Knock control

Post Reply
Jez
Horsham Developments
Posts: 64
Joined: Sun Jun 22, 2008 10:20 pm
Location: Newbury, Berkshire
Contact:

Knock control

Post by Jez »

I'm trying to calibrate my solaris so I can use closed loop knock control effectively.

Can anyone explain what the integrator time constant does / means - how do you go about optimising it's value.

I've chatted to Ryan about it breifly, but I've forgotten what he recommended :roll:

If anyone has any tips on setting it up properly I'd be grateful :)
pat
Syvecs Staff - Cleaner
Posts: 356
Joined: Fri May 23, 2008 10:23 am
Location: Out there... somewhere
Contact:

Re: Knock control

Post by pat »

Jez,

In order to understand the significance of the configuration parameters you need to understand how the signal is processed:

Starting at the knock sensor, the signal is fed into the ECU and to the periphery of the knock processor, where it goes through a fixed analogue gain stage. The purpose of the analogue gain stage is to present a signal that is neither too small nor too large for the following stages; if it is too small then the signal to noise ratio will be poor whereas if it is too large then it will get clipped (which ads considerable spectral energy at higher frequencies and could "drown out" the signal we are interested in).

Next it goes into an anti aliasing filter to remove spectral energy above the nyquist frequency of following analogue to digital converter. There are no settings for this stage, it is controlled by the system clock speed and you don't need to worry about it, it will be right for the system sampling rate.

The quantised signal then goes through a programmable gain stage, this is what you're programming with the gain setting; the aim here is to keep the signal to noise ratio sensible for the next stage. It allows the system to be matched to the engine without needing to change components in the analogue gain stage.

Once through the digital gain stage the signal goes through a programmable bandpass filter, this is what you're programming with the frequency setting. Engine knock is normally an inverse chirp signal, it starts at a high frequency and drops in both frequency and energy with time, so the centre of the bandpass filter should be set so that its passband permits as much spectral energy from the chirp through as possible. Sampling knock and running it through a spectrum analyser will give you a good idea of what your engine does when it knocks.

Once filtered, the signal is rectified. There is nothing for you to adjust on this stage, it just does what it does.

The final stage is the digital integrator. "Physically" it is controlled by an integrate input and the integrator time constant. "Logically" we want to listen for knock when it is likely to happen, and to do this we define a window of crank angles within which we realistically expect knock to occur, there's no point in listening to knock during the exhaust stroke! The integrate input is asserted by the timing logic when the crank is at the start angle; this causes the integrator to reset and to start integrating. The integrate input is deasserted by the timing logic when the crank is at the end angle; this causes the integrator to cease integrating and to hold the result. The rate at which the output of the integrator rises for a given input is determined by the integrator time constant, for simplicity just think of it as the time that it would take the integrator to swing from zero to full scale if a full scale input signal was present; the lower the number the quicker it rises, it's a bit like a gain but it's used for fine tuning time. If it's too low we can end up saturating the integrator output before the window has finished, if it's too high then we could find that even with heavy knock we still don't get a particularly high output from the knock processor.

Once the timing logic deasserts the integrate input, the knock processor's output is read by the knock control strategy to update the knockBase for the cylinder that just fired. For simplicity you can consider the knockBase to be a running average value for a given cylinder. We do knock discrimination on the premise that the knockBase is an ambient noise level for that cylinder in the absence of knock. The current knock value is then compared to the acceptable values in the Event Detection Level and Severe Event Detection Level tables; if it exceeds those values then a knock event is generated / deemed to have occurred and something must be done about it. This is very important because the premise is that knockBase represents background noise, and must not become contaminated with knock signal energy; if that happens then the discrimination will not work.

In terms of getting the right numbers in there, start with something in the region of a gain of 0.5, bandpass frequency around 6kHz, integrator time constant around 200, start angle around 0 degrees, end angle around 30 degrees. Turn on the knock detection at idle and see what sort of figures you're getting... they should be less than 10 but not 1 or 2, between 4 and 6 is a good starting point; you may need to play about with the gain to get the figures into this range. Do some runs with conservative timing and det cans to make sure there is no knock, leave knock control off but keep detection on and datalog the runs. Ideally you don't want to see more than 35 on the run. You can fine tune the individual cylinder trims at this point too so they all read the same. You may need to adjust the gain and/or time constant to get the readings in the right ballpark. Log the knock for each cylinder at a high sample rate (100Hz should be fine), so you can use SView to work out where you are / need to be with the event detection level settings... have a look at each knock trace in turn and also use a math function to get an average [you can use runavg(channel, samples) or filter(channel, filter_constant)]... then you can use another math function to subtract the average from the actual value to see what sort of "spikes" are normal, SView will automagically highlight the maximum present in your present view of the log. Once you have your acceptable "spike" thresholds for a clean run you can populate the event detection levels, allowing a little more than the "spikes" of course :) The default values are normally around 1.5x knockBase but you may find that's either too sensitive or not sensitive enough for your engine. Once you have event detection levels configured you can turn on knock control and test it with the cans on; it shouldn't be pulling timing as it is, if it is then you need to re-check your levels. Once it is OK you can start adding timing, you should see it pull timing before you can actually hear it, that is normal because if configured correctly it should be more sensitive than your hearing.

Hope this helps,

Pat.
Jez
Horsham Developments
Posts: 64
Joined: Sun Jun 22, 2008 10:20 pm
Location: Newbury, Berkshire
Contact:

Re: Knock control

Post by Jez »

Thanks Pat, thats great!

One thing I have noticed, and I guess theres no direct way around it, is that if I set the cylinder gain so that I get a similar amount of noise on each cylinder during idle, the amount of noise I get for each cylinder when under load or higher rpm (but with no knock) is very different. Do you think I should tune the cyl gain so I get a similar amount of noise on each cyl under load, or should I change the knock threshold for each cyl. I'd imagine the former.

Do you know if/when any documentation for the Solaris will be available? The help included in Scal is ok, but theres is a huge amount missing.
Ryan.g
Syvecs Staff - Caretaker
Posts: 571
Joined: Fri May 30, 2008 4:05 pm

Re: Knock control

Post by Ryan.g »

Great post Pat!

I trimmed my gain levels based on the logs of when on load Jez as i found the same as you.

With a bosch knock sensor, i run gain at 1.5 and Intergrator Time constant at 180 but my sensor is not bolted to the block.

Ryan
Post Reply