gemellocattivo.com
http://gemellocattivo.com/forum/

Spark Control
http://gemellocattivo.com/forum/viewtopic.php?f=19&t=148
Page 1 of 1

Author:  mk e [ Wed May 20, 2015 7:28 pm ]
Post subject:  Spark Control

I'm working on spark control now and have coil dwell v battery voltage working (I think)

Now to actually set timing. The simplest thing is just a load v rpm table and all cylinders the same....and that is generally all I ever use. I could add an air temp and/or coolant temp retard.....or knock retard I guess but I don't really need it

John, do you need or want anything beyond a basic table?

Author:  cribbj [ Thu May 21, 2015 8:22 am ]
Post subject:  Re: Spark Control

Mark, can we start with a basic 2D ignition map and add bells & whistles later?

For example, sometimes it's helpful to be able to vary idle speed with timing rather than solely with the IAC valves.

Author:  mk e [ Thu May 21, 2015 9:28 am ]
Post subject:  Re: Spark Control

cribbj wrote:
Mark, can we start with a basic 2D ignition map and add bells & whistles later?

For example, sometimes it's helpful to be able to vary idle speed with timing rather than solely with the IAC valves.


Yes......it's really easy to add channels but really hard to add channels in an order that makes sense so they get all helter-skelter pretty fast

The solution to that is something on the file menus in EL Console called "Run append script". What this does is let you make a bunch of small and hopefully neat modules and you run the script to link them all into a big finished model. I started playing with this yesterday and figured it out I think so toady I will break up what I already did into very small modules....like the MAP sensor will be its own module small and then all the magic happens in the build script which make adding idle control to spark easy.

Author:  mk e [ Mon May 25, 2015 7:52 pm ]
Post subject:  Re: Spark Control

spark looks like its working on the sim.....I need to test on the real hardware...and pretty up the colors :oops:

Attachments:
spark.JPG
spark.JPG [ 284.9 KiB | Viewed 19386 times ]
Dwell.JPG
Dwell.JPG [ 82.67 KiB | Viewed 19386 times ]

Author:  mk e [ Sun Nov 01, 2015 7:06 am ]
Post subject:  Re: Spark Control

I added a few things this morning

Coil enable - there's a user input to turn the coils on/off and if off, I set dwell to zero. I also now set dwell to 0 when the engine is not turning. I need to setup a red-limiter and that will try back into this too.

Timing lock and lock set point - this sets the timing to a fixed point when the user enables it. This is very handy when doing the initial crank timing setup.

Attachments:
coil enable.JPG
coil enable.JPG [ 76.96 KiB | Viewed 19208 times ]

Author:  apalrd [ Sun Nov 01, 2015 2:13 pm ]
Post subject:  Re: Spark Control

Our first-gen spark control:

-There was a table indexed by TPS and RPM. This set spark advance. 17x17 size
-There are two scalars, the number of spark events to cut when on the rev limiter and the total number of events in the pattern
-There was a third scalar for the rev limiter RPM

We used more table resolution at low RPM to make a 'hill', idle would float up and down the hill, RPM would stabilize fairly well from this.

The rev limiter had a boolean which would increment a counter every TDC if RPM was above limiter RPM. The counter rolled over at 1-'# of events in pattern' and spark would be cut if the counter was between 1 and # of events to cut. It makes a very pleasant sound.

Lessons learned:
-Rev limiter worked well (we still use that design but don't actively ride the limiter under most cases).
-Spark was not tied to any changes in fueling and we had to re-cal spark after fueling changes. This was acceptable for racing car but not for snowmobile (snowmobile never used this code).

Second-gen spark control:
-Switched to charge-based spark (spark indexed by RPM and Charge)
-We introduced eco mode switching and simply had 2 spark surfaces. This was a PITA since we had to cal everything twice even though portions of the surface were the same
-Still no closed-loop idle

Lessons learned:
-Need to decouple the surfaces of engine data/cal from the desired F/A. Desired F/A affects spark directly and it would be better to have multiple surfaces at different FA's than having a spark surface for each F/A surface. We ended up calibrating the engine rich and lean and then copy-pasting the sections of the surface to match the F/A surface. This worked okay

Third-gen spark control:
-Single spark surface for lean spark and single table at WOT only for rich WOT spark
-This worked okay but wasn't ideal, it was a stopgap solution
-Engine was 'too efficient'. We set full spark advance above 2000rpm since our cruising speeds at low speeds could get down to 3000 (we have a mechanical CVT which regulates engine speed). Normally we would retard linearly spark down to idle levels from 3500 and down. We found that it could get into a condition at 10mph where it would idle forward at 3000rpm since it would hit the min ETC clip at about 4% and produce enough power to move. Lightly tapping the brake would drag the engine down enough to get it to real idle again. Our current solution is to force retard spark below 2% pedal input ('power off spark' table of about 7-10deg).

Fourth gen thoughts:
-Closed-loop idle with spark - Set target idle speed in idle mode, use idle PID control with spark to maintain idle speed, use PI control with throttle (ETC) or IAC to control to a target idle spark advance (so ETC/IAC has a slow control loop to target e.g. 7deg of advance).
-Interpolated multiple surfaces for F/A or some other inclusion of FA directly (maybe need a model?)
-Air temp correction to predict knock - I have thoughts on this but nothing good yet

We have dial overrides through the code. These are bits of code which create a boolean and scalar calibration, if the boolean is 1 it overrides the parameter with the scalar. We have them scattered all over in the code. There is one for base spark. With the 2cyl individual cylinders we solve spark twice (once per cyl) based on a different charge but there are no separate cylinder tables. We can use dial spark during cal (on an engine dyno) or to do timing tests. There's also dial spark without

Author:  mk e [ Mon Nov 02, 2015 9:00 pm ]
Post subject:  Re: Spark Control

mine is just load v rpm which I think is fine for most applications.

Today I added an injector cut so you can crank without fuel if you want (like for setting base timing) and a simple rev limiter. The rev limiter is a hard limiter that cuts fuel or spark or both when you hit the limit.

I did a little clean up and consolidation as well.....basically I'm stalling before jumping into the ETC stuff that I know very little about.

Attachments:
Rev limiter.JPG
Rev limiter.JPG [ 46.8 KiB | Viewed 19195 times ]

Author:  apalrd [ Mon Nov 02, 2015 10:08 pm ]
Post subject:  Re: Spark Control

I've been thinking through the possibilities of model-based spark, but it's HARD (there's a reason that, as far as I can tell, no company does entirely model based control for spark).

One surface works perfectly well. Unless you are doing flex/fuel, then it's recommended to have a separate ethanol surface.

Author:  mk e [ Mon Nov 09, 2015 10:27 am ]
Post subject:  Re: Spark Control

mk e wrote:
mine is just load v rpm which I think is fine for most applications.

Today I added an injector cut so you can crank without fuel if you want (like for setting base timing) and a simple rev limiter. The rev limiter is a hard limiter that cuts fuel or spark or both when you hit the limit.

I did a little clean up and consolidation as well.....basically I'm stalling before jumping into the ETC stuff that I know very little about.



I learned there is a rev limit function of sorts not listed in the web page documentation.

"SPK_Probability [%]" and "SPK_CutLimit" are generally used for revlimiting. The probability a spark event will occur and the maximum number of concurrent spark events to skip. The same goes for injectors"

now to figure out how exactly to use them.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/