MEGAsquirt A place to collectively sort out this megasquirt gizmo

Bought a car, tune is completely borked. Halp?

Thread Tools
 
Search this Thread
 
Old 10-09-2013, 02:31 PM
  #21  
Senior Member
Thread Starter
iTrader: (4)
 
vteckiller2000's Avatar
 
Join Date: May 2010
Location: Dallas
Posts: 824
Total Cats: 64
Default

Okay, so I got it to almost idle okay by raising the idle rpm from 870 to 975. Now I see that when I am in the driveway playing with stuff it goes into closed loop just fine, but when I leave and drive, it won't go into closed loop idle most of the time. It just hovers around 1500 rpm.
vteckiller2000 is offline  
Old 10-09-2013, 02:49 PM
  #22  
Senior Member
iTrader: (5)
 
bcrx7's Avatar
 
Join Date: Jul 2005
Posts: 697
Total Cats: 53
Default

Are you sure the idle valve is the 99? The earlier valves are known to fail even with the stock ECU. Do you have another valve you can try perhaps?
bcrx7 is offline  
Old 10-09-2013, 02:51 PM
  #23  
Senior Member
Thread Starter
iTrader: (4)
 
vteckiller2000's Avatar
 
Join Date: May 2010
Location: Dallas
Posts: 824
Total Cats: 64
Default

Originally Posted by bcrx7
Are you sure the idle valve is the 99? The earlier valves are known to fail even with the stock ECU. Do you have another valve you can try perhaps?
No I am not. The car is a 94, and the intake is a 99. I am inclined to believe it may be a 90-93 valve based on my open and closed dc numbers. (~20% and ~60% respectively). Why would a failing valve work EVERY time I test it manually, but cause it to not go into closed loop?



EDIT: ~20% closed and ~60% open

Last edited by vteckiller2000; 10-09-2013 at 03:58 PM.
vteckiller2000 is offline  
Old 10-09-2013, 02:56 PM
  #24  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

what's the tps threshold for your CL idle settings? are you under that? PID lockout settings?
Braineack is offline  
Old 10-09-2013, 02:56 PM
  #25  
Elite Member
iTrader: (4)
 
hornetball's Avatar
 
Join Date: Mar 2008
Location: Granbury, TX
Posts: 6,301
Total Cats: 696
Default

Originally Posted by vteckiller2000
No I do not. The car is a 94, and the intake is a 99. I am inclined to believe it may be a 90-93 valve based on my open and closed dc numbers. (~20% and ~60% respectively). Why would a failing valve work EVERY time I test it manually, but cause it to not go into closed loop?
Yikes. For a 90-93 valve, minimum DC is 19% and closed DC is 17%.

Closed DC MUST be lower than the minimum. Keep in mind that when you exceed the dashpot values (i.e., TPS above the dashpot TPS or RPM above your idle RPM + RPM Adder), your MS tries to close the IACS by sending out closed DC to the IACV (since, in theory, it is no longer needed). If you are sending out 60%DC . . . 1500RPM sounds just about right . . . you'll never get below that.

A data log is in order at this point. Monitor your idle DC to see what it's doing relative to RPM, MAP and other parameters. You have downloaded MegaLog Viewer, right?
hornetball is offline  
Old 10-09-2013, 03:07 PM
  #26  
Senior Member
Thread Starter
iTrader: (4)
 
vteckiller2000's Avatar
 
Join Date: May 2010
Location: Dallas
Posts: 824
Total Cats: 64
Default

Originally Posted by Braineack
what's the tps threshold for your CL idle settings? are you under that? PID lockout settings?
TPS threshold at 0.5% currently and I tried 1%. I am not sure about the PID lockout settings (away from the PC that I am using for tuning).

Originally Posted by hornetball
Yikes. For a 90-93 valve, minimum DC is 19% and closed DC is 17%.

Closed DC MUST be lower than the minimum. Keep in mind that when you exceed the dashpot values (i.e., TPS above the dashpot TPS or RPM above your idle RPM + RPM Adder), your MS tries to close the IACS by sending out closed DC to the IACV (since, in theory, it is no longer needed). If you are sending out 60%DC . . . 1500RPM sounds just about right . . . you'll never get below that.

A data log is in order at this point. Monitor your idle DC to see what it's doing relative to RPM, MAP and other parameters. You have downloaded MegaLog Viewer, right?

My bad, I swapped the open and closed dc's. That should have read ~20% closed and ~60% open. It is idling around 30-34% dc at ~975 rpm. When it does go into closed loop... It is idling in a reasonably acceptable manner right now in the driveway and goes into closed loop just fine there, but it is not going into closed loop when driven for some reason.
vteckiller2000 is offline  
Old 10-09-2013, 03:11 PM
  #27  
Senior Member
Thread Starter
iTrader: (4)
 
vteckiller2000's Avatar
 
Join Date: May 2010
Location: Dallas
Posts: 824
Total Cats: 64
Default

My PID lockout stuff should be the same as my attached original msq file. I haven't changed those yet.


Closed loop idle settings:

Idle open dc - 60.5
Idle closed dc - 23.0
Idle activation rpm adder - 300
Idle activation tps threshold - 0.5
Dashpot adder - 1.2
Dashpot decay factor - 0
Close delay - 1
Leave valve open above - 1700
for seconds - 2

PID settings:

Min dc for PID - 23.8
rpm closed - 720
rpm open - 2650
PID delay - 2
Crank to run taper - 3
PID ramp to target - 2
PID control interval - 200

PID lockout rpmDOT threshold - 80
PID lockout max decel load - 27.0


IAC valve frequency - 9

Last edited by vteckiller2000; 10-09-2013 at 03:55 PM.
vteckiller2000 is offline  
Old 10-09-2013, 04:41 PM
  #28  
Elite Member
iTrader: (4)
 
hornetball's Avatar
 
Join Date: Mar 2008
Location: Granbury, TX
Posts: 6,301
Total Cats: 696
Default

Originally Posted by vteckiller2000
Closed loop idle settings:

Idle open dc - 60.5
Idle closed dc - 23.0
Idle activation rpm adder - 300
Idle activation tps threshold - 0.5
Dashpot adder - 1.2
Dashpot decay factor - 0
Close delay - 1
Leave valve open above - 1700
for seconds - 2

PID settings:

Min dc for PID - 23.8
rpm closed - 720
rpm open - 2650
PID delay - 2
Crank to run taper - 3
PID ramp to target - 2
PID control interval - 200

PID lockout rpmDOT threshold - 80
PID lockout max decel load - 27.0


IAC valve frequency - 9
Interesting. I don't see what your target RPM is in the above, so let's say that the target RPM is 975. Let's pay particular attention to the idle activation values.

The Idle Activation Adder is how many RPM above the target that the closed loop idle routine becomes active. You've told it 300. Add that to the target and you get 1275RPM. So, if you settle anywhere above 1275RPM, you never enter the idle routine. BTW, the reason it's called an "Adder" is because it adds to your target. That way it automatically increases with your target when cold.

My Idle Activation Adder is 700RPM.

You've also set the Idle Activation TPS Threshold to 0.5%. So barely a crack (or even signal noise) in the throttle turns off closed loop idle. Better raise that.

Mine is set to the equivalent of 18% (with MS1, you actually set the ADC value).

So, we know why we can't enter closed loop idle. Now, why are we settling so high? It's probably because your dashpot is never letting you settle into the range where you can enter closed loop idle. A dashpot event happens when you go from below to above either the Idle Activation RPM or Idle Activation TPS Threshold. With the super low Adder and TPS Threshold values you have, this may be happening continuously. Whenever the dashpot is activated, it instantly adds 1.2DC ("Dashpot Adder - 1.2") to your IACV and it never decays ("Dashpot Decay Factor - 0")!! To make matters worse, it you do make it above 1700RPM ("Leave Valve Open Above - 1700"), your IACV will go full open for 2 seconds ("for seconds - 2").

Pretty FUBAR all in all. BTW, if you log your data and view it, you should be able to see the above happening.

My recommendation is to increase the Idle Activation Adder and Idle Activation TPS Thresholds to reasonable values. Turn the dashpot off completely for now. We should then see the car enter closed loop idle and settle at the target RPM. Without a dashpot, it should sag a bit before settling. After we achieve that, we can add some dashpot back in to get rid of the sag. We need to add enough dashpot to avoid sag for a loaded engine (lights on, fan on, AC engaged).

Brain also asked about your PID lockout settings. Not familiar with those because MS1 doesn't have them. Hopefully he'll add comments on that.
hornetball is offline  
Old 10-09-2013, 06:02 PM
  #29  
Elite Member
iTrader: (4)
 
hornetball's Avatar
 
Join Date: Mar 2008
Location: Granbury, TX
Posts: 6,301
Total Cats: 696
Default

One more thing (kind of obvious), you determined that your actual closed DC is 20% yet you have it set to 23% in the settings with a minimum DC of 23.8%. That will, of course, increase your idle because the algorithm will never put out less than 23.8% when active or less than 23% when inactive.
hornetball is offline  
Old 10-09-2013, 06:03 PM
  #30  
Senior Member
Thread Starter
iTrader: (4)
 
vteckiller2000's Avatar
 
Join Date: May 2010
Location: Dallas
Posts: 824
Total Cats: 64
Default

Originally Posted by hornetball
Interesting. I don't see what your target RPM is in the above, so let's say that the target RPM is 975. Let's pay particular attention to the idle activation values.

The Idle Activation Adder is how many RPM above the target that the closed loop idle routine becomes active. You've told it 300. Add that to the target and you get 1275RPM. So, if you settle anywhere above 1275RPM, you never enter the idle routine. BTW, the reason it's called an "Adder" is because it adds to your target. That way it automatically increases with your target when cold.

My Idle Activation Adder is 700RPM.

You've also set the Idle Activation TPS Threshold to 0.5%. So barely a crack (or even signal noise) in the throttle turns off closed loop idle. Better raise that.

Mine is set to the equivalent of 18% (with MS1, you actually set the ADC value).

So, we know why we can't enter closed loop idle. Now, why are we settling so high? It's probably because your dashpot is never letting you settle into the range where you can enter closed loop idle. A dashpot event happens when you go from below to above either the Idle Activation RPM or Idle Activation TPS Threshold. With the super low Adder and TPS Threshold values you have, this may be happening continuously. Whenever the dashpot is activated, it instantly adds 1.2DC ("Dashpot Adder - 1.2") to your IACV and it never decays ("Dashpot Decay Factor - 0")!! To make matters worse, it you do make it above 1700RPM ("Leave Valve Open Above - 1700"), your IACV will go full open for 2 seconds ("for seconds - 2").

Pretty FUBAR all in all. BTW, if you log your data and view it, you should be able to see the above happening.

My recommendation is to increase the Idle Activation Adder and Idle Activation TPS Thresholds to reasonable values. Turn the dashpot off completely for now. We should then see the car enter closed loop idle and settle at the target RPM. Without a dashpot, it should sag a bit before settling. After we achieve that, we can add some dashpot back in to get rid of the sag. We need to add enough dashpot to avoid sag for a loaded engine (lights on, fan on, AC engaged).

Brain also asked about your PID lockout settings. Not familiar with those because MS1 doesn't have them. Hopefully he'll add comments on that.
Yeah, this was FUBAR for sure. I changed my idle activation adder to 700 rpm, the tps threshold to 5%, added a little hot start cranking dc and added some gain to the PID. It seems a little better in the driveway, but I will have to drive it to be sure. It is still hunting though.
vteckiller2000 is offline  
Old 10-09-2013, 06:04 PM
  #31  
Senior Member
Thread Starter
iTrader: (4)
 
vteckiller2000's Avatar
 
Join Date: May 2010
Location: Dallas
Posts: 824
Total Cats: 64
Default

Originally Posted by hornetball
One more thing (kind of obvious), you determined that your actual closed DC is 20% yet you have it set to 23% in the settings with a minimum DC of 23.8%. That will, of course, increase your idle because the algorithm will never put out less than 23.8% when active or less than 23% when inactive.
I retested it and it tested closed at ~23%. I was apparently tired last night and was in a hurry.
vteckiller2000 is offline  
Old 10-09-2013, 06:34 PM
  #32  
Elite Member
iTrader: (4)
 
hornetball's Avatar
 
Join Date: Mar 2008
Location: Granbury, TX
Posts: 6,301
Total Cats: 696
Default

You should be logging data at this point and posting your logs.

You don't really need to drive it. You should be able to tickle the condition by revving past the Idle Activation RPM and/or opening the throttle past Idle Activation TPS Threshold.

As for stability, is it related to IACV DC moving around, or is it because ignition advance and VE are changing? In particular, you should try to maintain a constant ignition advance in the idle region. When starting out, a constant VE that generates maximum vacuum helps also. Find maximum vacuum VE while in manual mode.

If you are hunting because the closed loop pid is moving the IACV DC around too much, reducing gain is what you want to do.

In general, when starting out with a PID loop, setting I and D to 0 and working on the P term to get a quick but stable reaction is how you want to start. Next work on I so that the target gets achieved (with P by itself you'll have an offset from the target). Finally D if needed.

I don't know if the MS2 PID has separate P, I and D terms. All I see in your post is the "PID Ramp" ("P" term?) and how often the loop runs ("PID Control Interval - 200ms"). Running the loop at 5Hz is actually pretty fast -- not much time for the engine to react. Pretty sure Brain has a write-up on idle PID tuning for MS2 somewhere.

Last edited by hornetball; 10-09-2013 at 06:58 PM.
hornetball is offline  
Old 10-09-2013, 11:09 PM
  #33  
Senior Member
Thread Starter
iTrader: (4)
 
vteckiller2000's Avatar
 
Join Date: May 2010
Location: Dallas
Posts: 824
Total Cats: 64
Default

Originally Posted by hornetball
You should be logging data at this point and posting your logs.

You don't really need to drive it. You should be able to tickle the condition by revving past the Idle Activation RPM and/or opening the throttle past Idle Activation TPS Threshold.

As for stability, is it related to IACV DC moving around, or is it because ignition advance and VE are changing? In particular, you should try to maintain a constant ignition advance in the idle region. When starting out, a constant VE that generates maximum vacuum helps also. Find maximum vacuum VE while in manual mode.

If you are hunting because the closed loop pid is moving the IACV DC around too much, reducing gain is what you want to do.

In general, when starting out with a PID loop, setting I and D to 0 and working on the P term to get a quick but stable reaction is how you want to start. Next work on I so that the target gets achieved (with P by itself you'll have an offset from the target). Finally D if needed.

I don't know if the MS2 PID has separate P, I and D terms. All I see in your post is the "PID Ramp" ("P" term?) and how often the loop runs ("PID Control Interval - 200ms"). Running the loop at 5Hz is actually pretty fast -- not much time for the engine to react. Pretty sure Brain has a write-up on idle PID tuning for MS2 somewhere.
I have tuned for a constant VE and ign advance already in teh cells it is idling in (plus when hunting). I played again with the PID dc's trying to get it to stop hunting, but it did nothing to help. Attached is a log I took of it hunting. I tipped the throttle a bit during the log to show that as well.
Attached Files
File Type: msl
2013-10-09_21.34.45.msl (352.3 KB, 122 views)
vteckiller2000 is offline  
Old 10-10-2013, 04:56 AM
  #34  
Senior Member
Thread Starter
iTrader: (4)
 
vteckiller2000's Avatar
 
Join Date: May 2010
Location: Dallas
Posts: 824
Total Cats: 64
Default

While talking with a buddy who has a squirted mustang, it was suggested that I unplug my IAC and set whatever idle I want while hot. Then set my PID valve closed rpm to whatever That rpm is. Then manually check the idle duty cycle with the IAC test function at all the points in the initial idle table according to what duty cycle I need to get those rpms so I don't have it trying to hang rpm's when I release the throttle (before the PID kicks on for CL). Think this will help?
vteckiller2000 is offline  
Old 10-10-2013, 07:34 AM
  #35  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

idle activator at 300rpm is/was a good setting.

can you post all the screenshots of these screens instead of text?

is this running the gslender firmware or regular? v3.0 with a ms2 cpu or a diypnp with a microsquirt?
Braineack is offline  
Old 10-10-2013, 07:35 AM
  #36  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

Originally Posted by vteckiller2000
While talking with a buddy who has a squirted mustang, it was suggested that I unplug my IAC and set whatever idle I want while hot. Then set my PID valve closed rpm to whatever That rpm is. Then manually check the idle duty cycle with the IAC test function at all the points in the initial idle table according to what duty cycle I need to get those rpms so I don't have it trying to hang rpm's when I release the throttle (before the PID kicks on for CL). Think this will help?
no. our idle valves open up slightly when the connector is pulled so it's not the lowest value; failsafe.
Braineack is offline  
Old 10-10-2013, 10:27 AM
  #37  
Elite Member
iTrader: (4)
 
hornetball's Avatar
 
Join Date: Mar 2008
Location: Granbury, TX
Posts: 6,301
Total Cats: 696
Default

Based upon that log, it looks to me like you're making progress.

Let's look at two areas. This is your steady state where you are getting about a 300RPM oscillation:

What I see here is a lot of changes in the Idle DC with MAP responding immediately. But notice how long it takes for the engine RPM to react to the MAP change (almost 1 second between peak MAP and peak RPM). Basically, the timing of your PID loop is mismatched to how quickly the engine RPM can change causing the PID loop to overcontrol. You need to either reduce the gain or slow down the timing to match the engine's response. Other than that, you're looking pretty good.

Now let's look at the throttle blip:

Check out how high your Idle DC goes as a result of the blip. That's the dashpot. The dashpot is supposed to ease your RPM down to a stable idle and prevent droops/stalling. But in this case you have far too much. It's catching the engine at 1200RPM and then forcing RPM back up to 1350 before finally decaying. Takes almost 7 seconds before the effect of the dashpot is gone. That's WAY too much dashpot.

Anyway, work on your idle stability first by reducing gain and reducing the update rate of the PID loop.

Work on dashpot next. I'd start at no dashpot then add what you need to catch the engine fully loaded by accessories.

You're actually a lot closer than you think.

BTW, you have installed MegaLog Viewer, right? Absolutely required. And pay the nominal cost for the full version. Phil Tobin has given us a tremendous tool.
Attached Thumbnails Bought a car, tune is completely borked. Halp?-hunting.png   Bought a car, tune is completely borked. Halp?-throttle-blip.png  
hornetball is offline  
Old 10-10-2013, 10:34 AM
  #38  
Senior Member
Thread Starter
iTrader: (4)
 
vteckiller2000's Avatar
 
Join Date: May 2010
Location: Dallas
Posts: 824
Total Cats: 64
Default

Originally Posted by Braineack
idle activator at 300rpm is/was a good setting.

can you post all the screenshots of these screens instead of text?

is this running the gslender firmware or regular? v3.0 with a ms2 cpu or a diypnp with a microsquirt?
So I should change it back to 300 rpm? What is the keystroke for screenshot on a pc? It is gslender firmware and I was told you built the unit for john151.
vteckiller2000 is offline  
Old 10-10-2013, 10:42 AM
  #39  
Senior Member
Thread Starter
iTrader: (4)
 
vteckiller2000's Avatar
 
Join Date: May 2010
Location: Dallas
Posts: 824
Total Cats: 64
Default

Originally Posted by hornetball
What I see here is a lot of changes in the Idle DC with MAP responding immediately. But notice how long it takes for the engine RPM to react to the MAP change (almost 1 second between peak MAP and peak RPM). Basically, the timing of your PID loop is mismatched to how quickly the engine RPM can change causing the PID loop to overcontrol. You need to either reduce the gain or slow down the timing to match the engine's response. Other than that, you're looking pretty good.
I played with the PID timing between 100ms and 500ms and it did nothing.

Originally Posted by hornetball
Check out how high your Idle DC goes as a result of the blip. That's the dashpot. The dashpot is supposed to ease your RPM down to a stable idle and prevent droops/stalling. But in this case you have far too much. It's catching the engine at 1200RPM and then forcing RPM back up to 1350 before finally decaying. Takes almost 7 seconds before the effect of the dashpot is gone. That's WAY too much dashpot.
How can that be too much dashpot if I am only using 1.2 for a value? Are you sure it isn't just referring to the initial value table (which is higher dc than required for the given rpms throughout)?


Originally Posted by hornetball
Anyway, work on your idle stability first by reducing gain and reducing the update rate of the PID loop.

Work on dashpot next. I'd start at no dashpot then add what you need to catch the engine fully loaded by accessories.

You're actually a lot closer than you think.
I removed all the gain from the PID and the dashpot and slowly added it until it brought the idle down to commanded and it still oscillated at the minimum gain it required to get to the commanded rpm.

Originally Posted by hornetball
BTW, you have installed MegaLog Viewer, right? Absolutely required. And pay the nominal cost for the full version. Phil Tobin has given us a tremendous tool.
Yes I have.
vteckiller2000 is offline  
Old 10-10-2013, 10:45 AM
  #40  
Elite Member
iTrader: (4)
 
hornetball's Avatar
 
Join Date: Mar 2008
Location: Granbury, TX
Posts: 6,301
Total Cats: 696
Default

Originally Posted by vteckiller2000
While talking with a buddy who has a squirted mustang, it was suggested that I unplug my IAC and set whatever idle I want while hot. Then set my PID valve closed rpm to whatever That rpm is. Then manually check the idle duty cycle with the IAC test function at all the points in the initial idle table according to what duty cycle I need to get those rpms so I don't have it trying to hang rpm's when I release the throttle (before the PID kicks on for CL). Think this will help?
Let's talk big picture so I can explain what your buddy is really trying to say.

What you want is for the mechanical idle setup to fundamentally idle the car. This mean that when warm with no load (AC off, light off, etc.), Minimum Idle DC + mechanical air bleed gives you a steady idle at your target RPM.

The closed loop idle algorithm is then only used to bump up the Idle DC to compensate for loads.

Looking at your graph, you clearly do not have this situation because your Idle DC is always well above minimum.

As for dashpot, it's not just the 1.2. It's also those initial values, the "Leave Valve Open Above X for Y seconds" value, etc. It's whatever is forcing your Idle DC to the crazy high value that was being graphed.

Idle DC PID for steady state idle and dashpot are two different things. You need to think of them as such and tune them separately. Tune steady state idle first.

Your buddy sounds like he knows what he's doing. Buy him a beer and invite him over.

BTW, my PID loop operates at 1Hz because that is the fastest that my engine can respond to changes (just like yours).
hornetball is offline  


Quick Reply: Bought a car, tune is completely borked. Halp?



All times are GMT -4. The time now is 01:21 PM.