MS-II Closed Loop Boost Control - PID
Thread Starter
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
Any of you guys having good luck with the new code? I'm just starting to fool around with it this week and was hoping to get a better starting off point with my PID values.
Currently I'm running:
Proportional Gain(%) - 130
Integral Gain(%) - 35
Differential Gain(%) - 60
It has been suggested in order to tune you should:
I have my boost targets set to 14.5psi, and I'm really close to hitting it initially but it's tapering off as the revs increase.

I assume I just need to starting increasing the I value until it stops tapering off, and maybe just increase P to hit a higher target.
Thought? Tips? Free Hugs?
(ignore my duty cycle values, as you can see I'm going crazy rich in boost on purpose)
Currently I'm running:
Proportional Gain(%) - 130
Integral Gain(%) - 35
Differential Gain(%) - 60
It has been suggested in order to tune you should:
First, turn off all I.
Second, Adjust P higher. Keep going higher until it gets close to your boost without overshooting (a little overshoot is OK here).
Once you get to this point, adjust the I term until the code will hold your target boost across the rev range.
Last, adjust the D term to get rid of any leftover overshoot, and to help with any oscillation that might pop up.
Second, Adjust P higher. Keep going higher until it gets close to your boost without overshooting (a little overshoot is OK here).
Once you get to this point, adjust the I term until the code will hold your target boost across the rev range.
Last, adjust the D term to get rid of any leftover overshoot, and to help with any oscillation that might pop up.
I assume I just need to starting increasing the I value until it stops tapering off, and maybe just increase P to hit a higher target.
Thought? Tips? Free Hugs?
(ignore my duty cycle values, as you can see I'm going crazy rich in boost on purpose)
Just as you said - I would adjust P a wee bit lower and then I a bit higher to keep it on the target. I really don't know about the D. (Didn't really do a lot to me)
My values at the moment are:
P= 105 I=48 D=150 (ignore that) - still seems to overshoot a bit but keeps quite good to the target.
Now give me a hug...
Greets
My values at the moment are:
P= 105 I=48 D=150 (ignore that) - still seems to overshoot a bit but keeps quite good to the target.
Now give me a hug...

Greets
Thread Starter
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
Here's what I don't like: Driving home I settle on P - 150 I - 40 and D - 60, holds 14.3psi flat in a 4th gear pull from 3K to 5.5K, looking good; my target is 14.5psi. Stop at a light, give it hell in second and it's only holding like 13psi...that's why I pulled my EBC in the first place...
Hmmm. Depending on the results you get tomorrow, looks like I might need to cough up the dough for an MS2 upgrade.... Oh, and while you are busy testing your car tomorrow, feel free to make some headway on that vband adapter. Gently prodding...gently prodding.
Here's what I don't like: Driving home I settle on P - 150 I - 40 and D - 60, holds 14.3psi flat in a 4th gear pull from 3K to 5.5K, looking good; my target is 14.5psi. Stop at a light, give it hell in second and it's only holding like 13psi...that's why I pulled my EBC in the first place...
If that overshoots in the beginning you could up the D value.
Thread Starter
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
Yeah I went the wrong way, mistaking P for I. I'm finished with P=110 I=53 D=47 by the time I got to work this morning, it's hitting my target then around 4K it starts to fade off. I'll keep at it but I don't have very many stretches of road where I can give it boost so it's going to take a while
Thread Starter
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
Thread Starter
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
Effects of increasing a parameter independently
Stole this from wiki, shows the relationship of increasing a value, should help for tuning if you understand these relationships.
also, looks like the tuning method I first posted is the Ziegler-Nichols method of tuning. Should be a good way to start from scratch, basically: Start with everything zeroed out. Then increase only P until you achieve your boost target, then increase I to hold the target throughout, and then increase D to remove initial overshoot and oscillation.
Code:
Prmtr Rise time Overshoot Settling time Steady-state error P Decrease Increase Small change Decrease I Decrease Increase Increase Large Decrease D Sm. decrease Sm. decrease Sm. decrease No effect
also, looks like the tuning method I first posted is the Ziegler-Nichols method of tuning. Should be a good way to start from scratch, basically: Start with everything zeroed out. Then increase only P until you achieve your boost target, then increase I to hold the target throughout, and then increase D to remove initial overshoot and oscillation.
Thread Starter
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
I suck at this. I cant do anything to get the boost from not tapering off. If I look on logs the Duty Cycle is "increasing" but I believe the settings in TS are set to "inverted," so I figure it's actually trying to dump boost off.
I guess I need to start from scratch with everything zeroed and work from there.
I just tried P=30 I=0 D=0 and It hit 16.5psi and tapered of to 13psi.
So I'll keep increasing P and work from there. It seems the P% value is too low and it's not reacting quick enough.
However, at same time P=107 I=75 D=45 let me hit 14psi (14.5 target), rising up to 15.5, then tapering off to 12psi. When I tried more I (100) it really didn't help the tapering off effect.
My wastegate holds 11psi flat right now. Would it be good to set a smaller open and closed % in the main parameters so it doesn't run the valve at such a large range? I probably need like 20-40% DC.
I guess I need to start from scratch with everything zeroed and work from there.
I just tried P=30 I=0 D=0 and It hit 16.5psi and tapered of to 13psi.
So I'll keep increasing P and work from there. It seems the P% value is too low and it's not reacting quick enough.
However, at same time P=107 I=75 D=45 let me hit 14psi (14.5 target), rising up to 15.5, then tapering off to 12psi. When I tried more I (100) it really didn't help the tapering off effect.
My wastegate holds 11psi flat right now. Would it be good to set a smaller open and closed % in the main parameters so it doesn't run the valve at such a large range? I probably need like 20-40% DC.






