0% found this document useful (0 votes)
11 views2 pages

مهم

This document summarizes computer exercises using MATLAB to: 1) Obtain the transfer function of a system with DAC/ADC and zero-order hold, with a sampling period of 0.05s. 2) Obtain the transfer function of the same system with a first-order hold. 3) The poles are the same for both systems due to the same sampling period, but the transfer functions differ based on the type of hold used.

Uploaded by

zara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

مهم

This document summarizes computer exercises using MATLAB to: 1) Obtain the transfer function of a system with DAC/ADC and zero-order hold, with a sampling period of 0.05s. 2) Obtain the transfer function of the same system with a first-order hold. 3) The poles are the same for both systems due to the same sampling period, but the transfer functions differ based on the type of hold used.

Uploaded by

zara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Computer Exercises (MATLAB):

1- For the analog system with a sampling period of 0.05 s

a) Obtain the transfer function for the system with DAC and ADC with Zero- order hold.
b) Obtain the transfer function for the system with DAC and ADC with first order hold.
c) Obtain the poles of the systems in (a) and (b) and comment on the differences between
them.

a) Obtain the transfer function for the system with DAC and ADC with Zero- order hold

numG=10*[1 2];
denG=[1 5 0];
G=tf(numG,denG)
G =

10 s + 20
---------
s^2 + 5 s

Continuous-time transfer function.

SYS1=c2d(G,.05)

SYS1 =

0.4654 z - 0.4212
----------------------
z^2 - 1.779 z + 0.7788

Sample time: 0.05 seconds


Step Response
2500
G
SYS1

2000

1500
Amplitude

1000

500

0
0 50 100 150 200 250 300 350 400 450 500
Time (seconds)

Discrete-time transfer function.


figure (1)
step (G)
hold on
(SYS1,'r')

b) Obtain the transfer function for the system with DAC and ADC with first order hold

SYS2=c2d(G,.05,'foh')

SYS2 =

0.2382 z^2 + 0.01107 z - 0.2051


-------------------------------
z^2 - 1.779 z + 0.7788

Sample time: 0.05 seconds


Discrete-time transfer function.

Step Response
2500
SYS2
G

2000

1500
Amplitude

1000

500

0
0 50 100 150 200 250 300 350 400 450 500
Time (seconds)

figure (2)
step (SYS2,'r')
hold on
step (G)

c) Obtain the poles of the systems in (a) and (b) and comment on the differences between
them.
The system 1 and system 2 have same poles by sampling period of
0.05s.

You might also like