Professional Documents
Culture Documents
DSP Lab 15 Open Ende Lab
DSP Lab 15 Open Ende Lab
31
INSTITUTE OF BUSINESS MANAGEMENT
COLLEGE OF ENGINEERING & SCIENCES
Semester _____________
LAB SESSION # 15
LAB OBJECTIVE: Write MATLAB program to find the Impulse response of a
system defined by Difference Equation.
Name of Student :
Student ID :
Date :
L ab Assessment
Total Marks
Marks Obtained
Lab Engineer:
Name:
__________________
Signature:
__________________
Date:
__________________
Faculty:
Name:
__________________
Signature:
__________________
Date:
32
AIM:- To find frequency response of a given system in differential equation form.
THEORY:
Systems respond differently to inputs of different frequencies. Some systems may amplify components
of certain frequencies, and attenuate components of other frequencies. The way that the system output
is related to the system input for different frequencies is called the frequency response of the system.
Since the frequency response is a complex function, we can convert it to polar notation in the complex
plane. This will give us a magnitude and an angle. We call the angle the phase.
Amplitude Response:
For each frequency, the magnitude represents the system's tendency to amplify or attenuate the input
signal.
Phase Response:
The phase represents the system's tendency to modify the phase of the input sinusoids. The phase
response, or its derivative the group delay, tells us how the system delays the input signal as a function
of frequency.
PROCEDURE:
• Open MATLAB
• Open new M-file
• Type the program
• Save in current directory
• Compile and Run the program
• For the output see command window\ Figure window
MATLAB CODE:-
clc;
clearall;
b=input('Enter the numerator coefficients:');
a=input('Enterthedenominatorcoefficients:');
[h,w]=freqz(b,a);
subplot(2,1,1);
plot(w/pi,abs(h));
grid;
xlabel('Normalised Frequency');
ylabel('Magnitude in dB');
title('Magnitude Response');
subplot(2,1,2);
plot(w/pi,angle(h));
grid;
xlabel('Normalised Frequency');
ylabel('phase in radians');
title('Phase Response');
SAMPLE INPUT:-
33
Enter the numerator coefficients: [1 2 3 4]
Enter the denominator coefficients: [3 4 -5 6]
Conclusion
In this open ended lab, I have performed my lab on Software Mat Lab to obtain Frequency response
from transfer or difference Equations. to find frequency response I have given different value of co-
efficient of numerator and denominator, actually transfer function is a ration of output and Input, here
input act as denominator and output as a numerator.
34