Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Experiment No. 1
(a): Modeling of Physical Systems and Study of Their Open Loop Response.
(b): PID Design Method for DC Motor Speed Control.
Introduction:
To understand and control physical systems, one of the initial requirements is to obtain the
mathematical model of the system. A model is one that quantitatively describes the relationship
between the input and output of a dynamic system. To model systems, we use physical laws,
such as Kirchhoff’s current and voltage laws for electrical networks and Newton’s law for
mechanical systems, along with simplifying assumptions.
Because the systems are usually dynamic in nature, one such model relating the input and output
is the linear, time invariant differential equation as shown below:
However, the classical approach of modeling linear systems is the transfer function technique
which is derived from the differential equation using Laplace transform. Transfer function yield
more intuitive information than the differential equation by visualizing the effect of system
parameter variations on the system response as well as it eases the modeling of interconnected
subsystems by forming block diagrams.
Second-Order System: The general second order transfer function can be expressed as:
𝑏
𝐺(𝑠) = (1)
𝑠2 + 𝑎𝑠 + 𝑏
This transfer function can also be expressed in terms of its natural frequency, 𝜔𝑛 and damping
ratio, 𝜁 as:
𝜔𝑛 2
𝐺(𝑠) = 2 , (2)
𝑠 + 2𝜁𝜔𝑛 𝑠 + 𝜔𝑛 2
⁄
where, 𝑏 = 𝜔𝑛 2 and 𝜁 = 𝑎 2�𝜔𝑛 .
The response of the system depends on the pole location, thus in effect on the values of 𝜁 and 𝜔𝑛
as seen from Fig. 1.
Figure 1: Second-order response as a function of damping ratio
Two significant parameters for system response are settling time and percent overshoot which
can be described as follows:
Percent overshoot, %OS. The amount that the waveform overshoots the steady-state, or final
value at the peak time.
2
% 𝑂𝑆 = 𝑒 −(𝜁𝜋/�1− 𝜁 ) × 100 (3)
Settling time, 𝑇𝑠 . The time required for the transient’s damped oscillations to reach and stay
within ±2% of the steady-state value.
4
𝑇𝑆 = (4)
𝜁𝜔𝑛
Part 1: Modeling of a dc motor
For this example, we will assume the following values for the physical parameters.
From the figure above we can write the following equations based on Newton's law combined
with Kirchhoff's law:
𝐽𝜃̈ + 𝑏𝜃̇ = 𝐾. 𝑖
𝑑𝑖
𝐿 + 𝑅𝑖 = 𝑉 − 𝐾𝜃̇
𝑑𝑡
Transfer Function
Using Laplace Transforms on the above modeling equations, we can get the following open-loop
transfer function where the rotational speed is the output and the voltage is the input.
𝜃̇ 𝐾
=
𝑉 (𝐽𝑠 + 𝑏)(𝐿𝑠 + 𝑅) + 𝐾 2
This is a second order system. Thus the settling time and percent overshoot can be calculated by
expressing it in the standard form of Eq.(2) and using Eq.s (3) and (4).
Matlab representation
We can represent the above transfer function into Matlab. Create a new m-file and enter the
following commands:
J=0.01;
b=0.1;
K=0.01;
R=1;
L=0.5;
num=K;
den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2)];
open_sys = tf(num,den);
Open loop response: Add the following commands onto the end of the m-file and run it in the
Matlab command window:
step (open_sys,0:0.1:3);
title('Step Response for the Open Loop System');
You should get the following plot:
Step Response
0.1
0.09
0.08
0.07
0.06
Amplitude
0.05
0.04
0.03
0.02
0.01
0
0 0.5 1 1.5 2 2.5 3
Time (sec)
Class Work:
1
Find the poles of the system 𝐺(𝑠) = 𝑠2 −6𝑠+25 by using the command pole(). Move the poles (a)
vertically in the s-plane by keeping their real part constant (b) horizontally by keeping their
imaginary part constant and (c) by keeping θ constant where cos 𝜃 = 𝜁. Plot the step response of
the system for all three cases and comment on settling time, peak time and percent overshoot
change.
Report:
1. Determine the maximum speed that the motor can achieve and time to reach that speed when 1
volt is applied.
2. How steady state speed and settling time of the output response vary with the variation of R
and input voltage?
3. Can you suggest any modification in the system if we want to increase the steady state speed
and reduce the settling time simultaneously?
This additional component or device that equalizes or compensates for the performance
deficiency is called compensator or controller.
R e u Y
Controller Plant
+ −
There are several techniques available to the control systems engineer to design a suitable
controller. One of controller widely used is the proportional plus integral plus derivative
(PID) controller, which has a transfer function:
𝐾𝐼
𝐾𝑃 + + 𝐾𝑑 𝑠
𝑠
• KP = Proportional gain
• KI = Integral gain
• Kd = Derivative gain
First, let's take a look at how the PID controller works in a closed-loop system using the
schematic shown above. The variable (e) represents the error, the difference between the desired
input value (R) and the actual output (Y). This error signal (e) will be sent to the PID controller,
and the controller computes both the derivative and the integral of this error signal. The signal
(u) just past the controller is now equal to the proportional gain (Kp) times the magnitude of the
error plus the integral gain (Ki) times the integral of the error plus the derivative gain (Kd) times
the derivative of the error.
This signal (u) will be sent to the plant, and the new output (Y) will be obtained. This new output
(Y) will be sent back to the sensor again to find the new error signal (e). The controller takes this
new error signal and computes its derivative and it’s integral again.
This process goes on and on.
** We should keep in mind that we do not need to implement all three controllers (proportional, derivative, and
integral) into a single system, if not necessary. For example, if a PI controller gives a good enough response (like the
above example), then we don't need to implement derivative controller to the system. We must keep the controller as
simple as possible.
Design requirements:
As seen in the previous experiment, our uncompensated motor can only rotate at 0.1 rad/sec with
an input voltage of 1 Volt. Our desired speed is 1 rad/sec for the same input voltage, while
steady-state error should be less than 1%. Other performance requirement is that the motor must
accelerate to its steady-state speed as soon as it turns on. In this case, we want it to have a
settling time of 1 second. Since a speed faster than the reference may damage the equipment, we
want to have an overshoot of less than 5%.
Summarizing the above requirements, if we simulate the reference input (r) by a unit step input,
then the motor speed output should have:
• Settling time less than 1 seconds
• Overshoot less than 5%
• Steady-state error less than 1%
Procedures:
1. Proportional control:
In order to meet the design specifications, we need to develop a feedback system with an
appropriate controller as shown in figure 3. First try using a proportional controller with a gain of
kp = 100. Add the following code to the end of your m-file:
kp = 100;
closed_sys = feedback(open_sys*kp,1);
step (closed_sys,0:0.01:3);
title ('Step Response Proportional Control');
You should get the following plot:
Determine rise time, steady-state error, overshoot and settling time from the output response plot.
2. Proportional-Integral control:
From the plot above we see that both the steady-state error and the overshoot are too large. To
improve the system response, let's try with a PI controller with Ki = 200 and Kp as before.
Observe the effect of PI controller on rise time, overshoot, settling time and steady-state error.
3. Proportional-Derivative control:
Modify your matlab code with Kp equals 100 as before, Kd equals 10 and Ki equals 0. Run the
program and note the effect of PD controller on rise time, overshoot, settling time and steady-
state error.
4. Proportional-Derivative-Integral control:
Modify your matlab code with Kp equals 100, Kd equals 10 and Ki equals 200. Run the program
and note the effect of PID controller on rise time, overshoot, settling time and steady-state error.
Report:
4. Give your inferences on the effects of proportional, integral and derivative control upon
system performances such as rise time, overshoot, settling time and steady-state error.
5. Is it possible to redesign the above PID controller with another set of Kp, Ki and Kd ? If
possible, design the controller.
References:
1. Control Systems Engineering by Norman S. Nise (Chapter: 4)
2. Modern Control Systems by Richard C. Dorf and Robert H. Bishop (Chapter: 2)
Experiment No: 01
(a) Modeling of Physical systems and study of their open loop response
Objective:
The objective of this experiment is the modeling of physical systems and study of their
open loop response.
Let us assume a car that travels only in one direction. Control to the car was applied in
such a way that it has a smooth start-up, along with a constant-speed ride.
If it is assumed that friction is opposing the motion of the car, then the modeling
equations become
mv bv u
yv
Mathematical analysis:
msV ( s) bV ( s) U ( s)
Y ( s) V ( s)
msY (s) bY ( s) U ( s)
Y ( s) 1
U ( s ) ms b
MATLab Code:
clc;
clear all;
close all;
b=50;
u=500;
figure;
for i=1:5
m=200*i;
num=[1];
den=[m b];
sys=tf(num,den);
step(u*sys);
hold on;
title('Step response of the Cruise Control when Friction is fixed');
xlabel('time')
ylabel('velocity(m/s)');
end
figure;
m=1000;
for j=1:5
b=j*10;
num=[1];
den=[m b];
sys=tf(num,den);
step(u*sys);
hold on;
title('Step response of the Cruise Control when Mass is fixed');
xlabel('time')
ylabel('velocity(m/s)');
end
MATLab Simulation:
MATLAB Data:
Report:
1. Define rise time, settling time, percentage overshoot and steady state error of a
system for step input.
The time required for the response to go from 10% of the final value to 90% of the
final value is known as rise time. It is denoted by Tr. For a step input, the output is
naturally expected to reach at the final value gradually instead of impulsive response.
The time required for the transient’s damped oscillations to reach and stay within
2% of the steady state value is known as settling time. It is denoted by T s.
The amount that, the response overshoots, the steady state or final value at the
peak time, expressed as a percentage of the steady state value.
M pt f v
P.O. 100%
fv
For a unit step input, Mpt is the peak value of the time response, and fv is the final
value of the response.
Steady state error is the difference in level between the response desired for the
input command and steady state final response.
2. From the plot, observe the steady-state speed of the vehicle and the time it takes to
reach the value.
The plot has been attached with the report. From the plot, following observations are
made,
3. How steady state speed, rise time and overshoot of the output response vary with the
variation of m and b?
Steady state speed of the system remains unchanged with the variation of the
mass of the system. So, steady state speed is immune to mass change of the
system.
Rise time reacts to mass change. When the mass increases, rise time of the
system increases and when the mass of the system decreases, rise time of the
system decreases. So a system with small mass will rise to the steady state
faster than the system with a large mass.
No overshoot was seen in the given system.
Steady state speed increases with decrease in friction & decreases with increase
in friction.
Rise time increases with decrease in b & decreases with increase in b.
No overshoot was observed in the given system.
4. Justify the steady state speed of the vehicle depends only on the friction coefficient
b.
In the cruise control system, it has been assumed that the vehicle travels only in one
direction. If the inertia of the wheels is neglected, then the steady state speed of the
vehicle depends on the friction coefficient b and the mass of the body m. According
to the classical theory of mechanics, mass of a body is a constant quantity and it
cannot be changed when it is running. So, from the equation it is clear that the
steady state speed of the vehicle depends only on the friction coefficient b. It
decreases when b increases and increases when b decreases, cause friction or
damping always works against motion. It is also seen from the plots obtained by
software simulation that any change in m doesn’t change the steady state speed. So,
it is decidable that the steady state speed of the vehicle depends only on the friction
coefficient b, not on the mass of the system, m.
The motor torque T, is related to the armature current, I by a constant factor Kt. The
back emf, e, is related to the rotational velocity by the following equations.
T Kt i
e K e
J b Ki
di
L Ri v K
dt
Where,
R=electric resistance
L=electric inductance
V=source voltage
=position of shaft
Mathematical analysis:
K
V ( Js b)( Ls R ) K 2
MATLAB Code:
clc;
clear all;
close all;
J=0.01;
b=0.1;
K=0.01;
L=0.5;
v=10;
figure;
for i=1:5
R=i;
num=K;
den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2)];
sys=tf(num,den);
st=(v*sys);
step(st,0:0.1:3);
hold on;
title('Step Response for the dc Motor when R is varied');
xlabel('Time');
ylabel('Speed');
end
R=5;
figure;
for j=1:5
v=j*2;
num=K;
den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2)];
sys=tf(num,den);
st=(v*sys);
step(st,0:0.1:3);
hold on;
title('Step Response for the dc Motor when V is varied');
xlabel('Time');
ylabel('Speed');
end
MATLAB Simulation:
MATLAB Data:
Report:
1. Determine the maximum speed that the motor can achieve and time to reach that
speed when 1 volt is applied?
When 1 volt is applied and when resistance is 1 ohm, maximum speed is 0.0996 unit
and time to reach the speed is 2.8 time units.
2. How steady state speed and settling time of the output response vary with the
variation of R and input voltage?
Steady state speed of the system increases with decrement of resistance and
vice-versa.
Relation of rise time or settling time to resistance variation has similar
characteristics. I.e. they are inversely related, when resistance increases
rise/settling time falls and when resistance is reduced rise/settling time rises.
Steady state speed increases with increase in input voltage and conversely.
Rise/Settling time is invulnerable to input voltage change.
3. Can you suggest any modification in the system if we want to increase the steady state
speed and reduce the settling time simultaneously?
If we increase the input voltage and the value of R at the same time, we can increase
the steady state speed and reduce the settling time simultaneously. But it contradicts
two different ideas. Firstly, it’s not wise to change resistance of a well-built system
and also not convenient economically. Secondly, when change in R and input voltage
are related when it’s required to increase the steady state speed and decrease the
steady state speed, a feedback loop is a must, which is a must for closed loop system
but should not be present in an open loop system.
As the given system is an open loop system. It can’t provide any kind of process to
increase the steady state speed & to decrease the settling time at the same time.
Discussion:
In this experiment, we studied modeling of physical systems and their open loop
response.
Describing a System:
The systems are usually dynamic by nature, one such model relating the input and
output is the linear, time variant differential equation.
However, the classical approach of modeling linear systems is the transfer function
technique which is derived from the differential equation using Laplace transform.
Transfer function yield more intuitive information than the differential equation by
visualizing the effect of system parameter variations on the system response as well as
it eases the modeling interconnected systems.
In our experiment, we modeled a cruise control system and a dc motor and also studied
their open loop response. We used software simulation (MATLAB) for this purpose. We
also studied how the response changed with the change of different variables.
An open loop system utilizes an actuating device to control the process directly without
using feedback. Here the final output is not compared with the desired one.
Reduction of cost
Simple
Control is easy
A closed loop control system uses a measurement of the output and feedback of this
signal to compare it with the desired input.
Greater accuracy
Less sensitive to noise, disturbance & changes in environment
Control is more convenient & flexible
Costly
Complex system
Sometimes unstable
Objective:
The objective of this experiment is to study PID design method for DC motor speed
control.
It is assumed that, the uncompensated motor can only rotate at 0.1 rad/s with an input
voltage of 1 volt. The desired speed is 1 rad/s for the same input voltage, while steady
state error should be less than 1%. Other performance requirement is that motor must
accelerate to its steady state speed as soon as it turns on. In this case, the desired
settling time is of 1 second. Since a speed faster than the reference may damage the
equipment, an overshoot of less than 5% will do fine.
Mathematical analysis:
The motor torque T, is related to the armature current, I by a constant factor K t. The
back emf, e, is related to the rotational velocity by the following equations.
T Kt i
e K e
J b Ki
di
L Ri v K
dt
Where,
R=electric resistance
L=electric inductance
V=source voltage
=position of shaft
K
V ( Js b)( Ls R ) K 2
KI K S 2 KPS KI
Kp KDS D
S S
K I = Integral gain
Kd = Derivative gain
MATLab Code:
clc;
clear all;
close all;
J=0.01;
b=0.1;
K=0.01;
R=1;
L=0.5;
num=K;
den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2)];
open_sys=tf(num,den);
subplot(2,1,1),step(open_sys,0:0.1:3);
title('Step response for the open loop System');
kp=100;
ki=200;
kd=10;
controller=tf([kd kp ki],[1 0]);
sys=feedback(controller*open_sys,1);
subplot(2,1,2),step(sys,0:0.1:3);
title('Step response for the Closed Loop System');
% Values of kp kd ki are varied according to the control type
MATLab Simulation:
Figure: Step response for Open Loop System and Proportional Controlled Closed System
Figure: Step response for Proportional Derivative Controlled Closed System with KI=5
Figure: Step response for Proportional Derivative Controlled Closed System with KI=0
Figure: Step response for Proportional Derivative Integral Controlled Closed System
MATLab Data:
Rise Steady
Control Overshoot Settling
Kp KD KI time state
Type (%) time(sec)
(sec) error (%)
Open Loop 0 0 0 1.14 0.0 2.07 0.01
50 0 0 0.179 11.1 0.541 16.7
Proportional 100 0 0 0.129 21.9 0.568 9.1
150 0 0 0.0955 31.8 0.621 6.3
25 0 12 2.52 0.0 6.99 0.0
Proportional 50 0 48 0.216 0.0 1.87 4.17
Integral 75 0 108 0.152 0.0 0.719 18.8
100 0 192 0.128 0.0 0.744 25.2
20 5 5 6.89 0.0 15.9 0.0
Proportional 40 10 5 6.74 0.0 22.3 0.3
Derivative 60 15 5 4.89 0.0 26.9 0.8
80 20 5 1.86 0.0 30.4 1.2
Report:
1. Give your inferences on the effects of proportional, integral and
derivative control upon system performances such as rise time,
overshoot, settling time and steady state error.
2. Is it possible to redesign the above PID controller with another set of K p, Ki and Kd?
If possible, design the controller.
Yes, it is possible to redesign the PID controller with another set of Kp, Ki and Kd.
These designs fulfill our system requirements. So these can be a useful alternative of
the given design of the system. The proposed design will be more economical and
simple.
Discussion:
In this experiment, we studied modeling of physical systems and their close loop
response.
PID Controller:
There are several techniques available to the control systems engineers to design a
suitable controller. One of controller widely used is the proportional plus integral plus
derivative (PID) controller, which has a transfer function:
KI KDS 2 KPS KI
Kp KDS
S S
K I = Integral gain
Kd = Derivative gain
The difference between the desired input value (R) and the actual value (Y) is the error
(e), which will be sent to the PID controller and
the controller computes both the derivative and
the integral of this error signal. The signal (u)
just past the controller is now equal to the
proportional gain (KP) times the magnitude of the
error plus the integral gain (KI) times the integral
of the error plus the derivative gain (K D) times
the derivative of the error.
de
So we get, u (t ) K p e K I edt K D
dt
This signal will be sent to the plant and the new output (Y) will be obtained.
Describing a System:
The systems are usually dynamic by nature, one such model relating the input and
output is the linear time variant differential equation.
However, the classical approach of modeling linear systems is the transfer function
technique which is derived from the differential equation using Laplace transform.
Transfer function yield more intuitive information than the differential equation by
visualizing the effect of system parameter variations on the system response as well as
it eases the modeling interconnected systems.
An open loop system utilizes an actuating device to control the process directly without
using feedback. Here the final output is not compared with the desired one.
Reduction of cost
Simple
Control is easy
A closed loop control system uses a measurement of the output and feedback of this
signal to compare it with the desired input.
Greater accuracy
Less sensitive to noise, disturbance & changes in environment
Control is more convenient & flexible
Costly
Complex system
Sometimes unstable
---00---
Exp. No.: 2.
This unit supplies a 24V DC, 2A unregulated supply to the motor, through a multiway
connector to the servo amplifier. On the front panel there are two sets of 4mm sockets to
provide ± l5V stabilized DC supplies to operate the smaller amplifiers and provide
reference voltages.
This unit operates the motor to which it may be connected via a 12-way socket. A
protective circuit limits the motor current under overload conditions.
The motor is a permanent magnet type and has a single armature winding. Current
through the armature is controlled by power amplifiers (as shown in the figure) so that
rotation in both directions is possible by using one or both of the inputs. Here a
specialized pre-amplifier unit PA 150C provides the necessary input signals.
Inputs 1 & 2 are connected to a pair of transistors in which the emitter currents of each
of transistor are added together and the total current is held at a fixed value by the
negative voltage (-15V) via a resistor. When both inputs are at the same voltage, the
current in each transistor will be equal and so the output voltages (measured at collector
point) are the same. This means that no current flows through the motor. Now if the
voltage at input 1 is raised, then the current through transistor 1 increases (and so the
voltage at its collector falls) and the current in other transistor must reduce (and so the
voltage at its collector increases). So we get a voltage difference across the collectors,
which are then input to the power amplifiers to provide a high current drive for the motor
armature.
Similar reasoning applies if we have the voltage at input 1 lower than input 2 except that
the output voltage across the motor is reversed and so it rotates in other direction.
This unit contains two 10 kΩ potentiometers. The p0l1ion of the resistance being selected
is indicated by a dial graduated from 1 to 10. This unit can either provide a reference
voltage when connected to a DC source or be used as a gain control when connected to
the output of an amplifier.
This is a speed reduction gearbox with a ratio of 30/1 from the high-speed shaft to the
low speed output shaft. A DC tachogenerator is driven by the high-speed shaft with an
output on the top panel, which can be used to display the tacho speed directly in r.p.m. or
to monitor a DC voltage on another unit.
A fitting for the Shaft mounts the aluminum disc which runs between the poles of a
separately mounted permanent magnet and then the eddy current generated have the
effect of a brake. The pole/disc interference area may be adjusted against an arbitrary
scale to provide a variable viscous load for the motor.
A general-purpose amplifier with facilities for multiple inputs and various feedback
arrangements are provided in this unit. It provides inverting voltage gain and a means or
Summing two or more signals, as well as facilities for compensation networks.
The operational amplifier is a high gain, low drift DC amplifier and is designed to be
independent of variations in the power supply voltage. The advantage of an amplifier
with a very high gain, up to 106, is that it can be used in a simple circuit that can perform
mathematical operations with a high degree of accuracy.
For the following circuit, the output will be the sum of V1 and V2 each suitably scaled.
For a gain control we can use the circuit of the following figure, which has gain of -1/α.
Pre-amplifier Unit (PA 150C)
This unit provides the correct signals to drive the servo amplifiers in SA150D. The two
inputs are effectively summed, allowing two signals to be applied e.g. a reference voltage
and the tachogenerator voltage. A positive signal applied to either input causes the upper
output (3) to go positive, the other output (4) staying near zero. A negative input causes
the lower output (4) to go positive, the upper one staying near zero. Thus bi-directional
motor drive is obtained when these outputs are linked to the SA150D inputs. A toggle
switch allows use with either of two internal compensation networks or in the 'normal'
condition using neither. Sometimes zero voltage at input does not result a nil voltage
across the outputs, it is because or a zero offset remaining in this unit. This can be
eliminated using the 'zero set’ control. In position control, the error signal output of the
operational amplifier is used to drive the output potentiometer via the pre-amplifier and
motor.
These are rotary potentiometers, used in position control. The IP150H input
potentiometer has ± 1500 of motion whilst the OP 150K output potentiometer has no
mechanical stops and so cannot be damaged by continuous rotation.
The input potentiometer is used to set up a reference voltage and the output potentiometer
is connected to the GT 250X low speed shaft using the push-on coupling. Each unit has a
buffer amplifier with a gain of one so that even if the output is shorted to a power supply
or ground, the potentiometer will not be damaged by overloading. The buffer also ensures
that the potentiometer wiper does not have to carry any current load during normal use.
Position Control of DC Servo Motor
Objective:
When you will complete this experiment you will come to know how a simple position
control system is constructed and operated.
Procedure:
1. Arrange the experimental setup for closed loop position control as shown in figure
2.
2. Set the gain control knob (Ku) of the upper potentiometer on the AU1508 to zero
before switching the power.
3. Switch on the power and adjust the 'zero set' knob of the PA150C so that the
motor does not rotate.
4. Set the magnetic brake to unloaded (or zero) position and keep it in such a way
that it can be fully engaged without fouling either the motor mount or the eddy
current disc. Set Ku at 0.5 for input positions θi of 0, 30, 60, 90, 120 and 150
degrees, observe the output positions θo respectively. Record your data in the
table 1.
5. Repeat step 4 for KF = 1, 1.5, 2 and 2.5. Record the results for each observation in
the same table.
6. Set the permanent magnet loading unit (eddy current brake) at 40%. Repeat step 5
7. Set the permanent magnet loading unit (eddy current brake) at 80%. Repeat step 5
Notes: If the output cursor stops before arriving at the set position, the system is then
tolerant to an error called "dead band". Increase the gain so that this tolerance is
overcome and you get the correct alignment.
Table 1: Effects of load and KF on the position control.
1.0
1.5
2.0
40% 0.5
1.0
1.5
2.0
80% 0.5
1.0
1.5
2.0
Report:
1. Explain how the position control method is implemented in this experiment.
2. Give your inferences on the effects of forward gain and loading upon the
performances such as stability, settling time and offset.
Experiment No: 02
Objective:
The objective of this experiment is to know how a simple position control system is
constructed and operated.
Required Equipment:
1. DCM150F:
Permanent magnet DC motor. The motor shaft is extended for direct mounting of the
magnetic brake and inertia disks.
2. OA150A:
Op-Amp unit. It includes summation to produce operating error for close loop system.
3. AU150B:
4. PA150C:
Pre-amplifier unit.
5. SA150D:
Servo-amplifier which operates the motor. A protective circuit limits the motor current
under overload conditions.
6. PS150E:
Power supply unit. Input tappings are 115V and 230V, 50/60 Hz, 40VA. Output 24V DC,
2A unregulated, connects directly to the servo amplifier via socket.
7. IP150H:
Input potentiometer. Mounted and fitted with calibrated position indicating dials. The
output unit carries a rear extension shaft for coupling directly to the Reduction Gear
Tacho unit.
8. GT150X:
Experimental Setup:
Data Table:
No of Stability
Kf i 0 oscillation Offset
before
settling
0% Loading
0 - - Unstable -
0.5
0 115 0 Stable -
1 50 75 - Unstable -
0 140 0 Stable -
1.5 10 135 0 Stable -
20 130 0 Stable
30 110 3 Stable
40 - - Unstable -
0 143 3 Stable -
2 10 135 2 Stable -
20 127 2 Stable -
30 - - Unstable
40% Loading
0 - - Unstable -
0.5
0 115 0 Stable -
1 10 - - Unstable -
0 137 1 Stable -
1.5 10 125 1 Stable -
20 - - Unstable -
0 142 2 Stable -
2 10 134 0 Stable -
20 124 1 Stable -
30 113 0 Stable -
40 - - Unstable -
80% Loading
0 - - Unstable -
0.5
0 115 0 Stable -
1 20 95 0 Stable -
50 64 0 Stable -
100 17 0 Stable -
140 -24 0 Stable -
180 -63 0 Stable -
0 135 0 Stable -
1.5 20 115 0 Stable -
50 84 0 Stable -
110 25 0 Stable -
140 -5 0 Stable -
180 -39 0 Stable -
0 142 0 Stable -
2 30 113 0 Stable -
60 84 0 Stable -
100 45 0 Stable -
150 -5 0 Stable -
170 -25 0 Stable -
180 -40 0 Stable -
Input potentiometer IP150H produces a reference voltage (Vref) proportional to the input
angular position (θi). Output potentiometer OP150K produces an output voltage (V out)
proportional to the angular position of the motor shaft that is displayed on the rotary dial of
OP150K and termed as θo. Vref and Vout are applied on the op-amp unit OA150A as its inputs
and an error signal (Verror) is produced at its output. A potentiometer of the attenuator unit
AU150B can be used to control the forward gain. This controlled error signal (Verror) is used
to drive the servo amplifier via preamplifier. The output from the servo amplifier controls
the rotation of the motor shaft according to the variation in error signal.
Questions
Answer:
We set an input angle via a rotary nob and input potentiometer produces reference voltage
proportional to the input angle (nob position). Output potentiometer produces output
voltage which is proportional to current position of motor shaft (which is connected to a
rotary dial also). These two voltages are compared and an error signal is generated. This
error signal is controlled via a servo amplifier and rotation of motor shaft depends on its
value. By this simple closed loop feedback method, position control method is implemented.
Give your inferences on the effects of forward gain and loading upon
system performances such as stability, settling time and offset?
Answer:
Before discussing the effects of changing the forward gain and tacho gain, some system
parameters such as stability, settling time and offset must be discussed. Stability is the
quality of a system to come to steady state and remain there. In a stable system the
transients will die away quickly and after that there will be no oscillation. An unstable
system will not remain at any fixed value, which is undesirable. The settling time is nothing
but time required for reaching steady state. A stable system will have low settling time.
Offset is the amount of error seen after the system has come to steady state. It is indicated
by the almost constant difference between output and input. Theoretically input-output
curves should be linear passing through the origin. But some offset is present which
prevents this from happening. From the connection diagram it is seen that, this servo
system uses two types of feedback. One of the feedback signals is directly obtained from the
output and is input to an adder circuit. The other signal is the output of the tacho-meter
connected directly to the pre-amp. The forward gain controls the amplification of the error
signal. In other words, the error signal, which controls the direction of rotation of the motor
is controlled by the forward gain. Theoretically as the value of the forward gain increased,
the settling time would increase which indicates that the no of oscillations increases with
the increase in KF. However, due to mechanical fault we could not determine this properly.
Permanent magnets were used as load, which uses the eddy current loss process to brake
the moving disk. Loading changes the characteristics of the system. As the load increases,
the stability should increase. Although we did not find evidence of this from our data.
Discussion:
1) From the experimental result, we found that output followed input (both given as angle)
closely with an almost constant (186~189 degree) offset angle. However, due to inaccuracy
of the machines, we could not determine no of oscillations before settling. Thus we failed to
compare stability in different cases. 2) In this experiment we studied position control system
using a DC servo motor. Closed loop feedback was used and the feedback control system
used two feedback signals.
3) One of the signals is the output voltage generated by output pot, which is directly fed into
the adder.
4) Another type of feedback is used which is the tacho signal. This signal is obtained from
the tachometer, which gives a signal directly proportional to the speed of the motor. This
feedback improves the settling time and stabilizes the system.
5) Feedback improves system performance greatly and by controlling error signal we can
further improve the output. This experiment was designed to demonstrate this fact.
6) Due to the rigidness of the motor shaft because of longer use, we could not count the
number of oscillation before settling.
7) The fact associated could be thought as for friction, the smooth movement of the disc
could not be observed. However, we noticed some sort of vibration before the disc finally
stopped rotating.
8) In case of 0o input, we always end up with unstable condition. The reason behind it might
be that, when the difference is large the gain affects and turns the motor so fast that it
crosses zero and before starting to pull back, it again chases to catch up the new right
position and so, every time it slips away.
THE END
Experiment No. 3
(a)Simulation and study of the open loop response of a DC motor with
MATLAB’s Simulink.
(b) Design of a PID controller and study the closed-loop response.
Objectives:
After performing this experiment students will be able to
Fig. 1
• Click on the ‘Simulink’ ( ) icon in the toolbar menu. Another window named
Simulink Library Browser’ will appear.
• From ‘Libraries’ on the left, select ‘Simscape’. The window shown in Fig. 2 will appear.
Fig. 2
EEE 402 Control System I Laboratory Level/Term: 4-I
• On the right of the ‘Simulink Library Browser’ there will be five icons to be selected.
1. Foundation Library
2. SimDriveline
3. SimHydraulics
4. SimMechanics
5. Utilities
For this experiment icon 1 & 5 (Foundation Library & Utilities) will be necessary.
Double-click on these icons and explore the contents inside them.
• Select Foundation Library Electrical Electrical Elements. Now you should see
icons for many fundamental electrical elements on the browser (Fig. 3).
Fig. 3
• Select ‘Resistor’ from the library browser and drag it to the ‘untitled’ window. It should
look like Fig. 4.
EEE 402 Control System I Laboratory Level/Term: 4-I
Fig. 4
Fig. 5
Now as you know how to use ‘Simulink Library Browser’ to search for your desired component,
you are ready to perform your first simulation of a physical system with MATLAB’s Simulink.
EEE 402 Control System I Laboratory Level/Term: 4-I
Part (a): Simulation and study of the open loop response of a DC motor with MATLAB’s
Simulink
In this experiment, we will be using the concepts of modeling a DC motor which were used in
experiment 1. Recall that a DC motor can be modeled in the way shown in Fig. 6.
dθ
ω= dω
dt J
dt bω
e = Kω
τ
Fig. 6
• Electrical Reference
2. Foundation Library ElectricalElectrical
Sources
• DC Voltage Source
3. Foundation Library Mechanical
Rotational Elements
• Inertia
• Rotational Mechanical Reference
• Rotational Damper
4. Utilities
• Solver Configuration
After inserting all these components, your window should look like Fig. 7.
Fig. 7
Now the components are to be wired together to complete the schematic. To do this,
place the mouse on any port of the symbol. This should change the mouse symbol from
arrow( ) to a cross(+
(+).. Then click and hold the mouse and place it to a port of another
symbol to be wired. This will join those ports with a line (wire).
EEE 402 Control System I Laboratory Level/Term: 4-I
Fig. 8
Change the parameters of the components according to those given above. Use 1 V for
the DC voltage source.
Select Simulation -> Configuration Parameters and in the ‘Solver options’ panel set
‘Solver’ to ‘ode 15s (stiff/NDF)’.
Now select ‘Start Simulation’ icon from the toolbar menu (or Simulation -> Start from
menu bar) to simulate the design.
If no error window appears, then you have successfully performed the simulation.
Although we have correctly followed the above steps our simulation is useless because there is
no way to communicate with the system i.e., there is no way to know the speed of the motor,
output torque or the current drawn by the motor. This is just because we have not placed
anything to display outputs (the situation is like you have just powered a motor and it is rotating
but you have no tachometer to measure its speed!). What we have to do is to place some sensors
(ammeter, voltmeter or tachometer) to get useful information. But before we do this, we should
EEE 402 Control System I Laboratory Level/Term: 4-I
learn another important thing – creating a block for your DC motor! This is because when we
shall start placing sensors, things will get clumsy soon if we do not create blocks.
Fig. 9
Hint: You can edit the port names by clicking and editing.
Fig. 10
Add the following components to the window containing the model for DC motor.
Foundation Library -> Electrical -> Electrical Sources
1. DC Voltage Source (1 piece)
Foundation Library -> Electrical -> Electrical Elements
1. Electrical Reference (1 piece)
Foundation Library -> Electrical -> Electrical Sensors
1. Current Source (1 piece)
2. Voltage Source (1 piece)
Foundation Library -> Mechanical -> Rotational Elements
1. Rotational Mechanical Reference (1 piece)
Foundation Library -> Mechanical -> Mechanical Sensors & Sources
1. Ideal Rotational Motion Sensor (1 piece)
Utilities
1. Solver Configuration (1 piece)
EEE 402 Control System I Laboratory Level/Term: 4-I
Connect the components with wires, your diagram should look like the one in Fig. 11.
Fig. 11
Fig. 12
Observe the plot. Calculate rise time, final value and settling time from the plot.
Also observe other plots of current, voltage and angular position.
Additional Task:
Part (b): Design of a PID controller and study the closed-loop response.
Now that you have gathered some skill over how to work in the simulink environment, the next
task is to append a PID controller to control the speed of the DC motor.
1. Open a new window and drag in following parts from the library.
a. Three instances of the ‘constant’ block in which the values of the proportional gain
kp, differential gain kd and integral gain ki will be provided (can be found in
Library Simulink Sources)
Fig. 13
b. Drag one instance of ‘add’ or ‘sum’ block from Library Simulink math
operation). It is meant for subtracting the feedback signal form the input reference.
You can edit this block by double left clicking on it and redefine its parameters, i.e. –
its number of ports, mode of operations (add / subtract).
Just like ‘sum’ block, the transfer function block can be edited too by double clicking
on it. For instance, to implement the following transfer function:
2 1
EEE 402 Control System I Laboratory Level/Term: 4-I
Fig. 14
d. Place another ‘subsystem’ block after the PID subsystem, which will be for DC
motor sub –system. You have already drawn a DC motor system without feedback in
Part 1 of this experiment. Use the same block here, the only change will be in input
and output port. Remove the input voltage source and place a ‘controlled voltage
source’ instead (go to library simscape foundation library electrical
electrical sources).
Since we will provide to the input of the DC mtor subsystem a numerical value from
PID controller, your design must translate it into a physical parameter, i.e. a voltage.
So the controlled voltage source should be preceded by a ‘Simulink to Physical
system converter’ (simscape utilities simulink-PS converter)
At the output, replace the scope by a output port (simulink ports and subsystem
out 1)
Fig. 15
EEE 402 Control System I Laboratory Level/Term: 4-I
2. Now return to your main window, where all the subsystems are already placed. Put a unit
step function at the +ve port of ‘sum’ block and the numerical value of motor speed to the
–ve port of ‘sum’ block.
Set kp = 2, kd =1 and ki = 1
Fig. 16
3. Start the simulation (menu bar simulation start or Ctrl + T). Make sure that the
‘normal’ option in the drop down menu of ‘simulation tab’ is selected. Also make sure
that your configuration parameter settings are as follows:
EEE 402 Control System I Laboratory Level/Term: 4-I
Fig. 17
4. Double
ouble click various ‘‘scope’’ in your final design to see the time dependent graphs, i.e.
i.e
speed vs. time, current in electrical side of DC motor vs.
vs time etc.
Speed
Time
Fig. 18: sample Graph of
o motor speed versus time for a unit step input voltage.
Tasks:
a. Observe the plot. Calculate rise time, final value and settling time from the plot.
b. Experiment with the numerical values of kp, kd, ki to see their relative effects on motor
behavior. Tune the coefficient values to obtain smaller settling ti time, rise time and
optimum overshoot. Note the coefficient values.
c. Also observe other plots of input current and angular position of the DC motor.
Prepared By:
Upal Mahbub
Assistant Professor,, Department of Electrical and Electronic Engineering
Bangladesh University of Engineering & Technology
Shuvro Chowdhury
Lecturer, Department of Electrical and Electronic Engineering
Bangladesh University of Engineering & T Technology
Dr. ShaikhAnowarul
ikhAnowarul Fattah
Associate Professor, Department of Electrical and Electronic Engineering
Bangladesh University of Engineering & Technology
Course Number: EEE 402
Experiment No: 03
Objective:
After performing this experiment, students will be able to
1. Find electrical components using Simulink Library Browser.
2. Draw a schematic of a physical system on Simulink.
3. How to create blocks for their models
4. How to obtain/display outputs from their models of physical systems.
5. Simulate open loop response of a DC motor.
6. Design a PID controller.
7. Use PID controller to control the speed of the DC motor.
Circuit:
Speed Graph:
Angle Graph:
Current Graph:
Voltage Graph:
Circuit:
Current Graph:
Angle Graph:
Speed Graph:
With Kp=100:
With Ki=50:
With Kd=50:
THE END
Introduction:
In industry the monitoring and control of many manufacturing processes and conveyor
systems (Systems for material handling and transporting) demand a series of operations
which are to be performed sequentially and repetitively. This purpose was served in
earlier time using mechanical timers and sequencers involving gears and cams which
were later replaced by electromechanical relays, contacts, counters, timers and
sequencers. Even these days the relay control has not yet been obsolete rather is favorite
to the engineers in many industries of the various parts of the world who understand a
process and its control better using Relay Ladder diagram. However, the relays suffer
from a number of problems viz: larger size, slower operation, contact wear and reliability
problems, inability to accept more than one input simultaneously and the necessity of
replacing the whole control panel in case another set of operations different from those
for which the relays have been hard wired are to be performed because rewiring the
relays is difficult and time consuming. This is why Programmable Logic controller (PLC)
has been evolved. A PLC is a solid state device specially designed to operate with
immunity to electrical interference when installed on the factory floor in noisy industrial
environment and perform all the logic functions shown in a Relay Ladder Diagram using
‘software’ relays, contacts, timers and sequencers instead of physical hard wired relays.
A PLC has a microprocessor and a memory chip and can be programmed using a pocket
or hand held programmer which has a key board with the symbols of contacts, relays or
output devices, timers, sequencers etc. Whenever a key on the programmer is pressed it
creates a software version of the associated symbol and an address is to be assigned to it.
To program a PLC the required operations are represented first in a Relay Ladder Logic
diagram which is similar to Relay Ladder diagrams but uses the symbols of software
relays, contact etc. Then each rung of this ladder diagram is programmed from the
keyboard of the programmer. Once programmed the program is saved in the PLC
memory and the PLC is brought into RUN mode and then programmer can be switched
off but the PLC left ON. The PLC in RUN mode starts the operations if its output and
input terminals are already connected respectively with input and output terminals of the
plant i.e. the system under control. There are interfaces between the PLC input terminals
and the processor to convert the signals coming from plant sensors, push buttons, limit
switches etc. to low level (+12V) DC voltage and to provide electrical isolation to these
signals as well as the processor from noise and voltage spikes (transients) on the input
lines using opto-coupler or opto-isolator (a combination of LED and a photo transistor).
Similarly there are interfaces between PLC processor and output terminals to send signals
and actuate the plant components like motor starters, solenoid valves, indicating lamps
etc. The electrical isolation for the PLC output signals and the processor is provided by a
transistor/triac switching circuit.
1
The PLC Training System in the Lab:
1. Plant: The plant (system under control) PC45 comprises a conveyor belt driven by a
12 Volt, 2.5 Watt DC motor, two infrared sensors for detecting the objects and three
cylinders whose pistons are operated pneumatically i.e. by compressed air at a
pressure of maximum 3 bars (45 lbs/sq. inch). The compressed air flow is controlled
by the valve opening actuated by electrical solenoid coils. The pistons can push the
objects on the conveyor (while the conveyor runs) to drop them into different sections
of a bin according to the object diameters or heights as decided by logical operations
programmed into the PLC.
2. PLC: This is the heart of the PLC system. This is an Allen Bradley SLC150
controller having the characteristics mentioned in the Introduction.
Input and Output wiring connections between the PC45 and SLC150
2
Inputs to PC45 to be Physical address of
connected with outputs from outputs to SLC150
SC150
Notes:
1. The bar (-) above an input e.g. C1 means this input will be activated when 0 volt is
applied to it.
2. The address of ‘input’ and ‘output’ terminals of SLC150 are physical and termed
external addresses.
Other Connections
EXERCISE – 1
Using three switches of the sequence switch module as push buttons switches (i.e. switch
ON and then immediately switch OFF) produce a start up sequence such that the
conveyor will start only if the first three push buttons are operated in order – 1, 2, 3. The
conveyor should stop when switch 4 is operated.
For this Exercise program the Ladder diagram (i.e. relay ladder logic diagram) shown in
Figure – 1.
3
Note:
The address beginning with 7 in a Ladder diagram are internal addresses and do not
imply any physical terminals rather refer to ‘software’ relays and corresponding
‘software’ contacts. The SLC150 can address the software relays and associated contacts
using the numbers 901 to 932 but pressing different function keys for symbols of timers,
counter and sequencers.
EXERCISE – 2:
Extend Exercise – 1 such that the conveyor will run only when switches 1, 2, 3 of
sequence switch module are operated in the order 1, 2, 3 and an object is placed between
transmitter and receiver of sensor 1 but not between sensor 2. Also the conveyor must
stop when the object reaches sensor 2.
Note:
1. To activate the cylinder 2 exactly when the object reaches it a timer is necessary to
time the interval for the object to move from sensor 2 to cylinder 2 so that the
cylinder will not be energized earlier rather the cylinder will operate after the time
(set by the timer) elapses. Also once the cylinder is activated it must not be
deactivated unless its piston fully pushed the object into the bin compartment. For this
another timer should also be used. If the arrival of the object, activation of cylinder 2
and push by its piston do not match the preset (PR) values of one or both the timers
may have to be changed by trial and error.
2. Both the sensors must be set at such a height that they can sense tall as well as short
objects.
3. It may happen that despite having appropriate PR values the timers, the piston of
cylinder 2 partially pushes out or does not push at all. In this case the pressure of the
air flow is low and manually pull out the piston from cylinder to reset the whole
system. Then pump the handle of the compressed air pump several more times until
sufficient pressure has been attained. Now run the program again. Further note that
once the pump has attained enough pressure the pressure will remain unchanged for
many operations of the cylinders and pistons.
REPORT:
1. Explain the logic of the Ladder diagram programmed for each exercise.
4
5
FIG. 3: LADDER DIAGRAM OF EXERCISE 3
6
Course Number: EEE 402
Experiment No: 04
Exercise 1
Problem:
If the first 3 push button switches are operated in the sequence-1,2,3 then
conveyor will start. If switch 4 is pushed the conveyor will stop.
Comment: As soon as 703 is unlatched the conveyor stops but to keep it de-
energized 702,701 are also needed to be de-energized
Exercise 2
Problem:
• If the first 3 push button switches are operated in the sequence-1,2,3 and an
object is placed in between sensor 1 but not sensor 2 then conveyor will start.
When the object reaches sensor 2 the conveyor immediately stops.
• 003=Address of sensor 1
• 004= Address of sensor 2
• If an object is placed between the transmitter and receiver of sensor its
corresponding relay is de-energized.
Exercise 3
Rung 1: An object is obstructing sensor 1 (003 is de-energized) and Green Push
button switch is pressed (001 is ON) makes 701 energized
Rung 2: Energized 701 turns relay at 11 ON and keep it latched
Rung 3: If an object is obstructing sensor 2 (004 is de-energized) 702 is latched
Rung 4: In turn if 702 is ON it will activate a timer with a preset counting time
(In our case it’s 3s).
Rung 5: After the countdown Timer 901 relay will activate the relay at 113
which corresponds to the input of cylinder 2
Rung 6: As soon as 102 is energized (the push from piston) it will activate
another timer with 902 with preset time of 0.5s
Rung 7: If 102 is ON conveyor also stops (11 is de-energized)
Rung 8: If 102 is ON 702 is unlatched
Rung 9: In the meantime, after counting 0.5s 902 is energized which Resets the
timer at 901 with 0 value
Rung 10: Now if the green push button is pressed the timer at 902 is reset
again.
Experiment No. 5: Root Locus Design Method for DC Motor Position Control.
Introduction:
The root locus of an (open-loop) transfer function H(s) is a plot of the locations (locus) of
all possible closed loop poles with proportional gain k and unity feedback:
and thus the poles of the closed loop system are values of s such that 1 + K H(s) = 0.
Let n = order of a(s) and m = order of b(s) [the order of a polynomial is the highest power
of s that appears in it].
We will consider all positive values of k. In the limit as k → 0, the poles of the closed-
loop system are a(s) = 0 or the poles of H(s). In the limit as k → infinity, the poles of the
closed-loop system are b(s) = 0 or the zeros of H(s).
No matter what we pick k to be, the closed-loop system must always have n poles,
where n is the number of poles of H(s). The root locus must have n branches, each
branch starts at a pole of H(s) and goes to a zero of H(s). If H(s) has more poles than
zeros (as is often the case), m < n and we say that H(s) has zeros at infinity. In this case,
the limit of H(s) as s -> infinity is zero. The number of zeros at infinity is n-m, the
number of poles minus the number of zeros, and is the number of branches of the root
locus that go to infinity (asymptotes).
Since the root locus is actually the locations of all possible closed loop poles, from the
root locus we can select a gain such that our closed-loop system will perform the way we
want. If any of the selected poles are on the right half plane, the closed-loop system will
be unstable. The poles that are closest to the imaginary axis have the greatest influence on
the closed-loop response, so even though the system has three or four poles, it may still
act like a second or even first order system depending on the location(s) of the dominant
pole(s).
Design requirements:
In this experiment, we want to be able to position a dc motor very precisely, thus the
steady-state error of the motor position should be zero. We will also want the steady-state
error due to a disturbance, to be zero as well. The other performance requirement is that
the motor reaches its final position very quickly. In this case, we want it to have a settling
time of 40ms. We also want to have an overshoot smaller than 16%.
1
If we simulate the reference input (R) by a unit step input, then the motor speed output
should have:
Motor parameters:
For this example, we will assume the following values for the physical parameters of
motor.
Procedures:
1. Open loop response:
The transfer function of the DC Motor relating input voltage to rotor position is:
Put the transfer function into Matlab by defining the numerator and denominator as
vectors:
J=3.2284E-6;
b=3.5077E-6;
K=0.0274;
R=4;
L=2.75E-6;
num=K;
den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2) 0];
Now let's see how the original open-loop system performs. Add the following command
onto the end of the m-file and run it in the Matlab command window:
step(num,den,0:0.001:0.2)
You should get the following plot:
2
From the plot we see that when 1 volt is applied to the system, the motor position
changes by 6 radians, six times greater than our desired position. For a 1 volt step input
the motor should spin through 1 radian. Also, the motor doesn't reach a steady state
which does not satisfy our design criteria
2. Proportional control
First try using a proportional controller with a gain of kp = 1.7 as shown in the figure
below:
Add the necessary code to the end of your m-file and obtain the step response of the
system.
You should get the following plot:
Now lets take a look at the step response for disturbance. You can get the system transfer
function for disturbance by the following relation.
3
Here TF stands for transfer function.
The main idea of root locus design is to find the closed-loop response from the root locus
plot. Then by adding zeros and/or poles to the original plant, the closed-loop response
will be modified. Let's first view the root locus for the plant. Add the following
commands at the end of your m-file.
sys= tf (num,den);
rlocus(sys);
sgrid(.5,0);
sgrid is a function in the Matlab tool box. The variables in the sgrid command are the zeta
term (0.5 corresponds to a overshoot of 16%), and the wn term (no rise time criteria)
respectively.
If you look at the axis scales on this plot, one open-loop pole is very far to the left
(further than -1x10^6). This pole does not affect the closed loop dynamics unless very
large gains are used, where the system becomes unstable. We will ignore it by changing
the axes to zoom in to just the lower-gain portion of the root locus.
4
We can see from this plot that the closed-loop poles are never fast enough to meet the
settling time requirement (that is, they never move to the left of the -100 vertical line).
We also need to remove steady-state error due to a disturbance.
4. Integral Control
Now, let's try using integral control to remove steady-state error due to a disturbance.
This adds a 1/s term to the forward loop or in other words a pole at the origin. . Insert the
following lines to define the controller (numcf and dencf) in your m-file.
numcf=[1];
dencf=[1 0];
controller=tf(numcf,dencf);
I_sys=controller*sys;
rlocus(I_sys);
Run the m-file and obtain the root locus of the system. Comment on the stability of the
system from the root locus plot.
Now, let's modify the integral controller to a PI controller. Using PI instead of I control
adds a zero to the open-loop system. We'll place this zero at s=-20. Change the lines
defining the controller (numcf and dencf) in your m-file to the following.
numcf=[1 20];
dencf=[1 0];
Re-run your m-file and you should obtain the following plot.
5
Obtain the step response of the system for disturbance input. Does PI controller improve
system performance for disturbance input?
In order to pull the root locus further to the left, to make it faster, we need to place a
second open-loop zero, resulting in a PID controller. You can place the two PID zeros at
s= -60 and s= -70. Change the lines defining the controller (numcf and dencf) in your m-
file and obtain the root locus plot for gain 0 : 0.001 : 1.
You should get the following plot:
Now, we can see that two of the closed-loop poles loop around well within both the
settling time and percent overshoot requirements. The third closed loop pole moves from
the open-loop pole at s=-59.2 to the open loop zero at s=-60. This closed-loop pole nearly
cancels with the zero (which remains in the closed loop transfer function) because it is so
close. Therefore, we can ignore it's effect. However, the other open-loop zero also
remains in the closed-loop, and will affect the response, slowing it down, and adding
overshoot. Therefore, we have to be conservative in picking where on the root locus we
want the closed-loop poles to lie.
We need the settling time and the overshoot to be as small as possible, particularly
because of the effect of the extra zero. Large damping corresponds to points on the root
locus near the real axis. A fast response corresponds to points on the root locus far to the
left of the imaginary axis. To find the gain corresponding to a point on the root locus, we
can use the rlocfind command. We can find the gain and plot the step response using this
gain all at once. To do this, enter the following commands at the end of your m-file and
re-run it.
[k poles]=rlocfind(PID_sys);
feedbk_sys=feedback(k*PID_sys,1);
figure
step(feedbk_sys);
Go to the plot and select a point on the root locus on left side of the loop, close to the real
axis as shown below with the small black + marks. This will ensure that the response will
be as fast as possible with as little overshoot as possible. These pole locations would
indicate that the response would have almost no overshoot, but you must remember that
the zero will add some overshoot.
a. Determine the percentage overshoot, settling time and steady-state error of the step
response.
6
b. Determine the closed-loop disturbance transfer function and plot its step response.
Comment on the disturbance response of the compensated system.
Report:
1. Comment on how the root locus is reshaped by adding a pole or a zero in the open
loop transfer function?
2. Why the PID compensated system gives more overshoot than what we predict
from the root locus?
Appendix:
J=3.2284E-6;
b=3.5077E-6;
K=0.0274;
R=4;
L=2.75E-6;
num=K;
den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2) 0];
sys= tf (num,den); % transfer function of the motor.
numcf=conv([1 60],[1 70]);
dencf=[1 0];
controller=tf(numcf,dencf); % transfer function of the PID controller.
PID_sys=controller*sys;
rlocus(PID_sys,0:.001:1); %plot the root locus of the system
sgrid(.5,0);
axis([-400 100 -200 200])
[k poles]=rlocfind(PID_sys); % locate a suitable point on root locus
% and thus obtain the required gain for the system
feedbk_sys=feedback(k*PID_sys,1);
figure
step(feedbk_sys,0:.001:.1); % step response of the compensated system.
figure
dis_sys=feedbk_sys/(k*controller); % transfer function for disturbance input
step(dis_sys,0:.001:.1); % step response for disturbance input
7
Course Number: EEE 402
Experiment No: 05
Objective:
1) Get familiar with the root locus design method and observe the effect of adding
zeros and poles to the system transfer function.
2) Design as system for position control using root locus method with the following
specifications-
a. Settling time: Less than 40ms
b. Overshoot: Less than 16%
c. No steady-state error
d. No steady-state error due to disturbance
Root locus:
The root locus of an (open-loop) transfer function H(s) is a plot of the locations (locus) of all
possible closed loop poles with proportional gain k and unity feedback.
Forward path
+ E K U H(s)
R Y
_ B
Negative feedback
𝐾𝐻(𝑠)
The closed loop transfer function, T(s)=
1+ 𝐾𝐻(𝑠)
|KH(s)|=1
< 𝐾𝐻(𝑠) = (2𝑚 + 1)𝜋; 𝑚 ∈ 𝑍
Since the root locus is actually the locations of all possible closed loop poles, from the root
locus we can select a gain such that our closed-loop system will perform the way we want. If
any of the selected poles are on the right half plane, the closed-loop system will be
unstable. The poles that are closest to the imaginary axis have the greatest influence on the
closed-loop response, so even though the system has three or four poles, it may still act like
a second or even first order system depending on the location(s) of the dominant pole(s).
Design Parameters:
Ѳ K
V
= s((Js+b)(Ls+R)+ K2 )
For Ts≤40ms, real part of pole≥100. Hence, the pole position should be on the left side of
the s=100 line and below the radial line corresponding to damping ratio=.5038 for the
aforementioned requirements of the system.
Matlab Code:
clc;
clear all;
close all;
J=3.2284e-6;
b=3.5077e-6;
K=0.0274;
R=4;
L=2.75e-6;
num=K;
den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2) 0];
sys=tf(num,den);
figure
zlabel('open loop response')
step(sys,0:0.001:0.2);
%%integral control
numcf=[1];
dencf=[1 0];
controller=tf(numcf,dencf);
I_sys=controller*sys;
figure
rlocus(I_sys);
sgrid(0.5,0);
axis([-400 100 -200 200]);
%%PI control
numcf=[1 20];
dencf=[1 0];
controller=tf(numcf,dencf);
PI_sys=controller*sys;
figure
rlocus(PI_sys, 0:0.1:30);
sgrid(0.5,0);
axis([-400 100 -200 200]);
%%PID control
numcf=conv([1 60],[1 70]);
dencf=[1 0];
controller=tf(numcf,dencf);
PID_sys=controller*sys;
figure
rlocus(PID_sys, 0:0.001:1);
sgrid(0.5,0);
axis([-400 100 -200 200]);
From the plot we see that when 1 volt is applied to the system, the motor position changes by
6 radians, six times greater than our desired position. For a 1 volt step input the motor should
spin through 1 radian. Also, the motor doesn't reach a steady state which does not satisfy our
design criteria.
Code:
clc;
clear all;
close all;
J=3.2284E-6;
b=3.5077E-6;
K=0.0274;
R=4;
L=2.75E-6;
kp=1.7;
kd=0;
ki=0;
num=K;
den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2) 0];
numcf=[kd kp ki];
dencf=[0 1 0];
controller=tf(numcf,dencf);
sys=tf(num,den);
P_sys=sys*controller;
closed_sys=feedback(P_sys,1);
figure
step(closed_sys,0:0.001:0.2)
title('Response to Step Input with Kp=1.7')
dist=closed_sys/controller;
figure
step(dist,0:0.001:0.2)
title('Response to Step Disturbance with Kp=1.7')
Values of Kp and Ki was varied to get response to step input and response to disturbance
input for Integral and PI control.
Here Kp=1.7
Here, Kp=1.7
Here we can see that percent overshoot and settling time does not correspond to the
required values. Hence, the design does not meet requirements.
Root Locus:
We change the axes to zoom in to just lower gain portion of the root locus.
Observing the axis scales on the first plot we can see that one open-loop pole is very far to
the left (further than -1x10^6). This pole does not affect the closed loop dynamics unless
very large gains are used, where the system becomes unstable. The system can be
approximated to second order system.
We can see from the second plot that the closed-loop poles are never fast enough to meet
the settling time requirement (that is, they never move to the left of the -100 vertical line).
We also need to remove steady-state error due to a disturbance.
Integral Control:
Integral control adds a 1/s term to the forward loop or in other words a pole at the origin.
Integral control is very unstable as poles are on the right hand plane.
Using PI control instead of Integral control adds a zero to the open-loop system.
Code
clc;
clear all;
close all;
J=3.2284E-6;
b=3.5077E-6;
K=0.0274;
R=4;
L=2.75E-6;
num=K;
den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2) 0];
sys= tf (num,den); % transfer function of the motor.
numcf=[1 20];
dencf=[1 0];
controller=tf(numcf,dencf); % transfer function of the PID controller.
PID_sys=controller*sys;
rlocus(PID_sys,0:.001:1); %plot the root locus of the system
sgrid(.5,0);
axis([-400 100 -200 200])
[k poles]=rlocfind(PID_sys); % locate a suitable point on root locus
% and thus obtain the required gain for the system
feedbk_sys=feedback(k*PID_sys,1);
figure
step(feedbk_sys,0:.001:.8); % step response of the compensated system.
figure
dis_sys=feedbk_sys/(k*controller); % transfer function for disturbance
input
step(dis_sys,0:.001:.8); % step response for disturbance input
It is observed from the plot that poles are on the right hand plane of s=-100. Hence the
settling tome requirement is not fulfilled
PI control improve performance for disturbance input because the steady state value for the
disturbance input is zero.
Root locus:
Here, Overshoot=14%,
Settling time=38.5ms,
From the plot of step response for disturbance input we can see that steady state error for
disturbance is compensated.
k(s+2)(s+1)
G(s)=
(s2-2s+2)
k(s+2)(s+1)
G(s)=
(s-2)(s-1)
k(s2+2)
G(s)=
(s+3)(s+4)
k(s2-9)
G(s)= 2
(s +4)
k(s+2)(s2+4)
G(s)=
(s+5)(s-3)
k(s+3)(s+5)
G(s)=
(s+1)(s-7)
-k(s+1)2
G(s)=
(s2+2s+2)
k(s+2/3)
G(s)=
s2(s+6)
k
G(s)=
(s+1)3(s+4)
k(s2+1)
G(s)=
s2
k(s2+4)
G(s)=
(s2+1)
k(s+2)(s+6)
G(s)=
(s2+8s+25)
k(s+1)
G(s)= s(s+2)
k(s+4)
G(s)=(s+1)(s+2)(s+3)
k
G(s)= (s+2)(s+4)(s+6)
k(s+1.5)
G(s)=s(s+1)(s+10)
k(s-2)(s-4)
G(s)=
(s2+6s+25)
k(s2-4s+20)
G(s)=
(s+2)(s+4)
k(s+2)
G(s)=
(s2-4s+13)
k(s+2)
G(s)=
(s+3)(s2+2s+2)
k(s-3)(s-5)
G(s)= (s+1)(s+2)
k
G(s)=
(s+2)(s+4)(s+6)
k(s+3)
G(s)=
s(s+1)(s+2)(s+4)
k(s+2)
G(s)= 2
(s +4s+13)
Q1. Comment on how the root locus is reshaped by adding a pole or a zero
in the open loop transfer function?
Answer: Inserting zeros and poles reshape the root locus significantly as evident from the
plots. Root locus have same number of branches as the poles of the transfer function. Each
branch starts at a pole and goes to a zero. If the transfer function has more poles than zeros,
we say it has zeros at infinity. The number of zeros at infinity is the number of poles minus
number of zeros and is the number of branches of the locus that goes to infinity. Adding
poles creates new branches. Adding a pole moves the previous locus towards the right side
which is the unstable region. It also slows down the settling of the response.
On the other hand, adding a zero pulls root locus to the left. Hence it makes system more
stable. It also speeds up the settling of the response.
Q2. Why the PID compensated system gives more overshoot than what we
predict from the root locus?
Answer: While designing using root locus method, some approximations are made. The
system is assumed to be 2nd order and overshoot is calculated based on this assumption.
While plotting step response of the PID compensated system no such assumption is made.
Actual transfer function is used. As the gain increases the root locus of far pole has stronger
effects. Hence the overshoot is greater than the predicted one from the root locus.
Discussions:
Experiment No: 06
Objective:
Objective of part A is -
Objective of part B is –
Equipment:
1. Variable frequency drive consists of basically (a) input converter (b) filter section
and (c) output inverter section
2. Mechanical load consists of (a) VARIAC unit (b) a diode and (c) DC rotor shaft
P age |2
Data Collection:
Table 1:
Keeping the load at fixed condition, varying speed (frequency) observe power absorbed and
current
Table 2:
Keeping the speed of the motor at a certain condition (20 Hz) and changing the load
applied to the motor and observing the effect on motor speed, current and power
absorbed
1. Position control
2. Velocity control
3. Torque control
Equipment:
The RS232 communication between the Control Interface Box and the computer (PC)
provides the possibility of commanding motor from the PC and to visualize the most
important signals of the motor.
P age |4
Data Collection:
Auto tuning:
Current Tuning:
P age |5
Velocity Tuning:
Warning: The motor shaft must be free running i.e. load disconnected during velocity
regulation tuning
P age |6
Position Tuning:
Warning: The motor shaft must be free running i.e. load disconnected during position
regulation tuning
Position Control:
Speed control:
Current control:
Graphical view for the parameters extracted from the motor operation.
Target Position:
Target Velocity:
Discussion:
1. For position and velocity tuning the motor shaft must be free-running i.e. load
has to be disconnected. Otherwise motor may be damaged.
2. In part A, with the load changes current changes more slowly than that of the
frequency changes. For both cases, load and frequency cannot be varied in such
a way so that current flows through the motor above the rating. If this happens,
motor will be damaged.
3. When setting the parameters using touchpad on the metallic box, only F mode
(fundamental functions) has to be used.
4. In part B, errors must be cleared before auto tuning.
5. Procedures must be done by following steps properly.
6. If the load is increased, current should increase too until it reaches 1000mA
(the maximum current). Current should not be increased above that maximum
value by changing the default values.
7. In the position control, if the “Move Relative” key is pressed, motor rotates
once to the specified position in one direction. If “Move Absolute” key is
pressed motor rotates continuously.
Experiment No: 07
Objective:
The main objective of this experiment is to get familiarized with the process how a
simple speed control system is constructed and operated.
Examples of speed control of dc motor can be seen in every branch of industry and
transport. They have become particularly important in continuous processes such as in
the control of sheet-metal thickness in hot rolling mills, in generators and most
industrial motors. In guidance systems, automatic pilots, lifts and overhead hoists both
reverse speed and positional control may be used.
In this experiment we shall use the ‘armature voltage control’ method of speed control.
Using the lower potentiometer of the AU150B we shall produce a reference voltage
(Vref). The feedback signal (V tacho) proportional to the speed is generated by the
GT150X. The error signal (V error) between Vref and Vtacho is produced by the OA150A.
The error signal (V error) is fed to the SA150D. Based on this error signal the servo
amplifier controls the armature voltage of the DC motor and thus the speed is
controlled.
Equipments:
Block Diagram:
Connection Diagram:
Data Tables:
Table 2: Effect of load on speed, keeping Vref = -3.87 volt and speed = 2000 rpm
Table 3: Effect of load on speed, keeping Vref= -7.05 volt and speed = 1000 rpm
Question 1:
Explain how the ‘Armature Voltage Control’ method of speed control is
implemented in this experiment.
Answer:
We know,
𝐸𝑏
𝑁= 𝐾
𝜑
Where, N=speed, K=constant, Eb= voltage across the armature. Now from the
equation if we increase Eb then speed increases and if we decrease Eb then
speed will also decrease. In our experiment there was a reference voltage
produced by lower potentiometer and a voltage which is proportional to the
speed of the motor was also created. The difference between reference voltage
and the feedback voltage is known as error signal. This signal is fed to the
SA150D. Based on this error signal the servo amplifier controls the armature
voltage of the dc motor and thus the motor speed is controlled.
Question 2:
Plot the graph of reference voltage verses speed from table 1. Also draw
the graph of error voltage verses speed from the table 1. Explain the
effect of reference voltage and error voltage on speed of the dc motor.
Answer:
When the Vref is increased, the speed of the dc servo motor is increased.
Therefore, for that moment the Vtacho is increased which results in the
decrease of the Verror voltage. As a result, the Verror tries to decrease the speed
of the dc servo motor. As the speed is decreased, for the next moment the
Vtacho reading is decreased and the Verror increases which again tries to increase
the speed.
So, with the increment of the reference voltage, the speed of the servo motor
is increased. And with the increment in error voltage, the speed of the servo
motor decreases. Actually the reference voltage and the error voltage control
the speed of the servo motor
Question 3:
Plot the graph of load verses speed for two different reference voltages on
the same graph paper using the data from table 2 and table 3. Explain the
effect of load on speed of the dc motor. Calculate the speed regulations
for both cases. Compare the two cases.
Answer:
From the graph we see that Keeping Vref constant, If the loading is increased,
the Vtacho is decreased. Therefore the (Vref-Vtacho=Verr ) Verr is decreased which
results in decrease in speed.
𝑉𝑁𝐿 − 𝑉𝐹𝐿
%𝑉𝑟𝑒𝑔 = × 100%
𝑉𝑁𝐿
From the equation we found that at higher reference voltage the voltage
regulation is poor. This poor
regulation is obtained, as with high reference voltage, the current through the
armature is large, and
From the above calculation it is found that at higher reference voltage the
voltage regulation is poor. This poor regulation is obtained, as with high
reference voltage, the current through the armature is large, and accordingly
armature resistance drop is also large, as a result the speed variation is also
very large.
Vref I a Ra
N= K
Where,
N = Speed
K=constant
Ia =armature current
R a = armature resistance
Question 4:
Plot the graph of error voltage verses load from data in table 4 & table 5.
Answer:
Here, the error voltage increases almost linearly with increased loading. The
slope is higher for higher gain.
When the loading is increased, the speed of the dc servo motor is decreased
which results in decrease in Vtacho. As the Vtacho is decreased, the Verr is
increased as the Vref is constant. So, speed of the servo motor increases or
tries to increase. In the first case gain is unity, therefore the Verr will increase
proportionally with load. If the gain is higher, the Verr will increase linearly but
five times more with increase in load than unity gain configuration.
Question 5:
Plot the graph of speed verses load on the same graph paper for gain values
1 and 5 using the data from table 4 and table 5. Compare the mean
regulation for a gain of 1 to that of 5 by using the changes of speed that
occur for changes in torque from break positions 0 to the current limits of
2A. Comment on the effects of forward path gain on torque-speed
characteristics of the dc motor.
Answer:
Speed decreases with increasing loading. Speed falls sharply for higher gain.
Under 100% loading, motor speed is almost same for two different values of
gain.
Speed Regulation at Gain= 1:
SR=(1000-660)/660 = 0.515
Speed Regulation at Gain= 5:
SR=(2000-670)/670 = 1.985
When the loading is increased, the speed of the dc servo motor is decreased. If
the unity gain is maintained, the voltage Verr, which controls the voltage across
the armature of the dc servo motor, changes proportionally. As the speed is
proportional to the voltage across the armature (for armature voltage
controlled dc servo motor), the speed fluctuation is less for unity gain.
Therefore, regulation is good in unity gain. If the gain is increased five times,
the voltage Verr, which creates a corresponding voltage across the armature of
the dc servo motor, changes at a high linear rate. And this voltage across the
armature is one of the main parameter related to the speed of the motor
directly. So, speed is changed linearly, but at a large amount. As a result, the
speed fluctuation is increased for a gain of five than that of unity. Therefore,
regulation is poor for a gain of five times of unity.
Question 6:
Plot the graph of speed verses load from the open loop data in table 6.
Compare the load-speed characteristics of open loop control and close loop
control.
Answer:
Comparison between closed loop and open loop control for speed-load
characteristic.
Discussion:
1) The current through the armature should not be above 2A. So during the
experiment, we kept a special look on it.
2) For safety reason the motor wasn’t rotated more than 1800 rpm.
3) We tried our best to avoid experimental error but still there are some error
due to potentiometer, ammeter, voltmeter resulting from non-ideal behavior.
4) The load in this experiment is provided by a permanent magnet, which uses
the eddy current loss process to break the moving disk.
Experiment No: 08
Objective:
2. To classify the tall objects according to three diameters and then to activate the
appropriate cylinder-piston to push those respectively into three compartments of a
bin e.g. shortest diameter objects in compartment-1 (left most), mid diameter in
compartment-2 and largest diameter in compartment-3 (right most). Each time a tall
object is pushed into the bin, the conveyor should stop and to restart it the green
3. Each time a short object is detected it must not activate any cylinder rather it
should run off the end of the conveyor and then the conveyor should shut down. To
restart the conveyor green push button switch should be pressed.
A PLC is a programmable device, which can be used in unfriendly places due to its noise
immunity and easiness in control. This controller has a microprocessor and a memory
device which can be programmed using a simple hand held unit having a keyboard and
symbols referring to the conventional ladder diagram. To program a PLC one first needs
the ladder diagram of the process. Each rung on the ladder diagram is entered into the
PLC using the hand held programmer. At the end of the sequence, all the rungs are
saved in the unit and even if the programmer is shut off, the program is saved in the
main module. The PLC in the run mode starts to execute the command directly using the
input and output terminals. There are sensors and interfaces between the
microprocessor and external signals coming from switches, infrared sensors, contacts
and other sources. The system used in the lab has three main parts. The plant PC45
comprises of a conveyor belt, two infra-red sensors for detecting objects, and
pneumatic cylinders which are operated by compressed air. This is the plant, which is
controlled by the PLC. Next is the PLC, which is an Allen Bradley SLC150 controller
having programmable and storage capabilities. And finally the compressed air unit which
is manually pumped to raise the air pressure and used to drive the pistons. Some of the
inputs and outputs of the plant used in this experiment are given below.
In the first exercise we have to program the PLC so that the conveyor belt starts
moving as soon as the switches are turned on and off in the sequence 1 -2-3 and turn
off with switching switch 4. The switches simulate push button switches.
In the ladder diagram just as switch 005 (physical switch 1) is pressed it latches on the
logical contact 701. Then if switch 006 is switched then logical switch 702 is latched
only if 701 is on. Again when 007 is switched then logical switch 703 is latched only if
701 and 702 are latched on previously. 703 is connected with the conveyor belt and it
starts running. Just as 008(physical switch 4) is switched in unlatches 701,702 and 703
which stops the conveyor belt. Any other sequence will not latch on the final latch 703
which implies that no other sequence other than that programmed will start the
conveyor belt. The latches are used because the switches will represent push button
switches and need to be held. Any other sequence will not latch the proper logical
switch and the conveyor belt will not start. The logic diagram is attached with the
report.
In 2nd exercise the conveyor belt will start running when the switches 1, 2 and 3 are
switched in the proper sequence and an object is sensed by the infrared sensor1 and
the conveyor belt will be stopped when an object is sensed by sensor 2.
The first three logic statements are similar to exercise no. 1. In the fourth RUNG
there are two parallel paths through which the logic can work. The first one implies
that when the three switches are properly pressed (active 703) the conveyor will run
only when the first sensor (s1, memory address 003) finds something between
transmitter and receiver (active 003) and the second sensor (S2) doesn’t (inactive
004). The second way implies the conveyer will run when the second sensor (S2, 004)
doesn’t find anything and the memory address for conveyer forward run 011 is on. This
has been done because, in the first path when the conveyer starts the object will move
away from Sensor 1 and thus turn off the address 003.To keep the object moving until
it reaches sensor-2 a parallel logic path is ensured by the second one. To make the
conveyer stopped when the object reaches sensor-2 the address of S2 (004) is used to
unlatched the sequence switch address which interns deactivate 011 and stop the
motor. The logic diagram is attached with the report.
In the third exercise the conveyor should run only if the first sensor senses an object
and the start switch is operated. When the object reaches cylinder 2 its piston must
push the object into the 2nd compartment of the bin and at the same time the
conveyor must stop.
First when there is an object between sensor 1 and the green pushbutton switch is
pushed the conveyer starts moving being activated by the memory address 701. When
the object reaches sensor 2(004), memory address 702 gets on which in starts the
countdown of the piston timer 1 by the address 901. After the preset value (30 which
means 3 seconds) 901 activates 113 that initiates the piston movement. When the
piston is fully stretched the read switch 102 gets on which turns on the second piston
timer 2. 102 simultaneously unlatches 11 and 702 thus the conveyer stops moving. After
the preset time of the second timer, 902 is activated which pulls the piston back to its
rest position and as well as resets the timer 1.
Here the value of timer 1 & 2 can be adjusted from the hand programmer unit and thus
the time can be matched to push a particular object as desired. The logic diagram is
attached with the report.
Ladder Diagram:
Here is the ladder diagram for the given objectives. Its operation is explained here
after the diagrams.
Rung 1: When the green push button (001) is pressed, the conveyor belt starts its
forward run (011) and the relay is latched, it means it will continue running until
unlatched.
Rung 2,3,4: The physical address of sensor 1 is 003. 901, 902 and 903 are the address
of RTO timers. If a tall object is placed at the extreme right of the conveyor, then the
timers 901, 902 and 903 will get enough time to complete their count in case of large
diameter. This is due to the fact that the larger the diameter, the more time the
sensor 1 remains at the true state and hence all the timer with higher PR values can
time out and close their associated normally open contacts. In this way, the three RTO
timers jointly discriminate large, mid and small diameter objects and decides which
cylinder to be activated.
Rung 5,6,7: When a tall object of short, mid or small diameter reaches sensor 2, then
the output relays (703,702,701 respectively) with normally open contacts must be
closed to activate a cylinder through latching.
Rung 8,9,10,11,12: When 703 is latched, the 904 timer will activate with PR=4.2s.
After 4.2s, 904 will be latched that will activate the input for cylinder 1 (112). This will
push a tall object with small diameter. The activation of 904 also activates 907 timer
with PR=5s which is the time for cylinder 1 to go back to its original position after
pushing the object. Then the value of 904 is reset by 907 and the value of 907 is reset
by pushing the green button (001).
Rung 13,14,15,16,17: When 702 is latched, the 905 timer will activate with PR=30s.
After 30s, 905 will be latched that will activate the input for cylinder 2 (113). This will
push a tall object with medium diameter. The activation of 905 also activates 908
timer with PR=5s which is the time for cylinder 2 to go back to its original position
after pushing the object. Then the value of 905 is reset by 908 and the value of 908 is
reset by pushing the green button (001).
Rung 18,19,20,21,22: When 701 is latched, the 906 timer will activate with PR=20s.
After 20s, 906 will be latched that will activate the input for cylinder 3 (114). This will
push a tall object with large diameter. The activation of 906 also activates 909 timer
with PR=5s which is the time for cylinder 3 to go back to its original position after
pushing the object. Then the value of 906 is reset by 909 and the value of 909 is reset
by pushing the green button (001).
Rung 23: When any of the contacts (101, 102 ,103) is energized, the 705 relay is
activated.
Rung 24: If 705 is activated or 910 timer is on, the 011 relay is unlatched which means
the conveyor belt will stop. So if any of the tall objects is pushed or a short object
goes all the way till the end of the belt, the belt will stop.
Rung 25,26,27: The activation of 705 unlatches 703, 702 & 701 and makes them ready
for next input object.
Rung 28,29,30: The activation of 705 or 910 also resets 901, 902, 903 timers for
next operation.
Rung 31: When an object is at sensor 1 but not at sensor 2, 706 relay will be activated.
A parallel path means 706 will stay activated after object passes sensor 1.
Rung 32: When 706 is activated, it activates RTO timer 910 with PR=80s, which means
the conveyor will stop after 80s if a short object passes and the cylinders remain
inactive.
Rung 33: When the green push button is pressed, 910 timer is reset and gets ready for
next operation.
Discussion:
The PLC is a very useful controlling element, which can be used to program many
complex sequential operations in minimum time. There are many advantages of this
device over the conventional devices used for control in the early days. . The unique
advantage of using PLC is that any change in programming can be done by only altering
the software (program). This doesn’t require the huge rewiring and readjustment of
hardware that is to be done in case of relay logic controllers normally used.
To program a PLC one first needs the ladder diagram of the process. Each rung on the
ladder diagram is entered into the PLC using the hand held programmer. At the end of
the sequence, all the rungs are saved in the unit and even if the programmer is shut
off, the program is saved in the main module. The PLC in the run mode starts to
execute the command directly using the input and output terminals. There are sensors
and interfaces between the microprocessor and external signals coming from switches,
infrared sensors, contacts and other sources.
In the second part of the experiment, we classified short and tall objects and also
classified the tall objects according to their diameter. The tall objects of different
diameters were put in different compartment.