MEGAsquirt A place to collectively sort out this megasquirt gizmo

MS-II Closed Loop Boost Control - PID

Thread Tools
 
Search this Thread
 
Old 01-31-2012, 09:18 AM
  #201  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,490
Total Cats: 4,079
Default

yes.

First make sure the valve is working. Run it in open loop, tune the table so it's running 50% or so when you're idling and make sure it's clicking.

Now, read the manual on how to tune the PID algorithm.




the most simple way ill explain it.

set PID to P - 200 | I - 0 | D -0

spool the turbo, lower P until you breach your KPA target, just worry about boost onset, dont hold the RPMs. Use 2nd gear.

Once you just breach the boost target, increase I until you can hold the boost to redline. You may have to tweak P a little as it will effect it.

Increase D to try to remove any overshoot on spool-up and any oscillation.
Braineack is offline  
Old 01-31-2012, 01:29 PM
  #202  
Senior Member
iTrader: (3)
 
90 Turbo's Avatar
 
Join Date: Sep 2011
Location: Plano TX
Posts: 595
Total Cats: -1
Default

Are these the instructions you are referring to Brain I dont find these very help full what am I missing?




The Solenoid Frequency is the pulse width that is used to control the solenoid, this will need to be experimented with to get your system to react best to the controller.

The Controller Interval is how often the ECU will look at the boost pressure and adjust the setpoint in mSecs.

The Proportional Gain is how hard it seeks the target.

Differential Gain means how it will react to sudden changes, it's roughly a predictive term, but for best results it probably has to be kept to a small value. Tune proportional first, leave differential for later

The Output Polarity is for setting the valve so it operates the right way, generally as PWM Increases the Boost Increases.
90 Turbo is offline  
Old 01-31-2012, 04:21 PM
  #203  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

Originally Posted by 90 Turbo
The Proportional Gain is how hard it seeks the target.

Differential Gain means how it will react to sudden changes, it's roughly a predictive term, but for best results it probably has to be kept to a small value. Tune proportional first, leave differential for later
Oh my god, slowly step away from the keyboard.

P and D work *together*.

ggermar got it right in his mega idle thread. Adjust P until it begins to oscillate, then increase D to quash it. Lather rinse repeat. And you should adjust P, I , and D in 50% increases (e.g. 4, 6, 8, 12), not in constant increases (e.g. 4,6,8,10).
JasonC SBB is offline  
Old 01-31-2012, 04:36 PM
  #204  
Boost Czar
Thread Starter
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,490
Total Cats: 4,079
Default

Originally Posted by 90 Turbo
Are these the instructions you are referring to Brain I dont find these very help full what am I missing?
http://msextra.com/doc/ms3/Boost_Control.html
Braineack is offline  
Old 02-23-2012, 12:25 AM
  #205  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

One night I was bored in my hotel in China and so I revisited the disconnect between me and Ken (and the page he linked) in the first few pages of this thread. Now I feel like typing it.

The implementation Ken used rolls the initial open loop value *and* the P gain into one user-adjustable value "Kp":

duty cycle = 100% - Kp*boost

Kp determines both the small signal P gain (change in duty for a change in error), as well as what is effectively the open loop value. For example, if you need 50% duty for 10 psi, Kp needs to be 5%. But this 5% value means for every psi of error, duty cycle changes by only 5%

A decrease in the P value increases the initial open loop value and thus increases the *initial* overshoot. However the subsequent damping and undershoot is um, more underdamped if the P value is larger. (As opposed to the initial overshoot which gets worse with smaller P)

A more flexible system would have 2 variables, Duty_initial and Kp:

duty = Duty_initial - Kp * boost_error

One could then set Duty_initial to 50% (using the earlier example that you want 50% duty to get 10 psi), *and* set Kp to a high value (e.g. 15% instead of 5%, to get thrice the reaction in duty for a given deviation from the boost target)

Duty_initial, is better to be a 2D table of duty vs. boost_target. And boost target is a table depending on TPS.
JasonC SBB is offline  
Old 09-17-2013, 11:59 PM
  #206  
Senior Member
iTrader: (2)
 
Amellrotts's Avatar
 
Join Date: Oct 2011
Location: Hickory, NC
Posts: 675
Total Cats: 9
Default

So after reading all this I am possibly more confused now than before....

What applies to the MS3? Brain was very good as spoon feeding us how to tune the closed loop but I think that was for Ms2 and I am not sure what applies to me and MS3?

Can someone please give me a decent starting point and a simple explanation of how to adjust PID to achieve the desired boost. In my case, at this time I am looking to maintain 18psi with EFR turbo which has a built in solenoid.
Amellrotts is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Full_Tilt_Boogie
Build Threads
84
04-12-2021 04:21 PM
Corky Bell
Prefabbed Turbo Kits
18
11-22-2016 09:01 PM
Trent
WTB
2
10-01-2015 12:15 PM
The Gleas
MEGAsquirt
3
10-01-2015 09:30 AM
shooterschmidty
Engine Performance
8
09-30-2015 10:28 PM



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



All times are GMT -4. The time now is 06:16 PM.