Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Experiment name: Frequency response by difference equation.

Objective: By this experience we will able to know the mat lab coding and graphical plot of
frequency response by difference equation.

Theory: If the system is IIR. however, its practical implementation as implied hj convolution
is clearly impossible. since it requires an infinite number of mem- ory locations.
multiplications. and additions. A question that naturally arises. then, is whether or not it is
possible to realize IIR systems other than in the form suggested by the convolution
summation. Fortunatel}. the answer is yes. there is a practical and computationally efficient
means for implementing a family of IIR systems. as will be demonstrated in this section.
Within the gen- eral class of IIR systems. this family of discrete-time systems is more con-
veniently described by difference equations. This family or subclass of IIR systems is very
useful in a variety of practical applications, including the imple- mentation of digital filters,
and the modeling of physical phenomena and physical systems.

Matlab Coding:

Frequency response (magnitude and phase response) of a given difference equation:


y(n) -1/6 y(n-1) -1/3 y(n-2) = x(n)

clc;
clear all;
x=[1];
y=[1 -1/6 -1/3];
[h,w]=freqz(x,y);
subplot(2,1,1);
plot(w/pi,abs(h));
grid;
xlabel('Normalized Frequency');
ylabel('Magnitude in dB');
title('Magnitude Response');
subplot(2,1,2);
plot(w/pi,angle(h));
grid;
xlabel('Normalized Frequency');
ylabel('Phase in radians');
title('Phase Response');

Conclusion: In this experiment we should consider all value of y and x is positive. And put
value correctly.

5 Submitted By : SHOVAN DHAR ID:182000320e

You might also like