MEGAsquirt A place to collectively sort out this megasquirt gizmo

MS-II Closed Loop Boost Control - PID

Thread Tools
 
Search this Thread
 
Old 01-26-2010, 09:32 AM
  #1  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default MS-II Closed Loop Boost Control - PID

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:
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.
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)
Braineack is offline  
Old 01-26-2010, 10:48 AM
  #2  
Miotta FTW!
iTrader: (24)
 
Splitime's Avatar
 
Join Date: Jun 2006
Location: Chicagoland, IL
Posts: 4,290
Total Cats: 31
Default

Free hug.
Splitime is offline  
Old 01-26-2010, 10:50 AM
  #3  
Elite Member
 
Zaphod's Avatar
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,553
Total Cats: 101
Default

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
Zaphod is offline  
Old 01-26-2010, 10:54 AM
  #4  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

what solenoid are you using?
Braineack is offline  
Old 01-26-2010, 12:44 PM
  #5  
Elite Member
 
Zaphod's Avatar
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,553
Total Cats: 101
Default

The GM one DIY used to sell...
Zaphod is offline  
Old 01-26-2010, 12:56 PM
  #6  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

I'm using the new one they sell, wonder how much that comes into play? what freq Hz?
Braineack is offline  
Old 01-26-2010, 04:34 PM
  #7  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

'D' should stay off until the boost is within 2-3 psi of target.
Ditto for 'I'.
JasonC SBB is offline  
Old 01-26-2010, 04:54 PM
  #8  
Elite Member
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,976
Total Cats: 355
Default

Out of curiosity, at what RPM does the boost taper off?

Jim
Reverant is offline  
Old 01-26-2010, 05:22 PM
  #9  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

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...
Braineack is offline  
Old 01-26-2010, 06:17 PM
  #10  
Elite Member
iTrader: (6)
 
kenzo42's Avatar
 
Join Date: Sep 2007
Location: CA
Posts: 2,016
Total Cats: 13
Default

~*xoxo*~
kenzo42 is offline  
Old 01-26-2010, 06:27 PM
  #11  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

oh wait it could be because I raised P between the two 5 points. will try again in the morninz
Braineack is offline  
Old 01-26-2010, 06:40 PM
  #12  
Elite Member
iTrader: (10)
 
Jeff_Ciesielski's Avatar
 
Join Date: Oct 2008
Location: Rhode Island
Posts: 1,770
Total Cats: 31
Default

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.
Jeff_Ciesielski is offline  
Old 01-26-2010, 08:25 PM
  #13  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

do more pm'ing and sending me money.
Braineack is offline  
Old 01-27-2010, 02:11 AM
  #14  
Elite Member
 
Zaphod's Avatar
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,553
Total Cats: 101
Default

Originally Posted by Braineack
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...
Why would you up the P value - I think you should maybe stay at 130 (that was what you had in your first post and go with a higher I (like 40-45).

If that overshoots in the beginning you could up the D value.
Zaphod is offline  
Old 01-27-2010, 08:35 AM
  #15  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

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
Braineack is offline  
Old 01-27-2010, 09:10 AM
  #16  
Senior Member
iTrader: (6)
 
TrickerZ's Avatar
 
Join Date: Jul 2007
Location: Cocoa Beach, FL
Posts: 850
Total Cats: 16
Default

That's why they invented the U-turn
TrickerZ is offline  
Old 01-27-2010, 09:24 AM
  #17  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

Originally Posted by TrickerZ
That's why they invented the U-turn
There are more police per square mile here than Mexicans in Mexico America, I try not to push my luck.
Braineack is offline  
Old 01-27-2010, 11:18 AM
  #18  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

Effects of increasing a parameter independently

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
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.
Braineack is offline  
Old 01-27-2010, 12:16 PM
  #19  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

The function of 'D' is to allow more 'P' without overshoot or oscillation. More 'P' will result in faster response.
JasonC SBB is offline  
Old 01-27-2010, 01:51 PM
  #20  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

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.
Braineack is offline  


Quick Reply: MS-II Closed Loop Boost Control - PID



All times are GMT -4. The time now is 08:14 AM.