Copyright© IfAC Programmable Devices and Embedded Systems Bmo, Czech Republic, 2006
r
Icf
C'.>
Publications
ESTIMATION OF KNOCK INTENSITY IN SPARK-IGNITION ENGINES BY USING WAVELET TRANSFORM .J erzy Fiolka •
• Silcsian Univcrsity of Technology, Faculty of Automatic Control, nlectronics and Computer Science, institute of Elcctronics, 'ul, Akademicka 16, 44-100 Gliwicc, I'oland, e-mail:
[email protected]
Ab"trad: Knock in "park ignition (SI) enginc,,; i" an undc,,;irabJc Illode of COIllbustion, causing high combustion pressure pulses associated with vibration of the engine block, Thb phenomenon limit" performance, durability and fuel economy of SI engine", In thb paper the author propO"~ a new knock detection method called WBKD (Wavelet B~ed Knock Detection), which is ba"ed on wavelet tran"form, Real data experiments confirmed the utility of the proposed approach for knock intensity estimating, Keywords: Automotive control, Time-frequency representation, Signal detection, Signal proce"sing
1. INTRODUCTION
the engine torque, exhaust emission and fuel economy, To achieve the"e goalli an effective method for knock detection is required,
Knocking comhustion takP.." place when the last part of the unburncd gas mixture in the combustion chamber self-ignites and burns ver)' rapidly, An extremely TApid T"lpasp of th" ch"mical PIWTgy results in sharp increase of pressure and temperature, producing a shock wave and a characteristic metallic "ound, which give" engine dct.onation it" name, Severe engine knock can lead to engine damage and loss of power, Moreover, it is also und~irable from a customer's accept.ance point of view (uncomfortable noises),
2, CYLINDER PRESSURE MEASUREMENT Knock detection can be done by analyzing many difrefCnt "ignals from an engine, such as cylinder pre"sure, cnginc block vibration, ionization current (MilIo and Ferraro, 1998), Because the fundamental variable that is U"ed to characterize the combu"tioll proc~s i" the cylinder pr~sure, the most reliable methods are based on analysis of the pressure signal. Figure (1) shows a typical cylinder pressure trace recorded during normal (a) and knocking (b) combustion, As we can see, during knocking combustion high-frequency presslITe fluctuations are observed whose amplituoe decr"asffi with time,
Detonation can be prevented by the use of fuel with higher octane numher, reduction of incylinder temperatures and pressure and by a proper ignition timing control (aovancing t.he spark incH','lsffi th" knock intensity: retarding the spark oecn,ases the knock), In practise, controlling spark advance angle is commonly used t.o eliminate the knocking, Moreover, operating as close to the knock threshold as possible optimises
Nowadays, in c,vlinder !lu"h mounted (e,g., Ki"tler 6121) and spark plug mounted (e,g"Kistler 6(51)
316
~~ ~~~~ -40
crrotl
"gnnk logle
.o
I f,..,}
OC .'CA.;
F ig. 1. Cy linder press ure versus cra nk s haft. angle t. raCffi of c.vel.,,; wit.h (a) normal comhust.ion, (b) !mock combustion piezoelect ric-quartz sensors a re used to meas ure inst.ant.anP.OlIs press ure. However , elu e t.o high cost , t hese type of sensors a re not. s uit.a ble for massproeluct.ion cars. In cont.fIlst 10 piewelectric-qullrt.z elevicffi, fth eroptic sensor with the proven life time of at least 20000 hOUTh and a projed ed price o f 7 ... 9 $ lII eet ~ a ll requirements for prod uctio n car applicati ons (Wlodarczyk et al. , 1998). For the~e re~o nti, the knock detect ion method proposed by the au thor iti based OIl a llalytiiti of pretiti ure ~ i g ll al. ::I . l\ J\OCK DETECTION
T he traditiolla l approach for knock ing d eted ioll is hasecl o n elet.ect ion of one o r more resonant. frequende~ in the press ure siglla!. The mode fr eq uenc ies a re typically in the range of :; to 25 kI-Iz . As a n example, Figure 2 shows the bilinear ti mefrequency represent ation (Choi-Willi ams distribution , C WD ) of t he press ure signal for a knocking cycle. T he conVfmt.ional met. hoels use a han el-pass filt er (or several band-pass filt ers) which is centered a round a cert.a in fr eq uency (Millo and Ferra ro, 199R). Th en , accordin g to t.h p Itssllm pd ddiniti on (for example t.he maximum a mplitude, the maximum value of the fir st. d erivative or the energy of the filte red sigllal ) the kll ock intc[lBity j( I is comput ed .
Fig . 2. C I.JOi-Willi ams distribution of the pretiS ure tiiglla l for a knocking c.vcle 'I WAVELET ANALYSIS
Time- freque ncy analysis of pressure can help to understand a signal na t.ure a nd can be used to improve kno ck det ection (Cars t.e ns-Behrens and n ohm e, 2(0 1). 1l 0wever , t.he prohl em of crossterms in the bi linear distributions a nd high computat.ional complex ity Iimit.s thp. usefuln ess of this approach . To ove rcome these d rawbacks , a kn ock el etect.i on met.hoel hasecl on wavelet. tran sfor m has been d eveloped. The wavele t I.rantiform belongs to a class of linear timp- freq ue ncy repretielltat ion . The cOlltinuo us wav",l",t transform (CWT) of a fun ct io n x{ l ) E U {R) is d",flll ed by (Chui , 1992), (Burrus et al., 1997 ):
C WT,{b,a) - (:1
,if'ou) ~ J ~ov "(I )~'I:,,,{I)dl (1)
whe re
,j'b.a{l) =
)a if' C:b),
a EII<:+, b EIR
(2)
,,[. (t) - fi x0.(1 fun ctio n callcel mot.her wavel et . In equat io n 2 th e variahl e a. is th e sCll le fa r t.or (tak ing la > 1 dila t.es t he wavelet a nd taking lal < I co mpresses t.he wavelet. ). T he facto r a- 1/ 2 is for e ne rgy no rllla Ji u lt.lOn a cross the eliffNent. "call'. The variab le b b t.h e tmlltilatioll faclo r. If t.he wavelet. sa tisfies the a dmissibilit.y cOIldition
T he ma in drawhack of t he con ventiona l met hods is that they a re effective only a t lower eng ine s peeds, where t.he SNR (signa l-t.o- noise ratio ) is high (the SNR d ecreases significantly at hi gh e ngin e speecls). :Vl o r p'oVf~r , it. is kn own t.hat. e ngille retiOllant freq uellc ies vary due to varia tioll in comprf>$s ion rat.io , mixt.ure compos ition , hurn ra te Nc. Thus , t.his t.echniqu e elo~ not prov ielc a precise mf'aS lITf' of knock int.e ns ity. To overcome this dra wback, a n improvexl kn ock d etect ion scheme based on time-frequell(!.I' a na lytiis b ~ been proposed .
whe re \]l (w) is th e, Fomier transform of \]l (I ), then t. he continuous wavelet tra nsform is inve rt.ible a lld a n illverse trallsforlll is given by
1
x{t ) - ""' C tP
J+oo ;.+00 n\ ·'/ ~{ b , a .h\.a{l ) -da.d!> · -2-
'X,.>
-~X1
a
(4) The ma in disadvanlages of the CWT a re heavy redundancy a nd cOlllPut a tiona l complexity. To over('ome t.his problt.,m , continuo us sP.t of valu es Cl
317
and b is sampled, that leads to Discrete Wavelets Transform (DWT).
5. DTSCRETE WAVELETS TRANSFORM
d3.0
d 3.,
d 3,2
d 3,.
d 3,3
d 3,s
d 3,7
d 3,6
Substituting a = 2- j
,
b=k·2 - j
) , k c:.7L
(,,;)
f
into eqn a tion J we get (what corresponds to a dyadic sampling of the timo-frequency plane) dj , k~CH'T(k·2 j ,2 ') =
j
2
/
2
= (X,li.'j,k) =
d2 ,o
d2,3
d 2,2
d 2"
(6)
.£~"" x(t j4'j,k (tidt
d",
d".
where
do,o
(7) and dj, k - expansion coeilicienls (ca\1ed detail coefli> d ents) . This se t of <:oeflicients contaim informat,ion about high- frequ ency components of the signal. Having the expansion coefficients dj,k the analyzed signal x(l) can be written as
.r.(t) =
2:: 2:: djk Jj, k(t)
(R)
Fig. 3. Rela tion of wavelet coefficient dj ,k to tiles 6. WAVELET DASED KNO CK DETECTION In this section the proposed method, called WnKD, is descrihed. Cylinder pTf~S llTe signal x(t) is a su m of t.hree components
1:(1.)
where
~\(t) - dua l mother wavelet .
= 2:: Cj,).k'Pjo.k( t ) -
w(l.)
+ sell + n(l)
(10)
where w(t) - a low frequency component ,
The inflIlite series expansion in equation 8 causes a prohl em in ca1c.nlation . For this rp.A<;on , eqna tion 8 can be written in the form (Durrus et aI., 1997)
.r.(t)
=
s(/) - a component conta ining information abo ut resonant frequencies, n(t) - a noi se (modeledas Gaussia n noise) .
.I
2:: 2:: dj.k ;J;j.dt )
Rp.cause t.he informat ion ahout the knock int ensity is contained only in .. (t), it is np.cessary to elimin at.e t.he low frequ ency component wet,) and the background noise n(t) from pressure signal.
(0)
k :i-.lu
where 'Pje"k(t) - scaling fnnct.ion (Ilssociated with wavelet fWldi on ) ('jo ,k - expansion coeffici ents (called approximation coefficients ). This set of coefficient.s co ntains information about low-frequency components of the signal. In pra<'l.icp., the indices )0 , .J and k " re det.ermined by the sampling rale and by the "size" of the featur es of interest in the signal x(t) .
6,1 Elimination of low frequency component
One of the most impo rtant features of a wavelet is the numher of its vanish in g moment.s M m(k)
A comlllollly used presentation of the de<;omposition of a signal using wavelet trallsform co nsist of partitioning the timo-frequency (timo-scalc) plane into tiles according to the indices ) and k . Choosing ortho norma l wavelet system (for o rthonormal wavelet systems the a mo unt of energy in the signa l in the wavelet. domain is exactly the same as the amount of energy ill the signal in the time domain ), the det.a il coefficients dj ,k a re a mp.ll$lIfe of the energy of the signal compon ent.s located at (2- i k,2 j ) in the plane. Figure 3 shows th e timo- frequency tiles associated wit h diadic discrete wavelet transform (four-level wavelet de<;omposition).
~
1: 00
t.k li' {t.)dt.
=
°
for k
~ 0, 1, .. , M
- 1
(11)
\Vhen the wavelet 's M moments arc equal to zero, a U the poly nOl1lial sil(nais /1-1 - 1
wet) =
2:: ak tk
(12)
k-O
are represented only by approximation coefficients (the detail coeffici ents arc zero). As it was shown in (Fiolka, 2(04), t.he " ideal" non-kno cking cycle can he approximated with acceptable accuracy by a polynomia l of degree 6. Using a wavelet with the number of vanishing moments M Z 7, the polynomial wet) is suppressf«i (the det.ail coefficients are zero) . Then,
318
appli es the wavelet deco mposit ion to the pressure signa l that include a high-frequency pressure lIuc tuation~ (knocking cycle) we obta in a lot of uou-zero values of the detail coefIicieut~. lu t.his manner we a re a ble to measure knock intensity ouly by examiuiug values of detail coe f1ici eut~.
a)
our
b)
out
6.2 Rad,:gm1tn d noi",; SlIl'l'Tf.ssioTl.
Fig. 5. Ha rd (a) and soft (b) thresl.lOlding
One of t.he diffklllt.iffi enro llnt.ered in using prffisure signal for knock detection is that the signals measured by sensor a lso incl ude the background noise coming fr om ignition, valve closing etc. In the WHKD me thod lhe author ha~ a pplied two techniques to remove the background llOi ~e: timefrequency filteriug aud thresholdillg in the wavelet coefficient domain .
6.2.2. 771.r>:slw[rfinq Thref;holdin p; in t. hp. wavelp.( coefficient. domain is the second technique employed to th e noi se suppression. This t.ech niqne is commonly used in t.he signal denoising and compression. Let. x(t.) he a noise-corrupt ed version of s(t): x( t ) = .s.(t) - n (t ) (J3)
where: a(t) - additive noise. The wavelet tra us form of x(l ) is
Time- frequeucy filt. ering is a particularly effective t echnique for removing the unwanted signa l components. In this a pproach , a corrupted signal is transformed to the wavelet doma in, then , some set of the coeffici ent.s are zeroed out. , and , finally, the processed coefficients life inverse-trans formed back to the origi na l signa l domain . To specify coeffic ients t.o preserve, t.he knowledge of t.he time-frequency hehavior of thp. signal is np.(,p.ssmy. For eXIl.mplp., for !lO()() rpm , only two dominant resonant frequencies arc observed, so the important features of the signal are represented only by a s mall tiel of detail coeffi cients, while the noise is represented by t.he rest of the coefficients. Thus, noise suppression can be achieved within the wavelet. dOlllaiu by selectively zeroing coeffi cients. In the proposed meth od, the knock int ensity is estimated based on the values of detail coefficients. Thus , it. is not. necessary to perform the inverse wavelet transform . T hanks to t.hat , the comput.ational complexity of the signal process in g algorithm is reduced . The fig ure 4 is given to illust.rat.p. the idea of t.he time-frequency filtering. 6.2.1. Time-frequency filt ering
C HTx(b,a) = (x ,lh,u) = (s,1{.'/" ,,)
+ (n, 1/'.,u ) (14 )
Wavelet deno ising is performed by ta king the wavelet tra nsform of the no i~e-(;()rrupted signa l x(t) and then zeroin g o ut a su bset. of the cocffi c ie lJt~ t.ha t. a re less tha n a particular threshold . The underl,'ing id ea is tha t. t.he noise n( t ), which is incoherellt wit h respect. 1.0 the set of expallsioll functions {,j'u,b( I.)} , is mostly represent.ed by lowmagnit.ud" coeffi cient.s , whp.rf'.as a cJ"an f;i gna l 8(1.) (coherent. with resp ect. t.o {1j'a.b(t )}) is represented only by a few large wavelet. coeffici ent s. T hus, for an appropriat.ely chosen t.hreshold , tIlE' noise is s uppressed effect.ivp.ly, a nd important. signal f"at.lIfffi aTP. well-preserved . Th ere aTP. two hasic methods in tllTt>;; holding: hard (Fig. 5a) a nd so ft thresholrling (Fig. ,') h ). A ha rd t.hrp.shold indi cat.es t hil t wavelet. t.ransform coeffi cients are retainro on ly if th p.ir ahsolut.e value is grp.at.p.r than or <-'
J
6.S {{nock intr.ns ity fkfinition.
Fig. 4. T he idca of the time- freq uency filt. ering (three- level decomposition : d j, k - det.ail coefficienl.s ; dark sq naTp.s - cop.fficient.s sP.t. 1. 0 zf'ro)
Compac t support. , maxi mum number of va nishing momp.n t.s for a givf'n support. Rnd efficient. com putation via quadrat ure mirror fIlt.er hanks a re import.ant. propert.ip.s of t.h " ort. honormRI Dauhechif'.~ wiw"I" t.s syst."m. In t.h r proposm m" t.hod t h" Dauhechi es wav"let wit.h R vanishin g mom ents (dbS ) is used to decomp ose the pressure signa l. According; to equat.ion l ~, knock int.ew;it.y metrics K 1 eRn he defll. ed hy :
319
(15)
The update step adds a filtered version of the lifting output to t he even input Cj _ 1
where: detail coefficient (after t hresholding and timo-frp.qup.ncy fiItNing ). Thus, t he parameter J{ J is a measure of energy contained in the resonant frequencies.
d j, k
=
eveuj_ 1
+ U( dj _ l )
(17 )
-
6.4 Wavelet decomposition T he pressure signal is sampled at 50kHz . After collec ting 2fi6 samples, the valu es are stored in a memory, and then, three- level wavelet decomposition is performed. Tn the proposed meth od, a lifting scheme is applied in order to calculate the wavelet coellicients . A detailed descripti on of the one-level lifting transform is presented in section
The algorithm shown in the figllTp. 6 can he also written in a matrix form (Daubechies and Sweldeos, 1998). The detailed description of the method for facto ring wavelet transform into lifting st.ep can be lind io (J ensen and la Co ur-Harbo , 2001) . Applying tllis procedure to wavelet used in the proposed method (db8) the analysis polyphase matrix is as follows
P(l / )' = Z
[K 0 ]n° [ ti(Z)1 0]1 [10 SitZ)1 ] 0 K I
(18) where [>( z) - polyphase matrix of the form P(z)
7.
= [h,(Z ) g,(z)]
h ,(z) _ 0.0006i54z -
i . LWl'lNG S Cl1E~1E
The filt. er hanks implementat.ion (known as Mal!at's a lgorithm ) is one of th e most widely used a lgo rithm for computing wavelet expansion coefficip.nt s. This scheme reqllires digital filtNin g with Finite Impulse Response filters and downsampling operation. An alterna tive way to compute t.he wavelet expansion coellicients is a o alp;orithm called lifting scheme. The algorithm prov ides several advantages with respect to the filter bank scheme, such as reduced by a factor of two cO lUputational complexity, the possibility of in-place calculations etc. To speed-up the calculation of the knock intensity, the proposed method is based 0 0 liftiog.
.
1=== 1
7
-
0.00487z- 6 ·1 0.01308z- 5
. 0.01 i :l7z - 4 1 0.0004725 z- 3 + 0.6756z- 1 + 0.05-112 9« Z)
= - 0.3129 - 0.58::;·1z 1 - 0.1287z
3
(19)
ho(z ) 90(Z)
-
0.01fiR:lz - 2
+ 0.281z 2
+ 0.04409z 4 -
0.008746z"
+ 0.0003017z o + 0.0001175 z 7 ho(z) = - 0.000117[. z-7 - 0.0003917z - 0 + 0.008716z- 5
+ 0.1287z - 3 + 0.5854z- 1 + 0.3129 - 0.04409z- 4
90(Z ) = ·1 0.05442 -I 0. 6i56z 1
0.284z- 2
0.01 5R:lz 2
+ 0.000472.)Z3 -
0.01 i:l7z 4 + 0.01 :l98z 5 o - 0.00487z + 0.0006i54z7 (20)
As it was shown in (Daubechies and Sweldens, 199R) any two-channel filter hank can he fa.c tored into a finit e number of lifting steps. T he lifting coosists of three steps: split, predict. a nd upda te (sce Fig. 6). The algorithm starts with a spli t step , which divides the input data into odd and even elements. The predict st ep subtracts a filtered version of the evell input to the odd input
(in orthogonal case P( z) polyphase matrix)
p(z), p( z) - dual
t. 1(Z) ~ 1.0[.z-5 - 0.247z- 0 + 0.02i2z- 7 SI(Z) ~ - 0.9526zo - 0.2241 z4 t2 (Z) - 0.0001888 z- 3 - 0.001804 z- 4 $2(Z) - 0.9'153z 5 + 0.212 z 4 13(Z) = 5.8 1 9z-~ - 2.756z - 4
(16)
. . . . c ~,
"3 (Z) = - 0.032 ,1 z~ + 0.OG091 z2 t4(Z) = 14 .54z 1 _ 7.402 z 2 84 (Z) -
/--_---1_ _ .... d j. ,
J{ =
0.0.'i227z1 1 0.168R 3.5·19
(2 1)
Th.is co rresponds t.o the following implementation for the one level forward t.ran sform
Fig. 6. The forward wavelet. transform using lifting
320
dl =x [21 + 1] et
additionally reduced . However , when the SN R is high, thresholding leads to increased estimation error. Thus, the thre~ hold level l' should be set according to the engine rotational speed.
5.75x [21]
= x[21 ] + 0.1688dt- 0.05227di+l
dt = dl + 14.54cl- 1 - 7.402cl-2 et = cl -I O.06091dt+2 _. O.m24dt+3 d~ = dt -'- 5.819({
c~
=
3 -
2. 750e1.
4
er + 0.9.153d~ 15 + 0.212d~ !
dt - d~
T
9. CONCLUSIONS 4
In this paper t he author proposes a new knock det.ection method C'.alled WBKD which is based on joint time-frequency (JTFA ) analysis of the pressure signal. The conclusions drawn from the author 's research are summarized Il.<; follows :
0.000 1888cL - 0.00 1804cL
= et - 0.!J526dt+5 - 0.2241dt+-l d? = dt + 1.05C1-5 - 0.2-17c1-6 + 0.0272c1- 7 Cl = 3.54get d1 = 3.549 Id? et
• P e rforming tim&freque ncy filtering and noise suppression in the wavelet coefficient domain wc arc able to obtain a very precise measure of knock intensity. • An importunt prope rty of wavelet transform is a low computational complexity. Thus , the proposed knock detection method is appropriate for low-cost , micro controller based engine co ntrol system. • Using lifting scheme instead of Mallat 's algorithm a llows to speed up computation of the knock intensity metric.
8 EXPERlMENTAL RESULTS An import a nt step in the development of the proposed method was validation of t he aCClIracy of knock intensit.y PRt.imat.ion . The frP.quen cy cont.ent of the knocking pressure signal was analyzed in the time-frequency domain using C hoi-Wiliams distribution . Based on a visual analysis of the di~ tribution, a synthetic pres~ure signal (modeled & a multicomponent signal with linear frequency modulated component~) with an asswned value of knock intensity was created. Then , white gaussian no ise was add. The procedure described above was repeated for a pressure signal recorded at 1500 , 2000, 3000, 4000, 5000 rpm (at diffe rent engine load). Pigme 7 shows a r elative error in estimating knock intensity 6% versu ~ SNR ratio As a reference method, a popular MSV method (the knock intensity is defined as a energy of the hand-pll.<;'~ filtered prPRsme signal ) was lIsed (Millo a nd Perraro, 19911) . As we can see, t.he propo~ed method allow~ to decre
e the val ue 0%. For P = 0 and for low SN R (the timefrequ ency filt.ering is enahled, thrPRholding in t.he wavelet coeffici ents domain is disabled ) the error i ~ reduced from about 80% to about 50 %. After activating thresholding (P > 0) , the error can be
REFERENCES RmTus, C. Sidney, Ramesh A. (;opinath and Haitao Guo (1!J!J7). Introduction to Wavelets and Wavel ets Transforms . ist (xi.. l'rentice Hal!. Carstens-Dehrcns, S. a nd J . F . Dohmc (200 1) . Applying time-frequency methods to pressure and ~tru<:l ure borne sound for combustion di ag no~ i~. Vo!. 1898 of l'roc . 1881'.4, Kuala Lumpur, Malaysia . Chui , Charles (1992). An Introduction to Wavelet •. Academic Press. Daubechies, I. a nd W . Sweldens (1998). Factoring wavelet tra nsforms into lifting steps. J. Fouricr Anal. Appl. 4(3 ), 245 267. Fiolka, J . (2004) . Wykrywanie ~J.lalania stukowego w silnikach benzynowych z wykorzystanicm metod C7,IlS0WO-c7,est.otliwosciowych. PhD thesis. Silesilln Universlly of Technology, Institute of Ek'Ctronics . Gliwice. PhD thesis. Jensen, Arne and Anders la Cour-Harbo (2001). Rippl~s in Math.em.atics. Th.f. Discrete Wa1!det Transform . Springer Ve rIag . Millo, F . a nd C. V. Fe rraro (1998) . Knock in s .i . engines: a comparison bet.ween different techniques for detection and control. SA E Tech.nical Paper. Wlodarczyk , M . T ., T. Poorman, 1. Xia, J . Arnold a nd T. Colema n (1998). Embedded fiberoptic co mbustion-pressure sensors for automotive engines. FISIT.4 Wor-ld Automotive Gongns.
- IOOol-----;;---7--7--:---o",---7.c-'7:-~~=.=!..l ~·NJ.
(dJ1)
Pig. 7. A relat.ive error in estimat.in g knock int.ensity 0% versus SNR for a speed of 5000 rpm (I" - thre~hold level for denoi~ing)
321