Anda di halaman 1dari 28

.

EE501 Term Project

Position Control of a DC Servo


System using a PID Controller

Submitted By:
Haider Ali MS-13-24359
Atif Jameel MS-13-23941
Muhammad Muzaffar Khan MS-13-21082

Dept of Electrical Engineering


Pakistan Institute of Engineering & Applied Sciences

Course Instructor: Dr. Ghulam Mustafa


Contents

1 Introduction 1
1.1 A Brief Overview of DC Servomotor . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 PID Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Mathematical Modeling 3

3 PID Controllers 6
3.1 Closed Loop System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 PID Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2.1 Proportional Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2.2 Integral Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2.3 Derivative Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4 Design, Simulation and Analysis 10


4.1 Parameter Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2 MATLAB Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2.1 Simulink Modeling and Analysis . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2.2 Root Locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2.3 PID Controller Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5 Hardware Implementation 18
5.1 Proportional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.2 Integrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.3 Differentiator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.4 Proportional-Integral-Derivative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

6 Summary 21

1
List of Figures

1.1 Components of a Servo Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2.1 DC Motor Equivalent Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3


2.2 Open Loop Control of DC Servo Motor . . . . . . . . . . . . . . . . . . . . . . . . . 5

3.1 Unity Feedback Closed Loop System . . . . . . . . . . . . . . . . . . . . . . . . . . . 6


3.2 Typical 2nd Order Motor Response and Transient Characteristics . . . . . . . . . . . 7

4.1 Parameter Estimation via Response Curve . . . . . . . . . . . . . . . . . . . . . . . . 11


4.2 Simulink Model of Closed Loop System . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.3 Response Curve of Closed Loop System . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4 Root locus of Uncontrolled DC Servo System . . . . . . . . . . . . . . . . . . . . . . 14
4.5 Simulink Model of PID Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.6 PID Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.7 Root Locus of Controlled System using PID . . . . . . . . . . . . . . . . . . . . . . . 16
4.8 Comparison of Transient Behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.1 Inverting Gain Op-Amp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18


5.2 Op-Amp Integrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.3 Op-Amp Differentiator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.4 PID Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

2
Abstract

In this report, position control of a DC Servo Motor using a Proportional-Integral-Derivative (PID)


controller is presented. The electrical and mathematical modeling of a typical DC Servo Motor is
discussed. After obtaining a generic system model, the system parameters are determined using the
system’s closed loop response. The obtained system is then modeled, simulated and analysed using
the root locus technique via the aid of MATLAB and Simulink. The desired system specifications
are then defined and MATLAB PID autotuner is used to find the gain values of the PID controller
corresponding to those specifications. Lastly, hardware implementation of a PID using operational
amplifiers is discussed along with the method to find the component values i.e. resistors and
capacitors.
Chapter 1

Introduction

Most of the industrial applications nowadays such as automation, robotics, production lines, CNC
machines and numerically controlled machinery require high dynamics on their position and speed
control and their starting and stopping functions need to be controlled quickly and accurately [3].
These systems incorporate DC servomotors as one of their vital components. DC servomotors
have a large market share in the Industry Automation and Drive Technologies. Because of their
importance, the design of the controllers for these servo systems has become an interesting area of
researchers all over the world.
The proportional-Integral-Derivative controllers (PID) have been extensively used over the past
few decades due to their efficiency, robustness and simplicity. It is estimated that PID controllers
are still employed in 95% of the industrial processes [1] and are widely used in the fields of ser-
vomotor control, robotics, temperature control and power electronics. These PID controllers are
usually implemented either in hardware using analog components or in software using computer
based systems.
This report provides a systematic approach to designing an efficient PID controller for a DC servo-
motor. The content is organized as follows: Chapter 1 gives a brief overview of the DC servomotor
and the PID controller. Mathematical modeling of the servomotor is described in chapter 2. In
chapter 3, different parts of a PID controller are discussed. Simulink modeling and hardware im-
plementation are presented in chapter 4 and chapter 5 respectively. Chapter 6, the last section,
drafts the summary of the whole discussion.

1.1 A Brief Overview of DC Servomotor


A DC servomotor is an electromechanical device which allows for precise control of angular position
and motion using an input voltage. A DC servomotor is actually an assembly of three main
components 1.1: a simple DC motor, a feedback sensing device (potentiometer in case of position
control) and a control circuit. The motor is attached to the wheel using gears. A control signal
representing the desired output position of the servo shaft is applied to the servomotor. As the
motor rotates, the resistance of the potentiometer changes and the control circuit can precisely
regulate both the position of the shaft and the direction of its movement. As the motor shaft is at
the desired position, power supplied to the motor is stopped.
Servomotors are controlled using the technique of Pulse Width Modulation (PWM) in which
electrical pulses of variable widths are sent via control wires. The duration of the positive-going
pulse determines the position of the servo shaft. Generally, a pulse of 1.5ms defines the center
position of the motor. A greater pulse width turns the motor 900 in clockwise direction and a

1
Figure 1.1: Components of a Servo Motor

smaller pulse width turns it 900 in anti-clockwise direction. The servo expects to see a pulse every
20ms and the position pulse must be repeated to instruct the servo to remain in position [2].
Servo motors are used extensively in robotics industry and radio-controlled airplanes. These motors
are most commonly employed in closed loop control systems where the programmed position of
motion and velocity feedback controllers are required [4]. Different studies and researches have
been conducted on the servo motor control. Currently, the conventional method of servo motor
control is based on proportional integral derivative.

1.2 PID Controller


Proportional-Integral-Derivative (PID) control is the most common control algorithm used in in-
dustry and has been universally accepted in industrial control. The popularity of PID controllers
can be attributed partly to their robust performance in a wide range of operating conditions and
partly to their functional simplicity, which allows engineers to operate them in a simple, straight-
forward manner.
As the name suggests, PID algorithm consists of three basic coefficients; proportional, integral and
derivative which are varied to get optimal response. The basic idea behind a PID controller is
to read a sensor, then compute the desired actuator output by calculating proportional, integral,
and derivative responses and summing those three components to compute the output. Different
variants of a PID controller include PI, PD, P or I controller in the absence of the respective control
action. All the three constituents of PID are explained in detail in 3.

2
Chapter 2

Mathematical Modeling

In this chapter, we discuss the steps involved in driving the mathematical model of an open loop
system of a DC servomotor. The figure 2.1 shows a DC motor attached to an inertial load. The
voltages applied to the armature and field sides of the motor are represented by Vf and Va respec-
tively. Similarly, Rf , Lf , Ra and La indicate the resistances and inductances of field and armature
sides of the motor. The motor can either be field controlled or armature controlled. In a field
controlled motor, the armature current ia is held constant and the field current if is controlled
through the field voltage Vf . On the other hand, the field current if is constant in an armature
controlled motor and the armature current ia is controlled via the armature voltage Va .

Figure 2.1: DC Motor Equivalent Circuit

The air gap flux φ of the motor is proportional to the field current and can be written as:

φ = Kf if

where Kf is a constant. The torque T delivered by the motor, in turn, is proportional to the

3
product of armature current ia and air gap flux as:

T = Ka ia φ
T = Ka ia Kf if

and Ka is also a constant. The DC servo system under examination is an armature control motor
for which armature current ia is variable, as mentioned earlier. The motor torque K is defined as
the product of Ka , Kf and if , therefore:

T = (Ka Kf if )ia
T = Kia

The speed of an armature controlled DC motor is controlled by the armature voltage va which is
supplied by a power supply. The differential equation for the armature circuit as obtained from the
figure is:
dia
va = Ra ia + La + vb
dt

where vb is the back emf voltage which is proportional to the angular velocity dt . Thus, with a
back emf constant Kb , we have:

vb = K b
dt
So, the armature circuit equation can be re-written as:
dia dθ
va = Ra ia + La + Kb (2.1)
dt dt
The armature current produces the torque T which is applied to the inertia and friction following
the equation:

d2 θ dθ
T =J +B
dt2 dt
2
d θ dθ
Kia = J 2 + B (2.2)
dt dt
To solve the differential equations (2.1) and (2.2), we use the technique of Laplace Transform.
Assuming that all the initial conditions are zero, we obtain the following equations in Laplace
Transform:

Va (s) = (La s + Ra )Ia (s) + Kb sΘ(s)


KIa (s) = (Js2 + Bs)Θ(s)

Now, considering Θ(s) as the output and Va (s) as the output, the transfer function, after simplifying
can be written as:
Θ(s) K
= 2
Va (s) s[La Js + (La B + Ra J)s + Ra B + KKb ]

4
The armature inductanceLa is usually very small and can be easily neglected. Neglecting La , the
transfer function can be reduced to:
Θ(s) K
=
Va (s) s[Ra Js + Ra B + KKb ]
Θ(s) Km
= (2.3)
Va (s) s(Tm s + 1)

where,
K
Km = = motor gain constant
Ra B + KKb
Ra J
Tm = = motor time constant
Ra B + KKb
We know that, angular velocity can be obtained by taking derivative of angular position, i.e.

w= or Ω(s) = sΘ(s)
dt
The transfer function relating angular velocity and applied voltage can now be written as:

Ω(s) Km
= (2.4)
Va (s) Tm s + 1

Equations (2.3) and (2.4) represent the angular position and angular velocity related to the applied
armature voltage respectively. We will be concerned withe angular position control in this project,
so the transfer function under observation will be:
Km
G(s) = (2.5)
s(Tm s + 1)

The equation (2.5) gives the open loop response of a DC servo motor as shown in figure 2.2 below:

Figure 2.2: Open Loop Control of DC Servo Motor

5
Chapter 3

PID Controllers

In this chapter, a brief overview of the Proportional-Integral-Derivative (PID) controller is pre-


sented. We will consider a closed loop system with unity feedback and discuss how each of the
three parameters of a PID controller affect the response of a closed loop system individually.

3.1 Closed Loop System


A closed loop control system, commonly referred to as a feedback control system, is the one in which
the output of the system is constantly fed back into the input of the control system. This feedback
configuration allows the system to constantly know the state of its output. This information helps
system to continuously correct the actual input to the system to reach the desired state. Typically,
a DC servomotor closed loop system with unity feedback is shown in figure 3.1.

Figure 3.1: Unity Feedback Closed Loop System

Here, G(s) represents the transfer function of the actual system i.e. DC servomotor, Gc (s)
shows the Laplace Transform of the controller i.e. PID and e represents the error signal which is
the difference between the output and the actual input of the system. Va and θ are the input and
output of the system respectively.
Now, some performance parameters of a general 2nd order closed loop system shown (3.1) by
equation are presented:

ωn2
G(s) = (3.1)
s2 + 2ζωn + ωn2

The response of such a system, marked with the transient response specifications that are defined
below, is shown in figure 3.2.

• Rise time(tr ): Time required for the response to go from 10% to 90% of the final value.

6
Figure 3.2: Typical 2nd Order Motor Response and Transient Characteristics

• Delay time(td ): Time required for the response to reach 50% of the final value the very first
time.

• Peak time(tp ): The time required for the response to reach the first overshoot.

• Maximum Overshoot(Mp ): The maximum peak value of the response curve measured from
the steady-state value.

• Settling time (ts ): The time required for the response curve to settle within a certain per-
centage of the final value.

• Steady-state error(ess ): Difference between the desired nal output and the actual response
when the system reaches a steady state.

These performance measures help quantify the desired system requirements which, typically, are:

• faster response

• minimal overshoot

• lesser settling time and

• minimum steady-state error

3.2 PID Theory


The basic idea behind a PID controller is to read a sensor and then compute the error e between the
actual input Va and the sensor output. This error e is then fed to the PID controller which calculates
its proportional, integral and derivative responses and the output θ is produced by summing these

7
three responses. The output of a PID controller, equal to the control input to the system, in time
domain is as follows:
Z
de
u(t) = Kp e(t) + Ki e(t) dt + Kd
dt
The transfer function of a PID controller is found by taking Laplace transform of the above equation:
Ki
Gc (s) = Kp + + Kd s
s
Kd s2 + Kp s + Ki
Gc (s) = (3.2)
s
where Kp , Ki and Kd are the controlling parameters of a PID controller defined as:

Kp = Proportional gain constant


Ki = Integral gain constant
Kd = Derivative gain constant

We now discuss the contribution of each of the three parameters in improving the system response.

3.2.1 Proportional Response


The proportional component has the effect of reducing the rise time and steady state error of the
system and depends only on the difference between the actual input and the sensor output which
is called error e. The proportional gain Kp determines the ratio of the output response to the
error signal. In general, increasing the proportional gain Kp increases the speed of the system but
the tendency towards oscillations also increases . However, if Kp is increased too large, the sensor
output will begin to oscillate. If it is increased further, the oscillations will become larger and the
system may become unstable. The proportional term is given by:

P = Kp e(t)

3.2.2 Integral Response


The integral component sums the error term e over time and gives the accumulated offset thus
eliminating the steady state error. The integral term accelerates the movement of the process
towards setpoint and eliminates the residual steady-state error that occurs with a pure proportional
controller. It, however, increases the settling time of the system along with the oscillations. The
integral term is given by:
Z
I = Ki e(t) dt

3.2.3 Derivative Response


The derivative response of the controller is proportional to the rate of change of the sensor out-
put. It is calculated by determining the slope of the error over time and multiplying this rate
by the derivative gain constant Kd . Derivative action predicts system behavior and has the ef-
fect of increasing the stability of the system, reducing the overshoot, and improving the transient
response.Most practical control systems use very small derivative gain constant Kd , because the

8
derivative response is highly sensitive to noise in the sensor output signal. The derivative term is
given by:
de
D = Kd
dt

9
Chapter 4

Design, Simulation and Analysis

In this chapter, we will first find the parameters of our actual DC servo system to find its open
loop and closed loop unity feedback transfer functions. Then the system is modeled and analysed
using Simulink. Lastly, PID controller implementation using MATLAB is discussed.

4.1 Parameter Estimation


The transfer function of the system can be obtained if we know the values of all the system
parameters i.e. Ra , B, J, Kb and the like, which, in this case, are not known. So we use the
alternate method of estimating the parameters from the output plot. This plot is given in figure
4.1 which shows the response of the unity feedback DC servo system. The open loop transfer
function of our system as obtained in equation (2.5) is:

Km
G(s) =
s(Tm s + 1)

The unity feedback closed loop transfer function can thus obtained as:

G(s)
T (s) =
1 + G(s)

Putting the value of G(s) and simplifying:

Km
T (s) = (4.1)
Tm s2 + s + Km
Rearranging the above equation, we can write that:
Km
Tm
T (s) = s Km
(4.2)
s2 + Tm + Tm

The equation (4.1) can easily be compared with the transfer function of a typical second order
system involving its parameters ζ and ωn as given in equation (3.1). Comparing, we get:
ωn
Km = (4.3)

1
Tm = (4.4)
2ζωn

10
Figure 4.1: Parameter Estimation via Response Curve
11
Now, looking at the response curve shown in figure 4.1, we can find the peak overshoot by the
following relation:

θ(t) − θ(∞)
Mp =
θ(∞)
4 − 3.2
Mp = = 0.25
3.2

2
Equating this value of peak overshoot Mp with e−(ζ/ 1−ζ )π :

2
0.25 = e−(ζ/ 1−ζ )π

Solving for ζ:

ζ = 0.4037 (4.5)

Now, to find natural frequency ωn , we use peak time tp which is given by:
π
tp =
ωn (1 − ζ 2 )

From the response plot 4.1, tp = 0.58sec, therefore:


π
0.58 =
ωn (1 − ζ 2 )

Solving for ωn :

ωn = 5.92 rad/sec (4.6)

Putting the values of ωn and ζ obtained in equations (4.6) and (4.7) in equations (4.3) and (4.4),
we get the following values of Km and Tm :

Km = 7.332
Tm = 0.2092

The open loop and closed loop transfer functions of the DC servo motor can be obtained by putting
the values of Km and Tm in equation (2.5) and (4.2) respectively:
7.332
G(s) = (4.7)
0.2092s2 + s
35.04
T (s) = 2 (4.8)
s + 4.78s + 35.04

4.2 MATLAB Implementation


In this section, the DC servo system model as obtained previously is modeled, simulated and
analysed using MATLAB.

12
4.2.1 Simulink Modeling and Analysis
The closed loop system as modeled in Simulink is shown in figure 4.2 below:

Figure 4.2: Simulink Model of Closed Loop System

A step input of magnitude 3.2 is applied to the system and the response curve obtained is shown
in figure 4.3:

Figure 4.3: Response Curve of Closed Loop System

We can see that the response obtained from Simulink as shown in figure 4.3 is exactly the
response of the original system as shown in figure 4.1 with both having an overshoot of 0.25, peak
time of 0.58 sec and settling time of 1.67 sec.

Design Objectives
We have assumed our design objectives as:
• Peak Overshoot less than 10%
• Settling time less than 1 sec

13
4.2.2 Root Locus
In this section, the system model is analysed using the technique of root locus via the aid of
MATLAB sisostool. As mentioned earlier, we have assumed our objectives to reduce the percentage
overshoot less than 10% and settling time less than 1 sec. The ζ and ωn corresponding to these
parameter objectives are obtained as 0.5912 and 6.7664 sec respectively. The root locus of the
original system and the desired values of ζ and ωn are plotted in the figure 4.4 below:

Root Locus of Uncontrolled DC Servo System

6.77

6
0.591

4
Imaginary Axis (seconds−1)

−2

−4

0.591
−6

6.77
−5 −4 −3 −2 −1 0 1
−1
Real Axis (seconds )

Figure 4.4: Root locus of Uncontrolled DC Servo System

It is evident from the above figure that the points corresponding to the desired parameter values
do not fall on the root locus of the system. Therefore, the required specifications cannot be achieved
by simple gain adjustment method.

4.2.3 PID Controller Design


After analysing the root locus of our DC servo system, we have deduced that there is a need to add
some poles and/or zeros to change the root locus thus allowing it to pass through our desired points.
Consequently, a PID controller is designed for this purpose. Specifically, we need to determine the
parameters Kp , Ki and Kd of our PID controller which are obtained using PID tuner block available
in MATLAB Simulink as shown in figure 4.5 below:

14
Figure 4.5: Simulink Model of PID Controller

The PID tuner allows you to set your desired system specifications i.e. whether to make the
system’s response time or transient behavior slower or faster thus changing the values of rise time,
settling time, peak time and peak overshoot which, in turn, change the values of Kp , Ki and Kd .
The following figure shows the tuning window. Note that the gain values for ζ ≤ 10% and ts ≤ 1sec
are shown on the right side window:

Figure 4.6: PID Tuning

Therefore, our required gain values are:

Kp = 1.2153 (4.9)
Ki = 0.22636 (4.10)
Kd = 0.15033 (4.11)

These gain values are now inserted in the transfer function of the PID controller as obtained in
equation (4.12) to obtain Gc (s). The controller transfer function can thus be written as:

0.15033s2 + 1.2153s + 0.22636


Gc (s) = (4.12)
s
The updated system now has the configuration of figure 3.1 in which the controller transfer function
is multiplied by the system transfer function. This updated system is now implemented in MATLAB
and the root locus now looks like:

15
Root locus of Controlled System using PID

Imaginary Axis (seconds−1) 4

−2

−4

−6
−25 −20 −15 −10 −5 0 5
Real Axis (seconds−1)

Figure 4.7: Root Locus of Controlled System using PID

The comparison between the transient responses of controlled and uncontrolled systems is shown
in the figure 4.8 below:

Transient behavior Comparison

1.4
Uncontrolled System
Controlled System
1.2

1
Amplitude

0.8

0.6

0.4

0.2

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
Time (seconds)

Figure 4.8: Comparison of Transient Behaviors

16
It is evident from the above figure that the transient response of the system has been improved
in terms of rise time, peak overshoot and settling time.
Now that we have obtained the values of gains corresponding to the desired specifications, we
can now translate these gain values into an electronic circuit using operational amplifiers, the
implementation of which is described in the next chapter.

17
Chapter 5

Hardware Implementation

In this chapter, the practical implementation of a PID circuit using analog electronic components
i.e. operational amplifiers is discussed. Firstly, each of the three components with their transfer
functions are presented and then they are combined to form the PID controller.

5.1 Proportional
The proportional part of a PID controller is implemented using an inverting amplifier as shown in
figure 5.1 below.

Figure 5.1: Inverting Gain Op-Amp

The transfer function is given by:


Rf
G(s) = −
Rin
The proportional gain is given by the following relation of resistors:
Rf
Kp =
Rin
Let Rin = 10 kΩ and Kp is 1.2153 as obtained in equation (4.9), then:

Rf = 1.2153 × 10 kΩ
Rf = 12.153 kΩ

18
5.2 Integrator
The circuit to implement the integrator part is shown in figure 5.2 below:

Figure 5.2: Op-Amp Integrator

The transfer function in this case is given by:


1
G(s) = −
sRC
In this case, the relation among Ki , R and C is given by:
1
Ki =
RC
Assuming, C = 100 µF and Ki = 0.22636 (4.11), then:
1
R=
100 × 10−6 × 0.22636
R = 44.177 kΩ

5.3 Differentiator
The figure 5.3 shows the circuit to implement the derivative part of the PID:

Figure 5.3: Op-Amp Differentiator

The transfer function of a differentiator is given by:

G(s) = −sRC

19
In the case of a differentiator:

Kd = RC

Again, assume that C = 100 µF and Ki = 0.15033 (4.10), then:


0.15033
R=
100 × 10−6
R = 1.503 kΩ

5.4 Proportional-Integral-Derivative
The complete circuit of a PID controller can now be implemented by combining the above three
parts using an Op-Amp summer. The output of the summer is inverted, therefore, an inverter is
used at the summer output to change the controller output phase. The complete circuit is shown
in figure 5.4 below:

Figure 5.4: PID Circuit

20
Chapter 6

Summary

This report presents a formal approach to designing a PID controller of a DC Servo System. A
complete design process of the DC Servo System, following all steps, is discussed. The problem
addressed is: “Given a model of a DC Servo System, design a PID controller to meet the desired
performance specifications”. First of all, the given system is identified by determining its variables
and specifications. Then, the system’s electrical and mathematical modeling is carried out to find
its transfer function and establish its configuration. After system definition and modeling, the gain
values of the PID controller are obtained using MATLAB Simulink. Lastly, these parameters are
then tuned to get the desired response.
The difference between the results of hardware implementation and the MATLAB simulation can
be attributed to the approximations made in the modeling of the system. This is because we have
estimated our original 3rd order system with a 2nd order system by ignoring motor’s armature
inductance La . Another consideration in this regard is the change in the values of the electronic
components i.e. resistors and capacitors with the environmental changes.
The efficiency of the designed controller can be improved by taking the original 3rd order system
instead of using its approximation, which will give us more information about the system. An-
other improvement can be obtained by implementing the PID controller using a microcontroller
instead of analog electronic components because microcontrollers, unlike analog components, are
less susceptible to environmental changes.

21
Appendix
MATLAB Code

%************************************************************************%
%FILE NAME: PROJECT_CSD.m
%Objective : Design and Modeling of PID controller for DC Servo System
%
%**************************************************************************
clc
clear all

%**************************************************************************
% DC Servo System in unity feedback without any Controller
% tp=0.58sec, PO=25% for step input
%**************************************************************************

Mp=0.25;
tp=0.58;
a=(-(log(Mp))/pi)^2; % Mp=exp(-zeta*pi/sqrt(1-zeta^2))
system_zeta=sqrt(a/(1+a));
system_wn=pi/(tp*sqrt(1-(system_zeta)^2)); % tp=pi/wd;
required_zeta=0.5912;
required_wn=6.7664;

%**************************************************************************
% our open loop transfer function is G(s)=km/(Tms^2+s)
% by parameter estimation Tm=0.2092; and Km=7.331;
%**************************************************************************

num=[7.332];
denum=[0.2092 1 0];
G_s=tf(num,denum);
figure(1)
rlocus(G_s)
sgrid(required_zeta,required_wn)
axis([-5 1 -7 7])
title(’Root Locus of Uncontrolled DC Servo System’)

% Step response of G(s) in unity feedback


figure(2)
step(G_s/(1+G_s))
title(’step response of Uncontrolled Dc servo System’)

% Desired PO=5% , Tseetling=1sec;

Mp=0.05;

22
ts=0.5;
b=(-(log(Mp))/pi)^2; % Mp=exp(-zeta*pi/sqrt(1-zeta^2))
desired_zeta=sqrt(b/(1+b));
desired_wn=4/((desired_zeta)*ts); % ts=4/sigma;

%**************************************************************************
% thsi can be achievd using PID controller==========================
% by using Nichols Ziegler criteria we found the values of Kp, Ki, and Kd
%**************************************************************************

kp=1.2153;
ki=0.22636;
kd=0.15033;

% transfer function of Controller=========================


num1=[kd kp ki];
denum1=[1 0];
Gc_s=tf(num1,denum1);

cmbind_tf=(G_s)*(Gc_s); % Combined transfer function of plant and PID controller


figure(3)
rlocus(cmbind_tf);
title(’Root locus of Controlled System using PID’)

closd_tf=cmbind_tf/(1+cmbind_tf);
figure(4)
step(closd_tf);
title(’Step response of Controlled System using PID’)

23
Bibliography

[1] K.J. Astrom and T. H. Hagglund. New tuning methods for pid controllers. In Proc. of 3rd
European Conference, pages pp. 2456–2462, 1995.

[2] B. Kocherov M. Baron. Vision guided motor control for semi-autonomous military vehicle.
Technical report, Institute Technology of Steven, 2007.

[3] K. Seki, H. Yokoi, and M. Iwasaki. Experimental evaluations of friction behavior in micro-
displacement region positioning for servo motor with air bearings. In Advanced Intelligent
Mechatronics (AIM), 2012 IEEE/ASME International Conference on, pages 731–736, July
2012.

[4] Rong-Jong Wai and R. Muthusamy. Fuzzy-neural-network inherited sliding-mode control for
robot manipulator including actuator dynamics. Neural Networks and Learning Systems, IEEE
Transactions on, 24(2):274–287, 2013.

24

Anda mungkin juga menyukai