Está en la página 1de 11

TRIBHUWAN UNIVERSITY

INSTITUTE OF
ENGINEERING
PULCHOWK

CAMPUS

A
LAB REPORT
ON
DIGITAL CONTROL SYSTEM
LAB NO. 4

SUBMITTED BY:
SUBMITTEDTO:
PRAKASH ACHARYA
ER. DEPAK CHAND

ROLL NUMBER: O69/BEL/327


DEPARTMENT OF
ELECTRICAL ENGINEERING

EXPERIMENT-4
SIMULATION STUDY USING SIMULINK OF MATLAB
OBJECTIVE:
To Familiarisation with MATLAB SIMULATION.
Study simulation of discrete time control system using simulink.
THEORITICAL BACKGROUND OF DISCRETE TIME CONTROL SYSTEM:
Discrete time control systems are those in which one or more variables can
change only at discrete instant of time. These instants are denoted by KT (K=0, 1,
2, 3). Discrete-time control system differs from continuous-time control system
in form of the signal. Signals in discrete-time control system are in sampled data
form or digital form.

Whenever a digital controller is involved, the signal should be in digital form.


Since must real world signals are in analog form, thus signals must be converted
into digital form. The process of converting analog signal to digital form is known
as sampling process.
A sampler in a digital system converts an analog signal into a train of amplitude
modulated pulses. The hold circuit holds the value of the sampled pulse signal
over a specified period of time. The sample and hold is required in the A/D
converter to produce a number that accurately represents the input signal at the
sampling instants.
Controller used in discrete time control system is usually a digital controller. If the
controller is PID controller then transfer function is given by
KI
G D ( z) K p
K D (1 z 1 )
1
(1 z )
. A digital controller takes data in digital
form and processes it and gives output data in digital form. A hold circuit is used
to convert the digital form of the data to analog form. A zero order hold circuit

smoothes the input signal to produce the output signal which is constant from the
last sampled value until the next sample is available. Transfer function of ZOH is
1 e Ts
G h 0 ( s)
s
given by
.
PREPARATORY WORKS:
Before coming to lab the students are advised to gain a clear understanding of:
Sampling and hold operation
Pulse transfer function of digital controller and digital control system
Response of digital control system to standard inputs and effect of the
sampling time on the response.
LABORATORY WORKS:
Laboratory exercise is the simulation study of discrete-time control system using
simulink.
1. Start the MATLAB.
2. In the command prompt type SIMULINK. A new window will open.
3. From file menu open a new blank file.
4. Select the components needed from the different libraries and design the control
system by dragging and dropping.
5. Connect the input to the designed system by dragging a source from the source
library.
6. Connect the output of the system to scope block by bringing it from the sink
library.
7. Set the appropriate block parameters by double clicking it.
8. Choose Kp =1, Ki=0, Kd=0 and Sampling time=1.
9. Set the simulation parameters
10. Start simulation and observe the differences among continues simulation,
simulation using first order hold and using 2nd order hold.
11. Repeat simulation by varying the sampling time of 0.5, 0.1 and .01. Observe the
differences from the previous case.
12. Also repeat simulation by varying Kp.
13. Observe the variation with non zero Ki and Kd and suggest your comments.
14.Repeat the whole procedure for a plant transfer function of 2nd order.
15.Simulate the speed control of dc motor you did in analog control
system lab in discrete time domain. Take transfer function of motor as

0.478
0.12 s 1

and transfer function of tachometer as 0.15 V/Rad/sec. The


block diagram of speed control system in continuous time is given
below:

I/P

Gain
Block
P-controller

Transfer Function Block


Gain
Block
Motor

Tacho-Generator

O/P

G. DISCUSSIONS:
1. Explain any discrepancy observed in simulation using contious time
model and discrete model.
2. Discuss the effect of sampling time for discrete simulation.
3. What variation on the response was observed when parameters of
controller were varied?

Kp
1

Pulse
Generator

s+1
Product2

Zero-Order
Hold

Ki

z-1

Plant

Scope

Integrql1

Inputp

z-1

Kd

z
Derivative1

Kp
1
s+1

Product1
Ki

z
z-1

First-Order
Hold

Plant1

Integral2

Kd

z-1
z
Derivative2

Kp
1
s+1
Ki

1
s
Integral4

Kd

du/dt
Derivative

Plant2

1. As specified in the lab sheet ,whenKp =1, Ki=0, Kd=0 and Sampling time=1,the
simulation output is shown below.

When sampling time =0.5

When sampling time =0.1

When sampling time=0.01

If we take kp=1,ki=0.5 and kd=0.8 then ;

COMMENTS:
Proportional-Integral-Derivative (PID) control is the most common
control algorithm used in industry and has been universally
accepted in industrial control. The popularity of PID controllers
can be attributed partly to their robust performance in a wide
range of operating conditions and partly to their functional
simplicity, which allows engineers to operate them in a simple,
straightforward manner.
The proportional term produces an output value that is
proportional to the current error value. The proportional response
can be adjusted by multiplying the error by a constant Kp, called
the proportional gain constant.
The proportional term is given by:
A high proportional gain results in a large change in the output
for a given change in the error. If the proportional gain is too
high, the system can become unstable . In contrast, a small gain
results in a small output response to a large input error, and a
less responsive or less sensitive controller. so we take in this
experiment kp=1,0 for different sampling period and observe the
result.
The contribution from the integral term is proportional to both
the magnitude of the error and the duration of the error.
Theintegral in a PID controller is the sum of the instantaneous
error over time and gives the accumulated offset that should
have been corrected previously. The accumulated error is then
multiplied by the integral gain ( ) and added to the controller
output.
The integral term is given by:

The integral term accelerates the movement of the process


towards setpoint and eliminates the residual steady-state error
that occurs with a pure proportional controller.
The derivative of the process error is calculated by determining
the slope of the error over time and multiplying this rate of
change by the derivative gain Kd. The magnitude of the
contribution of the derivative term to the overall control action is
termed the derivative gain, Kd.
The derivative term is given by:

Derivative action predicts system behavior and thus improves


settling time and stability of the system
conclusion : so by changing the value of kp, ki , kd we observe
the response of the system as explained in the comments.we
also change the sampling time .

También podría gustarte