Copyright © IFAC System Identification Santa Barbara, California, USA, 2000
DESIGN AND APPLICATION OF DIGITAL FIR DIFFERENTIATORS USING MODULATING FUNCTIONS Armin Wolfram and Olaf Moseler Darmstadt University of Technology Institute of Automatic Control Laboratory for Control Engineering and Process Automation Landgraf-Georg-Strasse 4 D-64283 Darmstadt (Germany) Phone: (+49) 6151 167406 Fax: (+49) 6151 293604 EMail:
[email protected]
Abstract: Continuous Process Models are widely used in system identification and fault detection. However, dynamic models require the derivatives of the process' input and output signals. Often they cannot be accessed by measurements. Thus they have to be provided by digital filters . Commonly state variable filters are used for this purpose. But this approach has a couple of drawbacks caused by the recursive structure of the filter. In this paper a consistent approach for the design of FIR differentiators by means of modulating functions is proposed. Finally the application of these filters for fault detection using a microcontroller is presented . Copyright @2000 IFAC Keywords: Finite Impulse Response Filter, Differentiators, Modulating Functions, System Identification, Fault Detection
1. INTRODUCTION
•
In many control engineering fields dynamic process models are required . Considering linear processes the corresponding transfer function can be represented either as discrete or as continuous model. Often a continuous transfer function is preferred because the coefficients represents physical parameter as they are directly derived from the differential equations. Thus, the model can be easily interpreted. Especially in the system identification task it is important to compare the theoretical considerations with the results achieved by parameter estimation based on measured data. However, the necessary derivatives of the input and output signal are often not accessible via measurements. Due to noise on the measured signals, for real world processes the derivatives cannot be calculated using the differential quotient. Lowpass filtering has to be applied, too. A widely used recursive filter with lowpass characteristic is the discrete state variable filter (SVF) (Young 1970, Young and lakeman 1980). This filter is designed such that the state variables represent the derivatives . But this type of filter has few drawbacks :
•
• •
• •
The order of the filter is at least one higher than the order of the process n. If only m derivatives (m = number of coefficients to be estimated) are necessary (m « 2n) the input and the output signal has to be filtered by an SVF of order n+ I. For big n this results in high computational effort. The phase delay depends on the filtered frequency. Higher frequencies cause larger phase delays . The impulse response is infinite. Thus, it takes the filter an indefinite time to be settled. The elements of the system matrix AsvF i.e. the filter coefficients may be in the range of several powers of 10. Thus, this algorithm cannot be computed with limited word-length such as 16-bit Integer but requires computation using floating point. Because of its recursive structure it can become unstable due to calculation errors. Limited word-length can cause limit-cycles.
A finite impulse response (FIR) filter avoids the mentioned drawbacks of the SVF because of its feed forward structure:
1037
Those signals show some remarkable properties. Similar to Shannon's sample theorem for band-limited signals it is possible to specify a similar theorem for time-limited signals in frequency domain (Unbehauen, 1993): Gu w)=
f. GU~w(J sin(~f - ~l1t) w
~ =_
2
(8)
Another option is to select an impulse response that is symmetrical to the point {t=TI2; h(t)=O}. The corresponding impulse response gp(t) can be written as sine progression:
(2)
2n
[O;T[
; otherwise
-~n
w =-
(3)
T
o
;tE
; t E [O;T[
Hence, the Fourier transform of time-limited signals is determined by the discrete values of G(jw) at the
; otherwise
frequency points w = ~ . Wo (~= 0, ± 1, ± 2, ... ). Due to eq. (2) the signal get) can be described by the Fourier progression denoted in (4):
tE
[O;T[
(9)
To decide which of those two possibilities is appropriate, their Fourier transform has to be taken into account. Since the filters should provide lowpass characteristics both systems have to fulfill
(4)
( 10)
G(O)= 1
sonst According to eq . (4) the sine progression of eq . (9) does not meet this requirement since Gp(O)=bo=O. Hence, only the cosine progression ga(t) is capable of providing lowpass filter characteristics with linear phase. The corresponding progresslOns are summarized in eq. (11), .. ., (14).
As already mentioned, it is useful to choose the filter's characteristic G (jw) in such away, that the high frequency parts of the input signals are decreased. To obtain such lowpass filter characteristics the discrete values of G u~w()) are chosen to be zero for I~I > N :
(5)
a( t
b
On the other hand the impulse response get) is a real signal. Hence, the Fourier transform of the signal meets the expression in (6) :
)=lfa~ cos~wot)
[O;T[
o
; otherwise
g (v) (t)= 0
; t..: [0; T]
N
I
g(v) (t)= ~(_I)2 (v+ I) . ~
~
(6)
;tE
~ =()
v v SInlJLwot . (.. )
a~w() ~
~= I
'
The equations (4), (5) and (6) can be exploited to propose another expression for the impulse response get).
odd number; t E
N
g(t)= ~a~ cos~wot)+ ~b~ sin~wot); tE [O;T[
1o
(12)
(13)
P;T[ (14)
~=I
N
(11 )
'
even number; t E
P; T[
(7)
These cosine progressions are also denoted as modulating functions . In the following section an approach for the determination of the unknown coefficients is proposed.
;otherwise
Additionally, the phase of the considered filter should be linear. The advantage of filters providing constant group delays is that the input signal is not distorted by frequency dependent runtimes. Thus, the delay of the output compared to the input signal is constant (Oppenheim and Schafer, 1998). In order to obtain filters with that property the impulse response must be symmetrically. This can be achieved in two different ways. One possibility is to choose impulse responses which are symmetrical to the axis t=T/2 . In this case the impulse response gaCt) can be expressed as cosine progression
3. DETERMINATION OF THE FILTER COEFFICIENTS Due to the frequency sample characteristic of timelimited signals described in expression (2) and the condition denoted in (10) the coefficient
1039