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

Department of Electrical Engineering Signal Processing Laboratory

Experiment No: 7
Aim: Locate the zeros and poles and plotting the pole zero maps in s-plane and Z-plane for the given
transfer function

Program:

% Prompt user to enter the transfer function


num = input('Enter the numerator coefficients of the transfer function
(in square brackets): ');
den = input('Enter the denominator coefficients of the transfer
function (in square brackets): ');

% Define the transfer function


s = tf('s');
H_s = tf(num, den)

% Locate zeros and poles


zeros_s = zero(H_s);
poles_s = pole(H_s);

% Plot pole-zero map in s-plane


figure;
pzmap(H_s);
title('Pole-Zero Map in s-plane');

% Convert transfer function to discrete-time (Z-transform)


Ts = 0.1; % Sampling time
H_z = c2d(H_s, Ts, 'zoh') % Convert to discrete-time using zero-order
hold method

% Locate zeros and poles in z-plane


zeros_z = zero(H_z);
poles_z = pole(H_z);

% Plot pole-zero map in z-plane


figure;
pzmap(H_z);
title('Pole-Zero Map in Z-plane');

Results:

Enter the numerator coefficients of the transfer function (in square


brackets): [1 1]

Enter the denominator coefficients of the transfer function (in square


brackets): [1 2 2]
Department of Electrical Engineering Signal Processing Laboratory

H_s =

s + 1
-------------
s^2 + 2 s + 2
Continuous-time transfer function.

H_z =

0.09501 z - 0.08596
----------------------
z^2 - 1.801 z + 0.8187

Sample time: 0.1 seconds


Discrete-time transfer function.
Department of Electrical Engineering Signal Processing Laboratory

Conclusion:

You might also like