Issues with Dwell Battery Correction

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
Shad Laws
MS/Extra Newbie
Posts: 18
Joined: Fri May 04, 2007 9:58 am
Location: Palo Alto, CA

Issues with Dwell Battery Correction

Post by Shad Laws »

Hey guys-

I've noticed two things about the dwell battery correction values that I think merit pointing out...

First thing: why are the dwell battery correction values so high? It makes sense to me that lower voltages need more time. It also makes sense that this would still roughly follow a 1st-order RL decay.

Here's what the "default" table says:
6v - 500%
8v - 248%
10v - 168%
12v - 128%
14v - 102%
16v - 88%

Here's what a simple 1st-order decay equation (t = -L/R * ln(1-R*I/V)) would predict:
6v - 243%
8v - 180%
10v - 144%
12v - 119%
14v - 102%
16v - 89%

Now, of course, this neglects the fact that there is a voltage drop across the IGBT... not all of the full battery voltage is available to the coil. So, we can offset the available voltage by 1.5v and get the following:
6v - 291%
8v - 199%
10v - 151%
12v - 122%
14v - 102%
16v - 87%

Second thing: It appears that the "default" table inherently considers 14v as the "normal" voltage. I've looked through the v1.0.2 code and it appears that it considers 12v as the "normal" voltage. The problem here is that if someone upgrades from v1.0.2 to v2 beta, their dwell time is going to basically go up by about 20% or so. This is bad news. It just *might* lead to *someone* frying an IGBT...

... such as, say, myself :-). The car ran fine for over 500 miles with v1.0.2, then fried the IGBT within 10 miles after the upgrade. I think this may be the reason why. My suggestion: redo the table to normalize around 12v instead of 14v. This will keep it consistent and avoid people (like me) from frying their chips :-).

So, here's the table I might suggest. It's the same as the able above that accounts for a 1.5v IGBT drop, normalized to make 12v = 100%.
6v - 239%
8v - 163%
10v - 124%
12v - 100%
14v - 84%
16v - 72%

What do you think?

Thanks, guys!

Take care,
Shad
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Post by muythaibxr »

The values in the table might be a bit high, but we purposely made it around 14v, so that when the car is running, the value you set is the value that actually happens.

As far as I'm concerned it's just an issue of documentation, and getting people to read it once it's documented.
6040solder
Experienced MS/Extra'er
Posts: 307
Joined: Mon Oct 22, 2007 7:15 am
Location: Auckland, New Zealand

Post by 6040solder »

14 - 14.4 is the right place for zero/100% if you ask me, not that you did, but I agree. Even if it does confuse people that change versions.

After all, any software that changes major version number is highly likely to have large differences to it in one way or another.
Gokart
Master MS/Extra'er
Posts: 667
Joined: Thu Aug 03, 2006 2:38 am
Contact:

Post by Gokart »

Something that confuses me is, most of the calculations for injector deadtime are in uSec while ms2 uses % for it's calculation.

For different type/size of injector, does 14v always point to 100%? ( Assuming a working engine is running/charging at 14v ).

To my understanding, different injector sizes are rated at different uSec opening time hence confusing me of what base does that 100% is pointing at. Even though my car is running fine, I'd like to understand further.

Injector manufacturer usually gives the spec in uSec too, not %.
(4G63T - MSIIextra) (4G13 - MS3-beta testing)
Shad Laws
MS/Extra Newbie
Posts: 18
Joined: Fri May 04, 2007 9:58 am
Location: Palo Alto, CA

Post by Shad Laws »

Hello-

I can see the argument of 12v vs. 14v, and agree that it is a matter of documentation. In particular, the documentation needs to warn people to look at the voltage they're considering. For example, if they run the coils with the engine off, as I did, they need to know that turning it on will kick the voltage from 12v to 14v and decrease dwell. They also need to know that the values consistent with all previous versions may lead to fried IGBTs without modification.

However, even at that, the default values are way off the predicted values, and not in a conservative way. They're notably more agressive, which could lead to issues at some point...




Also, a comment on injector opening time vs. coil dwell time question above... one big difference is that coil dwell time is very easily characterized by a simple first-order decay, which says that, for similar coil parameters, the timing should scale as a %, not a fixed ms increase or decrease. The parameter we call "injector opening time" (which, actually, isn't the injector opening time) doesn't do this. The parameter we use is basically the constant part of the affine relationship between pulsewidth and fuel:

fuel = b * (PW-a)

The b part we know from the steady-state flow rate of the injectors. The a part accounts for all of the ugly nonlinearities surrounding injector opening and closing (during which flow is kinda wonky). Now, it turns out that at low pulsewidths, this equation is a pretty bad approximation (opening and closing dominate, so the nonlinearities rear their ugly heads). So, for our purposes, we lump them together into this term and implicitly promise never to have ultra-short pulsewidths :-).

Now, how this changes with voltage is anyone's guess. The model MS uses is roughly approximate at best, but it does the job for most intents and purposes. The good news is that, if it's a bit off when the voltage goes way off for a bit, no transistors fry. The same isn't necessarily true for dwell times with 500% correction factors...

Take care,
Shad
Gokart
Master MS/Extra'er
Posts: 667
Joined: Thu Aug 03, 2006 2:38 am
Contact:

Post by Gokart »

I start to get some picture here. Dwell battery correction is strictly for ignition dwell compensation and have nothing to do with injector deadtime which I have mixed up. Therefore, the dwell time that we put in 'more ignition settings' are the base numbers for 100% condition. Am I right here?

If the running voltage is 14v, therefore the 100% condition should be at 14v table bin etc.

What about injector deadtime. How to determine and how to compensate in MT? Is the injector pwm time threshold refers to this? If this is the compensator, therefore MT is just taking the baseline and any variations in voltages are not accounted or automatically calculated to deal with the compensation. OEM ecu usually have the injector deadtime table just like what we have for the dwell battery correction.
(4G63T - MSIIextra) (4G13 - MS3-beta testing)
jsmcortina
Site Admin
Posts: 39611
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

Are you referring to injector opening time? That is and always has been in milliseconds.

Dwell battery compensation is spark only, nothing to do with fuel.

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".
Gokart
Master MS/Extra'er
Posts: 667
Joined: Thu Aug 03, 2006 2:38 am
Contact:

Post by Gokart »

Yes, that was what I referred to and I got mixed up between the injector opening time and 'ignition' dwell voltage corection which confused me. There's nothing wrong with what you guys did, just my lack of understanding of the functions.
(4G63T - MSIIextra) (4G13 - MS3-beta testing)
Post Reply