MS-II Closed Loop Boost Control - PID - Miata Turbo Forum - Boost cars, acquire cats.

Welcome to Miataturbo.net   Members
 


MEGAsquirt A place to collectively sort out this megasquirt gizmo

Reply
 
 
 
LinkBack Thread Tools
Old 01-26-2010, 10:32 AM   #1
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,899
Total Cats: 1,792
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:
Quote:
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   Reply With Quote
Old 01-26-2010, 11:48 AM   #2
Miotta FTW!
iTrader: (24)
 
Splitime's Avatar
 
Join Date: Jun 2006
Location: Chicagoland, IL
Posts: 4,295
Total Cats: 26
Default

Free hug.
Splitime is offline   Reply With Quote
Old 01-26-2010, 11:50 AM   #3
Senior Member
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,497
Total Cats: 81
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   Reply With Quote
Old 01-26-2010, 11:54 AM   #4
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,899
Total Cats: 1,792
Default

what solenoid are you using?
Braineack is offline   Reply With Quote
Old 01-26-2010, 01:44 PM   #5
Senior Member
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,497
Total Cats: 81
Default

The GM one DIY used to sell...
Zaphod is offline   Reply With Quote
Old 01-26-2010, 01:56 PM   #6
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,899
Total Cats: 1,792
Default

I'm using the new one they sell, wonder how much that comes into play? what freq Hz?
Braineack is offline   Reply With Quote
Old 01-26-2010, 05:34 PM   #7
Elite Member
 
Join Date: Jul 2005
Posts: 6,454
Total Cats: 80
Default

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

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

Jim
Reverant is offline   Reply With Quote
Old 01-26-2010, 06:22 PM   #9
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,899
Total Cats: 1,792
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   Reply With Quote
Old 01-26-2010, 07:17 PM   #10
Elite Member
iTrader: (6)
 
Join Date: Sep 2007
Location: CA
Posts: 1,990
Total Cats: 9
Default

~*xoxo*~
kenzo42 is offline   Reply With Quote
Old 01-26-2010, 07:27 PM   #11
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,899
Total Cats: 1,792
Default

oh wait it could be because I raised P between the two 5 points. will try again in the morninz
Braineack is offline   Reply With Quote
Old 01-26-2010, 07:40 PM   #12
Elite Member
iTrader: (10)
 
Join Date: Oct 2008
Location: Seattle, Wa
Posts: 1,780
Total Cats: 30
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   Reply With Quote
Old 01-26-2010, 09:25 PM   #13
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,899
Total Cats: 1,792
Default

do more pm'ing and sending me money.
Braineack is offline   Reply With Quote
Old 01-27-2010, 03:11 AM   #14
Senior Member
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,497
Total Cats: 81
Default

Quote:
Originally Posted by Braineack View Post
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   Reply With Quote
Old 01-27-2010, 09:35 AM   #15
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,899
Total Cats: 1,792
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   Reply With Quote
Old 01-27-2010, 10:10 AM   #16
Senior Member
iTrader: (6)
 
Join Date: Jul 2007
Location: Cocoa Beach, FL
Posts: 808
Total Cats: 3
Default

That's why they invented the U-turn
TrickerZ is offline   Reply With Quote
Old 01-27-2010, 10:24 AM   #17
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,899
Total Cats: 1,792
Default

Quote:
Originally Posted by TrickerZ View Post
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   Reply With Quote
Old 01-27-2010, 12:18 PM   #18
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,899
Total Cats: 1,792
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   Reply With Quote
Old 01-27-2010, 01:16 PM   #19
Elite Member
 
Join Date: Jul 2005
Posts: 6,454
Total Cats: 80
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   Reply With Quote
Old 01-27-2010, 02:51 PM   #20
Boost Czar
Thread Starter
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,899
Total Cats: 1,792
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   Reply With Quote
 
 
Reply

Related Topics
Thread Thread Starter Forum Replies Last Post
Project Gemini - Turbo Civic on the Cheap Full_Tilt_Boogie Build Threads 59 12-15-2017 09:00 PM
Another Cast Manifold Corky Bell Prefabbed Turbo Kits 18 11-22-2016 10:01 PM
Going back to stock. Need some 1.6 parts. Trent WTB 2 10-01-2015 01:15 PM
Time to start learning and play with tuning The Gleas MEGAsquirt 3 10-01-2015 10:30 AM
Bad head gasket or ? shooterschmidty Engine Performance 8 09-30-2015 11:28 PM


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 10:16 AM.