Pole Zero plot and magnitude response
Objective:
Objective of this topic is to
design filter using properties of pole and zero and analyze magnitude.
Description:
Pole-Zero
plot and its relation to Frequency domain:
Pole-Zero
plot is an important tool, which helps us to relate the Frequency domain and
Z-domain representation of a system. Understanding this relation will help in
interpreting results in either domain. It also helps in determining stability
of a system, given its transfer function H(z).
Visualizing
Pole-Zero plot:
Since the z-transform is a function of a complex
variable, it is convenient to describe and interpret it using the complex
z-plane. In the z-plane, the contour corresponding to |z| = 1 is a circle of unit radius. This contour is referred
to as the Unit
Circle. Also, the z-transform is most
useful when the infinite sum can be expressed as a simple mathematical formula.
One important form of representation is to represent it as a rational function
inside the Region
of Convergence. i.e.
The pole-zero plot gives us a convenient way of visualizing the relationship between the Frequency domain and Z-domain. The frequency response H(e jw ) is obtained from the transfer function H(z), by evaluating the transfer function at specific values of z = e jw.
Poles and zeros are nice graphical representation of z-domain here is the pole zero plot of a simple system with two poles near unit circle and two zeros at 0.let’s see what happens by moving poles and zeros.
If a filter has a zero r located on the unit circle, i.e.
r = 1, then H(r) = 0, i.e. the frequency response has a null at frequency r.
Similarly, if a filter has a zero r located close to the unit circle, i.e. r~1,
then H (\r) ~ 0, i.e. the frequency response has a dip at frequency \r. In
either case, H (w) ~0, when W ~ r. In short by putting zero r at or near unity
circle H (w) approaches to zero where, w being the angular frequency of zero r
to the x-axis
Similarly if we place a pole r at any angle w it makes the
system’s response go to infinity/peak at that particular frequency.
Poles:
·
Poles enhances the magnitude response of the
system.
·
Moving the poles nearer to the unit circle
increases the effect of enhancement (Amplitude of peak), moving towards the
origin decreases the effect.
Zeros and Poles Editing:
You
can edit a designed or imported filter's coefficients by moving, deleting, or
adding poles and/or zeros using the Pole/Zero Editor panel. Click the Pole/Zero Editor button in the sidebar or select Edit > Pole/Zero
Editor to display this panel.
Changing
the Pole-Zero Plot
Plot mode buttons
are located to the left of the pole/zero plot. Select one of the buttons to
change the mode of the pole/zero plot. The Pole/Zero Editor has these buttons
from left to right: move pole, add pole, add zero, and delete pole or zero.
The following plot
parameters and controls are located to the left of the pole/zero plot and below
the plot mode buttons.
·
Filter gain — factor to compensate
for the filter's pole(s) and zero(s) gains
·
Coordinates — units
(Polar or Rectangular) of the selected pole or zero
·
Magnitude — if polar coordinates is
selected, magnitude of the selected pole or zero
·
Angle — if polar coordinates is
selected, angle of selected pole(s) or zero(s)
·
Real — if rectangular coordinates is
selected, real component of selected pole(s) or zero(s)
·
Imaginary — if rectangular
coordinates is selected, imaginary component of selected pole or zero
·
Section — for multisection filters,
number of the current section
·
Conjugate — creates a corresponding
conjugate pole or zero or automatically selects the conjugate pole or zero if
it already exists.
·
Auto update — immediately updates
the displayed magnitude response when poles or zeros are added, moved, or
deleted.
·
You can select zero pair or pole pair by
clicking on it the selected pair is shown in green.
·
When you select one of the zeros from a
conjugate pair, the Conjugate check box and the conjugate are automatically
selected.
·
Selected
pair can be moved along z-plane using the arrow by drag and drop method.
Designing a filter using poles and zeros plot:
For example this is might be how we
use poles and zeros to design a band pass filter.
To change the frequency range that
we are trying to stop move the zeros across the unit circle. To increase the
band stop range add more zeros so they will more area. Smoothness of this
suppression can be increased by moving the zero towards the origin.
1: Use the enhancement and suppression properties of poles & zeros to design filters.
Create following filters by
creating and adjusting zeros and poles according to the requirements of the
magnitude response of given filter.
·
Low Pass Filter
·
High Pass Filter
·
Band Pass Filter
Apply all the filters on audio
signal having sampling rate 44k Hz, plot magnitude of resultant outputs and
comment on results with respective to filters and pole zeros.
All filters
are designed by keeping the original signal in mind.
Part 1 : Low
Pass Filter
CODE:
[data,Fs] = audioread('Freestudystrom\CDQuality.wav');
%read input file
audiowrite('C:\Desktop\New.wav',data,44000); %write it eith sampling frequency
of 44kHz
[data,Fs] = audioread('C:\Desktop\New.wav'); %read new file
data = data(:,2); %consider
one channel
T = 1/Fs; %time
period
figure
%plot original signal in
time and frequency domain
subplot(2,1,1)
t = 0:T:(length(data)*T)-T;
plot(t,data)
title('Original
Signal in Time Domain')
xlabel('Time')
ylabel('Amplitude')
subplot(2,1,2)
FFT= abs(fft(data));
f =
(0:length(FFT)-1)*Fs/length(FFT);
plot(f,FFT)
title('Original
Signal in Frequency Domain')
xlabel('Frequency')
ylabel('Magnitude')
Out =filter(loww,data); %apply low pass filter to the
input signal
figure
%plot original signal in
time and frequency domain
subplot(2,1,1)
t = 0:T:(length(Out)*T)-T;
plot(t,Out)
title('Filtered
Signal in Time Domain')
xlabel('Time')
ylabel('Amplitude')
subplot(2,1,2)
FFT= abs(fft(Out));
f =
(0:length(FFT)-1)*Fs/length(FFT);
plot(f,FFT)
title('Filtered
Signal in Frequency Domain')
xlabel('Frequency')
ylabel('Magnitude')
OUTPUT:
Low Pass Filter is designed such that it allows frequencies upto 2kHz only.
Multiple zeros are added to create more dips on the higher frequency side.
To measure its speed and time taken:
As evident form the frequency domain analysis, higher frequency components are attenuated.
Part 2 : High
Pass Filter
CODE:
[data,Fs] = audioread(‘freestudystrom/CDQuality.wav'); %read input file
audiowrite('C:\Desktop\New.wav',data,44000); %write it eith sampling frequency
of 44kHz
[data,Fs] = audioread('C:\Desktop\New.wav'); %read new file
data = data(:,2); %consider
one channel
T = 1/Fs; %time
period
figure
%plot original signal in
time and frequency domain
subplot(2,1,1)
t = 0:T:(length(data)*T)-T;
plot(t,data)
title('Original
Signal in Time Domain')
xlabel('Time')
ylabel('Amplitude')
subplot(2,1,2)
FFT= abs(fft(data));
f =
(0:length(FFT)-1)*Fs/length(FFT);
plot(f,FFT)
title('Original
Signal in Frequency Domain')
xlabel('Frequency')
ylabel('Magnitude')
Out =filter(high,data); %apply high pass filter to the
input signal
figure
%plot original signal in
time and frequency domain
subplot(2,1,1)
t = 0:T:(length(Out)*T)-T;
plot(t,Out)
title('Filtered
Signal in Time Domain')
xlabel('Time')
ylabel('Amplitude')
subplot(2,1,2)
FFT= abs(fft(Out));
f =
(0:length(FFT)-1)*Fs/length(FFT);
plot(f,FFT)
title('Filtered
Signal in Frequency Domain')
xlabel('Frequency')
ylabel('Magnitude')
OUTPUT:
Part 3 : Band
Pass Filter
CODE:
[data,Fs] = audioread('freestudystrom\CDQuality.wav');
%read input file
audiowrite('C:\Desktop\New.wav',data,44000); %write it eith sampling frequency
of 44kHz
[data,Fs] = audioread('C:\Desktop\New.wav'); %read new file
data = data(:,2); %consider
one channel
T = 1/Fs; %time
period
figure
%plot original signal in
time and frequency domain
subplot(2,1,1)
t = 0:T:(length(data)*T)-T;
plot(t,data)
title('Original
Signal in Time Domain')
xlabel('Time')
ylabel('Amplitude')
subplot(2,1,2)
FFT= abs(fft(data));
f =
(0:length(FFT)-1)*Fs/length(FFT);
plot(f,FFT)
title('Original
Signal in Frequency Domain')
xlabel('Frequency')
ylabel('Magnitude')
Out =filter(band,data); %apply band pass filter to the
input signal
figure
%plot original signal in
time and frequency domain
subplot(2,1,1)
t = 0:T:(length(Out)*T)-T;
plot(t,Out)
title('Filtered
Signal in Time Domain')
xlabel('Time')
ylabel('Amplitude')
subplot(2,1,2)
FFT= abs(fft(Out));
f =
(0:length(FFT)-1)*Fs/length(FFT);
plot(f,FFT)
title('Filtered
Signal in Frequency Domain')
xlabel('Frequency')
ylabel('Magnitude')
OUTPUT:
No comments:
Post a Comment