Notices
MEGAsquirt A place to collectively sort out this megasquirt gizmo

MS-II Closed Loop Boost Control - PID

Thread Tools
 
Search this Thread
 
Old Jan 26, 2010 | 09:32 AM
  #1  
Braineack's Avatar
Thread Starter
Boost Czar
iTrader: (62)
 
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
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)
Old Jan 26, 2010 | 10:48 AM
  #2  
Splitime's Avatar
Miotta FTW!
iTrader: (24)
 
Joined: Jun 2006
Posts: 4,290
Total Cats: 31
From: Chicagoland, IL
Default

Free hug.
Old Jan 26, 2010 | 10:50 AM
  #3  
Zaphod's Avatar
Elite Member
 
Joined: Mar 2006
Posts: 1,574
Total Cats: 106
From: Schwarzenberg, Germany
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
Old Jan 26, 2010 | 10:54 AM
  #4  
Braineack's Avatar
Thread Starter
Boost Czar
iTrader: (62)
 
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
Default

what solenoid are you using?
Old Jan 26, 2010 | 12:44 PM
  #5  
Zaphod's Avatar
Elite Member
 
Joined: Mar 2006
Posts: 1,574
Total Cats: 106
From: Schwarzenberg, Germany
Default

The GM one DIY used to sell...
Old Jan 26, 2010 | 12:56 PM
  #6  
Braineack's Avatar
Thread Starter
Boost Czar
iTrader: (62)
 
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
Default

I'm using the new one they sell, wonder how much that comes into play? what freq Hz?
Old Jan 26, 2010 | 04:34 PM
  #7  
JasonC SBB's Avatar
Elite Member
 
Joined: 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'.
Old Jan 26, 2010 | 04:54 PM
  #8  
Reverant's Avatar
Elite Member
iTrader: (10)
 
Joined: Jun 2006
Posts: 6,020
Total Cats: 369
From: Athens, Greece
Default

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

Jim
Old Jan 26, 2010 | 05:22 PM
  #9  
Braineack's Avatar
Thread Starter
Boost Czar
iTrader: (62)
 
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
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...
Old Jan 26, 2010 | 06:17 PM
  #10  
kenzo42's Avatar
Elite Member
iTrader: (6)
 
Joined: Sep 2007
Posts: 2,017
Total Cats: 13
From: CA
Default

~*xoxo*~
Old Jan 26, 2010 | 06:27 PM
  #11  
Braineack's Avatar
Thread Starter
Boost Czar
iTrader: (62)
 
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
Default

oh wait it could be because I raised P between the two 5 points. will try again in the morninz
Old Jan 26, 2010 | 06:40 PM
  #12  
Jeff_Ciesielski's Avatar
Elite Member
iTrader: (10)
 
Joined: Oct 2008
Posts: 1,770
Total Cats: 31
From: Rhode Island
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.
Old Jan 26, 2010 | 08:25 PM
  #13  
Braineack's Avatar
Thread Starter
Boost Czar
iTrader: (62)
 
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
Default

do more pm'ing and sending me money.
Old Jan 27, 2010 | 02:11 AM
  #14  
Zaphod's Avatar
Elite Member
 
Joined: Mar 2006
Posts: 1,574
Total Cats: 106
From: Schwarzenberg, Germany
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.
Old Jan 27, 2010 | 08:35 AM
  #15  
Braineack's Avatar
Thread Starter
Boost Czar
iTrader: (62)
 
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
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
Old Jan 27, 2010 | 09:10 AM
  #16  
TrickerZ's Avatar
Senior Member
iTrader: (6)
 
Joined: Jul 2007
Posts: 857
Total Cats: 21
From: Cocoa Beach, FL
Default

That's why they invented the U-turn
Old Jan 27, 2010 | 09:24 AM
  #17  
Braineack's Avatar
Thread Starter
Boost Czar
iTrader: (62)
 
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
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.
Old Jan 27, 2010 | 11:18 AM
  #18  
Braineack's Avatar
Thread Starter
Boost Czar
iTrader: (62)
 
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
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.
Old Jan 27, 2010 | 12:16 PM
  #19  
JasonC SBB's Avatar
Elite Member
 
Joined: 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.
Old Jan 27, 2010 | 01:51 PM
  #20  
Braineack's Avatar
Thread Starter
Boost Czar
iTrader: (62)
 
Joined: May 2005
Posts: 80,552
Total Cats: 4,368
From: Chantilly, VA
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.



All times are GMT -4. The time now is 05:48 AM.