Familiarization With Digital Control System.: Experiment No 7
Familiarization With Digital Control System.: Experiment No 7
1
After we write the program in M/File and start (run) the program we get:
Case 2:
In order to convert a transfer function (sys) from continuous to discrete domain at
sampling time of Ts using zero order hold method as shown below:
2
After we write the program in M/File and start (run) the program we get:
Case 3:
In order to convert a transfer function (sys) from continuous to discrete domain at
sampling time of Ts we use FOH method as shown below:
After we write the program in M/File and start (run) the program we get:
3
Case 4:
In order to convert a transfer function (sys) from continuous to discrete domain at a
sampling time of Ts we using Tustin method as shown below:
After we write the program in M/File and start (run) the program we get:
4
Case 5:
Using pole zero map (pzmap) of a discrete transfer function as shown below:
After we write the program in M/File and start (run) the program we get:
5
If we write feedback code as shown below:
6
7
If we enter (pzmap) as shown below:
After we write the program in M/File and start (run) the program we get:
8
Assignments:
𝟏
1. G(s)=
𝒔𝟐 +𝒔+𝟒
a- ZOH method:
9
10
b- FOH method:
11
c- Tustin method:
12
𝟓
2- G(s)=
𝒔𝟐 +𝟗
a- ZOH method:
13
b- FOH method:
14
c- Tustin method:
15
𝟏
3- G(s)=(𝒔𝟐
+𝟑𝒔+𝟓)(𝒔+𝟑)(𝒔+𝟓)
a-ZOH method:
16
b-FOH method:
17
c- Tustin method:
18
Discussion:
1-why continuous signal is to be converted in discrete domain:
The c2d command discretizes continuous-time models. Conversely, d2c converts
discrete-time models to continuous time. Both commands support several
discretization and interpolation methods
2- what is the function of ZOH device:
The Zero-Order Hold (ZOH) method provides an exact match between the
continuous- and discrete-time systems in the time domain for staircase inputs.
The following block diagram illustrates the zero-order-hold discretization Hd(z) of a
continuous-time linear model H(s).
The ZOH block generates the continuous-time input signal u(t) by holding each
sample value u(k) constant over one sample period:
u(t)=u[k], kTs≤t≤(k+1)Ts
The ZOH discrete-to-continuous conversion has the following limitations:
• d2c cannot convert LTI models with poles at z = 0.
• For discrete-time LTI models having negative real poles, ZOH d2c conversion
produces a continuous system with higher order. The model order increases
because a negative real pole in the z domain maps to a pure imaginary value in
the s domain. Such mapping results in a continuous-time model with complex data.
To avoid this issue, the software instead introduces a conjugate pair of complex
poles in the s domain. See Convert Discrete-Time System to Continuous Time for
an example.
3-what is sampling:
In signal processing, sampling is the reduction of a continuous-time signal to
a discrete-time signal. A common example is the conversion of a sound wave (a
continuous signal) to a sequence of samples (a discrete-time signal).
A sample is a value or set of values at a point in time and/or space.
19
A sampler is a subsystem or operation that extracts samples from a continuous
signal.
A theoretical ideal sampler produces samples equivalent to the instantaneous value
of the continuous signal at the desired points.
Sampling is a process by which a continuous time system can be converted to
discrete domain. Discrete time signal x[n] often arises from periodic sampling of
continuous time signal xc(t):
x[n] = xc (nT) -∞<n<∞
This system is called continuous to discrete time converter or sampler
fs = 1/T
Ωs=2πfs rad/sec.
After sampling a continuous signal an impulse train will be obtained. That
impulses are difficult to generate and transmit. So it is more convenient to generate
sample signal in form of Zero order hold.
The transfer function of ZOH is
𝟏−𝒆−𝑻𝒔
G(s) zoh =
𝐬
𝟐
𝟏−𝒆−𝑻𝒔 𝑻𝒔+𝟏
G(s)foh=( ) ( )
𝒔 𝑻
20
If the zeros in the right hands side the phase will be positive (not minimum phase).
If the zeros in left hand side the phase will be negative (minimum phase).
21