MS-II Closed Loop Boost Control - PID - Page 2 - Miata Turbo Forum - Boost cars, acquire cats.

Welcome to Miataturbo.net   Members
 


MEGAsquirt A place to collectively sort out this megasquirt gizmo

Reply
 
 
 
LinkBack Thread Tools
Old 01-27-2010, 04:26 PM   #21
Elite Member
iTrader: (1)
 
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,658
Total Cats: 39
Default

Dunno if this helps but for closed loop idle tuning Ken recommends barely any 'D' term, and if you can none at all.

D dampens the response, P is to get to target as fast as possible and I is to stop overshoot.
richyvrlimited is offline   Reply With Quote
Old 01-27-2010, 04:39 PM   #22
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,900
Total Cats: 1,792
Default

I think my issue was staring with someone else's values. I'll start by increase P up until I've just hitting 15psi, probably need to be closer to 100, then I think I've always had I too high, so I'll start at 0 and go up and just do this **** right.

As far as D, I found it was also suggested to not be used for EGO as well:

Quote:
+ PID Derivative (%) (egoKD): This predicts the future difference between the AFR target and the set-point, based on the rate of change of the error at present. The larger the derivative term, the more rapidly the controller responds to changes in the process's output. However, for relatively slow processes, lower numbers mean more stable output, and a value of 0 is typical for MegaSquirt® (i.e., don't use the derivative term at all).
Thoughts on altering the open and closed % values? I see references to doing this as well... Since I'm only looking for about 4psi above my wastegate pressure with low duty cycles I figured it could help.
Braineack is offline   Reply With Quote
Old 01-27-2010, 04:56 PM   #23
Senior Member
iTrader: (2)
 
dc2696's Avatar
 
Join Date: May 2005
Location: Edmonton Ab, Canada
Posts: 1,176
Total Cats: 13
Default

No matter what I did to my ebc last year, it would fall off up top or super overboost, couldn't keep it consistant
dc2696 is offline   Reply With Quote
Old 01-27-2010, 04:59 PM   #24
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,900
Total Cats: 1,792
Default

It shouldn't since I don't get boost creep, I can run my MBC at 15psi without trouble, but I really want to activate my hi/low switch again.

Well see after tonight. I'll have more time this weekend and actually get on a highway so i can **** around.
Braineack is offline   Reply With Quote
Old 01-27-2010, 05:14 PM   #25
Elite Member
iTrader: (1)
 
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,658
Total Cats: 39
Default

Quote:
Originally Posted by Braineack View Post
I think my issue was staring with someone else's values. I'll start by increase P up until I've just hitting 15psi, probably need to be closer to 100, then I think I've always had I too high, so I'll start at 0 and go up and just do this **** right.

As far as D, I found it was also suggested to not be used for EGO as well:


Thoughts on altering the open and closed % values? I see references to doing this as well... Since I'm only looking for about 4psi above my wastegate pressure with low duty cycles I figured it could help.
I'd leave that till you've exhausted other options. a wider apart open and closed value will make the code more sensitive and vis-vesa
richyvrlimited is offline   Reply With Quote
Old 01-27-2010, 05:26 PM   #26
Elite Member
iTrader: (11)
 
Join Date: Feb 2009
Posts: 2,982
Total Cats: 10
Default

In to ride coat tails
miatauser884 is offline   Reply With Quote
Old 01-27-2010, 09:45 PM   #27
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,900
Total Cats: 1,792
Default

really, no matter what I do it tapers off up top. I'm pretty sure I found the good P value.

Here's P=140 I=10 D=5



now P=130 I=10 D=5



so the number between those two should net reach my boost target the best, now. I lowered the P to get more boost, then added a bunch of I to help the boost drop:

P=110 I=80 D=5



if you overlay the logs, the boost after around 5000RPM drops off the the exact same amount. What's really odd is the Boost Duty % number might be completely different. Look at the difference between the top two, one averages 70% the other 30%.





So I mean, it's obviously working cause it is increasing boost over my wastegate, but it doesn't make a lick of sense to me. If I just crank up the MBC I can hold 15psi all day long...

Braineack is offline   Reply With Quote
Old 01-27-2010, 11:31 PM   #28
Senior Member
iTrader: (2)
 
dc2696's Avatar
 
Join Date: May 2005
Location: Edmonton Ab, Canada
Posts: 1,176
Total Cats: 13
Default

Like I said, I ducked around all last summer with no sucess. I was advised to pickup an after market ebc but I Have no money for that fancy ****
dc2696 is offline   Reply With Quote
Old 01-28-2010, 12:55 AM   #29
Elite Member
 
Join Date: Jul 2005
Posts: 6,454
Total Cats: 80
Default

Quote:
Originally Posted by Braineack View Post
really, no matter what I do it tapers off up top.
Doesn't the software ask you to enter a "base duty cycle" table, which it will deliver even with the PID turned off? The idea is to get some base duty cycle going that gets you close, then the PID will speed the response, get it spot on, and correct for variations in outside factors like due to engine and ambient temperature.
JasonC SBB is offline   Reply With Quote
Old 01-28-2010, 03:34 AM   #30
Senior Member
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,497
Total Cats: 81
Default

@Brain - please post that at msextra.com I think Ken will be able to give you some advice.

Greets

Edit:
For comparsion:

That is how my setup looks with P=100 I=48 D=150 target is 165kPa



and with P=105 I=48 D=150 same target


Last edited by Zaphod; 01-28-2010 at 03:45 AM.
Zaphod is offline   Reply With Quote
Old 01-28-2010, 08:18 AM   #31
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,900
Total Cats: 1,792
Default

Quote:
Originally Posted by JasonC SBB View Post
Doesn't the software ask you to enter a "base duty cycle" table, which it will deliver even with the PID turned off? The idea is to get some base duty cycle going that gets you close, then the PID will speed the response, get it spot on, and correct for variations in outside factors like due to engine and ambient temperature.

the DC% table grays out if you select closed loop, I'll try getting a DC% table setup and then switch it back and see how that reacts.
Braineack is offline   Reply With Quote
Old 01-28-2010, 09:27 AM   #32
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,900
Total Cats: 1,792
Default

I set a DC% table, letting it target 40% below 5K and 60% above.

with p=140 i=120 d=5, it appears the code is working brilliantly.



As you can see, it hit around 40%DC and hit my target within .3psi, then started adding DC% where it hit 65% by the time I lifted. So it looks like it's really trying to do it's job but for some reason my solenoid isn't holding the boost up.

So I need to look into a few things, I know the wastegate can hold boost, I was hitting 17psi at redline last week. So either I plumbed my solenoid incorrectly, or there's some stupid setting that needs to be changed. The code is definitely closing the valve as i can easily go into overboost (17.5psi) if the P value is too low. So I'm wondering about this "inverted" value under boost control settings.

My valve, at least in MS-I, would run open at 0% and closed at 100%. If I put my DC% targets at 100% I would hit 20+psi at 4K.

So, in MS-II, the closed DC% value must be lower than the open DC% value in order to operate correctly. I have closed at 0% and open at 100%, and "inverted" selected for polarity.

But, it did an interesting thing when I tried just using DC% table, I had everything set to 0%, then 70% at 5K and 80% at 7K. I hit 15psi at 4800RPM, then it dropped off to 13psi as the DC% increased to 80%. This has me confused more. It's almost like it's working backwards, so I need to go out at lunch and try it with the polarity set as normal and see what happens.

Otherwise, if that doesn't work, I'll re-plumb my EBC and MBC and simply use the EBC for wastegate level of boost (fully open) and the MBC to run 15psi, which I was doing on my MS-I unit.
Braineack is offline   Reply With Quote
Old 01-28-2010, 09:54 AM   #33
Senior Member
iTrader: (6)
 
Join Date: Jul 2007
Location: Cocoa Beach, FL
Posts: 808
Total Cats: 3
Default

I think you're right Brain, if you look at the Boost vs DC on all your graphs, it looks like it perfectly matches your loss of boost. Maybe they never coded it to work inverted.
TrickerZ is offline   Reply With Quote
Old 01-28-2010, 10:09 AM   #34
Elite Member
iTrader: (11)
 
Join Date: Feb 2009
Posts: 2,982
Total Cats: 10
Default

Quote:
Originally Posted by Braineack View Post
I set a DC% table, letting it target 40% below 5K and 60% above.

with p=140 i=120 d=5, it appears the code is working brilliantly.



As you can see, it hit around 40%DC and hit my target within .3psi, then started adding DC% where it hit 65% by the time I lifted. So it looks like it's really trying to do it's job but for some reason my solenoid isn't holding the boost up.

So I need to look into a few things, I know the wastegate can hold boost, I was hitting 17psi at redline last week. So either I plumbed my solenoid incorrectly, or there's some stupid setting that needs to be changed. The code is definitely closing the valve as i can easily go into overboost (17.5psi) if the P value is too low. So I'm wondering about this "inverted" value under boost control settings.

My valve, at least in MS-I, would run open at 0% and closed at 100%. If I put my DC% targets at 100% I would hit 20+psi at 4K.

So, in MS-II, the closed DC% value must be lower than the open DC% value in order to operate correctly. I have closed at 0% and open at 100%, and "inverted" selected for polarity.

But, it did an interesting thing when I tried just using DC% table, I had everything set to 0%, then 70% at 5K and 80% at 7K. I hit 15psi at 4800RPM, then it dropped off to 13psi as the DC% increased to 80%. This has me confused more. It's almost like it's working backwards, so I need to go out at lunch and try it with the polarity set as normal and see what happens.

Otherwise, if that doesn't work, I'll re-plumb my EBC and MBC and simply use the EBC for wastegate level of boost (fully open) and the MBC to run 15psi, which I was doing on my MS-I unit.
I have it set to normal open is 0% and closed is 100% I think the normal and inverted setting flips the duty percent settings. At least that is my experience i.e. inverted in my situation would make 0% high boost and 100% low boost.
miatauser884 is offline   Reply With Quote
Old 01-28-2010, 10:21 AM   #35
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,900
Total Cats: 1,792
Default

Quote:
Originally Posted by djp0623 View Post
I have it set to normal open is 0% and closed is 100%
When I tired that the code failed to work. It rapdly oscillated between 0% and 100% and I would overboost at like 3200RPM. When reading msextra.com it was suggested that closed must be a lower DC% than open and to use "inverted."
Braineack is offline   Reply With Quote
Old 01-28-2010, 11:05 AM   #36
Elite Member
iTrader: (11)
 
Join Date: Feb 2009
Posts: 2,982
Total Cats: 10
Default

I did notice this oscillation on my last log. I've only just started trying closed loop. It seemed to work for open loop. So you have inverted selected and 100% open 0% closed? I'll give it a try today and see what results I get on a datalog.
miatauser884 is offline   Reply With Quote
Old 01-28-2010, 11:09 AM   #37
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,900
Total Cats: 1,792
Default

Quote:
Originally Posted by djp0623 View Post
So you have inverted selected and 100% open 0% closed?
Yes, but on my logs it seems to be doing exactly the opposite as what I want, even using open-loop mode. On my valve more DC% = more boost. I'm going change it to normal and see what happens. Didn't get a chance to try it before I got to work.
Braineack is offline   Reply With Quote
Old 01-28-2010, 11:17 AM   #38
Elite Member
iTrader: (11)
 
Join Date: Feb 2009
Posts: 2,982
Total Cats: 10
Default

What happens if you select normal, but don't change your duty percents?


Do me a favor a post your settings along with your results.

We can have

Inverted: closed 100%, open 0%
Normal: open 0%, closed 100%

Inverted: open 100%, closed 0%
Normal : open 0%, closed 100%

With my current closed loop settings i was over-boosting like crazy, and noticed the duty cycle oscillations Normal : open 0%, closed 100%, In closed loop it seems like these settings represent low duty cycle % less boost, high duty cycle % high boost. I though my closed loop problems were do to an untuned PID
miatauser884 is offline   Reply With Quote
Old 01-28-2010, 11:22 AM   #39
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,900
Total Cats: 1,792
Default

from ken:

Quote:
The algorithm is designed such that 0% duty should mean higher boost (closed wastegate) and 100% duty should mean lower boost (open wastegate).
Quote:
I wrote it in terms of the wastegate not the valve itself. If the wastegate is closed, you get more boost, and open you get less.

So higher number means less boost (100% means fully open wastegate), and lower number means more boost.
this is my problem. Therefore normal polarity should be correct.
Braineack is offline   Reply With Quote
Old 01-28-2010, 11:25 AM   #40
Elite Member
iTrader: (11)
 
Join Date: Feb 2009
Posts: 2,982
Total Cats: 10
Default

Quote:
Originally Posted by Braineack View Post
from ken:




this is my problem.
I read that as well, I thought keeping those settings and selecting inverted would make it so the duty tables were "normal" low duty low boost, high duty high boost. This did not seem to be the case. I then flipped the duty percent and left it as normal. Which seems to work for open loop, but obviously closed loop is more complex to control.
miatauser884 is offline   Reply With Quote
 
 
Reply

Related Topics
Thread Thread Starter Forum Replies Last Post
Project Gemini - Turbo Civic on the Cheap Full_Tilt_Boogie Build Threads 59 12-15-2017 09:00 PM
Another Cast Manifold Corky Bell Prefabbed Turbo Kits 18 11-22-2016 10:01 PM
Going back to stock. Need some 1.6 parts. Trent WTB 2 10-01-2015 01:15 PM
Time to start learning and play with tuning The Gleas MEGAsquirt 3 10-01-2015 10:30 AM
Bad head gasket or ? shooterschmidty Engine Performance 8 09-30-2015 11:28 PM


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 11:37 PM.