What is AutoTune?

For discussing MicroSquirt (TM) configuration and tuning of fuel parameters (including idle valves, etc.).
Forum rules
Forum rules
Read the manual to see if your question is answered there before posting. If you have questions about MS1/Extra or MS2/Extra or other non-B&G code configuration or tuning, please post them at http://www.msextra.com The full forum rules are here: Forum Rules, be sure to read them all regularly.
Rollagti16
MegaSquirt Newbie
Posts: 1
Joined: Thu Oct 07, 2004 1:13 pm
Location: Denmark

What is AutoTune?

Post by Rollagti16 »

Hello, one quastion. :
What is autotune in megatune??
efahl
Site Admin
Posts: 232
Joined: Mon Feb 16, 2004 3:15 pm
Location: San Clemente, California, USA
Contact:

Post by efahl »

Rolla,

Auto-tune is an algorithm in MegaTune's 3D tuning dialog that adjusts the VE table based upon feedback computed (usually) from the lambda sensor readings. It can be used with a narrow band sensor to tune the main part of the VE table to stoich, or with a wideband to tune just about all of the VE table.

Eric
Fastest95PGT
Helpful Squirter
Posts: 61
Joined: Sat Jun 12, 2004 5:27 pm
Location: Worcester, MA
Contact:

Post by Fastest95PGT »

When using a wideband and AutoTune, does it aim for the target AFR map as opposed to stoich for a narrowband?
1995 Ford Probe GT ~ Megasquirted & Boosted
275whp/242wtq @ 5.5psi ---- 317whp/287wtq @ 8.5psi
^^^ (thanks to MSnS-E and dyno tuning by me!)
2003 GSX1300R (Hayabusa)
boost junkie
Helpful Squirter
Posts: 62
Joined: Tue May 11, 2004 7:58 am
Location: dallas texas usa

Post by boost junkie »

Its my understanding that autotune just goes off of the EGO correction. If you set EGO correction to use the AFR table then thats what autotune will use...
-shawn
msns-e controled turbo neon
sample msq's!
Fastest95PGT
Helpful Squirter
Posts: 61
Joined: Sat Jun 12, 2004 5:27 pm
Location: Worcester, MA
Contact:

Post by Fastest95PGT »

Thanks Shawn.
1995 Ford Probe GT ~ Megasquirted & Boosted
275whp/242wtq @ 5.5psi ---- 317whp/287wtq @ 8.5psi
^^^ (thanks to MSnS-E and dyno tuning by me!)
2003 GSX1300R (Hayabusa)
efahl
Site Admin
Posts: 232
Joined: Mon Feb 16, 2004 3:15 pm
Location: San Clemente, California, USA
Contact:

Post by efahl »

Fastest95PGT wrote:When using a wideband and AutoTune, does it aim for the target AFR map as opposed to stoich for a narrowband?
As Shawn says, it simply tries to minimize the error in the control variable, which is almost always set to be EGOcorrection. The tuning algorithm looks at the value of the specified output, sees if it's 100 and if it's not it adds/subtracts something from the current table entry to move the output closer to 100.

Code: Select all

   correction     = EGOcorrection_value
   value          = VEtable_value / 100.0
   steps          = gain * value * (correction-100)
   VEtable_value = VEtable_value + steps
There are a bunch of other parameters dictating when this can happen (both in terms of proximity to a node and frequency of updates), which should not be too loose or too fast or the algorithm can become unstable.

Eric
ochizon
Helpful Squirter
Posts: 42
Joined: Mon Jan 16, 2006 1:59 pm

Post by ochizon »

Im sorry if im a little dense...

There are 2 functions for autotune?

1. Autotuning the VE table: Sets the VE output based on the wideband acheiving the desired output.

2 EGO correction: Once the VE table is set in stone, the wideband functions only for minute alterations to maintain the desired AFR output.

Is that right? Or is it ONLY #2?
Fastest95PGT
Helpful Squirter
Posts: 61
Joined: Sat Jun 12, 2004 5:27 pm
Location: Worcester, MA
Contact:

Post by Fastest95PGT »

Thanks for the expanded clarification Eric.

I am wondering if you need to be in closed loop for AutoTune to work with a Wideband since no EGO correction is going on?
1995 Ford Probe GT ~ Megasquirted & Boosted
275whp/242wtq @ 5.5psi ---- 317whp/287wtq @ 8.5psi
^^^ (thanks to MSnS-E and dyno tuning by me!)
2003 GSX1300R (Hayabusa)
efahl
Site Admin
Posts: 232
Joined: Mon Feb 16, 2004 3:15 pm
Location: San Clemente, California, USA
Contact:

Post by efahl »

ochizon wrote:There are 2 functions for autotune?

1. Autotuning the VE table: Sets the VE output based on the wideband acheiving the desired output.

2 EGO correction: Once the VE table is set in stone, the wideband functions only for minute alterations to maintain the desired AFR output.
Well... Actually both simultaneously. Your MS will compute EGO correction and apply that internally. MT's auto-tune algorithm is watching that EGO correction and minimizing it by messing with the VE table. Obviously the MS does its EGO correction all the time (assuming closed loop is enabled), but MT can only do its bit when you have MT connected to a running engine.

Eric
efahl
Site Admin
Posts: 232
Joined: Mon Feb 16, 2004 3:15 pm
Location: San Clemente, California, USA
Contact:

Post by efahl »

Fastest95PGT wrote:I am wondering if you need to be in closed loop for AutoTune to work with a Wideband since no EGO correction is going on?
Now that you mention it, no, you wouldn't necessarily need to be in closed loop mode at all.

You could set the auto-tune up to do something like this, which would work irrespective of whether you were running closed- or open-loop:

Code: Select all

[OutputChannels]
   ...
   lambda    = { 1.5 - 5.0 * egoADC/255.0               }
   afr       = { lambda * 14.7                          }
   targetAFR = { vexInterp(rpm, map, 0, "afrtable.vex") }
   AFRcorr   = { (afr / targetAFR) * 100.0              }
   ...

[AutoTune]
   table = veTableMap
      corrector = AFRcorr
      ...
Just make up a vex file "afrtable.vex" and you're off to the races.

Eric
Post Reply