[Diy_efi] RE: 60-2 Toothwheel - Kalman Filter or ( EKF )

Bernd Felsche bernie
Sat Apr 7 04:15:50 UTC 2007


On Saturday 07 April 2007 00:54, James Holland wrote:
> > >I only have a Camshaft Position Sensor giving 2 pulses per
> > >revolution (TBI).

> > >It sounds like this could be a very good implementation for me.
> > >However if I'm accelerating wouldn't this be reflected in the
> > >MAP value and therefore any ignition retardation would be at
> > >least partly accounted for within the timing look up table
> > >anyway?

> > <cough> 2 ppr  !

Probably 4 "edges".

> Well that's the stock set up, Suzuki Vitara 1.6 8V with TBI. The
> distributor has a hall effect sensor with four cut outs on the
> vane. The 16V engine had the same distributor set up but with a
> Crank Sensor(1ppr) to enable the injection to be synchronized.

If the distributor is "static", i.e. no mechanical or other
"advance" built in, then you have 8 edges to use for timing in one
engine cycle (2 crank revs). Backlash and flexibility in the
distributor drive can cause some "interesting" errors.

I gather that the 16V had a camshaft sensor as that would allow the
injection to be sequential. A single pulse off the crank doesn't
make a lot of sense as the distributor is already providing 4 edges
per crank revolution. Maybe the distributor drive became too
flexible for reliable timing; perhaps by driving a DOHC?.

> Well its not a performance engine, however your current debate
> raised a few interesting points and got me wondering whether there
> was any noticeable improvement that could be effected.

This is the key question. And it applies to a performance engines.

How quickly could an engine accelerate under control and how quickly
would you want it to?

If you went from 900 to 6000 rpm in 2 seconds (it makes the numbers
easier), then that represents 15 revs/sec to 100 revs/sec in 2
seconds; or an average acceleration of 42.5 revs/sec/sec.

The "mis-timing", the error in not detecting a speed change is worst
at low speeds, so resolution is important to detect the actual speed
as soon as possible. But the engine's speed cannot change
instantaneously without some operating parameter also changing;
load, air, ignition or injection.

The change in speed is detected by comparing the expected
time to the detected time and then anticipating the next event
correspondingly earlier/later than for constant speed. (I will
avoid diverging into how the _expected_ times for constant speed may
be calculated.)

If there is again an error in the same direction when the next event
actually happens, then there is continued acceleration. Which may be
nice to know... the angular acceleration can be detected from just
one "mis-anticipated" event; though it requires at least half a rev
with so few marks (*) and minimal ECU resources to get a useful
average, taking into account compression, etc -based angular
velocity changes.

(*) In theory one full cycle; but you get one full cycle in half a
rev of a 4-cylinder, 4-stroke.

Going back to the numbers, the average acceleration of 42.5
revs/sec/sec is equivalent to an average of 170 edges/sec/sec if the
edges were evenly-spaced. (*) With the engine turning at 15 rev/sec,
or 120 edges/sec, the initial timing error would be from edges are
expected to appear about every 8.333 ms on average, but the first
accelerated edge could be detected sooner. At 8.265 ms on average
(if I've solved the quadratic equation correctly).

(*) Edges are typically at 78 and 6 degrees BTDC, giving 72 and
108-degree crank intervals.

That appears to be somewhat detectable, being an error of about 68
microseconds (us). In the previous draft design, the timer
resolution was 8 us, so it would be detected 7 (or 8) ticks before
anticipated. Any subsequent event can be anticipated and outputs
scheduled to occur that much earlier (as) if the engine were at a
constant speed.

At higher (max) engine speeds, the acceleration becomes
"undetectable" (@ ~2 us) because of the 8 us timer resolution.
So one "cheats" by sampling/detecting on fewer edges. :-)

Strictly speaking, that cheat is "not correct" but keep in mind that
the things being controlled have comparatively slow responses; e.g.
spark ignition takes of the order of a millisecond and varies by
about +/- 200 microseconds.

So how much of a difference do and can the "esoterics" like Kalman
filtering make to the operation of the engine in the real world?

-- 
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ /  ASCII ribbon campaign | "If we let things terrify us,
 X   against HTML mail     |  life will not be worth living."
/ \  and postings          | Lucius Annaeus Seneca, c. 4BC - 65AD.






More information about the Diy_efi mailing list