MS-II Closed Loop Boost Control - PID
#162
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
Jason, when you select closed loop boost control in tunerstudio, it disables the dutycycle table used for open loop and ENables a table that has boost targets and the axes are throttle% and RPM.
#163
http://bestune.50megs.com/typeABC.files/image008.gif
Which has not actually had the setpoint removed from P, only D. (Notice that P is still Kp * [e(k) - e(k - 1)], set point is part of error by definition, so set point is part of the P term)
His type C loop below the type B one has setpoint removed from both P and D (and is what I use for my closed loop idle algorithm).
You didn't cripple the algorithm for everyone else, just for this one guy, did you?
Ken
Last edited by muythaibxr; 01-10-2011 at 05:49 PM.
#164
I treat 0% as closed wastegate and 100% as open wastegate.
When not in boost and upon entry to boost, the duty is 0% (closed wastegate). Then as soon as you enter boost, PID engages and starts opening the wastegate depending on your settings. For most that I've tuned this has been fine, and I suspect that even for djp once his PID numbers are dialed in, it should work fine.
The setting I'm adding for djp allows PID to stay disengaged until you're x kPa from the target, essentially keeping the wastegate closed up until that point, which should make it possible to get a faster spool than possible if it starts controlling as soon as you enter boost.
One thing people should do on here though is make sure that you know what duty actually affects boost. So what duty do you have to hit before you see it affect boost?
If you see it affect boost immediately at 0-1%, then 0% is the proper closed duty. If you have to get to 20-30 % before it affects boost, then that should be used for the "closed" value.
Tuning that will allow you to more accurately tune the P term for good response and fast spool.
Ken
#166
I think with the new setting you will have to tune the PID to perfection, then slowly play increase PID engagement point until there is no overshoot.
This in effect is creating an artificially low P term since low P increases spool.
How fast can the algorithm respond? If I have the PID engage a fraction of a sec before target, will it be able to bleed off the new volume of air to stay at target?
What values will we be controlling for the PID engagement term?
Is what I am asking making any sense?
I'm thinking that if we know the inherent delay in the system, electronic and mechanical. Shouldn't we be able to adjust a value that represents the amount of time the PID algorithm needs to respond in order to hit target without overshoot? If you know the delay for one turbo, you change to a larger turbo, then the PID delay would increase by the ratio of the large turbo flow volume/ small turbo flow volume.
This in effect is creating an artificially low P term since low P increases spool.
How fast can the algorithm respond? If I have the PID engage a fraction of a sec before target, will it be able to bleed off the new volume of air to stay at target?
What values will we be controlling for the PID engagement term?
Is what I am asking making any sense?
I'm thinking that if we know the inherent delay in the system, electronic and mechanical. Shouldn't we be able to adjust a value that represents the amount of time the PID algorithm needs to respond in order to hit target without overshoot? If you know the delay for one turbo, you change to a larger turbo, then the PID delay would increase by the ratio of the large turbo flow volume/ small turbo flow volume.
Last edited by miatauser884; 01-10-2011 at 07:58 PM.
#167
here is my open loop table for 20psi. Obviously this is not going to work if I use this for 15psi
[IMG][/IMG]
#169
I guess just put an rpm based delay. Simple, and trial and error will dedicate the appropriate delay point. Fully tune the PID algorithm. Then keep increasing the PID delay rpm. When it overshoots, you've gone too far. Those that are really gung ho could start to tweak their P term again to gain the maximum delay rpm and hopefully fastest spool.
I like this idea, I'm not a fan of using open loop.
Sorry about not responding on the msextra forum it doesn't seem to be migrating over. At least I put a link to this thread over there.
I like this idea, I'm not a fan of using open loop.
Sorry about not responding on the msextra forum it doesn't seem to be migrating over. At least I put a link to this thread over there.
#170
This in effect is creating an artificially low P term since low P increases spool.
How fast can the algorithm respond? If I have the PID engage a fraction of a sec before target, will it be able to bleed off the new volume of air to stay at target?
What values will we be controlling for the PID engagement term?
Is what I am asking making any sense?
I'm thinking that if we know the inherent delay in the system, electronic and mechanical. Shouldn't we be able to adjust a value that represents the amount of time the PID algorithm needs to respond in order to hit target without overshoot?
If you know the delay for one turbo, you change to a larger turbo, then the PID delay would increase by the ratio of the large turbo flow volume/ small turbo flow volume.
Ken
#171
I guess just put an rpm based delay. Simple, and trial and error will dedicate the appropriate delay point. Fully tune the PID algorithm. Then keep increasing the PID delay rpm. When it overshoots, you've gone too far. Those that are really gung ho could start to tweak their P term again to gain the maximum delay rpm and hopefully fastest spool.
I like this idea, I'm not a fan of using open loop.
Sorry about not responding on the msextra forum it doesn't seem to be migrating over. At least I put a link to this thread over there.
Ken
#172
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
ken, is there a way to make a minimal psi boost trace with a closed wastegate and then have it wide open at 5 psi so you get a known spool profile?
obviously the BC doesn't have to do anything but hold the gate closed until there's positive pressure and then start controlling as it increases above 0psi.
obviously the BC doesn't have to do anything but hold the gate closed until there's positive pressure and then start controlling as it increases above 0psi.
#175
This is what the 'D' term is for. It implements what is called a "lead compensator". The lead compensator can be described in terms of *time*. In my car, it needed to be between 200 and 300 ms. This is actually also the lead time the solenoid needs - IOW as boost approaches target and it's ramping up, if you draw a straight line to the target, the duty cycle needs to begin opening the wastegate ~250 ms before it would hit target had the boost climb been maintained.
#176
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
In order to build a duty cycle table that is optimum for spool, you need to know how fast the turbo spools, right? There's no point in raising duty cycle before the turbo is above a certain MAP threshold.
I was just wondering if there was a way to have the MS "learn" your turbo's spool profile and generate a rough open loop duty cycle table based on it.
Then use that duty table as the basis for PID.
#177
Agreed. Having to get the 'I' to slew through the deadband of 0-20% (in your example), adds to the windup problem. FWIW in the AEM, the problem is mitigated by using 3D open loop tables (which then start at 20%), then clipping the 'I' portion to +/- 5 or 7%.
Last edited by JasonC SBB; 01-11-2011 at 09:42 PM.
#179
Keep in mind that my algorithm considers 0% to be closed wastegate not open (like yours seems to), so duty ramping up is the equivalent of reducing boost not increasing it.
I treat 0% as closed wastegate and 100% as open wastegate.
When not in boost and upon entry to boost, the duty is 0% (closed wastegate). Then as soon as you enter boost, PID engages and starts opening the wastegate depending on your settings.
I treat 0% as closed wastegate and 100% as open wastegate.
When not in boost and upon entry to boost, the duty is 0% (closed wastegate). Then as soon as you enter boost, PID engages and starts opening the wastegate depending on your settings.
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.
#180
I'm trying to overcomplicate things!
In order to build a duty cycle table that is optimum for spool, you need to know how fast the turbo spools, right? There's no point in raising duty cycle before the turbo is above a certain MAP threshold.
I was just wondering if there was a way to have the MS "learn" your turbo's spool profile and generate a rough open loop duty cycle table based on it.
Then use that duty table as the basis for PID.
In order to build a duty cycle table that is optimum for spool, you need to know how fast the turbo spools, right? There's no point in raising duty cycle before the turbo is above a certain MAP threshold.
I was just wondering if there was a way to have the MS "learn" your turbo's spool profile and generate a rough open loop duty cycle table based on it.
Then use that duty table as the basis for PID.
I do think that my "delay PID control until x kPa from target" feature will help though.
This is another one I'm willing to meet up to try things with. I personally don't have a turbo car (I'm actually going to be working on fixing that situation by putting a turbo engine/tranny/diff/etc.. in my rx7, hopefully this summer), but if I can meet up with someone who has one and doesn't mind letting me tinker a bit, I can try all my ideas out at once, and just load new code for every idea.
Ken
Last edited by muythaibxr; 01-12-2011 at 10:49 AM.