MS-II Closed Loop Boost Control - PID
#181
So you're essentially initializing I to be = P, and the CO at "closed" 'gate.
A potential issue I see, is massive overshoot when the driver, while at WOT at some high RPM, quickly lifts then floors it again - the turbine will still have a lot of RPM, and the PID will be initialized at 0 duty / closed wastegate. This test was a benchmark for me while tuning my AEM + D circuit. It'll show to a lesser extent at a fast upshift at redline. I tolerate 0.5 psi.
Ken
#182
Your description, not others' problems.
I wasn't clear. What I meant was that your calcs is the same as doing a "normal" PID wherein the I output is initialized to -P, so that the sum, CO, is zero. (or 20 if that's where the solenoid starts to affect boost)
Correct.
Yes but if done quickly enough the turbo shaft still has a lot of RPM.
I is actually initialized to 0 correction. As is P explicitly in the code. Neither of them does anything until the error is determined. CO is initialized at 0 most of the time.
That could only happen theoretically if the driver lifts enough to get back out of boost (like a complete lift),
but in practice, I've seen quite a few datalogs that don't have that problem because while in boost, when the driver lifts, the wastegate ends up getting opened completely before closing once out of boost. <due to D>
#183
OK, so again, I don't see where there's a problem. In practice, many have gotten the algorithm to spool their turbos quite fast. Additionally, I'm willing to work with local guys at making it better, first by helping tune, and second by adding code if necessary.
I would want to see a datalog to be sure that this particular issue is really a problem.. For the ones I have tuned it hasn't been since the P term sees the change in target when the driver lifts, and essentially fully opens the wastegate, which causes the turbo to slow down enough that overshoot when the throttle is applied again isn't a problem.
I'm open to making changes to the algorithm if they'll really help, but only if they're necessary.
Ken
Yes but if done quickly enough the turbo shaft still has a lot of RPM.
I'm open to making changes to the algorithm if they'll really help, but only if they're necessary.
Ken
#185
Update: I've started to do a few pulls to retune my boost control following the correct procedure. I running into the problem where it takes a long time to get up to target because i'm tuning P only with no I-term. If I make the I=1, will that be enough for it to start trying to ramp up more quickly? I like doing pulls in 5th gear (6 sp), is there anything wrong with doing them in fourth? I changed P from 37 to 35 and really didn't see much of a change other than it took longer to reach target. It overshoots by almost 1 psi, the oscillates with an amplitude of about .5 psi around target.
I guess the real question is: Would it be better to initially tune with a small value for I while adjusting the P value? Then start the procedure we discussed earlier for adjusting I and D
I guess the real question is: Would it be better to initially tune with a small value for I while adjusting the P value? Then start the procedure we discussed earlier for adjusting I and D
#186
I'm thinking that we might want to do this in stages to get everything right for you. I think you're going to need a lot less P and a bit more D to get the kind of spool you want.
I would go ahead and tune your I term to get you to and keep you at the target without overshoot or oscillation.
Then gradually lower P and raise D until it starts spooling quicker.
I would raise D in smaller increments than you lower D.
Ken
I would go ahead and tune your I term to get you to and keep you at the target without overshoot or oscillation.
Then gradually lower P and raise D until it starts spooling quicker.
I would raise D in smaller increments than you lower D.
Ken
#187
I'm thinking that we might want to do this in stages to get everything right for you. I think you're going to need a lot less P and a bit more D to get the kind of spool you want.
I would go ahead and tune your I term to get you to and keep you at the target without overshoot or oscillation.
Then gradually lower P and raise D until it starts spooling quicker.
I would raise D in smaller increments than you lower D.
Ken
I would go ahead and tune your I term to get you to and keep you at the target without overshoot or oscillation.
Then gradually lower P and raise D until it starts spooling quicker.
I would raise D in smaller increments than you lower D.
Ken
stage one was: lower P until you get 1-2 psi overshoot?
stage two: increase I until target is maintained
stage three: increase D until overshoot is gone.
I really want to continue tuning P first, but it appears that it needs some minimum value of I so that it tries to ramp to target in a reasonable amount of time.
Currently it takes so long to ramp to target that i am exceeding the speed limit by a significant margin.
If I start tuning I and P at the same time, I'm afraid I will not find the optimum value of P ( P will end up being too high).
Maybe when tuning P we all need to start with and I value of 10-20.
Here is my current plan: Increae I just enough to get some spool back. Continue to lower P until it overshoots target by 1-2 psi. By being less aggressive with I, it should minimize I's overshoot contribution to P.
Increase I until target is maintained
Then adjust D to decrease overshoot.
Possibly adjusting P a little along the way.
#190
Yeah, I think the P term is just too high.. When I last tuned someone's boost control, a P term of 9 was enough to make it hit the target (in less than a second) and then only overshoot slightly. Once I added some I term, I had to raise the P-term to 30+ to help the overshoot. I raised it to there and then began removing P term and adding D term until it spooled quickly with little or no overshoot.
We may also want to figure out what duty actually causes boost to change using open loop. I'm talking about do a run at 0%, watch how fast it spools, do a run at 5%, does that affect spool rate? If not, try 10%, etc. until you find the duty that affects spool rate. Once you find that, set the "closed duty" to that and retune PID. This should allow you to set better PID numbers and get a better spool rate with PID engaged.
Ken
We may also want to figure out what duty actually causes boost to change using open loop. I'm talking about do a run at 0%, watch how fast it spools, do a run at 5%, does that affect spool rate? If not, try 10%, etc. until you find the duty that affects spool rate. Once you find that, set the "closed duty" to that and retune PID. This should allow you to set better PID numbers and get a better spool rate with PID engaged.
Ken
#191
I've done some tuning the past couple of days,a nd I still feel that tuning PID is not straight forward. The I-term especially. I adjusted P until I got a couple of PSI overshoot. I increased I-term until it maintained target pretty consistently. This got me an I-term of 105 iirc. Then I tuned the D term. Then, for kicks I reduced the I-term to 45. Results were good. What's the deal? There has to be an upper limit for I-term that beyond it doesn't help much.
With all of than said. I think my main issue is an unported internal WG. I think my graph will only get so stable.
This graph is with a P-23, I-45, and D-160
If I'm cruising at 4k rpm in 5th (6sp) and do a pull. It goes from 0-17psi in 1s and ~400rpm.
If I want to deal with 2psi of overshoot I can make the ramp up curve look almost vertical.
I am going to bump the I-term to 50 and see if I notice the curve stabilize.
Some of the best results came from just adjusting the "control interval" I've got it set to 23ms.
At what point does raising the D-term stop doing anything. I haven't taken it higher than 160. I have to make very large D-term adjustments to lower P-term
With all of than said. I think my main issue is an unported internal WG. I think my graph will only get so stable.
This graph is with a P-23, I-45, and D-160
If I'm cruising at 4k rpm in 5th (6sp) and do a pull. It goes from 0-17psi in 1s and ~400rpm.
If I want to deal with 2psi of overshoot I can make the ramp up curve look almost vertical.
I am going to bump the I-term to 50 and see if I notice the curve stabilize.
Some of the best results came from just adjusting the "control interval" I've got it set to 23ms.
At what point does raising the D-term stop doing anything. I haven't taken it higher than 160. I have to make very large D-term adjustments to lower P-term
#195
Boost Czar
Thread Starter
iTrader: (62)
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,498
Total Cats: 4,080
looks like he hit it around 4000RPM. Nice linear boost increase, but I agree, the valve is opening slightly before the target it hit...but I doubt it's really negating spool.
#196
4000rpm is when I hit it. It only takes 1 second to get to 17psi. I don't know how much faster I can make it spool. Decreasing P-term one point starts to get me a 1psi overshoot. I'm wondering if this is the nature of the beast with an unported interanl WG. I'm not sure how high you can go with D-term before you aren't doing anything.
I pulled quite a bit of timign while doing this. If I noticed any bobble of the oil pressure gauge I pulled .5 degrees. I kept doing this until I didn't see any major movement. I'm not sure how good of a knock dectector the oil pressure gauge actually is, but I feel like I have a very safe tune.
I pulled quite a bit of timign while doing this. If I noticed any bobble of the oil pressure gauge I pulled .5 degrees. I kept doing this until I didn't see any major movement. I'm not sure how good of a knock dectector the oil pressure gauge actually is, but I feel like I have a very safe tune.