Closed loop idle bug?

This is a forum for discussing the development and testing of alpha MS2/Extra code. Documentation
(Runs on MS2 and Microsquirt)

Moderators: jsmcortina, muythaibxr

Post Reply
teg
Experienced MS/Extra'er
Posts: 291
Joined: Sun Sep 05, 2004 2:02 pm
Location: Finland

Closed loop idle bug?

Post by teg »

Closed loop idle "stalled" today without any reason? PWM stalled to 90% (fully open) even rpm was over target? Using MS2 Extra beta8
Opel Kadett C City 2.0 16V Turbo
UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Post by UnaClocker »

I haven't look at your stuff, but I'd imagine it's a TPS problem.. Is your TPS calibrated? Do you have the TPS settings correctly set so that the closed loop idle knows when your TPS is closed?
Brian
'84 Dodge Rampage
teg
Experienced MS/Extra'er
Posts: 291
Joined: Sun Sep 05, 2004 2:02 pm
Location: Finland

Post by teg »

You should look that log before guessing.

TPS is calibrated and it IS zero.
Opel Kadett C City 2.0 16V Turbo
Keithg
Super MS/Extra'er
Posts: 2413
Joined: Sun Mar 06, 2005 9:15 am
Location: Chicago, IL, USA
Contact:

Closed loop idle bug?

Post by Keithg »

That is weird. First things I would ask are:
is 90% truly a good value for 'open'. It is a good idea to have this value be slightly above a normal idle value on a hot day with all accessories running.
is 37% actually the closed duty? This is the value when the valve is closed all the way. I would suspect this should be either 0 or 25% for the 2 types I have seen and used. There may be others that I am unaware of, but AFAIK...
It appears that your idle can regulate at target RPM (end of the log) at ~40. You may want to play with RPM lag to make sure it always gets a good rpmdot value. The code defaults to 50. I ended up having to use 30 to get it to reliably get out of lockout. Also, your map at idle is pretty high. Is there some reason it is at 50? (cam, A/C running, etc) If this is a normal idle MAP value, you can bring your PID lockut map value closer to your idle MAP value. If it normally idles at 50 map, you may want to try 48 as a PID lockout value.

Maybe Ken will see something I did not, but closed loop idle is pretty exacting in the values you need to have for it to work well.

HTH,

KeithG

On 8/22/07, teg wrote:
Closed loop idle "stalled" today without any reason? PWM stalled to 90% (fully open) even rpm was over target? Using MS2 Extra beta8



Opel Kadett C City 1.2i Tbo MS-II PCB V3 squirt'n'spark



teg
Experienced MS/Extra'er
Posts: 291
Joined: Sun Sep 05, 2004 2:02 pm
Location: Finland

Post by teg »

Finally got megalogviewer working and foudn that closed loop idle started to control after Gwarm went to 100 (ASE ends?)
Opel Kadett C City 2.0 16V Turbo
MegaScott
MS/Extra Guru
Posts: 1280
Joined: Mon Jun 14, 2004 9:35 am
Location: Chiang Mai, Thailand

Post by MegaScott »

Is 37% really your closed value? that seems kind of high. On my setup i used 15% and that was really where the valve stopped moving at the low end. (use "Warm up only" to get this) I had to lower my idle screw at the lower end to get it to idle lower than 1000rpm because the stock Ford computer expects 1volt tps at idle.

I would tweak your PID a little better. I would try bumping up your proportional gain and lower your Intregal gain a little if it's hunting.

Also I see your Idle Spark advance is pretty low, you should run this up more to get more torque at idle to make it less likely to stall. You have around 9 degrees of advance at idle, I would run closer to 20-30degrees advance at idle and you'll see better idle quality.

Oh, also your VE table lower values drop off at idle a bit at lower Map, richen it up around the edges a bit and that will help.
teg
Experienced MS/Extra'er
Posts: 291
Joined: Sun Sep 05, 2004 2:02 pm
Location: Finland

Post by teg »

MegaScott wrote:Is 37% really your closed value? that seems kind of high. On my setup i used 15% and that was really where the valve stopped moving at the low end. (use "Warm up only" to get this) I had to lower my idle screw at the lower end to get it to idle lower than 1000rpm because the stock Ford computer expects 1volt tps at idle.
It is actually 37%. Valve still moves if I go lower , BUT then it will open from other end. That is kind of fail safe position in wire break situation
I would tweak your PID a little better. I would try bumping up your proportional gain and lower your Intregal gain a little if it's hunting.
I was just starting to do PID tuning (with NZ-method), so those aren't final values.
Also I see your Idle Spark advance is pretty low, you should run this up more to get more torque at idle to make it less likely to stall. You have around 9 degrees of advance at idle, I would run closer to 20-30degrees advance at idle and you'll see better idle quality.
Stock engine has 4-6 degrees idle advance. My engine is old Opel OHV engine (1.2 litres) from 70's.
Opel Kadett C City 2.0 16V Turbo
MegaScott
MS/Extra Guru
Posts: 1280
Joined: Mon Jun 14, 2004 9:35 am
Location: Chiang Mai, Thailand

Post by MegaScott »

Back in the 70's there was no computerized ignitions, and the Vacuum advance left a little to be desired.

Bump up just the idle advance bins and you'll see a big difference. Also richen up those bottom VE values, when it leans out like that it will have a tendancy to oscillate and stall.
teg
Experienced MS/Extra'er
Posts: 291
Joined: Sun Sep 05, 2004 2:02 pm
Location: Finland

Post by teg »

Ok, thanks for your hints and comments. Hope emissions won't (HC) won't go too high..

BUT I still have problem with Idle valve control...
Opel Kadett C City 2.0 16V Turbo
MegaScott
MS/Extra Guru
Posts: 1280
Joined: Mon Jun 14, 2004 9:35 am
Location: Chiang Mai, Thailand

Post by MegaScott »

teg wrote:Ok, thanks for your hints and comments. Hope emissions won't (HC) won't go too high..

BUT I still have problem with Idle valve control...
All the newer OEM's use a scheme where the idle advance is upwards of 30degrees advanced, this serves two purposes, one it increases torque, so accessories such as A/C and alternator do not drag the engine down so much, plus it gives you more control when letting out the clutch.

I suspect as soon as you raise your idle advance you'll see the engine idle go up to a point where you will need ot lower your throttle blade opening, this will cause the Idle control valve to be forced open more, giving you more control over your idle.

Your Proportional gain is a little low, this could cause sluggish operation in closed loop, bump it up to 20 or higher.

Also your Integral might then be a little high, this can cause excess hunting, lower that until the hunting goes away, it will still over shoot a bit, but now that you have more air and more control over your idle it should only overshoot once a small amount, then settle down to the target speed.
Keithg
Super MS/Extra'er
Posts: 2413
Joined: Sun Mar 06, 2005 9:15 am
Location: Chicago, IL, USA
Contact:

Closed loop idle bug?

Post by Keithg »

Actually, your HC may actually improve based on what Scott says. Basically, increase timing at idle until idle quality decreases. You will note this as MAP will continue to decrease then level out. Since you are mapping timing, you will not affect any of the rest of the map, only around idle. In carb days they used to have a slightly rich idle as a slightly rich idle is more stable than slightly lean. With EFI, you can get closer to a stoich idle which helps the 3 way catalyst (if so equipped) and idle quality.

KeithG

On 8/22/07, teg wrote:
Ok, thanks for your hints and comments. Hope emissions won't (HC) won't go too high..

BUT I still have problem with Idle valve control...


teg
Experienced MS/Extra'er
Posts: 291
Joined: Sun Sep 05, 2004 2:02 pm
Location: Finland

Post by teg »

It happend again. Idle control stalled or actually had wrong target. I had ~900rpm as target but it tried to adjust idle to 1300rpm.

So this is really a bug.
Opel Kadett C City 2.0 16V Turbo
teg
Experienced MS/Extra'er
Posts: 291
Joined: Sun Sep 05, 2004 2:02 pm
Location: Finland

Post by teg »

I have a feeling that it will get first bin from rpm target curve and tries to keep in that value until CLT reaches last temp bin?
Opel Kadett C City 2.0 16V Turbo
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Post by muythaibxr »

I have been unable to get the behavior you are seeing to happen. I'll see if I can find anything this week.

Ken
teg
Experienced MS/Extra'er
Posts: 291
Joined: Sun Sep 05, 2004 2:02 pm
Location: Finland

Post by teg »

Hmm..

Interpolation of target rpm has done by this way:

Code: Select all

	    targ_rpm = intrp_1ditable(outpc.clt,8,(int *)pg5_ptr->pwmidle_clt_temps,
		    (unsigned int *)pg5_ptr->pwmidle_target_rpms);
And prototype of intrp_1ditable is:

Code: Select all

unsigned int intrp_1ditable(unsigned int x, unsigned char n, unsigned int * x_table, unsigned int * z_table)
What if pwmidle_clt_temps has negative values (as I have)?
Opel Kadett C City 2.0 16V Turbo
snillet
Master MS/Extra'er
Posts: 670
Joined: Tue Dec 06, 2005 1:43 pm
Location: Kungälv, Sweden

Post by snillet »

MegaScott wrote:
All the newer OEM's use a scheme where the idle advance is upwards of 30degrees advanced, this serves two purposes, one it increases torque, so accessories such as A/C and alternator do not drag the engine down so much, plus it gives you more control when letting out the clutch.
You say that newer engine managements run at around 30btdc idle advance ?, hmm, thought i was seeing ghosts when i was getting into that area myself......, thought that something must be wrong for this to work so good. Car was really nice to drive in "jammed" traffic, no need to touch the throttle at all, just clutchwork 8)

But hey, i´m not using MS2 extra, YET(getting there soon), so i´ll shut up now.
Peugeot 309GR1990 XU9JAZ(4cyl 1.9litre) 10.8:1 CR with 60-2 VR wheel decoding ,V2.2 card, singel coil and dizzy spark ,360cc 0 280 150 431 injectors. Msns-E hi-res 10d2 and E85(Ethanol) in the gastank.
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Post by muythaibxr »

teg wrote:Hmm..

Interpolation of target rpm has done by this way:

Code: Select all

	    targ_rpm = intrp_1ditable(outpc.clt,8,(int *)pg5_ptr->pwmidle_clt_temps,
		    (unsigned int *)pg5_ptr->pwmidle_target_rpms);
And prototype of intrp_1ditable is:

Code: Select all

unsigned int intrp_1ditable(unsigned int x, unsigned char n, unsigned int * x_table, unsigned int * z_table)
What if pwmidle_clt_temps has negative values (as I have)?
Could be the problem. I'll check into it.

Ken
jsmcortina
Site Admin
Posts: 39618
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

teg wrote:What if pwmidle_clt_temps has negative values (as I have)?
I knew we should have used Kelvin..

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".
teg
Experienced MS/Extra'er
Posts: 291
Joined: Sun Sep 05, 2004 2:02 pm
Location: Finland

Post by teg »

It is not, yet, too late to start using Kelvins :)
Opel Kadett C City 2.0 16V Turbo
rb26dett
Master MS/Extra'er
Posts: 497
Joined: Tue May 24, 2005 11:34 pm
Location: Auckland New Zealand

Post by rb26dett »

jsmcortina wrote:
teg wrote:What if pwmidle_clt_temps has negative values (as I have)?
I knew we should have used Kelvin..

James
woooooooo hoooooooooo

please metricise the code :-)

that would be cool indeed. properly pure scientific grade code :-)

i actually exclaimed "yes!!" when i read that. shows just how sad i am ;-)

fred.
ms2,v3,cop,innovate,mazda fe3/fe-dohc 2l 4cyl with stock 10:1 pistons,4 stock coils,4 stock ignitors,rx7 550cc injectors maxed@6600rpm&17psi,custom everything,holset he351cw turbo,44mm ext gate,nis gtr bovs,nis gtr intercooler,70mm lexus throttle,chinese fpr,10may v2 ms2e alpha code
Post Reply