ad space

Impulse Invariant Transformation Filter Design Example Work

Impulse Invariant Transformation (IIT) is a technique for converting an analog filter's transfer function into a digital filter's transfer function. The idea behind the method is to sample the impulse response of the analog filter and map it directly onto the impulse response of the digital filter. This is done by applying a Kronecker delta function to the analog filter, which generates its impulse response. Then, the impulse response is sampled at the required sampling frequency to obtain a discrete-time sequence. This discrete-time sequence is then used to generate the coefficients of the digital filter.

The impulse invariant transformation method is simple to apply and does not require any approximations or assumptions about the analog filter's transfer function. However, this method is sensitive to sampling frequency, and the accuracy of the method is limited by the frequency response of the analog filter. As a result, it may not be suitable for filters with high cutoff frequencies or steep roll-off characteristics.

The system transfer function H(s) of analog filter can be written as,

\( H(s) = \sum_{i=1}^{N}\frac{A_i}{s-p_i} \)    --->(1)

or, \( H(s) =\frac{A_1}{s-p_1} + \frac{A_2}{s-p_2} +\frac{A_3}{s-p_3} +....+\frac{A_N}{s-p_N}\)

where \(A_i = A_1, A_2...A_N\) are the coefficients of partial fraction expansion and \(p_i = p_1, p_2...p_N\) are the poles.

Also \(s=\sigma +j\Omega\) is the Laplace operator.  \(\sigma\) is the attenuation factor and \(\Omega\) is the analog frequency.

The digital IIR filter Z-transform transfer function H(z) is obtained from analog filter Laplace transform transfer function H(s) given in equation by using the following substitution:

\( \frac{1}{s-p_i}  =  \frac{1}{1-e^{p_i T}z^{-1}}\) --->(2)

After transformation the digital filter transfer function is,

\( H(z) = \sum_{i=1}^{N}\frac{A_i}{1-e^{p_i T}z^{-1}} \)    --->(3)

Example

Consider the following analog filter transfer function,

\(H(s) = \frac{2} {s^2 + 3s + 2} \)

Using the quadratic formula, we can find the roots as follows:

\(s = \frac{-b ± \sqrt{b^2 - 4ac}}{2a}\)

where a = 1, b = 3, and c = 2. Plugging in these values, we get:

\(s = \frac{-3 ± \sqrt{3^2 - 4(1)(2)}} {2(1)}\)

\(s = \frac{-3 ± 1}{2}\)

So the roots of the denominator polynomial are s = -2 and s = -1.

Therefore, we can write the transfer function as:

\(H(s) = \frac{2}{ (s + 1)(s + 2)}\)   -->(4)

This is the factored form of the transfer function. From the above equation the poles are located at s = -1 and s = -2.

Let expand equation (4) then we can write (4) as,

\(H(s) = \frac{A_1}{ (s + 1)} + \frac{A_2}{ (s + 2)}\)  

Now we can determine the coefficients \(A_1, A_2\) as follows.

\(A_1 = (s-p_1) H(s)|_{s=p_1}\)

or, \(A_1 = (s-(-1)) \frac{2}{ (s + 1)(s + 2)}|_{s=-1}\)

or, \(A_1 = \frac{2}{ -1 + 2} =2\)

Similarly, \(A_2 =-2\) 

So the equation(4) can be written as,

\(H(s) = \frac{2}{ (s + 1)} - \frac{2}{ (s + 2)}\)  --->(5)

Let the sampling frequency fs be 1Hz then the sampling period is T=1s. Now using the transformation equation(2),

\( \frac{1}{s-p_i}  =  \frac{1}{1-e^{p_i T}z^{-1}}\)

 We have,

\( \frac{1}{s+1}  =  \frac{1}{1-e^{-1 \times 1}z^{-1}} = \frac{1}{1-e^{-1}z^{-1}}= \frac{1}{1-0.367z^{-1}}\)

and, \( \frac{1}{s+2}  =  \frac{1}{1-e^{-2 \times 1}z^{-1}} = \frac{1}{1-e^{-2}z^{-1}} = \frac{1}{1-0.135z^{-1}}\) 

Then using (4), the digital filter transfer function equation is,

 \( H(z) = \frac{2}{1-0.367z^{-1}} -  \frac{2}{1-0.135z^{-1}} \)  

The above equation can further be simplified as follows,

  \( H(z) = \frac{2z}{z-0.367} -  \frac{2z}{z-0.135} \)  

or, \( H(z) = \frac{2z(z-0.135) -  2z(z-0.367)}{(z-0.367)(z-0.135)}\)

\( H(z) = \frac{0.464z}{z^2-0.502z+0.0495}\)

 Matlab Code

The following is Matlab code that transforms an analog filter to a digital filter using impulse invariant transformation method.

% Analog to Digital Filter using impulse invariant transformation

clear
% analog filter,  H(s) = 2 / (s^2 + 3s + 2)

b=[2];  % numerator coeff of analog filter
a = [1, 3, 2];   % denominator coeff of analog filter
fs = 1;  % sampling frequency

[bz,az] = impinvar(b,a,fs)

% Plot frequency response of digital filter H(z)
freqz(bz,az);

% Plot zero and poles of the filter
zplane(bz, az);
title('Pole-Zero Plot of Low-Pass Filter');

The above MATLAB code demonstrates the implementation of the impulse invariant transformation technique to convert an analog filter represented by its coefficients of numerator and denominator polynomials 'b' and 'a' respectively into its equivalent digital filter. The analog filter has a transfer function of H(s) = 2 / (s^2 + 3s + 2). The sampling frequency 'fs' is set to 1 Hz. The 'impinvar' function in MATLAB is used to perform the transformation, which returns the coefficients of the digital filter in 'bz' and 'az'. The frequency response and the pole-zero plot of the digital filter are plotted using the 'freqz' and 'zplane' functions respectively. The title of the pole-zero plot is set as 'Pole-Zero Plot of Low-Pass Filter'.


 References

[1] Low-Pass Filter Design and Analysis in MATLAB

[2] FIR filter design by frequency sampling

[3] RC LPF Laplace Transform, Z-Transform & Bilinear Transform

[2] DFT in Matlab without built-in function

Post a Comment

Previous Post Next Post