Professional Documents
Culture Documents
Abstract. In this paper, the problem of estimating the noises, having variances q and r, respectively:
frequency of an harmonic signal embedded in broad-band w(t) W N ( 0 , q ) and v ( t )= W N ( 0 , r ) . The parameter E
noise is considered. The paper focuses on the Extended (where & L O and, typically, & < < I ) has the goal of
Kalman Filter Frequency Tracker, which is the application enforcing stability into the third equation of ( I ) . The state
of the Extended Kalman Filter (EKF) framework to the variable x 3 ( t ) represents the unknown frequency U .
frequency estimation problem. The EKF Frequency Tracker
Given the state-space model ( l ) , the EKF technique can be
recently proposed in the literature is characterised by a
applied straightforwardly (see e.g. [l], [13] for a general
vector of three design parameters, whose tuning is still a
description of EKF). The complete set of equations of the
controversial and unclear issue. In this paper it is shown
EKF Frequency Tracker derived from (1) is here recalled
that the Extended Kalman Frequency Tracker can be
(see [7-91 for more details):
I
parametrized using just one design parameter, without any
loss of performance. This simplification allows an easier ,?(t//) = f ( $ t - I / / - I ) ) + K ( t ) ( y ( l ) - Hf(.i(t - I / / - I)))
and more transparent tuning of the EKF tracking behaviour. &(t) = C i ( r / t )
(2a)
Key words. Extended Kalman Filter; frequency tracking; K ( I ) = P ( ~ ) H( /H P ( ~ ) H+' r)-'
harmonic analysis; parameter estimation. P(t + 1) = F(t)[P(/)- P ( / ) H /( H P ( t ) H / + r ) - l H p ( t ) k /(/) + q/,
where
I . INTRODUCTION
This paper deals with the problem of estimating the
frequency o of an harmonic signal s ( t ) = Acos(ot + cp),
given its noisy measurement y ( t ) = s ( t ) + n ( t ) ,where n ( t )
is a broad-band stationary signal (e.g. a white noise).
This problem is frequently encountered in real-world
applications, especially in the fields of adaptive control and
signal processing, and numerous techniques have been
developed for its treatment (see e.g. [5-61, [lo-111). This
paper focuses on the use of the Extended Kalman Filter
(EKF), an approach which has been recently proposed by
Bitmead and co-authors in [7-91 for the design of a
Frequency Tracker. In particular, in [7] the EKF Frequency
Tracker is proposed, and some heuristic guidelines for the
tuning of its parameters are proposed. In [9] its stability Recursive eqs. (2) are suitable for on-line frequency
analysis is developed, whereas the case of high-noise tracking. In particular, the fourth equation in (2a), giving a
environments is considered in [SI. recursion for the auxiliary matrix P(t) of dimension 3x3, is
The basic idea around which papers [7-91 evolve around is the celebrated Riccafi equation ([3]).
to model the measured signal y ( t ) = s ( t ) + n ( t ) by means As any frequency tracker, from an external point of view
of a third-order state space model, as follows: the EKF Frequency Tracker (2) can be seen as a device
1
x,(t + 1) = cos(x3(t))xl(t) - sin(x,(t))x,(t) receiving the measured signal y ( t ) as input, and delivering
x2(t + 1) = sin(x,(t))x,(t) +cos(x,(t))x,(t) the estimated frequency h(t)= i , ( t / t ) as output. The
(1) internal structure is constituted by two main sub-parts: the
x;(t+1)=(1-E)X3(t)+W(f)
first one performs the updating of the state equations,
y ( t ) = XI ( t ) + 4 2 ) according to the first expression in (2a); the second one has
Here w(t) and v ( t ) are zero-mean incorrelated white the task of providing the gain vector at each time step, and
is based on the third and fourth equations of (2a).
0-7803-551 9-9/00 $10.00 0 2000 AACC 2225
Notice that the EKF is parameterised in { 4 , r , ~ }These . Proof. Consider the state equations of the EKF (2a), under
three parameters are the ”knobs”, by means of which the the assumption that the frequency estimate is at steady-
designer can obtain suitable tracking performance. state, namely i 3 ( t / t )= i 3 ( t - 1 l t - 1) = X3 . Then, denoting
In [7] and [9] a preliminary analysis of the roles played by by { K , ( f ) ) i = , , 2the
, j three components of K(t), the original
the parameters { 4 . r , ~ }is given, and some guidelines for equations of (2) can be written as:
their tuning are proposed. Such analysis, having the
1
*GI(///) = C O & ~ ) ? ~ ( / - I / / - 1) -sin(y?)-Q?(/- I / / - I ) +
objective of explaining the effects of each parameter on the + K , (r)lv(/)-co+;)i-, (/ - I / i - i) +sin(i; )q2 ( I - I / / - I)]
EKF performance. is mainly based upon Monte-Carlo (3)
.t2( I //) = siii(.Tl IQ,( I - I / / - I ) + cos(.^;).<-^ ( I - I / / - I ) +
simulation trials. Some useful and interesting indications
have been obtained in this way, but the tuning of ( 4 , r , ~ )
still remains a difficult task due to the unclear cross-
relationships between such parameters.
I + K2(t)Lv(l)- c04.Y~PI(I - I / t - I)+sin(Y; ( I - I / / - I)]
X; = ( I -&)y3+ K ; ( t ) ~ ( / ) - C O ~ . Y ; ~ ~I ,/ (/ /-- I )t sin(Tl).Q2(/ - I / / - I)]
Note that the dynamics of (3) is confined into the first two
equations. Thus, i , ( f l t ) and i z ( t / t ) are the only state
Moving from the seminal works [7-91, the goal of this
paper is to go a step further in the analysis of the EKF variables of system (3). Y, can be seen as its output,
Frequency Tracker, in order to gain more insight in the whereas y(t) plays the role of input signal. Interestingly
relationships between its behaviour and its tuneable enough, while system (3) is non-linear, the system obtained
parameters (4,r, E } . Precisely, two simple but fundamental by setting &(t/t)=const. is linear. So, one can compute
results will be established: the transfer function from y(t)to T3 . To this purpose, using
0 Even in a noise-free setting ( n ( t ) = 0 V t ), if E > 0 the (3), by cumbersome but simple computations, one obtains:
EKF Frequency Tracker (2) provides an 0;; = K; (t)G(z;Ki ( t ) ,K2 ( t ) ,Z; >y(t> 7 (4)
asymptotically biased estimate of the unknown where
frequency w . The bias is zero only for E = 0 . G ( z ; K (, t ) , K 2 ( t ) . y 3=)
Q The performance of the EKF Frequency Tracker z ( 2 - 2ZCOS(Y3) + 1) .( 5 )
depends on the ratio h = r 14 only. -
(K,(t)cos(jT,)-
Z* -z(K,(t)sin(jT3)+2cos(jT3))+ K , ( t ) + 1)
The main outcome of these statements is that a wise Eq. (4) expresses the relationship between the input y(t) and
parameterisation of (2) corresponds to set E = 0 from the the output Ex3, Under the assumption of noise-free setting,
very beginning, and then using h = r14 as the only tuning
the input signal of system (5) is a pure sinusoid:
knob. This greatly simplifies the designer task. y ( t ) = s ( t ) = Acos(wt) . Therefore we can resort to the
The outline of the paper is as follows: in Section 2 a bias- frequency-response theorem to determine the steady-state
analysis of (2) is given, whereas Section 3 is devoted to the value of the output. Equation (4) hence can be rewritten as:
analysis of the dependence of (2) upon r and q. These
results are both illustrated with a numerical example at the 6, K , ( / ) ,K 2 ( t ) ,Z3)lc~s(o>/+ L G ( e ” ; Kl(t), K ~ ( / ) , T , ) ) . ( ~ )
= K,(t)IG(e’“’;
end of Section 2 and Section 3, respectively. Eq. (6) is peculiar in that it expresses how a sinusoidui
signal determines a constant signal. As a matter of fact,
2. BIAS ANALYSIS what really matters is when the bias xj -a is zero. Now
A minimal requirement for a good frequency tracker is the from ( 5 ) it is apparent that the numerator evaluated in e’”
so-called unbiasedness in a noise-free setting. This means is zero if and only if 2, = w . Thus, from ( 6 ) it is possible
that, if the measure y(t) of the harmonic signal to conclude that the frequency estimation bias is zero if and
s ( t ) = Acos(wt) is not corrupted by noise ( n ( t ) = 0 V t ),
only if EO = 0 .
and the frequency w is constant, the frequency tracker is
The above Proposition 1 states a very simple but interesting
expected to provide an estimate h(t) which, at steady- twofold result:
state, coincides with w . Most of the frequency trackers 0 At steady-state, the EKF frequency Tracker (2) is
typically used in real-world applications (see e.g. [2], [4-61, unbiased (for every value of o ) in a noise-free setting
[IO-121) obviously have the above simple property. In the only if the parameter E is set to zero.
subsequent result we will show that the EKF Frequency
Tracker (2) does not have this property if E > 0 . Since IG(e’”;K,(t),K,(t),2;)I=O V t if and only if
Proposition 1. Consider the EKF Frequency Tracker (2). Z3= w , equation (4) points out that the bias must
Assume that n(t) = 0, V t and that the frequency w of
depends on the value T, of the sinusoidal signal
the harmonic signal s ( t ) = Acos(ot) is constant. At frequency. Specifically, since the first member of
steady-state, the frequency estimate & ( t ) = , f , ( t / t ) equation (4) grows as 2, increases, the bias is expected
provided by (2) is unbiased if and only if EW = 0 .
2226
to grow with X3.Such a dependence of the bias upon has been set to ~=0.05;as a second trial, E is set to zero. The
the estimated frequency was already empirically results of the so-obtained frequency estimation are
pointed out in [7]. Proposition 1 now provides a simple displayed in Fig. 1. These diagrams clearly show the main
explanation to this fact. conclusions which can be drawn from Proposition 1 :
A straightforward consequence of the above Proposition 1 If E>O, the estimation is strongly biased even for small
is that the best choice for E is to set E=O; as a matter of fact values of E.
E>O may lead to a strong estimation bias which (unless o The bias increases as the value of the unknown
is very close to zero) dominates the mean square error of frequency increases;
the frequency estimate (this is confirmed by the heuristic The dynamic properties (stability and noise rejection)
analysis proposed in [7] - see also Example 1 below), of the EKF Frequency Tracker in the case ~=0.05and
without providing any clear benefit. In this regard, it is E=O are similar (the only clearly visible difference is
interesting to notice that the condition E>O was introduced just the presence of bias if E>O ).
in [7-91 with the goal of having the 3rd equation of model 25 frequency - _-
, 1
I
(1) asymptotically stable. As is well known, however, the ................................................
stability of the model is not required in order to come out
.*....'.
with a stable Kalman Filter: specifically, it is easy to check
by simulation that the stability properties of the EKF
Frequency Tracker using E=O or E>O (with ~ < < 1 )are
indistinguishable (see Example 1 below). This is confirmed J
by the fact that, in the stability analysis of the EKF 0 100 200 300 400 500
time
600 700 800 900 1000
proposed in [9], the assumption E>O does not play a crucial 2.5
I
frequency
I
-1
1
role.
On the basis of the above result, in the rest of the paper the
EKF Frequency Tracker (2) will be replaced by its
simplified version obtained by substituting E=O in (2),
namely: 05
I W ( / ) = Ci(///)
+ .)-'
K ( t ) = P(t)H'(HP(f)H'
( P ( t + 1) = F ( t ) [ P ( / ) - P ( t ) H 7(HP(/)H' + r)-'HP(l)JF' ( I ) + q/
dashed line indicates the true frequency).
tlme
Fig. 1. Frequency tracking of the EKF ~=0.05and E=O (the
K ( t ) = P ( f ) H ‘ (HP(f)H7 +$I
- Hf(i(t- l / r - 1)))
1 ‘ I
resulting solution F ( t ) is equal to aP(t). cos(i,(t/t))i, ( t / t )- sin(i3(t/t))i2( t / t )
It is important to stress, however, that this is true under the f ( i ( r / r ) )= sin(i3(t/t))il( t / t )+ cos(i,(t/t)P,(t/t)
.(13b)
assumption that F(t) does not change if q and r are both i,(t/f)
scaled by the same factor a, namely that F ( f )= F ( t ) . By H=[l 0 01 c=[o 0 I]
inspecting the structure of the EKF Frequency Tracker (7) Tracker (1 3) is a significant simplification of (8); the vector
and that of the matrix F(t), it is easy to see that of the “tuneable” parameters of (13) is now constituted by a
F(f) = F ( t ) if z ( t / t ) = i ( t / t ) b’f . Moreover, K ( t ) = K ( t ) single parameter il .
implies that Z ( t l t ) = i ( t / t ) . This can be easily proven We conclude this section by presenting a numerical
since example, which qualitatively shows the influence of the
parameter h on the tracker behaviour.
i(t/t)=f(i(t-~/t-~))+K(t)(y(t)-Hf(i(t-~/t-~))).
Example 2.
From this expression, it is apparent that, if g ( t ) = K ( t ) and
- - The signal considered in this example is an harmonic signal
;(t - 1 / t - I ) = ;(t - 1/ t - 1) , then i ( t l t ) =i ( t / t ) .
Since embedded in white noise, characterised by a time-varying
the initial condition of the filter are chosen by the designer frequency. Specifically, y ( t ) = s ( t ) + n(t) , t=1,2, ... 1000,
at a value say X(0) , we have to take z ( 0 ) = i ( 0 ) = X(0) , where n ( t ) = WN(O,O.Ol) and s ( t ) = cos(:t) for
and then, by induction, we can conclude that i ( t ) = K ( t ) t=1,2 ...500, s ( t ) = c o s ( g t ) for r=501,502 ... 1000.
In order to estimate the frequency of the harmonic signal
implies % ( t / t ) = i ( t / t ) Vf . Thus, the following chain of
embedded in y ( t ) , the EKF Frequency Tracker (13), is
implications holds true:
-
i ( t ) =K(t)= i ( t l t ) = i ( f / t ) = F(t) = F ( t ) =3 F ( t ) =aP(t).
used. To assess the effect of h on the tracker behaviour,
three different values of h have been used: h=O, h=l, and
So far, we have to analyse the gain variation against the h=lO; the corresponding frequency estimation results are
scaling effect. To this end, recall that displayed in Fig.2.
From Fig.2 some useful indications on the tracker
K ( t ) = P(t)HT(HP(t)HT +,)-I . (1 1) behaviour can be drawn. In particular, as for every on-line
By plugging in (1 1) aP(t) in place of P(t), and ar in place frequency tracker (see e.g. [6], [12]), there is a trade-off
of r, after some manipulations we obtain: between the variance error of the estimated frequency and
the ability of the tracker to follow frequency variations (in
K ( t ) = P ( t ) H T(HP(t)H + r)-’ . (12) the case considered herein we have considered the most
The fact that (12) coincides with (1 1) means that demanding situation, given by a large and sudden jump of
F ( t ) =aP(t)3 K ( t ) = K(t). Therefore, the following set of the frequency to be tracked). Specifically:
circular implications holds: When h increases the variance error diminishes, as can
be seen by observing the decrement in the fluctuations
~ ( t ) = K ( t ) ~ ~ ( t l t ) = ~ ( t / t ) == .F~( t() t- )p ( t ) = a P ( t ) of the estimated frequency up to time 500; however,
2228
the ability of the tracker to follow rapidly varying of parameters tuning much easier and more transparent.
frequency changes deteriorates.
When h decreases the variance error grows, but the ACKNOWLEDGEMENTS
tracker is more robust towards frequency variations. Paper supported by CARIPLO Foiindation for Scientific
In particular notice from Fig.5 that if h=10 the frequency is Research. The authors are grateful to Professor R.R.
accurately estimated at steady-state, but the EKF gets Bitmead, for his enlightening hints and suggestions.
completely lost after the frequency jump. This problem can
be overcome using a lower value of h, at the price of a
REF E RENC E S
worse noise rejection.
Anderson B.D.0, Moore J.B (1979). Optimal
The correct choice of h clearly depends on the features of
Filtering. Prentice-Hall, Englewood Cliffs, NJ.
the measured signal: if the frequency of the harmonic signal
is constant or slowly-varying a large value of h should be Bittanti S., Campi M., Savaresi S.M. (1997).
used; on the other hand, if h is subject to large and sudden "Unbiased Estimation of a Sinusoid in Noise via
variations, a small value of h should be used, in order to Adapted Notch Filters". Automatica, Vo1.33, n.2,
guarantee robustness to the tracker. pp.209-2 15.
25
frequency Bittanti S., Laub A.J., Willems J.C. (eds.), The Riccati
2 m Equation. Springer-Verlag, 1991.
Handel P., Tichavsky P., Savaresi S.M. (1 998). "Large
error recovery for a class of frequency tracking
algorithms". International Journal on Adaptive Control
05
2229