Can't get closed loop boost control working properly

All questions about MS2/Microsquirt/Microsquirt module. See also MS2/Extra manuals

Moderators: jsmcortina, muythaibxr

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

Re: Can't get closed loop boost control working properly

Post by pit_celica »

Also, looking at your msq, we can see that you are using a Boost Control Lower Limit Delta of 20kPa. This means that the control begins 20kPa before the actual target. Maybe this value is too low, too close from the target. Try to increase this value to something like 50-60. Another possibility is to use the Initial Value table. Fill this table with boost duty that should yield a specified boost target at a said RPM (find these values by tuning in open loop).

Another thing that could help you is to decrease the hysteresis of the overboost.

Sam
Markvb
Helpful MS/Extra'er
Posts: 39
Joined: Sat Aug 23, 2014 9:34 am
Location: Belgium

Re: Can't get closed loop boost control working properly

Post by Markvb »

Ok, did my home work... :mrgreen:

First file is the issue I have been dealing with since the beginning and that I can't get under control: In the file in attach you can see at 1044s that as soon as my rpm hits aprox 4400rpm that the boost starts oscilating up and down and massively overshooting creating boost protection

Note that in the controler my boost target was at 180kpa
New at this stuff...but eager to learn...

1991 MX5 1.6l Greddy Turbo, BEGI DP, 2,5" SIMONS Exhaust, MSII PNP, FMIC, RX8 injectors, VTPS, Wideband O2, ....and many more...
Markvb
Helpful MS/Extra'er
Posts: 39
Joined: Sat Aug 23, 2014 9:34 am
Location: Belgium

Re: Can't get closed loop boost control working properly

Post by Markvb »

Next is the file where I run Open Loop with all the boost targets on 0
So without boostcontrol, purely on the wastgate spring
New at this stuff...but eager to learn...

1991 MX5 1.6l Greddy Turbo, BEGI DP, 2,5" SIMONS Exhaust, MSII PNP, FMIC, RX8 injectors, VTPS, Wideband O2, ....and many more...
Markvb
Helpful MS/Extra'er
Posts: 39
Joined: Sat Aug 23, 2014 9:34 am
Location: Belgium

Re: Can't get closed loop boost control working properly

Post by Markvb »

And finaly some more mapping with what you guys asked me to do together with the log...

Resume:
-Open duty at 100% is not possible as the P no longer gives any changes, always overboost protection starting from 4400rpm, so lowered it back to 40% because at that value the controller seems to react
-Tried to change P, had to keep the value high: even at 200 getting everboost protection in 4th gear
-Started to play with a high value D (120-150) got a bit better but still had overboost protection
-changing the I to low values, had no result whatsoever
-I selected the initial value table without result BUT maybe I did not change the values enough (In open loop I have max 33% duty)

Hope you guys can help because I get the feeling that no matter what I do nothing seems to work... :?
New at this stuff...but eager to learn...

1991 MX5 1.6l Greddy Turbo, BEGI DP, 2,5" SIMONS Exhaust, MSII PNP, FMIC, RX8 injectors, VTPS, Wideband O2, ....and many more...
pit_celica
Master MS/Extra'er
Posts: 682
Joined: Tue Jul 18, 2006 3:12 pm

Re: Can't get closed loop boost control working properly

Post by pit_celica »

Looking at the boost duty, I would be inclined to reduce the sensitivity with the slider (more to the left). Also, did you try to tune the closed-loop in standard mode (no PID tuning, only with slider). Maybe it could remove a variable from the equation for now. Looking at your last datalog, I would say that it's quite good, except for the fast boost duty oscillation. The amplitude of these oscillations on the MAP signal itself aren't that high, about ±5kPa.

Sam
16vboost
Master MS/Extra'er
Posts: 478
Joined: Thu Apr 22, 2010 9:10 pm
Location: Miami, FL

Re: Can't get closed loop boost control working properly

Post by 16vboost »

I still get the feeling that something is fundamentally wrong. Looking at the fist long you posted today (2014-09-01_10.07.24.msl) I see the crazy oscillation. But what really bothers me is that as soon as boost control starts working (within 40kPa of your target) the duty cycle drops to zero. It's way below target fora long time and the duty cycle is at zero, meaning that the open loop is trying to achieve less boost. Look at the picture from my log below.

Image

Yes there is lots of overshoot but look at the duty cycle. It stays at 100% while MAP is under the target, keeping the wastegate closed and trying to make more boost. Once it gets close to the target, the duty cycle starts to go down and regulate boost. I don't think your PID code is commanding this. It seems like PID thinks that 0% means more boost and 40% (in your case) means less boost. That's why I thought you had set your polarity wrong. Maybe someone else can help explain what's going on here.

-Alex
jsmcortina
Site Admin
Posts: 39619
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Can't get closed loop boost control working properly

Post by jsmcortina »

Increase the control interval.
At 19.5Hz the solenoid is only pulsing every 51ms, but you are trying to control boost every 10ms. That is going to result is wild swings in boost duty. Try 50ms or 100ms.
Your datalog is only showing datapoints every 60ms, so it is difficult to see what happened in between.
EDIT: Also, your "initial values table" uses values outside of the 0-40% range that the valve is allowed to move.

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".
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Can't get closed loop boost control working properly

Post by elaw »

James,

This is a little OT but have you guys ever considered whether it might be possible to run the boost control algorithm synchronously with the valve? As in, have the timer (is there one?) that runs the valve also generate an interrupt which would call the boost control routine. Maybe with an (automatic?) scaling factor so at higher valve frequencies, the boost control code would be called only every 2nd or 3rd (or whatever) cycle?
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.
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Re: Can't get closed loop boost control working properly

Post by muythaibxr »

elaw wrote:James,

This is a little OT but have you guys ever considered whether it might be possible to run the boost control algorithm synchronously with the valve? As in, have the timer (is there one?) that runs the valve also generate an interrupt which would call the boost control routine. Maybe with an (automatic?) scaling factor so at higher valve frequencies, the boost control code would be called only every 2nd or 3rd (or whatever) cycle?
We have already tied the two together at this point, though it is not 100% synchronous.
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
16vboost
Master MS/Extra'er
Posts: 478
Joined: Thu Apr 22, 2010 9:10 pm
Location: Miami, FL

Re: Can't get closed loop boost control working properly

Post by 16vboost »

For what it's worth, I'm running a 19.5hz frequency with a 10ms control interval and have had good results.

-Alex
jsmcortina
Site Admin
Posts: 39619
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Can't get closed loop boost control working properly

Post by jsmcortina »

16vboost wrote:For what it's worth, I'm running a 19.5hz frequency with a 10ms control interval and have had good results.

-Alex
The problem is that Megasquirt will try to make corrections before the valve has moved. That's what looks to be happening in the OP's datalog. The boost duty is changing rapidly before there's been a chance to move the valve. The system will respond slower than the valve too.

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".
16vboost
Master MS/Extra'er
Posts: 478
Joined: Thu Apr 22, 2010 9:10 pm
Location: Miami, FL

Re: Can't get closed loop boost control working properly

Post by 16vboost »

Understood, and I will experiment with this later. But what about Markvb's problem. Why is his duty cycle at zero percent while he's way under the boost target?
jsmcortina
Site Admin
Posts: 39619
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Can't get closed loop boost control working properly

Post by jsmcortina »

16vboost wrote:Understood, and I will experiment with this later. But what about Markvb's problem. Why is his duty cycle at zero percent while he's way under the boost target?
It looked like the MAP was climbing and the PID was trying to slow it down, but because the PID was running too quickly and too sensitively, it reached zero duty before the valve had even moved.

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".
Markvb
Helpful MS/Extra'er
Posts: 39
Joined: Sat Aug 23, 2014 9:34 am
Location: Belgium

Re: Can't get closed loop boost control working properly

Post by Markvb »

Ok guys, thanks for all the answers and tips....

I just got home from France (for work) and i just changed the values in the laptop as follows:
-I putted the control interval at 100ms
-changed the lower contol limit to 50kpa (so that the system has more time to react and regulate)
-changed the Boost control initial duty table towards the values I use in open loop, so the highest value is now on 33%

I will take the car out tomorow evening after work to do some testing and mapping

Will keep you informed

Mark
New at this stuff...but eager to learn...

1991 MX5 1.6l Greddy Turbo, BEGI DP, 2,5" SIMONS Exhaust, MSII PNP, FMIC, RX8 injectors, VTPS, Wideband O2, ....and many more...
weeblebiker
Master MS/Extra'er
Posts: 421
Joined: Sun May 11, 2008 4:03 pm

Re: Can't get closed loop boost control working properly

Post by weeblebiker »

pretty enlightening thread so far. gave me some settings to check
v2.2 box, ms2, dual wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L16V, TD0-14T turbo, itbs
weeblebiker
Master MS/Extra'er
Posts: 421
Joined: Sun May 11, 2008 4:03 pm

Re: Can't get closed loop boost control working properly

Post by weeblebiker »

btw, my control interval was 10ms also,I don't think I changed it because I did not really understand the consequences of changing it. is 10ms the default? if so shouldn't the default be at least the slowest frequency? maybe put something in the question mark notes like start with the solenoid frequency (1/Hz*1000)? maybe better twice the solenoid frequency? or at least have the control interval and solenoid frequency in the same units to make the correlation more intuitive?
v2.2 box, ms2, dual wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L16V, TD0-14T turbo, itbs
Markvb
Helpful MS/Extra'er
Posts: 39
Joined: Sat Aug 23, 2014 9:34 am
Location: Belgium

Re: Can't get closed loop boost control working properly

Post by Markvb »

So, did some more testing...

The msq file is in this post in attach and I did a total of 4 datalogs on this one (Test1, Test2 ,Test3 and Test4) , each time just changing 1 value

What I tested before without Datalogging:
1/Control Interval 50ms-100ms-130ms: overboost protection at all time, system reacted slower in oscilating but the fuel cut remained
2/Closed duty=0 and Open Duty=40 : Same problem
3/Closed duty=0 and Open Duty=100 : Same problem but even quicker in Boost protection
4/Closed duty=40 and Open Duty=0 : Same problem but even quicker in Boost protection

Please note that I swithed the "Boost Control Initial Value Table" "Off" just to make things not to complicated...tried with this table switched on but did not have any improvement
New at this stuff...but eager to learn...

1991 MX5 1.6l Greddy Turbo, BEGI DP, 2,5" SIMONS Exhaust, MSII PNP, FMIC, RX8 injectors, VTPS, Wideband O2, ....and many more...
Markvb
Helpful MS/Extra'er
Posts: 39
Joined: Sat Aug 23, 2014 9:34 am
Location: Belgium

Re: Can't get closed loop boost control working properly

Post by Markvb »

TEST1

As in MSQ file with Control interval at 100ms

P=0

Overboost protection...
Last edited by Markvb on Sun Sep 07, 2014 3:04 am, edited 1 time in total.
New at this stuff...but eager to learn...

1991 MX5 1.6l Greddy Turbo, BEGI DP, 2,5" SIMONS Exhaust, MSII PNP, FMIC, RX8 injectors, VTPS, Wideband O2, ....and many more...
Markvb
Helpful MS/Extra'er
Posts: 39
Joined: Sat Aug 23, 2014 9:34 am
Location: Belgium

Re: Can't get closed loop boost control working properly

Post by Markvb »

TEST 2

As in MSQ file with Control interval at 100ms

P=200

Overboost protection...
New at this stuff...but eager to learn...

1991 MX5 1.6l Greddy Turbo, BEGI DP, 2,5" SIMONS Exhaust, MSII PNP, FMIC, RX8 injectors, VTPS, Wideband O2, ....and many more...
Markvb
Helpful MS/Extra'er
Posts: 39
Joined: Sat Aug 23, 2014 9:34 am
Location: Belgium

Re: Can't get closed loop boost control working properly

Post by Markvb »

TEST 3

As in MSQ file with Control interval at 150ms

P=200

No overboost protection...but still very strong oscilation
New at this stuff...but eager to learn...

1991 MX5 1.6l Greddy Turbo, BEGI DP, 2,5" SIMONS Exhaust, MSII PNP, FMIC, RX8 injectors, VTPS, Wideband O2, ....and many more...
Post Reply