My try at CL boost control = Success! Fully detailled inside

General support questions and announcements for MS3. See also MS3 manuals.

Moderators: jsmcortina, muythaibxr

pit_celica
Master MS/Extra'er
Posts: 682
Joined: Tue Jul 18, 2006 3:12 pm

My try at CL boost control = Success! Fully detailled inside

Post by pit_celica »

Hi,

I've tried CL boost control recently and I've detailled the whole process in an Excel sheet and I've done some screenshot of each boost curve corresponding to a PID settings. This way, you can follow the reasoning between each PID changes and how it relates in real-world data. Download the *.zip file using the link down the post.

My settings :

MS3+MS3X v1.1.2

DIYAutotune boost control solenoid
Plumbing : external wastegate type as per DIYAutotune diagrams
Frequency : 19.5 Hz
Output polarity : Inverted
Control interval : 20 ms
Closed duty : 0%
Open duty : 100%
Boost control lower limit : 100%

Before trying CL boost control, follow these steps :

-Enable OL boost control and be sure that you are getting more boost as you lower the duty cycle in the Boost duty table.
-Try to tune the Boost duty table so you can have a nice boost curve near the boost target you are chasing and be sure you have good AFR and no knock at these high loads/high RPM because you will likely overboost while tuning PID settings. This is why overboost settings need to be activated.
-Read and understand the Boost Control section in the MS3 manual at least 2 times so you know how each settings are used.

I hope this thread will help future CL boost control user to understand a little more how PID settings are acting on the boost and boost duty cycle curves.

Finally, please note that my PID settings aren't perfect and need some fine-tuning, but I'm happy with the results so far.

_______________________________________________________________________________________________________________________________________

EDIT (2012-08-31) :

Here's the new *.zip file that include my latest tuning for boost control.

https://www.dropbox.com/s/6vsjn9cmozb3n ... l.zip?dl=0

The reason for this is that I've discovered that I wasn't reaching the boost target when the boost was increasing really fast (think going through 2-3-4 gears in WOT). Follow the Excel file to understand the tuning process. My tuning process involve a run from 2000RPM to redline in 3rd gear at WOT and a run going through the gears 2-3-4 as fast as I can at WOT for each PID setting. Please note that when I shift, engine RPM goes from redline to about 5000-5300 RPM.

I'm now at P=50, I=100 and D=50. With these settings, during the 3rd gear 2000-redline WOT run, I have an initial overshoot at 225kPa but the boost is glued to the target within ±3kPa from 4500 to 7400 RPM. During the 2-3-4 fast gear change WOT run, the boost is overshooting in 2nd gear at 221kPa, then it stick to the target until redline. When going into 3rd gear, the target is reached perfectly without any overshoot and stick to the target at ±4kPa. When going into 4th gear, the boost is coming so fast that the PID isn't making the boost reaching the target initially (undershoot at 200kPa) and then the I term is making the boost climbing up to the target in a fast manner (sticking to the target at ±4kPa from 5500RPM to redline).

Because a picture worth a thousand of word, see the attached pictures for the 3rd gear run and the 2-3-4 fast gear change run for the P=50, I=100 and D=50.

Here are my conclusions so far about CL boost control :

1- Playing with the P term will influence the moment when the boost duty will start to increase when the boost is increasing. Big P number make the boost duty coming up sooner when the MAP is increasing and vice-versa.
2- Increasing P will reduce initial overshoot and vice-versa.
3- Increasing I will slightly increase initial overshoot. If the target isn't reached initially, a bigger I term will make the boost climbing to the target faster. Too much a I term will make the boost oscillating after the initial overshoot.
4- The D term will reduce the oscillating effect of a large I number. Too much D term lead to huge oscillations in the boost duty. It takes some large D number to reduce the initial overshoot.
5- I've varied the Control Interval from 30ms to 10ms without seeing any changes in boost control performance. Smaller Control Interval will lead to higher oscillation of the boost duty.
6- You can limit the maximal boost duty by setting the Open Duty at a number lower than 100%. It is useful if you do not reach the target initially because the boost is climbing faster. But this is not a good solution because it prevent the PID code to do his job if a smaller boost target is wanted later.
7- You want some sort of initial overshoot to have a good control. If the target isn't reached initially, the I term will try to get the boost to the target, but it will take some time.
8- Initial overshoot will be bigger in higher gear (4th, 5th) for a given PID setting compared to a 3rd gear run because the boost is climbing much more slowly and the P term is supposed to react to (current_error - last_error). When boost is climbing slowly, (current_error - last_error) isn't a big number so the P term do not have the same impact as in 3rd gear. The inverse is also true : you will get less overshoot when boost is climbing faster (like in 2nd gear).

The following are the thing I would like to test/tune/perfect in the following rounds of tuning :

-Reduce initial overshoot in 3rd gear 2000-redline WOT run at something around 215kPa.
-Make sure that initial overshoot isn't too big in higher gears (4th or 5th gear from 2000 RPM to redline at WOT)
-Try a higher and/or lower target with a constant PID setting and see the results.
-Try a boost target map that has a varying target vs RPM to see how the PID react.
-Play with the Boost Control Lower Limit to see what impact it has for a constant PID setting.


Sam
Last edited by pit_celica on Tue Apr 11, 2023 7:59 pm, edited 6 times in total.
Mario
Master MS/Extra'er
Posts: 409
Joined: Sun Jan 30, 2005 11:13 pm
Location: Monroe, Wa.
Contact:

Re: My try at CL boost control = Success! Fully detailled in

Post by Mario »

That is great! Thanks for logging all your work :)
1967 Beetle My test mule
The Dub Shop
Facebook
Megasquirt for life!
HidRo
Super MS/Extra'er
Posts: 1172
Joined: Mon Dec 28, 2009 4:56 pm
Location: Portugal
Contact:

Re: My try at CL boost control = Success! Fully detailled in

Post by HidRo »

The explanation of how Closed Loop boost control works is impressive!
With this, I believe that anyone can learn how to tune CL.
I guess this would be a good article in the msextra documentation.

Congrats and thank you! :yeah!:
Image
Golf II + 1.8T 20V + MSII V3.0 http://eight620vt.tk/
Peter Florance
Super MS/Extra'er
Posts: 3653
Joined: Fri Apr 02, 2004 8:40 pm
Location: Virginia Beach, VA
Contact:

Re: My try at CL boost control = Success! Fully detailled in

Post by Peter Florance »

What a great resource
Thanks!
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
zmanco
Experienced MS/Extra'er
Posts: 329
Joined: Mon May 28, 2007 2:16 pm

Re: My try at CL boost control = Success! Fully detailled in

Post by zmanco »

Is the boost control algorithm in MS2 the same as in MS3?
Daniel
'73 240Z
Castle Rock, CO USA
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: My try at CL boost control = Success! Fully detailled in

Post by muythaibxr »

the base algorithms are the same, but the ms3 has extra features such as gear-based boost targets, etc.
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
xrattiracer
Experienced MS/Extra'er
Posts: 301
Joined: Fri Aug 01, 2008 2:25 pm

Re: My try at CL boost control = Success! Fully detailled in

Post by xrattiracer »

indeed that is good stuff.
I have very little chances to do closed loop tuning with my own car, so this kind of stuff is very useful to me. im not making crazy power levels, but i still have a hard time finding a place where i can do repeated runs in a gear higher than 2nd. and things just happen too quickly in 2nd to do some of the tuning. it really makes me wonder how differently the numbers end up being for different setups, and if there is a default that would work fairly well for most people. the aftermarket boost control boxes seem to work out of the box on a wide variety of configurations...
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: My try at CL boost control = Success! Fully detailled in

Post by muythaibxr »

All the aftermarket ones I have tried still require some tuning, and even after tuning aren't that consistent.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
pit_celica
Master MS/Extra'er
Posts: 682
Joined: Tue Jul 18, 2006 3:12 pm

Re: My try at CL boost control = Success! Fully detailled in

Post by pit_celica »

I've updated the first post and the attachments to include my latest boost control tuning comments/conclusion. Feel free to comment!

Sam
9secz
Experienced MS/Extra'er
Posts: 204
Joined: Sun Jun 13, 2010 10:33 am
Location: NorCal USA
Contact:

Re: My try at CL boost control = Success! Fully detailled in

Post by 9secz »

Thanks for sharing all your research! So far I have not figured out how to grab your zip file without installing the host site download manager. I've tried Chrome and Firefox browsers, and wget. Anybody know the secret?

Edit: NVM, I finally got the zip file, but not before having to close some bonus full-screen popups.

Jeff
tutuur
Experienced MS/Extra'er
Posts: 288
Joined: Tue Nov 06, 2012 5:27 am

Re: My try at CL boost control = Success! Fully detailled in

Post by tutuur »

Wow! This is a great guide!

Only thing i don't get: why do you have to invert the output and work from 100% to 0% when going to use closed loop?
Is it something in the code?

As surely the valve will work exactly the same when giving normal output but working from 0>100 right?
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: My try at CL boost control = Success! Fully detailled in

Post by elaw »

In older versions of the code, the philosophy was that the duty cycle percentage was supposed to represent the amount of flow going through the wastegate - so 100% would be minumum boost and 0% would be maximum.

Recently that was changed, I think because many people found it confusing. So in the newer firmwares (I know this to be true of MS3, not sure about MS2) 100% is highest boost and 0% is lowest.

The concept of inverting the output and swapping the high/low percentages works when using open-loop boost control. But in closed-loop, you have to have it set the way the code wants, otherwise the PID control will be reversed (as in, when boost is too high, it'll try to make it higher rather than lower).
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
TerrenceLP
Helpful MS/Extra'er
Posts: 52
Joined: Tue May 29, 2012 8:18 pm

Re: My try at CL boost control = Success! Fully detailled in

Post by TerrenceLP »

I applied these settings (P=50 I=100 D=50)

Toyota Supra Turbo 1987 7mgte, max boost 18psi, desired target 16psi.

On first try, so far nice, I have wastegate issues now but boost builds and holds pretty nice!
Log attached :lol:
2014-03-15_18_modified_modified.msl
pit_celica
Master MS/Extra'er
Posts: 682
Joined: Tue Jul 18, 2006 3:12 pm

Re: My try at CL boost control = Success! Fully detailled in

Post by pit_celica »

Something is wrong, look at the boost duty% signal. It is going from 100% to 0% to 100% rapidly. Usually, this indicate that the Open Duty% is smaller than the Closed Duty% in your msq file. Please post your msq for more information.

Sam
TerrenceLP
Helpful MS/Extra'er
Posts: 52
Joined: Tue May 29, 2012 8:18 pm

Re: My try at CL boost control = Success! Fully detailled in

Post by TerrenceLP »

I'll state that I'm running a 35a MAC Valve, this means that 0% duty it's open, 100% duty is closed.

I'm still experimenting but I noticed under Open Loop, with my current wastegate only allowing up to 16psi, 92% duty gives me just under 18psi peak, so in closed loop, I'm thinking the only real adjustment is in the 90%-99% duty cycle thus the "On-Off" looking duty on the log. Ultimately I need a better wastegate spring for better control.

Any opinions?
5010050-tunerstudio.png
5010050-tunerstudio-2.png
pit_celica
Master MS/Extra'er
Posts: 682
Joined: Tue Jul 18, 2006 3:12 pm

Re: My try at CL boost control = Success! Fully detailled in

Post by pit_celica »

It doesn't matter which kind of valve you are using. It's a code requirement :

- The closed-loop code require the Open Duty% to be higher than the Closed Duty%.
- The closed-loop code assume that higher boost duty means more boost pressure.

You need to comply with these requirement for the closed-loop code to work. Either replumb the valve of play with the Output polarity.

As I understand it, Open Duty% and Closed Duty% are more acting like Min Duty% and Max Duty% as in the idle closed-loop code.

Sam
TerrenceLP
Helpful MS/Extra'er
Posts: 52
Joined: Tue May 29, 2012 8:18 pm

Re: My try at CL boost control = Success! Fully detailled in

Post by TerrenceLP »

- The closed-loop code require the Open Duty% to be higher than the Closed Duty%. - This wont work if you can't swap duty. My valve is open at 0% duty, and from what I can read, changing polarity doesn't matter when using Closed Loop control.


- The closed-loop code assume that higher boost duty means more boost pressure. - That's what I'm doing, 100% = Closed Valved.

"Set this so that higher duty yields higher boost." from tuner studio - Why would I change polarity when everything is set as mentioned?

"Closed Duty - A closed duty of 0% is the default. This should be tuned to the value that starts to open the wastegate, but typically 0% works well.
Open Duty - An open duty value of 100% is the default. This should be tuned to the value that fully opens the wastegate, but typically 100% works well." - from msextra. - I want to install 1.3 and see these sliders everyone mentions.

So to me Closed Duty means 100% energized solenoid and I have it plumbed top and side of wastegate with turbo pressure. Where am I missing something?

My next strategy is to limit the duty window, where Open will be 80% to 90% and closed will be 96%, this should give good control.
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: My try at CL boost control = Success! Fully detailled in

Post by jsmcortina »

TerrenceLP wrote:and from what I can read, changing polarity doesn't matter when using Closed Loop control.
Where did you read this?

The current documention has not yet been updated in line with the firmware. As mentioned in this topic, you need to be configured so more duty = more boost.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
pit_celica
Master MS/Extra'er
Posts: 682
Joined: Tue Jul 18, 2006 3:12 pm

Re: My try at CL boost control = Success! Fully detailled in

Post by pit_celica »

Take a look at this thread :

http://www.msextra.com/forums/viewtopic ... 82#p394282

The guy was having the same problem as you : sawtooth shaped boost duty signal going from Open Duty% to Closed Duty%, but never to a value in-between.

The solution was to swap the Closed Duty% and Open Duty% so that the Open Duty% is higher than th Closed Duty%.

I understand your confusion about these two Open/Closed Duty% settings. I think they are mislabeled for what they are used in the code. They are the lower and higher (min and max) limits of the closed-loop duty output. As said in the manual, if boost start increasing only at a duty of 10%, set the Closed Duty% at 10%. If the boost do not increase anymore at 90% of duty, set the Open Duty% at 90%.

So, in your case, set the Closed Duty% at 90% and the Open Duty% at 96%.

Sam
jasaircraft
Super MS/Extra'er
Posts: 902
Joined: Mon Jul 07, 2008 5:45 pm

Re: My try at CL boost control = Success! Fully detailled in

Post by jasaircraft »

the download link takes you to a .exe program???
Post Reply