You are on page 1of 183

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

BANGLADESH UNIVERSITY OF ENGINEERING & TECHNOLOGY


EEE 402: CONTROL SYSTEMS SESSIONAL

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:

𝑑𝑛 𝑐(𝑡) 𝑑𝑛−1 𝑐(𝑡) 𝑑 𝑚 𝑟(𝑡) 𝑑 𝑚−1 𝑟(𝑡)


𝑎𝑛 + 𝑎 𝑛−1 + ⋯ + 𝑎 0 𝑐(𝑡) = 𝑏𝑚 + 𝑏 𝑚−1 + ⋯ + 𝑏0 𝑟(𝑡)
𝑑𝑡 𝑛 𝑑𝑡 𝑛−1 𝑑𝑡 𝑚 𝑑𝑡 𝑛−1
where, the output and input are 𝑐(𝑡) and 𝑟(𝑡) respectively and 𝑎𝑖 and 𝑏𝑗 are system parameters.

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

Physical setup and system equations


A common actuator in control systems is the DC motor. DC motors are widely used in numerous
control applications, including robotic manipulators, tape transport mechanisms, disk drives,
machine tools, and servo-valve actuators. The electric circuit diagram of the armature shown in
the Fig. 2.

Figure 2: (a) Electrical diagram and (b) Sketch of a dc motor.

For this example, we will assume the following values for the physical parameters.

* moment of inertia of the rotor (J) = 0.01 kg.m2/s2


* damping ratio of the mechanical system (b) = 0.1 Nms
* electromotive force constant (K = 𝐾𝑒 = 𝐾𝑡 ) = 0.01 Nm/Amp
* electric resistance (R) = 1 ohm
* electric inductance (L) = 0.5 H
* input (V): Source Voltage
* output (θ): position of shaft
* The rotor and shaft are assumed to be rigid
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:
𝑇 = 𝐾𝑡 . 𝑖
𝑒 = 𝐾𝑒 . 𝜃̇
In SI units (which we will use), Kt (armature constant) is equal to Ke (motor constant).

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?

Part 2: PID Design Method for DC Motor Speed Control


Control systems analysis and design focuses on three primary objectives:
1. Producing the desired transient response
2. Reducing steady state errors
3. Achieving stability
A control system that provides an optimum performance without necessary adjustments is rare.
Usually we find it necessary to compromise among many conflicting and demanding
specifications and to adjust the system parameters to provide a suitable and acceptable
performance. However, we often find that it is not sufficient to adjust a system parameter and
thus obtain the desired response. Rather we are required to reconsider the control system design
and insert additional components in the structure of the system.

This additional component or device that equalizes or compensates for the performance
deficiency is called compensator or controller.

The schematic diagram of a unity feedback control system looks like:

R e u Y
Controller Plant
+ −

Figure 3: A unity feedback control system

Plant: A system to be controlled.


Controller: Provides the excitation for the plant; Designed to control the overall system behavior.

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)

Reviewed By: Dr. Celia Shahnaz and Mrs. Fariah Hayee


Course Number: EEE 402

Experiment No: 01

Name of the Experiment:


(a) Modeling of Physical systems and study of their open loop response

(b) PID Design Method for DC motor speed control

Date of Performance: 06.03.2016

Student’s ID: 1106006

Name: Abdullah Ibn Mahmud


Dept.: EEE
Group: A1(1)
Page |1

Name of the experiment:

(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.

Part 1: Simulation of a cruise control system

Physical Interpretation & system equations:

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
yv

Mathematical analysis:

Taking the Laplace transform of the equations, we find

msV ( s)  bV ( s)  U ( s)

Y ( s)  V ( s)

Substituting V(s) in terms of Y(s)

msY (s)  bY ( s)  U ( s)

[ Abdullah Ibn Mahmud 1106006]


Page |2

The transfer function of the system becomes

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

[ Abdullah Ibn Mahmud 1106006]


Page |3

MATLab Simulation:

[ Abdullah Ibn Mahmud 1106006]


Page |4

MATLAB Data:

Friction Settling Overshoot Steady


Mass (m) Rise Time
(b) Time Percentage State Error
200 50 8.79 15.7 0
400 50 17.6 31.3 0
600 50 26.4 47 0
800 50 35.2 62.6 0
1000 50 43.9 78.2 0
1000 10 220 391 0
1000 20 110 196 0
1000 30 73.2 131 0
1000 40 54.9 97.9 0
1000 50 43.9 78.3 0

[ Abdullah Ibn Mahmud 1106006]


Page |5

Report:

1. Define rise time, settling time, percentage overshoot and steady state error of a
system for step input.

Rise Time, Tr:

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.

Settling Time, Ts:

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.

Percentage Overshoot, %OS:

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.

It is expressed in percentage form as,

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:

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,

Friction Settling Steady State


Mass (m)
(b) Time (sec) Speed (m/s)
200 50 15.7 9.8
400 50 31.3 9.8
600 50 47 9.8
800 50 62.6 9.8
1000 50 78.2 9.8
1000 10 391 9.8
1000 20 196 9.8
1000 30 131 9.8
1000 40 97.9 9.8
1000 50 78.3 9.8

[ Abdullah Ibn Mahmud 1106006]


Page |6

3. How steady state speed, rise time and overshoot of the output response vary with the
variation of m and b?

When Mass was varied:

 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.

When Friction was varied:

 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.

[ Abdullah Ibn Mahmud 1106006]


Page |7

Part 2: Modeling of a dc motor

Physical interpretation & system equations:

A common actuator in control systems is the DC motor. It directly provides rotary


motion and coupled with wheels or drums and cables can provide transitional motion.
The electric circuit of the armature and the free body diagram of the rotor are shown in
the following figure.

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

From the figure, we can write the following equations.

J   b  Ki
di
L  Ri  v  K
dt

Where,

J=moment of inertia of the rotor

b=damping ratio of the mechanical system

K=Kt=Ke=electromotive force constant

R=electric resistance

[ Abdullah Ibn Mahmud 1106006]


Page |8

L=electric inductance

V=source voltage

 =position of shaft

Mathematical analysis:

Using Laplace transforms on the above modeling equations, we get

 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

[ Abdullah Ibn Mahmud 1106006]


Page |9

MATLAB Simulation:

[ Abdullah Ibn Mahmud 1106006]


P a g e | 10

MATLAB Data:

Resistance Settling Overshoot Steady


Voltage (V) Rise Time
(R) Time Percentage State Error
1 10 1.14 2.07 0
2 10 0.624 1.11 0
3 10 0.473 0.8 0
4 10 0.402 0.668 0
5 10 0.354 0.588 0
5 2 0.354 0.588 0
5 4 0.354 0.588 0
5 6 0.354 0.588 0
5 8 0.354 0.588 0
5 10 0.354 0.588 0

[ Abdullah Ibn Mahmud 1106006]


P a g e | 11

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?

When Resistance was varied:

 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.

When input voltage was varied:

 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.

[ Abdullah Ibn Mahmud 1106006]


P a g e | 12

Use of Laplace Transform:

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.

Open Loop System:

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.

Block Diagram of Open Loop System:

Advantages of Open Loop System:

 Reduction of cost
 Simple
 Control is easy

Disadvantage of Open Loop System:

 No compensation for disturbance.

Closed Loop System:

A closed loop control system uses a measurement of the output and feedback of this
signal to compare it with the desired input.

[ Abdullah Ibn Mahmud 1106006]


P a g e | 13

Block Diagram of Closed Loop System:

Advantages of Closed Loop System:

 Greater accuracy
 Less sensitive to noise, disturbance & changes in environment
 Control is more convenient & flexible

Disadvantages of Closed Loop System:

 Costly
 Complex system
 Sometimes unstable

[ Abdullah Ibn Mahmud 1106006]


P a g e | 14

Name of the experiment:

(b) PID Design Method for DC motor speed control

Objective:

The objective of this experiment is to study PID design method for DC motor speed
control.

Physical Interpretation & Design Criterions:

A common actuator in control systems is the DC motor. It directly provides rotary


motion and coupled with wheels or drums and cables can provide transitional motion.
The electric circuit of the armature and the free body diagram of the rotor are shown in
the following figure.

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.

[ Abdullah Ibn Mahmud 1106006]


P a g e | 15

T  Kt i
e  K e

From the figure, we can write the following equations.

J   b  Ki
di
L  Ri  v  K
dt

Where,

J=moment of inertia of the rotor

b=damping ratio of the mechanical system

K=Kt=Ke=electromotive force constant

R=electric resistance

L=electric inductance

V=source voltage

 =position of shaft

Using Laplace transforms on the above modeling equations, we get

 K

V ( Js  b)( Ls  R )  K 2

In order to meet the design specification, a feedback system with an appropriate


controller is developed which is shown below and has a transfer function of

KI K S 2  KPS  KI
Kp   KDS  D
S S

Where, K p = Proportional gain

[ Abdullah Ibn Mahmud 1106006]


P a g e | 16

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

[ Abdullah Ibn Mahmud 1106006]


P a g e | 17

MATLab Simulation:

Figure: Step response for Open Loop System and Proportional Controlled Closed System

[ Abdullah Ibn Mahmud 1106006]


P a g e | 18

Figure: Step response for Proportional Integral Controlled Closed System

[ Abdullah Ibn Mahmud 1106006]


P a g e | 19

Figure: Step response for Proportional Derivative Controlled Closed System with KI=5

[ Abdullah Ibn Mahmud 1106006]


P a g e | 20

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

[ Abdullah Ibn Mahmud 1106006]


P a g e | 21

20 5 0 Inf NaN Inf N/A


40 10 0 Inf NaN Inf N/A
60 15 0 Inf NaN Inf N/A
80 20 0 Inf NaN Inf N/A
25 5 50 0.627 2.26 1.78 0.0
Proportional
50 10 100 0.366 1.37 0.669 0.0
Derivative
75 15 150 0.242 1.78 0.561 0.0
Integral
100 20 200 0.161 1.09 0.493 0.0

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.

Increment in Settling Percentage Steady


Rise Time
Controllable Time Overshoot State Error
(Tr, sec)
Constant (Ts, sec) (OS%) (%)
Proportional, KP Decrease Increase Increase Decrease
Derivative, KD Decrease Decrease Increase Equal
Integral, KI Increase Increase Equal Equal

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.

Design of the PID Controller:

Rise time Overshoot Settling time Steady-state error


Kp KD KI
(sec) (%) (sec) (%)

100 10 200 0.144 1.03 0.269 0

100 10 175 0.145 0.306 0.296 0

50 7 90 0.326 0.819 0.609 0

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.

[ Abdullah Ibn Mahmud 1106006]


P a g e | 22

Discussion:

In this experiment, we studied modeling of physical systems and their close loop
response.

A control system that provides an optimum performance without necessary adjustments


is rare. Usually we find it necessary to compromise among many conflicting and
demanding specifications and to adjust the system parameters to provide a suitable
performance. Sometimes we are required to reconsider the control system design and
insert additional components. These additional components are called compensator or
controller.

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

Where, K p = Proportional gain

K I = Integral gain

[ Abdullah Ibn Mahmud 1106006]


P a g e | 23

Kd = Derivative gain

Function of a PID Controller:

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.

Use of Laplace Transform:

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.

Open Loop System:

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.

[ Abdullah Ibn Mahmud 1106006]


P a g e | 24

Block Diagram of Open Loop System:

Advantages of Open Loop System:

 Reduction of cost
 Simple
 Control is easy

Disadvantage of Open Loop System:

 No compensation for disturbance.

Closed Loop System:

A closed loop control system uses a measurement of the output and feedback of this
signal to compare it with the desired input.

Block Diagram of Closed Loop System:

Advantages of Closed Loop System:

 Greater accuracy
 Less sensitive to noise, disturbance & changes in environment
 Control is more convenient & flexible

[ Abdullah Ibn Mahmud 1106006]


P a g e | 25

Disadvantages of Closed Loop System:

 Costly
 Complex system
 Sometimes unstable

Primary Objectives of a Control System:

 Producing the desired transient response


 Reducing steady state errors
 Achieving stability

---00---

[ Abdullah Ibn Mahmud 1106006]


DEPARTMENT OF ELECTRICAL AND ELECTRONIC
ENGINEERING BANGLADESH UNIVERSITY OF
ENGINEERING & TECHNOLOGY
EEE 402: CONTROL SYSTEMS LABORATORY

Exp. No.: 2.

Experiment on DC Servo Motor System

Description of different components


Experiment on position control
Description of the Components of DC Servo System

Power Supply (PS150E)

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.

Servo Amplifier (SA 150D)

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.

Attenuator Unit (AU 150B):

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.

DC Motor Unit ( DCM 150F)


This unit contains a DC permanent magnet motor, which has an extended shaft and onto
which the magnetic brake or inertia disc can be fixed. The motor may also be attached to
the Reduction Gear Tacho Unit GT150X using the hexagonal coupling provided.

Reduction Gear Tacho Unit ( GT 150X)

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.

Loading Unit (LU 150L)

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.

Op-Amp Unit (OA 150A)

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.

Input and Output Potentiometer ( IP150H & OP150K)

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.

Overview of the DC Servo Position Control:


Input potentiometer IP150H produces a reference voltage (Vref) proportional to the input
angular position (θi). Output potentiometer OP150K produces an output voltage (Vout)
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.

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.

Magnetic KF θi θo No. of Stability Offset


loading (degrees) (degrees) oscillation (stable/unstable) (degrees)
(in %) before
settling
0% 0.5

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.

Updated by: Sishir Bhowmick


Md. Shamim Reza

Reviewed By: Md. Imran Momtaz


Course Number: EEE 402

Experiment No: 02

Name of the Experiment:


Experiment on DC Servo Motor System:
Description of different components
Experiment on position control

Student’s ID: 1106006

Name: Abdullah Ibn Mahmud


Dept.: EEE
Group: A1(1)
Page |1

Objective:
The objective of this experiment is to know how a simple position control system is
constructed and operated.

Part 1: Simulation of a cruise control system

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:

Attenuator unit available for gain and tacho-feedback control.

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:

[ Abdullah Ibn Mahmud 1106006]


Page |2

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:

Reduction Gear Tacho unit.

Experimental Setup:

[ Abdullah Ibn Mahmud 1106006]


Page |3

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 -

[ Abdullah Ibn Mahmud 1106006]


Page |4

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 -

How the position control method is implemented in this experiment:

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

Explain how position control method is implemented in this experiment?

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

[ Abdullah Ibn Mahmud 1106006]


Page |5

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.

[ Abdullah Ibn Mahmud 1106006]


Page |6

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

[ Abdullah Ibn Mahmud 1106006]


EEE 402 Control System I Laboratory Level/Term: 4-I

Department of Electrical & Electronic Engineering


Bangladesh University of Engineering & Technology

EEE 402: Control System I Laboratory

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

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.

Getting Started with MATLAB’s Simulink


• Open MATLAB.
• Select File  New  Model. A new window named ‘untitled’ should appear on the
screen as shown in Fig. 1.
EEE 402 Control System I Laboratory Level/Term: 4-I

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

• Double-click on ‘Resistor’ symbol. A window named ‘Block Parameters: Resistor’ will


appear (Fig. 5). You can read necessary information about the symbol there and edit
‘Resistance’ value.

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ω
dt J
dt bω
e = Kω
τ

Fig. 6

From experiment 1, we have the following parameters for the DC motor:

1. moment of inertia of the rotor (J) = 0.01 kgm2s−2


2. damping ratio of the mechanical system (b) = 0.1 Js
3. electromotive force constant ( K = Ke = Kt ) = 0.01 JA−1

4. electric resistance (R) = 1 Ω


5. electric inductance (L) = 0.5 H
6. input (V): Source Voltage
7. output ( θ ): position of shaft
8. The rotor and shaft are assumed to be rigid.

Task 1: To draw a complete schematic of the DC motor on Simulink.


To accomplish the task, following components are to be dragged onto the ‘untitled’ window of
Simulink.

1. Foundation LibraryElectrical  Electrical Elements


• Resistor
• Inductor
• Rotational Electromechanical Converter
EEE 402 Control System I Laboratory Level/Term: 4-I

• 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

Hint: Use Ctrl+R (or Format ->


> Rotate Block) to rotate the components.

 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

 Complete the wiring. The window should look like Fig. 8.

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.

• Save the file.

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.

Task 2: To create a blockfor the DC motor on Simulink.


• Create a new Simulink window.
• In ‘Libraries’ panel on the left of ‘Simulink Library Browser’ window select Simulink ->
Ports & Subsystems and drag ‘Subsystem’ onto the Simulink window.
• Double-click on ‘Subsystem’. A new window named ‘untitled/Subsystem’ should
appear.
• Clear the window.
• From the library browser select Simscape -> Utilities and drag ‘Connection Port’ for
four times onto ‘untitled/Subsystem’ window.
• Add other components so that your window looklike Fig. 9.

Fig. 9

Hint: You can edit the port names by clicking and editing.

• Change the parameters as mentioned above.


• Double-click on port 3 and set ‘Port location on parent subsystem’ to ‘Right’.
• Double-click on port 2 and set ‘Port location on parent subsystem’ to ‘Left’.
• At this point the ‘untitled’ window should look like Fig. 10.
EEE 402 Control System I Laboratory Level/Term: 4-I

Fig. 10

• Rename ‘Subsystem’ to ‘DC Motor’.


• Save the ‘untitled’ window.

You have successfully created a block for your DC motor!

Task 3: To study the open loop response of a DC motor in Simulink.


At this point we have a block for our DC motor and we are ready to add necessary
sensors/meters with this motor and study the open loop response of the motor.

 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

2. PS-Simulink Converter (4 pieces)


Simulink -> Sinks
1. Display (4 pieces)
2. Scope (4 pieces)

 Connect the components with wires, your diagram should look like the one in Fig. 11.

Fig. 11

 Use 1 V for the DC voltage source.


 Select Simulation -> Configuration Parameters. In the ‘Solver options’ panel set
‘Solver’ to ‘ode 15s (stiff/NDF)’. Also set ‘Stop time’ to ‘3.0’ in the ‘Simulation time’
panel.
 Click on ‘Start Simulation’ icon. You should observe changes in the ‘Display’ elements.
 Double-click on the Scope named ‘Plot Speed’. A new window containing a plot of speed
vs. time will appear (Fig. 12).
EEE 402 Control System I Laboratory Level/Term: 4-I

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:

1. Get familiar with each of the elements used up to this.

You have completed the first part of the experiment successfully!!!


EEE 402 Control System I Laboratory Level/Term: 4-I

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).

c. Drag a ‘subsystem’ block from Library  Simulink  Ports & Subsystems.


Rename the block as PID Controller. Now, double click the block to draw the inner
structure of the subsystem. The structure of the PID controller is shown in Fig. 14. As
you can see, here are four input ports (simulink  port and subsystem  out 1),
meant for kp, kd, ki and error signal; three ‘product’ block (simulink  math
operation), two transfer function blocks (simulink  continuous  transfer Fcn),
one ‘sum’ block and a output port (simulink  port and subsystem  out 1).

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

Provide the numerator matrix as = [1 0] and denominator matrix as = [1 2 1].



However, you can also use the ‘integrator’ to implement

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

The final design should look like following:

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

Soumitra Roy Joy


Lecturer, Department of Electrical and Electronic Engineering
Bangladesh University of Engineering & Technology

Under the supervision of:

Dr. ShaikhAnowarul
ikhAnowarul Fattah
Associate Professor, Department of Electrical and Electronic Engineering
Bangladesh University of Engineering & Technology
Course Number: EEE 402

Experiment No: 03

Name of the Experiment:


(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.

Date of Performance: 06.03.2016

Student’s ID: 1106006

Name: Abdullah Ibn Mahmud


Dept.: EEE
Group: A1(1)
Page |1

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.

Part a: Simulation and Study of the open loop response of a DC


motor with Matlab’s Simulink.

Circuit:

[ Abdullah Ibn Mahmud 1106006]


Page |2

Speed Graph:

Angle Graph:

[ Abdullah Ibn Mahmud 1106006]


Page |3

Current Graph:

Voltage Graph:

[ Abdullah Ibn Mahmud 1106006]


Page |4

Part b: Design of a PID controller and study the closed-loop


response

Circuit:

[ Abdullah Ibn Mahmud 1106006]


Page |5

Current Graph:

Angle Graph:

[ Abdullah Ibn Mahmud 1106006]


Page |6

Speed Graph:

With Kp=100:

[ Abdullah Ibn Mahmud 1106006]


Page |7

With Ki=50:

With Kd=50:

THE END

[ Abdullah Ibn Mahmud 1106006]


EEE 402
Control Systems Sessional
Experiment No: 4
Control of a conveyor system using Programmable Logic
Controller (PLC) – Part I

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:

The system has three main parts:

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.

3. Compressed Air Pump: This is a manually pumped plastic reservoir (PC49)


supplying pressurized air to the solenoid valve manifold of the cylinder set of PC45.
To fill the pump with compressed air, one has to simply twist its handle to release it
from its clamped position and then manually pump the handle (raise up and lower
down) until some resistance is felt while pumping. The pump has a built-in pressure
relief valve which will open whenever the pressure exceeds 3 bars thereby ensuring
that excessive air pressure can not be applied to the PC45.

Input and Output wiring connections between the PC45 and SLC150

Outputs from PC45 to be Physical address of


connected with inputs to inputs to SLC150
SC150

Green Pushbutton switch (SWG) 001


Red Pushbutton switch (SWG) 002
Sensor 1 (S1) 003
Sensor 2 (S2) 004

Sequence switch module Switch 1 005


Switch 2 006
Switch 3 007
Switch 4 008
Switch 5 009

Limit (Reed) switch on cylinders R1 101


R2 102
R3 103

2
Inputs to PC45 to be Physical address of
connected with outputs from outputs to SLC150
SC150

Green lamp (LG) 012


Red lamp (LR) 013
Conveyor forward Run (E) 011
Conveyor reverse Run (R) 111

Input for Cylinder 1 (C1) 112


Input for Cylinder 2 (C2) 113
Input for Cylinder 3 (C3) 114

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

VAC/VDC common terminal Connect to 0V


For output terminals 12 and 13
of SLC150

VAC/VDC common terminal for Connect to 0V


output 112,113 and 114 of SLC150

Common terminals of outputs 11 and 111 Strap together and


of SLC150 connect to 0V

Common terminal (COM) on input Connect to 0V


side of SLC150

VSWITCH terminal of Connect to 0V


sequence switch module

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.

The Ladder diagram for this Exercise is given in Figure -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.

2. Record the results of Exercise – 3 as in the given Table:

Observation Object nature Timer-1 Timer-2 Object


No. (tall/short and PR PR pushed
heavy/light) (sec) (sec) or not?

4
5
FIG. 3: LADDER DIAGRAM OF EXERCISE 3

Last modified by: Redwan Noor Sajjad, Lecturer,


Md. Shamim Reza, Lecturer,
Dept. of EEE, BUET. (22/7/2008)

Reviewed By: Md. Imran Momtaz (March, 2010)

6
Course Number: EEE 402

Experiment No: 04

Name of the Experiment:


Control of a Conveyor system using Programmable Logic Controller
(PLC)

Date of Submission: 10.04.2016

Student’s ID: 1106006

Name: Abdullah Ibn Mahmud


Dept.: EEE
Group: A1(1)
Page |1

• Address 5,6,7,8 correspond switches 1,2,3,4


• Address beginning with 7 correspond to ‘software’ relays, they can preserve
information
• All the rungs in ladder diagram are logical statements that are executed
simultaneously not sequentially.

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.

[ Abdullah Ibn Mahmud 1106006]


Page |2

Rung 1: Turning ON switch 1 (energizing 005) makes relay at address 701


energized to preserve the information that switch 1 is ON state. We’ll say the
information is latched at 701
Rung 2: If relay at 701 is energized/ON and switch 2(006) is ON then 702 is
latched.
Rung 3: If 702,701 is ON and switch 3(007) is ON then 703 is latched.
Rung 4: If 703 is ON then energize the relay at 11 which implies forward run of
conveyor.
Rung 5: If switch 4(008) is ON unlatch 701
Rung 6: If switch 4(008) is ON unlatch 702
Rung 7: If switch 4(008) is ON unlatch 703

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

[ Abdullah Ibn Mahmud 1106006]


Page |3

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.

Rung 1: Turning ON switch 1 (energizing 005) makes relay at address 701


energized to preserve the information that switch 1 is ON state. We’ll say the
information is latched at 701
Rung 2: If relay at 701 is energized/ON and switch 2 (006) is ON then 702 is
latched.

[ Abdullah Ibn Mahmud 1106006]


Page |4

Rung 3: If 702,701 is ON and switch 3 (007) is ON then 703 is latched.


Rung 4: If 703 is ON and an object is between sensor 1(003 is de-energized)
and nothing is between sensor 2 (004 is energized) then energize the relay at
11 which implies forward run of conveyor.
Also if 11 is energized and no object is in between sensor 2 then 11 is kept
energized.
Rung 5: If an object is in between sensor 2 (004 is de-energized) unlatch 701
Rung 6: If an object is in between sensor 2 (004 is de-energized) unlatch 702
Rung 7: If an object is in between sensor 2 (004 is de-energized) unlatch 703

[ Abdullah Ibn Mahmud 1106006]


Page |5

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.

[ Abdullah Ibn Mahmud 1106006]


DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING
BANGLADESH UNIVERSITY OF ENGINEERING & TECHNOLOGY
EEE 402 : CONTROL SYSTEMS SESSIONAL

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:

The closed-loop transfer function is:

and thus the poles of the closed loop system are values of s such that 1 + K H(s) = 0.

If we write H(s) = b(s)/a(s), then this equation has the form:

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:

• Settling time less than 40 milliseconds


• Overshoot less than 16%
• No steady-state error
• No steady-state error due to a disturbance

Motor parameters:

For this example, we will assume the following values for the physical parameters of
motor.

* moment of inertia of the rotor (J) = 3.2284E-6 kg.m^2/s^2


* damping ratio of the mechanical system (b) = 3.5077E-6 Nms
* electromotive force constant (K=Ke=Kt) = 0.0274 Nm/Amp
* electric resistance (R) = 4 ohm
* electric inductance (L) = 2.75E-6 H
* input (V): Source Voltage
* output (theta): position of shaft
* The rotor and shaft are assumed to be rigid

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:

Create a new m-file and enter the following commands:

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.

System TF for actual input


System TF for disturbance =
Controller TF

3
Here TF stands for transfer function.

You should get the following plot:

3. Drawing the root locus

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.

axis([-400 100 -200 200])


You should obtain the following plot in which you can see that the closed-loop system
will be stable for small gains.

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.

5. Proportional plus Integral Control

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.

Is the system fast enough to fulfill the design requirement?

5
Obtain the step response of the system for disturbance input. Does PI controller improve
system performance for disturbance input?

6. Proportional plus Integral plus Derivative Control

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.

7. Finding the gain using the rlocfind command

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:

Complete matlab code for PID compensated system:

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

Reviewed By: Md. Imran Momtaz (March, 2010)

7
Course Number: EEE 402

Experiment No: 05

Name of the Experiment:


Root Locus Design Method for DC Motor Position Control

Date of Submission: 24.04.2016

Student’s ID: 1106006

Name: Abdullah Ibn Mahmud


Dept.: EEE
Group: A1(1)
Page |1

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+ 𝐾𝐻(𝑠)

Poles of the system are the values of s for which 1+KH(s)=0.

Hence the conditions of finding root locus are:

 |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).

[ Abdullah Ibn Mahmud 1106006]


Page |2

Design Parameters:

 moment of inertia of the rotor (J) = 3.2284E-6 kg.m^2/s^2


 damping ratio of the mechanical system (b) = 3.5077E-6 Nms
 electromotive force constant (K=Ke=Kt) = 0.0274 Nm/Amp
 electric resistance (R) = 4 ohm
 electric inductance (L) = 2.75E-6 H
 input (V): Source Voltage
 output (theta): position of shaft
 The rotor and shaft are assumed to be rigid
The transfer function of the DC Motor relating input voltage to rotor position;

Ѳ K
V
= s((Js+b)(Ls+R)+ K2 )

For 16% overshoot damping ratio=0.5038

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;

%% open loop response

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);

%%drawing root locus


figure
rlocus(sys);
sgrid(0.5,0);
axis([-400 100 -200 200]);

[ Abdullah Ibn Mahmud 1106006]


Page |3

%%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]);

%%finding gain using rlocfind command


[k, poles]=rlocfind(PID_sys);
feedbk_sys=feedback(k*PID_sys,1);
figure
step(feedbk_sys)

[ Abdullah Ibn Mahmud 1106006]


Page |4

Step Response for Open Loop System:

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.

Step Response Proportional Control:

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;

[ Abdullah Ibn Mahmud 1106006]


Page |5

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

[ Abdullah Ibn Mahmud 1106006]


Page |6

Step Response Proportional Control with Disturbance:

Here, Kp=1.7

System TF for actual Input


System TF for Disturbance =
Controller TF

Here TF stands for transfer function

Here we can see that percent overshoot and settling time does not correspond to the
required values. Hence, the design does not meet requirements.

[ Abdullah Ibn Mahmud 1106006]


Page |7

Root Locus:

We change the axes to zoom in to just lower gain portion of the root locus.

[ Abdullah Ibn Mahmud 1106006]


Page |8

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.

[ Abdullah Ibn Mahmud 1106006]


Page |9

Integral Control:

Integral control adds a 1/s term to the forward loop or in other words a pole at the origin.

We change the axes to zoom in the plot.

Integral control is very unstable as poles are on the right hand plane.

[ Abdullah Ibn Mahmud 1106006]


P a g e | 10

Proportional Plus Integral Control:

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

[ Abdullah Ibn Mahmud 1106006]


P a g e | 11

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

Step Response for Disturbance Input:

PI control improve performance for disturbance input because the steady state value for the
disturbance input is zero.

[ Abdullah Ibn Mahmud 1106006]


P a g e | 12

Proportional Plus Integral Plus Derivative Control:

Root locus:

The poles are chosen close to the real axis.

Step response of the compensated system:

[ Abdullah Ibn Mahmud 1106006]


P a g e | 13

Here, Overshoot=14%,

Settling time=38.5ms,

Steady state error=0

The system fulfills the requirements

Step response for the disturbance input:

From the plot of step response for disturbance input we can see that steady state error for
disturbance is compensated.

[ Abdullah Ibn Mahmud 1106006]


P a g e | 14

From Nise’s Book:

k(s+2)(s+1)
G(s)=
(s2-2s+2)

k(s+2)(s+1)
G(s)=
(s-2)(s-1)

[ Abdullah Ibn Mahmud 1106006]


P a g e | 15

k(s2+2)
G(s)=
(s+3)(s+4)

k(s2-9)
G(s)= 2
(s +4)

[ Abdullah Ibn Mahmud 1106006]


P a g e | 16

k(s+2)(s2+4)
G(s)=
(s+5)(s-3)

k(s+3)(s+5)
G(s)=
(s+1)(s-7)

[ Abdullah Ibn Mahmud 1106006]


P a g e | 17

-k(s+1)2
G(s)=
(s2+2s+2)

k(s+2/3)
G(s)=
s2(s+6)

[ Abdullah Ibn Mahmud 1106006]


P a g e | 18

k
G(s)=
(s+1)3(s+4)

k(s2+1)
G(s)=
s2

[ Abdullah Ibn Mahmud 1106006]


P a g e | 19

k(s2+4)
G(s)=
(s2+1)

k(s+2)(s+6)
G(s)=
(s2+8s+25)

[ Abdullah Ibn Mahmud 1106006]


P a g e | 20

k(s+1)
G(s)= s(s+2)

k(s+4)
G(s)=(s+1)(s+2)(s+3)

[ Abdullah Ibn Mahmud 1106006]


P a g e | 21

k
G(s)= (s+2)(s+4)(s+6)

k(s+1.5)
G(s)=s(s+1)(s+10)

[ Abdullah Ibn Mahmud 1106006]


P a g e | 22

k(s-2)(s-4)
G(s)=
(s2+6s+25)

k(s2-4s+20)
G(s)=
(s+2)(s+4)

[ Abdullah Ibn Mahmud 1106006]


P a g e | 23

k(s+2)
G(s)=
(s2-4s+13)

k(s+2)
G(s)=
(s+3)(s2+2s+2)

[ Abdullah Ibn Mahmud 1106006]


P a g e | 24

k(s-3)(s-5)
G(s)= (s+1)(s+2)

k
G(s)=
(s+2)(s+4)(s+6)

[ Abdullah Ibn Mahmud 1106006]


P a g e | 25

k(s+3)
G(s)=
s(s+1)(s+2)(s+4)

k(s+2)
G(s)= 2
(s +4s+13)

[ Abdullah Ibn Mahmud 1106006]


P a g e | 26

Answer to the Questions:

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.

[ Abdullah Ibn Mahmud 1106006]


P a g e | 27

Discussions:

1) Root locus method is used to design a system to fulfill specific requirements.


2) Closed loop response is obtained using root locus method. But it gives less
overshoot than the PID compensated system as root locus is based on some
approximations.
3) Root locus method provides graphical information about the performance and
stability of the system.
4) The pole which is very far to the left does not affect much the closed loop system unless
large gain is used.
5) Only forward path is used to locate poles and obtain gain.
6) The second order approximation has to be valid to get correct results from root locus.

[ Abdullah Ibn Mahmud 1106006]


P age |0

Course Number: EEE 402

Experiment No: 06

Name of the Experiment:


PART A: STUDY OF VARIABLE SPEED OPERATION OF AN AC MOTOR

PART B: STUDY OF OPERATING CONDITION OF A DC SERVO MOTOR SYSTEM

Student’s ID: 1106006

Name: Abdullah Ibn Mahmud


Dept.: EEE
Group: A1(1)
P age |1

Objective:

Objective of part A is -

1. To familiarize with variable speed control mechanism of AC motors


2. To understand basics of motor operation with changing load conditions.

Objective of part B is –

3. To study three different operation characteristics of a DC servo system using PC


interface.

Part A: STUDY OF VARIABLE SPEED OPERATION OF AN


AC MOTOR
In this Part the speed of an AC motor is varied for control application. Edibon VVCA: AC
motor Speed Controller unit has a control panel to introduce various parameters of motor
operation. It also has a series of terminals where we connect the digital and analog inputs
and relay and transistor outputs.

Equipment:

Edibon VVCA: AC motor Speed Controller including

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

Load(V) Frequency(Hz) Power(KW) Current(A)


12 15 0.02 0.25
12 17 0.02 0.26
12 20 0.02 0.26
12 25 0.03 0.27

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

Load (V) Frequency(Hz) Power(KW) Current(A)


12 20 0.02 0.26
37 20 0.03 0.27
50 20 0.03 0.28
P age |3

PART B: STUDY OF OPERATING CONDITION OF A DC


SERVO MOTOR SYSTEM
In this part 3 types of controlling scheme of a DC servo system is observed

1. Position control
2. Velocity control
3. Torque control

Equipment:

1. A DC SERVO training module designed by EDIBON which consists of


(a) Control Interface Box
(b) DC motor (24 V, 90 W)
(c) Encoder module
2. PC with EPOS STUDIO version 2.31 software

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:

Target position 1000

Target position 500

Figure: Position control parameters


P age |1

Speed control:

Figure: Profile velocity mode(parameters)

[ Abdullah Ibn Mahmud 1106006]


P age |2

Current control:

Figure: Current mode (Activation)

[ Abdullah Ibn Mahmud 1106006]


P age |3

Figure: Current mode (Parameters)

[ Abdullah Ibn Mahmud 1106006]


P age |4

Data Recording Mode:

Graphical view for the parameters extracted from the motor operation.

Figure: Data recording (Configuration)

[ Abdullah Ibn Mahmud 1106006]


P age |5

Observing the parameters that appear on the recording window.

Target Position:

[ Abdullah Ibn Mahmud 1106006]


P age |6

Setting Current Value:

Target Velocity:

[ Abdullah Ibn Mahmud 1106006]


P age |7

[ Abdullah Ibn Mahmud 1106006]


P age |8

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.

[ Abdullah Ibn Mahmud 1106006]


Course Number: EEE 402

Experiment No: 07

Name of the Experiment:


Speed control of DC servo motor

Date of Submission: 21.05.2016

Student’s ID: 1106006

Name: Abdullah Ibn Mahmud


Dept.: EEE
Group: A1(1)
P age |1

Objective:

The main objective of this experiment is to get familiarized with the process how a
simple speed control system is constructed and operated.

Overview of the DC Servo Position Control:

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:

i. Power Supply (PS150E)

ii. Servo Amplifier (SA150D)

iii. Attenuator Unit (AU150B)

iv. Reduction Gear Tacho Unit (GT150X)

v. Loading Unit (LU150L)

vi. Op-Amp Unit (OA150A)

vii. Pre-amplifier Unit (PA150C)

viii. I/P & O/P Potentiometer (IP150H & OP150K)

[ Abdullah Ibn Mahmud 1106006]


P age |2

Block Diagram:

Connection Diagram:

[ Abdullah Ibn Mahmud 1106006]


P age |3

Data Tables:

Table 1: Effect of reference voltage on speed

KL Vref(volts) Vtacho (volts) Verror(volts) Speed(rpm)


1 -1.58 1.13 .29 390
2 -3.12 2.3 .68 790
3 -4.62 3.4 1.1 1210
4 -5.95 4.5 1.35 1570
5 -7.35 5.51 1.69 1950
6 -9.01 6 2.75 2120
7 -10.44 5.94 4.2 2160
8 -12.07 6.03 5.92 2160
9 -13.88 6.06 7.65 2120

Table 2: Effect of load on speed, keeping Vref = -3.87 volt and speed = 2000 rpm

Load Vtacho (volts) Verror(volts) Speed(rpm)


0% 2.87 .86 1000
10% 2.77 .97 960
20% 2.69 1.05 930
30% 2.63 1.11 920
40% 2.57 1.18 890
50% 2.55 1.20 890
60% 2.51 1.25 870
70% 2.45 1.30 850
80% 2.35 1.40 810
90% 2.17 1.58 770
100% 2.11 1.62 740

[ Abdullah Ibn Mahmud 1106006]


P age |4

Table 3: Effect of load on speed, keeping Vref= -7.05 volt and speed = 1000 rpm

Load Vtacho (volts) Verror(volts) Speed(rpm)


0% 5.21 1.78 1800
10% 5.10 1.86 1780
20% 4.54 2.52 1580
30% 4.13 2.92 1450
40% 3.83 3.11 1340
50% 3.65 3.30 1290
60% 3.57 3.35 1240
70% 3.38 3.6 1170
80% 3.1 3.88 1070
90% 2.78 4.10 980
100% 2.49 4.44 880

Table 4: Effect of load on speed, keeping gain 1, K u = 10

Load Vref(volts) Vtacho (volts) Verror(volts) Speed(rpm)


0% -4.64 2.9 0.82 1000
10% -4.66 2.7 0.93 940
20% -4.67 2.6 0.97 910
30% -4.67 2.5 1.03 870
40% -4.67 2.43 1.07 840
50% -4.68 2.33 1.10 810
60% -4.68 2.22 1.18 770
70% -4.68 2.15 1.20 750
80% -4.68 2.09 1.24 720
90% -4.68 2.04 1.26 710
100% -4.68 2.01 1.28 690

[ Abdullah Ibn Mahmud 1106006]


P age |5

Table 5: Effect of load on speed, keeping gain = 5, K u = 1;

Load Vref(volts) Vtacho (volts) Verror(volts) Speed(rpm)


0% -9.18 5.65 3.11 1970
10% -9.18 5.51 3.25 1905
20% -9.18 5.44 3.39 1880
30% -9.18 5 4.05 1530
40% -9.18 4 4.05 1530
50% -9.18 3.62 5.12 1400
60% -9.19 3.14 5.5 1220
70% -9.19 2.91 5.85 1080
80% -9.19 2.58 6.09 900
90% -9.2 2.41 6.17 858
100% -9.23 2.22 6.4 790

Table 6: Effect of load on speed, for open loop control.

Load Vref(volts) Vtacho (volts) Verror(volts)


0% -1.6 4.67 1640
10% -1.6 3.88 1370
20% -1.6 3.68 1270
30% -1.6 3.50 1205
40% -1.6 3.28 1130
50% -1.6 3.01 1020
60% -1.6 2.8 960
70% -1.6 2.63 900
80% -1.6 2.55 890
90% -1.6 2.49 870
100% -1.6 2.46 850

[ Abdullah Ibn Mahmud 1106006]


P age |6

Answer to the Questions

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.

[ Abdullah Ibn Mahmud 1106006]


P age |7

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:

Graph 1: Effect of reference voltage on speed and V error on speed

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

[ Abdullah Ibn Mahmud 1106006]


P age |8

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

[ Abdullah Ibn Mahmud 1106006]


P age |9

accordingly armature resistance drop is also large, as a result the speed


variation is also very large.

Speed Regulation at Vref = -9.01V:


SR=(2000-820)/820 = 1.439
Speed Regulation at Vref = -5.16V:
SR= (1000-790)/790 = 0.266

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

[ Abdullah Ibn Mahmud 1106006]


P a g e | 10

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.

[ Abdullah Ibn Mahmud 1106006]


P a g e | 11

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

[ Abdullah Ibn Mahmud 1106006]


P a g e | 12

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.

[ Abdullah Ibn Mahmud 1106006]


P a g e | 13

Here we can observe that,

i) Closed loop: Gain=5 graph has a slope of around 12rpm/loading.


ii) Closed loop: Gain=1 graph has a slope of around 3.4rpm/loading.
iii) Open-loop control graph has a slope of around 8.5rpm/loading.

In open loop control poor speed regulation is obtained because there is


no control parameter when the speed of the motor decreases with
increasing load at constant reference voltage or vice-versa.

[ Abdullah Ibn Mahmud 1106006]


P a g e | 14

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.

[ Abdullah Ibn Mahmud 1106006]


Course Number: EEE 402

Experiment No: 08

Name of the Experiment:


Control of a Conveyor System Using Programmable Logic
Controller - Part 2
Date of Submission: 28.05.2016

Student’s ID: 1106006

Name: Abdullah Ibn Mahmud


Dept.: EEE
Group: A1(1)
P age |1

Objective:

1. To distinguish tall objects from short objects placed on a running conveyor.

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

button switch is to be pressed.

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.

Programmable Logic Controller:

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.

[ Abdullah Ibn Mahmud 1106006]


P age |2

Physical address of inputs to SLC150

Green Pushbutton switch(SWG) 001

Red Pushbutton switch (SWR) 002

Sensor 1 (S1) 003

Sensor 2 (S2) 004

Sequence Switch 1 005

Sequence Switch 2 006

Sequence Switch 3 007

Sequence Switch 4 008

Sequence Switch 5 009

Limit switch on cylinder 1 (R1) 101

Limit switch on cylinder 2 (R2) 102

Limit switch on cylinder 3 (R3) 103

Conveyor Forward Run (E) 011

Input for cylinder 1 (C1) 112

Input for cylinder 2 (C2) 113

Input for cylinder 3 (C3) 114

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

[ Abdullah Ibn Mahmud 1106006]


P age |3

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.

[ Abdullah Ibn Mahmud 1106006]


P age |4

Ladder Diagram:

Here is the ladder diagram for the given objectives. Its operation is explained here
after the diagrams.

[ Abdullah Ibn Mahmud 1106006]


P age |5

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.

[ Abdullah Ibn Mahmud 1106006]


P age |6

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.

[ Abdullah Ibn Mahmud 1106006]


P age |7

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.

This is the operation process of the given ladder diagram.

[ Abdullah Ibn Mahmud 1106006]


P age |8

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.

[ Abdullah Ibn Mahmud 1106006]

You might also like