Notices
ECU Flash

PID boost control code

Thread Tools
 
Search this Thread
 
Old May 19, 2008 | 03:18 PM
  #31  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
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.
Reply
Old May 19, 2008 | 03:40 PM
  #32  
mrfred's Avatar
EvoM Guru
iTrader: (50)
 
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
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.
Reply
Old May 19, 2008 | 04:11 PM
  #33  
dan l's Avatar
Account Disabled
iTrader: (3)
 
Joined: Apr 2006
Posts: 1,029
Likes: 0
From: USA
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.
Reply
Old May 19, 2008 | 04:42 PM
  #34  
dan l's Avatar
Account Disabled
iTrader: (3)
 
Joined: Apr 2006
Posts: 1,029
Likes: 0
From: USA
Originally Posted by jcsbanks

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'm sorry, you are right in a purely mathematical sense. The stock ecu control will only make small corrections around the target boost. However in a real world application this is just fine. We aren't really going for spot on boost control but trying to keep it as close as possibly (about a psi or so I'd imagine).

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.
Reply
Old May 19, 2008 | 07:36 PM
  #35  
mrfred's Avatar
EvoM Guru
iTrader: (50)
 
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
Originally Posted by dan l
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.
I do mean P. As jcsb said, another way to tell is the stock BEC system is an I correction is that it keeps a running sum of the corrections that have been applied.

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.
Reply
Old May 19, 2008 | 08:06 PM
  #36  
tephra's Avatar
EvoM Guru
15 Year Member
iTrader: (6)
 
Joined: Feb 2007
Posts: 9,486
Likes: 67
From: Melbourne, Australia
John what I might do is expand the TargteBoost/BDEL table so that it has TPS as a input, as well as RPM...

That way people can have lower boost for lower TPS.. not really my thing but its been requested
Reply
Old May 20, 2008 | 12:59 AM
  #37  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
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.

Last edited by jcsbanks; May 20, 2008 at 01:03 AM.
Reply
Old May 20, 2008 | 01:02 AM
  #38  
RazorLab's Avatar
EvoM Guru
20 Year Member
Liked
Loved
Community Favorite
iTrader: (8)
 
Joined: Aug 2003
Posts: 14,094
Likes: 1,092
From: Mid-Hudson, NY
Originally Posted by dan l

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.
Do you have your WGDC correction interval set to 1 (from stock 10)? Set at 1 you should find that it reacts quite quickly to changes.

Last edited by razorlab; May 20, 2008 at 01:07 AM.
Reply
Old May 20, 2008 | 01:04 PM
  #39  
dan l's Avatar
Account Disabled
iTrader: (3)
 
Joined: Apr 2006
Posts: 1,029
Likes: 0
From: USA
Originally Posted by razorlab
Do you have your WGDC correction interval set to 1 (from stock 10)? Set at 1 you should find that it reacts quite quickly to changes.
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.

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.
Reply
Old May 20, 2008 | 01:24 PM
  #40  
mrfred's Avatar
EvoM Guru
iTrader: (50)
 
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
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.
Reply
Old May 20, 2008 | 09:06 PM
  #41  
RazorLab's Avatar
EvoM Guru
20 Year Member
Liked
Loved
Community Favorite
iTrader: (8)
 
Joined: Aug 2003
Posts: 14,094
Likes: 1,092
From: Mid-Hudson, NY
Originally Posted by dan l
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.
Have you tried the interval at 1, WGDC vs TPS at zero and fine tuning the error correction table? I've found using less upward/downward correction in the error table to work well, of course, depending on mods. Also a "buffer" around the 0 in the table helps as well.

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.
Reply
Old May 21, 2008 | 07:31 PM
  #42  
tephra's Avatar
EvoM Guru
15 Year Member
iTrader: (6)
 
Joined: Feb 2007
Posts: 9,486
Likes: 67
From: Melbourne, Australia
Hey All,

From peoples experience would you say than an additional 3% WGDC roughly equals an extra PSI of boost?

I am just trying to work out some good values for the P,I,D gains...
Reply
Old May 21, 2008 | 09:18 PM
  #43  
mrfred's Avatar
EvoM Guru
iTrader: (50)
 
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
I think it depends on the RPM. At 3500 RPM 3% will probably give 1 psi, but at 7000 RPM, 3% gets me almost nothing. :-)
Reply
Old May 21, 2008 | 10:25 PM
  #44  
dudical26's Avatar
Evolved Member
iTrader: (17)
 
Joined: Nov 2005
Posts: 2,544
Likes: 0
From: NNJ
Originally Posted by mrfred
I think it depends on the RPM. At 3500 RPM 3% will probably give 1 psi, but at 7000 RPM, 3% gets me almost nothing. :-)
It also depends a lot on the gear you are in and the turbo you have.

Assuming stock turbo and 3rd gear then I would say from around 3,500 to 6k 3% is about 1psi.
Reply
Old May 21, 2008 | 10:37 PM
  #45  
tephra's Avatar
EvoM Guru
15 Year Member
iTrader: (6)
 
Joined: Feb 2007
Posts: 9,486
Likes: 67
From: Melbourne, Australia
definitely...

I am just having trouble at the moment because I am trying to simulate different P,I,D gains and their affect on the Output WGDC.

I was kinda hoping that 1 P,I,D would fit all, but I think its going to be a case of every car is different :\
Reply



All times are GMT -7. The time now is 05:21 PM.