next up previous contents
Next: Bit recovery. Up: How the program works. Previous: General decoder structure.   Contents

The Digital filters.

The filters used in the RTTY program are of the IIR type. IIR means Infinite Impulse Response, which in turn, means that the filter is implemented using some kind of feedback. The general IIR filter algorithm is:


\begin{displaymath}
y_{i}=a_{0}x_{i}+a_{1}x_{i-1}+...+a_{n}x_{i-n}+b_{1}y_{i-1}+...+b_{n}y_{i-m}
\end{displaymath} (1.1)

Where \( x_{i} \) is the current input sample and \( y_{i} \) is the current output sample. As it can be seen, the current output sample depends on the previous output samples, so here is the feedback.

The IIR filters are computer efficient, but they are very sensitive to coefficient accuracy and can become unstable. To avoid instability, the order of the filter must be low. Higher order filters are implemented by cascading lower order sections. In this program the filter section is order 2 and it is commonly called ``biquad''. The filter behavior is dictated by its own coefficients, and the calculation of these coefficients are the purpose of the digital filter design.

The filter design starts with a continuous-time version of the biquad filter section, the resonant frequency, \( \omega _{0} \), is ``prewharped'' to account for the further frequency response distortion. Then the Bilinear transform is used to translate the continuous-time filter to a discrete-time version of the filter, where its transfer function is written in terms of the Z transform. Finally the filter coefficients are derived from the discrete-time transfer function.

In the following example a bandpass resonator is designed. The filter parameters are its resonant frequency \( \omega _{0} \), and its quality factor \( Q \). In order to account for the error introduced by the Bilinear transform, the resonant frequency is prewharped, so the used resonant frequency is: \( \widehat{\omega }_{0}=2f_{s}\tan \left( \frac{\omega _{0}}{2f_{s}}\right) \), where \( f_{s} \) is the sampling frequency. The continuous-time transfer function, written in the Laplace transform terms, is:


\begin{displaymath}
H(s)=\frac{\frac{1}{Q}\frac{s}{\widehat{\omega }_{0}}}{\frac...
...omega }_{0}^{2}}+\frac{1}{Q}\frac{s}{\widehat{\omega }_{0}}+1}
\end{displaymath} (1.2)

Then, we use the Bilinear transformation to obtain an approximate discrete-time equivalent transfer function. The Bilinear transform is merely the replacement of ``\( s \)'' by `` \( 2f_{s}\frac{1-z^{-1}}{1+z^{-1}} \)'' in equation 1.2. The new transfer function is then:


\begin{displaymath}
H(z)=\frac{\frac{2\alpha }{Q}(1-z^{-2})}{(4\alpha ^{2}+\frac...
...8\alpha ^{2})z^{-1}+(4\alpha ^{2}-\frac{2\alpha }{Q}+1)z^{-2}}
\end{displaymath} (1.3)

where \( \alpha =\frac{f_{s}}{\widehat{\omega }_{0}} \)

Then, the recurrence algorithm is derived taking into account that \( H(z)=\frac{Y(z)}{X(z)} \), and that \( z^{-n} \) is represented in the time domain by an \( n \) clock cycle delay. From equation 1.3 we obtain:


\begin{displaymath}
y_{i}=\frac{\frac{2\alpha }{Q}}{4\alpha ^{2}+\frac{2\alpha }...
...frac{2\alpha }{Q}+1}{4\alpha ^{2}+\frac{2\alpha }{Q}+1}y_{i-2}
\end{displaymath} (1.4)

And finally, by matching equation 1.4 with equation 1.1, the filter coefficients are easily obtained.

These bandpass resonators are used to split the signal into a mark & space bands in the very front-end of the demodulator, but the demodulator also includes a low-pass filter, which is divided into two biquad sections giving a total stopband attenuation of 80 dB/dec. Each section has the following transfer functions:


\begin{displaymath}
H(s)=\frac{1}{\frac{s^{2}}{\widehat{\omega }_{0}^{2}}+\frac{1}{Q}\frac{s}{\widehat{\omega }_{0}}+1}
\end{displaymath} (1.5)


\begin{displaymath}
H(z)=\frac{1+2z^{-1}+z^{-2}}{(4\alpha ^{2}+\frac{2\alpha }{Q...
...8\alpha ^{2})z^{-1}+(4\alpha ^{2}-\frac{2\alpha }{Q}+1)z^{-2}}
\end{displaymath} (1.6)

And the recurrence algorithm is:


\begin{displaymath}
y_{i}=\frac{1}{4\alpha ^{2}+\frac{2\alpha }{Q}+1}(x_{i}+2x_{...
...frac{2\alpha }{Q}+1}{4\alpha ^{2}+\frac{2\alpha }{Q}+1}y_{i-2}
\end{displaymath} (1.7)


next up previous contents
Next: Bit recovery. Up: How the program works. Previous: General decoder structure.   Contents
yo 2001-06-18