PID boost control code
#31
Evolved Member
Thread Starter
http://www.expertune.com/artCE87.html looks an interesting article that I want to read after some sleep... came across it by searching for 1/d and PID, it seems to mention 1/d being used to determine the timebase, but their featured PID equations don't have 1/d as their derivative factor. If they did the sign would need to be swapped around?
As far as I've seen you can't remove offsets (in the way the stock ECU seems to) with anything except integral gain. Proportional leaves a steady state offset, and the derivative disappears to 0.
I've had a quick look again at the code, but reached no quick conclusion.
As far as I've seen you can't remove offsets (in the way the stock ECU seems to) with anything except integral gain. Proportional leaves a steady state offset, and the derivative disappears to 0.
I've had a quick look again at the code, but reached no quick conclusion.
#32
EvoM Guru
iTrader: (50)
The stock system is pretty much an I system. It does do a time-based sum, but the measurement points are more descrete than what people might typically imagine for an I correction.
The easiest way to see that the stock system has no P correction is that there is nothing that allows for the WGDC to change during initial spool up. The WGDC just sits at the BWGDC value until an I correction is fed into the WGDC value. The BWGDC curve works in place of the P correction.
I think the greatest value in adding a P correction is that it makes for faster spool by allowing the system to sit at 100% WGDC until the boost approaches the target value.
Before I would add a P correction, I'd convert the BWGDC vs RPM curve into a BWGDC vs RPM and TPS curve. People really seem to want this as it allows for the engine to have a more progressive response to throttle action. Its probably easier on the turbo as well. Plus, I think its necessary to deal with part throttle boost with a P correction.
The easiest way to see that the stock system has no P correction is that there is nothing that allows for the WGDC to change during initial spool up. The WGDC just sits at the BWGDC value until an I correction is fed into the WGDC value. The BWGDC curve works in place of the P correction.
I think the greatest value in adding a P correction is that it makes for faster spool by allowing the system to sit at 100% WGDC until the boost approaches the target value.
Before I would add a P correction, I'd convert the BWGDC vs RPM curve into a BWGDC vs RPM and TPS curve. People really seem to want this as it allows for the engine to have a more progressive response to throttle action. Its probably easier on the turbo as well. Plus, I think its necessary to deal with part throttle boost with a P correction.
#33
Account Disabled
iTrader: (3)
Join Date: Apr 2006
Location: USA
Posts: 1,029
Likes: 0
Received 0 Likes
on
0 Posts
mrfred are you using P instead of D or do you really mean P in your post (Proportional)? If I replace D in your above post I agree.
Anyways I tried using the TPS vs WGDC map in the current stuff and it really monkies with it. Basically you partial throttle and then when you go to slam the gas the WGDC (that had a % taken out) slowly drifts towards the BWGDC table. So basically it takes a second or so to go from low boost to target boost.
Anyways I tried using the TPS vs WGDC map in the current stuff and it really monkies with it. Basically you partial throttle and then when you go to slam the gas the WGDC (that had a % taken out) slowly drifts towards the BWGDC table. So basically it takes a second or so to go from low boost to target boost.
#34
Account Disabled
iTrader: (3)
Join Date: Apr 2006
Location: USA
Posts: 1,029
Likes: 0
Received 0 Likes
on
0 Posts
EDIT:
Also if you read that link that you posted pay attention to what the author says about derivative control. The high frequency stuff is what will be causing us issues with the jumpy JDM MAP signal. We will have to filter the D or just eliminate it after target boost is reached (that would be ideal). If I wanted to use D in the field on a jumpy system (like boost control) I would probably start experimenting with capacitors on the input sensor. I actually did this on a paper tension system with great success.
Also it looks like I is the value that is inverted in feedback diagrams. 1/I and not D, I don't think.
Last edited by dan l; May 19, 2008 at 04:51 PM.
#35
EvoM Guru
iTrader: (50)
mrfred are you using P instead of D or do you really mean P in your post (Proportional)? If I replace D in your above post I agree.
Anyways I tried using the TPS vs WGDC map in the current stuff and it really monkies with it. Basically you partial throttle and then when you go to slam the gas the WGDC (that had a % taken out) slowly drifts towards the BWGDC table. So basically it takes a second or so to go from low boost to target boost.
Anyways I tried using the TPS vs WGDC map in the current stuff and it really monkies with it. Basically you partial throttle and then when you go to slam the gas the WGDC (that had a % taken out) slowly drifts towards the BWGDC table. So basically it takes a second or so to go from low boost to target boost.
Yeah, I'm not surprised that the Max WGDCC vs TPS did not work exactly as hoped.
Last edited by mrfred; May 19, 2008 at 08:19 PM.
#37
Evolved Member
Thread Starter
The 1/I for the gain looks to be the formal way to do it. I think in the ECU it might be a little easier to do mul rather than div with integer math and just use I.
However, if we are thinking that the ECU is already a variable gain I and we're worried about D because of noise and instability, why not work with the stock system and think about adding P? I wonder if P is needed because a duty cycle of say 50% will give a similar wastegate position to 100% until the turbo is near to target and reduce the chance of overshoot? There is some gear-coefficient stuff in there we might be able to adapt to give it a kick in lower gears.
However, if we are thinking that the ECU is already a variable gain I and we're worried about D because of noise and instability, why not work with the stock system and think about adding P? I wonder if P is needed because a duty cycle of say 50% will give a similar wastegate position to 100% until the turbo is near to target and reduce the chance of overshoot? There is some gear-coefficient stuff in there we might be able to adapt to give it a kick in lower gears.
Last edited by jcsbanks; May 20, 2008 at 01:03 AM.
#38
EvoM Guru
iTrader: (8)
Anyways I tried using the TPS vs WGDC map in the current stuff and it really monkies with it. Basically you partial throttle and then when you go to slam the gas the WGDC (that had a % taken out) slowly drifts towards the BWGDC table. So basically it takes a second or so to go from low boost to target boost.
Last edited by razorlab; May 20, 2008 at 01:07 AM.
#39
Account Disabled
iTrader: (3)
Join Date: Apr 2006
Location: USA
Posts: 1,029
Likes: 0
Received 0 Likes
on
0 Posts
mrfred, I'm apparently looking at the stock system much different than everybody else. I'm forcing the stock code to act like something I'm comfortable with, a PI controller. I'm happy with my boost control right now but would embrace a true PID system.
At any rate, the exciting part is, once we get a solid system down the next logical step is speed and/or gear related boost control for those of us who fight traction in the lower gears and/or want to protect the drivetrain. Doing all the code in the stock computer should work out extremely well.
#40
EvoM Guru
iTrader: (50)
I hear quite a few people talking about having difficulty with the boost overshoot. Makes me wonder if a smaller pill at the tee is not the way to go. Can't say for sure though because razorlab seems to be able to make the restrictor pill method work very well, and I've never tried the restrictor pill method.
#41
EvoM Guru
iTrader: (8)
I have it set to 3 and I might move it higher yet. The reason I have it set higher is that I don't want it freaking out on the boost overshoot. I'm fine with that, it helps get the car moving. If I move the intervel too low then the ecu starts trying to fight the overshoot and I get an overshoot, then undershoot and this is extremely undesirable.
Of course the GM 3 port in conjunction with the above really makes things much tighter as well as it is much quicker reacting then the stock solenoid with upgraded pill.