Vous êtes sur la page 1sur 7

Moape Kaloumaira s11089535

Introductio
EE323-Digital Control Systems

n to Digital
Control
Systems
LAB 1
School of Engineering & Physics EE323
Digital Control Systems
Lab 1
Title: Introduction to Digital Control Systems
Objectives:
The general objective of the lab is to introduce the students to the use of MATLAB and Simulink
in implementing and simulating the block diagram representation of digital control systems. The
specific objectives are two-fold. These are
To study the effects of sampling and quantization.

To study the simulation of digital control systems using MATLAB and Simulink.
Introduction and Theory Behind Experiment
A digital control system model can be viewed from different perspectives including control
algorithm, computer program, conversion between analog and digital domains, system
performance etc. One of the most important aspects is the sampling process level. In continuous
time control systems, all the system variables are continuous signals. Whether the system is
linear or nonlinear, all variables are continuously present and therefore known (available) at all
times. A typical continuous time control system is shown in figure 1 below.

In a digital control system, the control algorithm is implemented in a digital computer. The error
signal is discretized and fed to the computer by using an A/D (analog to digital) converter. The
controller output is again a discrete signal which is applied to the plant after using a D/A (digital
to analog) converter.. In the context of control and communication, sampling is a process by
which a continuous time signal is converted into a sequence of numbers at discrete time
intervals. It is a fundamental property of digital control systems because of the discrete nature of
operation of digital computer.
In the early development, an analog system, not containing a digital device like computer, in
which some of the signals were sampled was referred to as a sampled data system. With the
advent of digital computer, the term discrete-time system denoted a system in which all its
signals are in a digital coded form. Most practical systems today are of hybrid nature, i.e.,
contains both analog and digital components. Before proceeding to any depth of the subject we
should first understand the reason behind going for a digital control system. Using computers to
implement controllers has a number of advantages. Many of the difficulties involved in analog
implementation can be avoided. Few of them are enumerated below.
1. Probability of accuracy or drift can be removed.
2. Easy to implement sophisticated algorithms.
3. Easy to include logic and nonlinear functions.
4. Reconfigurability of the controllers.
Experimental Setup and Procedure
Part 1:
1a: Implement the analogue control system of Fig. 1 in Simulink using the following plant and
controller transfer functions:

1b: Connect the output of the system to a Simulink Output Point (Control System Toolbox /
Output Point) and then to a scope (Simulink / Sinks / Scope) so that you can observe the
response of the system.
1c: At the input side of the system connect a Simulink Input Point (Control System Toolbox /
Input Point) and then to the Input Point connect the input signal. First apply a step input to the
system and then a 125 rad/sec sinusoidal input. For both input cases run the simulation and note
the system response.
Part 2:
2a: Now build the digital control system of Fig. 2 in Simulink. The sampler of Fig. 2 is to be
implemented using a Pulse Generator, Product and Quantizer as shown in Fig. 3. For the pulse
generator set the pulse type to be Time based, amplitude to be 1, period to be the sampling time
T, pulse width to be 1% and the phase delay to be 0. The various blocks that you need to use are
selected as follows:
Discrete Transfer Function: (Discrete / Discrete Transfer Function)
Pulse Generator: (Sources / Pulse Generator)
Product: (Math Operations / Product)
Quantizer: (Discontinuities / Quantizer)
ZOH: (Discrete / Zero-Order Hold)
2b: Obtain the digital equivalent of your PID controller by using the backward difference
approximation for differentiation and integration. Use a sampling time T of 0.01 second. Write
down the z-transfer function for your digital controller.
2c: Implement the digital controller transfer function you have obtained in 2b. Note you must
select the Discrete Transfer Function block and set the sample time to 0.01 second. For the pulse
generator block the settings are explained in 2a. You must also set the sample time in the ZOH
block to 0.01 second. You will need to vary the quantization interval of the quantizer block as
indicated in Table 1 below.
2d: Apply in turn a step input and a sinusoidal input of frequency 125 rad/sec to your digital
control system.
2e: Now successively vary the following and in each case observe the systems response to the
step input and the sinusoidal input.
Sampling time the sample times in the Discrete Transfer Function block, pulse generator
block and ZOH block need to be changed simultaneously to the current sampling time value.
(Note that you also need to recalculate the digital controller transfer function when the sampling
time is changed i.e. Gc (z) will be different for each sampling time.)
Quantization interval (resolution) of the Quantizer block.

2f: Note the response of the digital control system to the step input and the sinusoidal input as the
sampling time and quantization interval are varied. What can you conclude from your
observations?
Results and Sample Calculation

Matlab codes and Simulink model result is attached


Sampled Calculation
Result Discussion
The controller transfer function was implemented as a continuous domain. This was the analogue
control. The step input and sine wave input was chosen for simulation The scope of the output
was noted when implemented per simulation requirement of the experiment. The second parts
findings of the discrete version and digital of the controller was also implemented the same. The
scope of all the three output showed that all were same showing that the experiment objectives
was met.

Conclusion
At the conclusion of this experiment, the implementing and simulation of block diagrams
representing digital control systems was successfully done. The outline effect of sampling and
quantization was that reducing the sampling time of the system had more accurate reading of the
digital controller in comparison to the analogue controller. Finally, the simulation of the
controllers was done and all Simulink model and matlab codes saved.

Vous aimerez peut-être aussi