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-10-2013, 10:50 AM
  #41  
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
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.
True, it hovers around 30% and minimum I measured was ~23%. So is it good practice to set the mechanical idle that way and then tune for stable idle after?


May it help to tune my initial value table to get a smoother rpm decrease to idle? As the last post in this thread specifies:
http://www.msextra.com/forums/viewto...?f=131&t=49926
vteckiller2000 is offline  
Old 10-10-2013, 10:56 AM
  #42  
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 hornetball
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.
be careful with your MSI knowledge. dashpot is only an arbitrary dc% adder when you lift the pedal BEFORE CL is active.
Braineack is offline  
Old 10-10-2013, 11:08 AM
  #43  
Elite Member
iTrader: (4)
 
hornetball's Avatar
 
Join Date: Mar 2008
Location: Granbury, TX
Posts: 6,301
Total Cats: 696
Default

Originally Posted by Braineack
dashpot is only an arbitrary dc% adder when you lift the pedal BEFORE CL is active.
An engine is an engine. You have a steady state idle provided by an air bleed that can vary a bit to compensate for load + additional air ("dashpot") to catch it on the way down.

MS2 is using a variety of mechanisms to "dashpot" the engine -- obviously not just the arbitrary "Dashpot DC Adder." What OP needs to do is look at his log, figure out where the additional DC is coming from (table, dc% adder, whatever) and adjust it to appropriately catch the engine on the way down.
hornetball is offline  
Old 10-10-2013, 11:33 AM
  #44  
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
True, it hovers around 30% and minimum I measured was ~23%. So is it good practice to set the mechanical idle that way and then tune for stable idle after?


May it help to tune my initial value table to get a smoother rpm decrease to idle? As the last post in this thread specifies:
Megasquirt MSEXTRA / MS3EFI • closed loop idle initial values (View topic)
Yes and yes.

By "Mechanical Idle" we mean (Mechanical Air Bleed + Minimum Idle DC).

You can put the MS in manual idle mode, set the DC to 23.8% and then adjust the mechanical bleed for RPM. Done.
hornetball is offline  
Old 10-10-2013, 11:38 AM
  #45  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

why would you do this?

if you're idling at 30% with a valve that operated between 20-60%, and it's a good rpm, why do you want to lower it to the far end? what happens on a hot day, go back out and reset it for summer? silly.
Braineack is offline  
Old 10-10-2013, 11:39 AM
  #46  
Elite Member
iTrader: (4)
 
hornetball's Avatar
 
Join Date: Mar 2008
Location: Granbury, TX
Posts: 6,301
Total Cats: 696
Default

You didn't read what I said.
hornetball is offline  
Old 10-10-2013, 11:41 AM
  #47  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

you're saying set the idle valve at lowest dc%

then tuning the bleed screw so the idle speed is now at the rpm you want to idle at.



that doesn't make sense to me.
Braineack is offline  
Old 10-10-2013, 11:51 AM
  #48  
Elite Member
iTrader: (4)
 
hornetball's Avatar
 
Join Date: Mar 2008
Location: Granbury, TX
Posts: 6,301
Total Cats: 696
Default

Originally Posted by Braineack
you're saying set the idle valve at lowest dc%

then tuning the bleed screw so the idle speed is now at the rpm you want to idle at.



that doesn't make sense to me.
It's only the first step in a process. You then go back to CL and the only thing CL needs to do is compensate for loads. You still need to tune CL, but at least you've got a solid base.

Maybe Joe said it best:
https://www.miataturbo.net/megasquir...e2/#post263116
hornetball is offline  
Old 10-10-2013, 12:24 PM
  #49  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

But then your idle target it just the lowest physical limits of the idle valve at that particular temperature.

you'll have to retune it in warmer temps and other negs that came with no being able to close it enough.

idling at 30% is exactly where I do and my valve works at 19-62% and i have ZERO idle issues cause I tuned it.
Braineack is offline  
Old 10-10-2013, 12:35 PM
  #50  
Elite Member
iTrader: (4)
 
hornetball's Avatar
 
Join Date: Mar 2008
Location: Granbury, TX
Posts: 6,301
Total Cats: 696
Default

In warmer temps CL bumps RPM for you. You don't retune.

Hey, works for me, works for Joe, works for OP's Mustang bud. You're doing it differently. I'm cool with that.

In any case, OP's CL is currently hyperactive because it's responding too fast for the engine.
hornetball is offline  
Old 10-10-2013, 12:47 PM
  #51  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

again, you are mistaking MSI code for MS2/MS3 code.


so reduce the P and I.
Braineack is offline  
Old 10-10-2013, 12:50 PM
  #52  
Elite Member
iTrader: (4)
 
hornetball's Avatar
 
Join Date: Mar 2008
Location: Granbury, TX
Posts: 6,301
Total Cats: 696
Default

+1 to working on P and I.
hornetball is offline  
Old 10-10-2013, 01:33 PM
  #53  
Senior Member
Thread Starter
iTrader: (4)
 
vteckiller2000's Avatar
 
Join Date: May 2010
Location: Dallas
Posts: 824
Total Cats: 64
Default

Going out to mess with it now. Should I use the initial values table or last known value?
vteckiller2000 is offline  
Old 10-10-2013, 02:09 PM
  #54  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

okay, so you have ms3?
Braineack is offline  
Old 10-10-2013, 02:11 PM
  #55  
Elite Member
iTrader: (4)
 
hornetball's Avatar
 
Join Date: Mar 2008
Location: Granbury, TX
Posts: 6,301
Total Cats: 696
Default

What? Posting in your own thread? LOL. Brain, are we going to allow this?

I'm only familiar with Last Known Value because that is the only thing MS1 has.
hornetball is offline  
Old 10-10-2013, 02:18 PM
  #56  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

I was under the impression only ms3 had initial duties table, unless this was glsender code, but for that I'd have to look and still wasnt aware of it.
Braineack is offline  
Old 10-10-2013, 02:23 PM
  #57  
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
okay, so you have ms3?
MS2 pnp that you built with gslender code. It may be a MS2E though since I have an initial value table.


I got it to idle decently, but I had to use 120% derivative gain. I do not like that.
vteckiller2000 is offline  
Old 10-10-2013, 04:03 PM
  #58  
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
I got it to idle decently, but I had to use 120% derivative gain. I do not like that.
So, what PID values did you end up with? And what was your tuning methodology?
hornetball is offline  
Old 10-10-2013, 05:12 PM
  #59  
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
So, what PID values did you end up with? And what was your tuning methodology?
P - 20%
I - 30%
D - 120%


I lowered the initial value table about 2% across the board, then added I gain until it reached target rpm reasonably. I then added P gain until it recovered smoothly from turning on the headlights and a/c. It was oscillating the whole time so I added D gain until it smoothed out. It still oscillates but it is almost unnoticeable. Something is wrong to have to use the D gain so much, no?

I also noted that it takes ~3-4 dc% to notice a change on idle. That is awful resolution and maybe the source of my problem? FWIW I am running IAC freq at 13.

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

You're right to be suspicious of so much "D." Should be able to do this with almost no "D."

Assume you've seen the following:
Idle Control
https://www.miataturbo.net/megasquir...request-59027/

What you are doing sounds correct with two exceptions:
1. When you start, set all values to 0 so you can get a good "I" value without interference from anything else.
2. Make sure you are not oscillating at the end of every step. You should not accept oscillation and then crank in a bunch of "D" at the end to mask it.

In the log you posted this morning, I see some Idle DC steps in the 0.4% range and each step is clearly causing a MAP change. I don't see any issue there.

You may be confusing what Idle DC changes. Idle DC changes MAP. MAP eventually changes RPM (with about a 1 second lag when we are at idle RPM). That is why this is challenging and why you need to treat your gains gingerly.
hornetball is offline  


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



All times are GMT -4. The time now is 09:41 PM.