DCS Lab 1 Report
DCS Lab 1 Report
Lab #1 Report
v. Set the sampling time = 0.001 for both ZOH and quantizer. Set quantization interval =
0.001
vi. Connect the output of both control systems to a single scope for easy comparison.
Figure 3: Continuous & Discrete Time System implementation in Simulink
vii. Compare the outputs of both the control systems. Are they similar?
viii. Now gradually increase sampling time up to 5 seconds while keeping the quantization
interval at 0.001. Compare the response of both the systems. Do the responses differ?
Does the closed loop system with the digital controller remains stable?
ix. Keeping the sampling time at 0.01 secs, try different values of the quantization interval
between 0.001 and 5. Compare the response of both the systems. Do the responses differ?
Does the closed loop system with the digital controller remains stable? Do you observer
any oscillations in the steady state value of the system. Can you observe any link of the
frequency/amplitude of these oscillations to the sampling time and quantization interval?
Exercise 1 Solution:
G =
1
-----
s - 1
ans =
Simulink Observations:
For part (vii), sampling time and quantization interval are both equal to 0.001 and the outputs of
both control systems are exactly the same.
For part (viii), quantization interval is fixed at 0.001 and the sampling time is increased up to 5
seconds. The responses differ and the closed loop system with the digital controller does not
remain stable.
For part (ix), sampling time is fixed at 0.01 seconds and the quantization interval is changed
between 0.001 and 5. The responses differ, but the closed loop system with the digital controller
remains stable. However, as we increase the value of quantization interval, the oscillations in the
steady state value of the system increase. If the values of sampling time and quantization interval
are similar then the oscillations are small, but if these values differ then the oscillations are large.
Exercise 2 Solution:
G =
1
-----
s + 1
Continuous-time transfer function.
ans =
-1
Proportional Controller Design (C = 2):
Simulink Implementation:
Simulink Observations:
For part (v), sampling time and quantization interval are both equal to 0.001 and the outputs of
both control systems are exactly the same.
For part (vi), quantization interval is fixed at 0.001 and the sampling time is increased up to 5
seconds. The responses differ and the closed loop system with the digital controller does not
remain stable.
For part (vii), sampling time is fixed at 0.1 seconds and the quantization interval is changed
between 0.001 and 5. The responses differ, but the closed loop system with the digital controller
remains stable.
For part (viii), as we increase the value of quantization interval, the oscillations in the steady
state value of the system increase. If the values of sampling time and quantization interval are
similar then the oscillations are small, but if these values differ then the oscillations are large.
Exercise 3: Consider the following transfer function.
1
𝐺(𝑠) =
(𝑠 + 1)(𝑠 + 3)
Exercise 3 Solution:
G =
-------------
s^2 + 4 s + 3
ans =
-3
-1
Proportional Controller Design (C = 4):
Simulink Implementation:
Simulink Observations:
Observations are the same as those seen in exercises 1 and 2.
G =
-------------
s^2 + 3 s - 4
ans =
-4
Simulink Observations:
Observations are the same as those seen in exercises 1 and 2.
Exercise 5: After considering the observations in the above exercises, in your opinion what are
the factors that need to be considered when implementing a controller digitally?
Explanation:
Sampling time and quantization interval must be selected carefully to ensure that the signal is
represented accurately in the digital domain. The sampling time must be small enough to ensure
that the controller response is stable. Sampling time and quantization interval must also have
values that are similar to minimize the oscillations in the steady state value of the system.
Exercise 6: In this handout all of the observations are with a simple controller. In your
opinion, will the sampling time and the quantization interval also affect a PID controller?
Explanation:
Sampling time and quantization interval will also affect a PID controller. To achieve certain
performance parameters such as rise time, percentage overshoot, etc. we will have to adequately
select the sampling time and quantization interval values and then adjust our gains through trial-
and-error approach.