MS-II Closed Loop Boost Control - PID
#21
Elite Member
iTrader: (1)
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,642
Total Cats: 42
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.
D dampens the response, P is to get to target as fast as possible and I is to stop overshoot.
#22
Boost Czar
Thread Starter
iTrader: (62)
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
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.
As far as D, I found it was also suggested to not be used for EGO as well:
+ 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).
#24
Boost Czar
Thread Starter
iTrader: (62)
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
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.
Well see after tonight. I'll have more time this weekend and actually get on a highway so i can **** around.
#25
Elite Member
iTrader: (1)
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,642
Total Cats: 42
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.
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.
#27
Boost Czar
Thread Starter
iTrader: (62)
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
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...
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...
#29
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.
#31
Boost Czar
Thread Starter
iTrader: (62)
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
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.
#32
Boost Czar
Thread Starter
iTrader: (62)
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
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.
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.
#34
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.
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.
#35
Boost Czar
Thread Starter
iTrader: (62)
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
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."
#37
Boost Czar
Thread Starter
iTrader: (62)
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
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.
#38
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
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
#39
Boost Czar
Thread Starter
iTrader: (62)
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
from ken:
this is my problem. Therefore normal polarity should be correct.
The algorithm is designed such that 0% duty should mean higher boost (closed wastegate) and 100% duty should mean lower boost (open wastegate).
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.
So higher number means less boost (100% means fully open wastegate), and lower number means more boost.
#40
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.