463 views

Uploaded by Haider Ali

- PID21
- Control of an Electronic Expansion Valve Using an Adaptive PID Co
- 86599 Analyze Design in the Pid Tuner App
- Fuzzy Pid Basic
- 86594 Tune Pid Controllers to Favor Reference Tracking or Disturbance Rejection
- 27.Ijaest Vol No 8 Issue No 2 Dc Motor Control Using Fuzzy Logic Controller 291 296
- IRJET-A Review on Comparison of PI DC Motor Speed Controller and PI Fuzzy DC Motor Speed Controller
- 86006-00_2-4
- The State of the Art in Chemical Process Control in Japan
- v80-229
- PID Fuzzy.pdf
- Sanuji Kalhan (MS12950478) - Control Engineering Assignment 2
- Home Assignment
- Multi-band power system stabilizer design by using CPCE algorithm for multi-machine power system
- Design of Fuzzy Pid Controller for Bldc
- Unimotor Technical Data
- Datasheet S21 En
- EEE4093_QFT
- Steady State Error in Control Systems
- A Control Model of Active Magnetic Bearings

You are on page 1of 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 Muzaﬀar 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 Diﬀerentiator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 Diﬀerentiator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 speciﬁcations

are then deﬁned and MATLAB PID autotuner is used to ﬁnd the gain values of the PID controller

corresponding to those speciﬁcations. Lastly, hardware implementation of a PID using operational

ampliﬁers is discussed along with the method to ﬁnd 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 eﬃciency, 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 ﬁelds 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 eﬃcient 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, diﬀerent 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 deﬁnes 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]. Diﬀerent 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 coeﬃcients; 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. Diﬀerent

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 ﬁgure 2.1 shows a DC motor attached to an inertial load. The

voltages applied to the armature and ﬁeld sides of the motor are represented by V

f

and V

a

respec-

tively. Similarly, R

f

, L

f

, R

a

and L

a

indicate the resistances and inductances of ﬁeld and armature

sides of the motor. The motor can either be ﬁeld controlled or armature controlled. In a ﬁeld

controlled motor, the armature current i

a

is held constant and the ﬁeld current i

f

is controlled

through the ﬁeld voltage V

f

. On the other hand, the ﬁeld current i

f

is constant in an armature

controlled motor and the armature current i

a

is controlled via the armature voltage V

a

.

Figure 2.1: DC Motor Equivalent Circuit

The air gap ﬂux φ of the motor is proportional to the ﬁeld current and can be written as:

φ = K

f

i

f

where K

f

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

3

product of armature current i

a

and air gap ﬂux as:

T = K

a

i

a

φ

T = K

a

i

a

K

f

i

f

and K

a

is also a constant. The DC servo system under examination is an armature control motor

for which armature current i

a

is variable, as mentioned earlier. The motor torque K is deﬁned as

the product of K

a

, K

f

and i

f

, therefore:

T = (K

a

K

f

i

f

)i

a

T = Ki

a

The speed of an armature controlled DC motor is controlled by the armature voltage v

a

which is

supplied by a power supply. The diﬀerential equation for the armature circuit as obtained from the

ﬁgure is:

v

a

= R

a

i

a

+L

a

di

a

dt

+v

b

where v

b

is the back emf voltage which is proportional to the angular velocity

dθ

dt

. Thus, with a

back emf constant K

b

, we have:

v

b

= K

b

dθ

dt

So, the armature circuit equation can be re-written as:

v

a

= R

a

i

a

+L

a

di

a

dt

+K

b

dθ

dt

(2.1)

The armature current produces the torque T which is applied to the inertia and friction following

the equation:

T = J

d

2

θ

dt

2

+B

dθ

dt

Ki

a

= J

d

2

θ

dt

2

+B

dθ

dt

(2.2)

To solve the diﬀerential 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:

V

a

(s) = (L

a

s +R

a

)I

a

(s) +K

b

sΘ(s)

KI

a

(s) = (Js

2

+Bs)Θ(s)

Now, considering Θ(s) as the output and V

a

(s) as the output, the transfer function, after simplifying

can be written as:

Θ(s)

V

a

(s)

=

K

s[L

a

Js

2

+ (L

a

B +R

a

J)s +R

a

B +KK

b

]

4

The armature inductanceL

a

is usually very small and can be easily neglected. Neglecting L

a

, the

transfer function can be reduced to:

Θ(s)

V

a

(s)

=

K

s[R

a

Js +R

a

B +KK

b

]

Θ(s)

V

a

(s)

=

K

m

s(T

m

s + 1)

(2.3)

where,

K

m

=

K

R

a

B +KK

b

= motor gain constant

T

m

=

R

a

J

R

a

B +KK

b

= motor time constant

We know that, angular velocity can be obtained by taking derivative of angular position, i.e.

w =

dθ

dt

or Ω(s) = sΘ(s)

The transfer function relating angular velocity and applied voltage can now be written as:

Ω(s)

V

a

(s)

=

K

m

T

m

s + 1

(2.4)

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:

G(s) =

K

m

s(T

m

s + 1)

(2.5)

The equation (2.5) gives the open loop response of a DC servo motor as shown in ﬁgure 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 aﬀect 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

conﬁguration 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 ﬁgure 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, G

c

(s)

shows the Laplace Transform of the controller i.e. PID and e represents the error signal which is

the diﬀerence between the output and the actual input of the system. V

a

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:

G(s) =

ω

2

n

s

2

+ 2ζω

n

+ω

2

n

(3.1)

The response of such a system, marked with the transient response speciﬁcations that are deﬁned

below, is shown in ﬁgure 3.2.

• Rise time(t

r

): Time required for the response to go from 10% to 90% of the ﬁnal value.

6

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

• Delay time(t

d

): Time required for the response to reach 50% of the ﬁnal value the very ﬁrst

time.

• Peak time(t

p

): The time required for the response to reach the ﬁrst overshoot.

• Maximum Overshoot(M

p

): The maximum peak value of the response curve measured from

the steady-state value.

• Settling time (t

s

): The time required for the response curve to settle within a certain per-

centage of the ﬁnal value.

• Steady-state error(e

ss

): Diﬀerence 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 V

a

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:

u(t) = K

p

e(t) +K

i

e(t) dt +K

d

de

dt

The transfer function of a PID controller is found by taking Laplace transform of the above equation:

G

c

(s) = K

p

+

K

i

s

+K

d

s

G

c

(s) =

K

d

s

2

+K

p

s +K

i

s

(3.2)

where K

p

, K

i

and K

d

are the controlling parameters of a PID controller deﬁned as:

K

p

= Proportional gain constant

K

i

= Integral gain constant

K

d

= 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 eﬀect of reducing the rise time and steady state error of the

system and depends only on the diﬀerence between the actual input and the sensor output which

is called error e. The proportional gain K

p

determines the ratio of the output response to the

error signal. In general, increasing the proportional gain K

p

increases the speed of the system but

the tendency towards oscillations also increases . However, if K

p

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 = K

p

e(t)

3.2.2 Integral Response

The integral component sums the error term e over time and gives the accumulated oﬀset 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:

I = K

i

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 K

d

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

d

, because the

8

derivative response is highly sensitive to noise in the sensor output signal. The derivative term is

given by:

D = K

d

de

dt

9

Chapter 4

Design, Simulation and Analysis

In this chapter, we will ﬁrst ﬁnd the parameters of our actual DC servo system to ﬁnd 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. R

a

, B, J, K

b

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 ﬁgure

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:

G(s) =

K

m

s(T

m

s + 1)

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

T(s) =

G(s)

1 +G(s)

Putting the value of G(s) and simplifying:

T(s) =

K

m

T

m

s

2

+s +K

m

(4.1)

Rearranging the above equation, we can write that:

T(s) =

Km

Tm

s

2

+

s

Tm

+

Km

Tm

(4.2)

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:

K

m

=

ω

n

2ζ

(4.3)

T

m

=

1

2ζω

n

(4.4)

10

Figure 4.1: Parameter Estimation via Response Curve

11

Now, looking at the response curve shown in ﬁgure 4.1, we can ﬁnd the peak overshoot by the

following relation:

M

p

=

θ(t) −θ(∞)

θ(∞)

M

p

=

4 −3.2

3.2

= 0.25

Equating this value of peak overshoot M

p

with e

−(ζ/

√

1−ζ

2

)π

:

0.25 = e

−(ζ/

√

1−ζ

2

)π

Solving for ζ:

ζ = 0.4037 (4.5)

Now, to ﬁnd natural frequency ω

n

, we use peak time t

p

which is given by:

t

p

=

π

ω

n

(1 −ζ

2

)

From the response plot 4.1, t

p

= 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 K

m

and T

m

:

K

m

= 7.332

T

m

= 0.2092

The open loop and closed loop transfer functions of the DC servo motor can be obtained by putting

the values of K

m

and T

m

in equation (2.5) and (4.2) respectively:

G(s) =

7.332

0.2092s

2

+s

(4.7)

T(s) =

35.04

s

2

+ 4.78s + 35.04

(4.8)

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 ﬁgure 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 ﬁgure 4.3:

Figure 4.3: Response Curve of Closed Loop System

We can see that the response obtained from Simulink as shown in ﬁgure 4.3 is exactly the

response of the original system as shown in ﬁgure 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 ﬁgure 4.4 below:

−5 −4 −3 −2 −1 0 1

−6

−4

−2

0

2

4

6

0.591

0.591

6.77

6.77

Root Locus of Uncontrolled DC Servo System

Real Axis (seconds

−1

)

I

m

a

g

i

n

a

r

y

A

x

i

s

(

s

e

c

o

n

d

s

−

1

)

Figure 4.4: Root locus of Uncontrolled DC Servo System

It is evident from the above ﬁgure that the points corresponding to the desired parameter values

do not fall on the root locus of the system. Therefore, the required speciﬁcations 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. Speciﬁcally, we need to determine the

parameters K

p

, K

i

and K

d

of our PID controller which are obtained using PID tuner block available

in MATLAB Simulink as shown in ﬁgure 4.5 below:

14

Figure 4.5: Simulink Model of PID Controller

The PID tuner allows you to set your desired system speciﬁcations 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 K

p

, K

i

and K

d

.

The following ﬁgure shows the tuning window. Note that the gain values for ζ ≤ 10% and t

s

≤ 1sec

are shown on the right side window:

Figure 4.6: PID Tuning

Therefore, our required gain values are:

K

p

= 1.2153 (4.9)

K

i

= 0.22636 (4.10)

K

d

= 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 G

c

(s). The controller transfer function can thus be written as:

G

c

(s) =

0.15033s

2

+ 1.2153s + 0.22636

s

(4.12)

The updated system now has the conﬁguration of ﬁgure 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

−25 −20 −15 −10 −5 0 5

−6

−4

−2

0

2

4

6

Root locus of Controlled System using PID

Real Axis (seconds

−1

)

I

m

a

g

i

n

a

r

y

A

x

i

s

(

s

e

c

o

n

d

s

−

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 ﬁgure 4.8 below:

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

0

0.2

0.4

0.6

0.8

1

1.2

1.4

Transient behavior Comparison

Time (seconds)

A

m

p

l

i

t

u

d

e

Uncontrolled System

Controlled System

Figure 4.8: Comparison of Transient Behaviors

16

It is evident from the above ﬁgure 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 speciﬁcations, we

can now translate these gain values into an electronic circuit using operational ampliﬁers, 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 ampliﬁers 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 ampliﬁer as shown in

ﬁgure 5.1 below.

Figure 5.1: Inverting Gain Op-Amp

The transfer function is given by:

G(s) = −

R

f

R

in

The proportional gain is given by the following relation of resistors:

K

p

=

R

f

R

in

Let R

in

= 10 kΩ and K

p

is 1.2153 as obtained in equation (4.9), then:

R

f

= 1.2153 ×10 kΩ

R

f

= 12.153 kΩ

18

5.2 Integrator

The circuit to implement the integrator part is shown in ﬁgure 5.2 below:

Figure 5.2: Op-Amp Integrator

The transfer function in this case is given by:

G(s) = −

1

sRC

In this case, the relation among K

i

, R and C is given by:

K

i

=

1

RC

Assuming, C = 100 µF and K

i

= 0.22636 (4.11), then:

R =

1

100 ×10

−6

×0.22636

R = 44.177 kΩ

5.3 Diﬀerentiator

The ﬁgure 5.3 shows the circuit to implement the derivative part of the PID:

Figure 5.3: Op-Amp Diﬀerentiator

The transfer function of a diﬀerentiator is given by:

G(s) = −sRC

19

In the case of a diﬀerentiator:

K

d

= RC

Again, assume that C = 100 µF and K

i

= 0.15033 (4.10), then:

R =

0.15033

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 ﬁgure 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 speciﬁcations”. First of all, the given system is identiﬁed by determining its variables

and speciﬁcations. Then, the system’s electrical and mathematical modeling is carried out to ﬁnd

its transfer function and establish its conﬁguration. After system deﬁnition 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 diﬀerence 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 L

a

. 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 eﬃciency 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

- PID21Uploaded byAnonymous 1A7olH
- Control of an Electronic Expansion Valve Using an Adaptive PID CoUploaded byCarlos Eduardo Castilla Alvarez
- 86599 Analyze Design in the Pid Tuner AppUploaded byRicael Spirandeli
- Fuzzy Pid BasicUploaded byhabbythomasa
- 86594 Tune Pid Controllers to Favor Reference Tracking or Disturbance RejectionUploaded byRicael Spirandeli
- 27.Ijaest Vol No 8 Issue No 2 Dc Motor Control Using Fuzzy Logic Controller 291 296Uploaded byvenkatv1986
- IRJET-A Review on Comparison of PI DC Motor Speed Controller and PI Fuzzy DC Motor Speed ControllerUploaded byIRJET Journal
- 86006-00_2-4Uploaded byHafiz Maulud
- The State of the Art in Chemical Process Control in JapanUploaded byDaniel Jaimes
- v80-229Uploaded bymecatro
- PID Fuzzy.pdfUploaded byAbdul Rahman Siddiqi
- Sanuji Kalhan (MS12950478) - Control Engineering Assignment 2Uploaded bysanuji2100
- Home AssignmentUploaded byTanya Singhal
- Multi-band power system stabilizer design by using CPCE algorithm for multi-machine power systemUploaded byhoussem_ben_aribia6240
- Design of Fuzzy Pid Controller for BldcUploaded bynassim
- Unimotor Technical DataUploaded byLuciano Cardoso Vasconcelos
- Datasheet S21 EnUploaded byfoma
- EEE4093_QFTUploaded byJames Gillard
- Steady State Error in Control SystemsUploaded byabiyotaderie
- A Control Model of Active Magnetic BearingsUploaded byFelipe Carvalho
- 9032002606c.pdfUploaded byAngel Rangel
- Sap Bods TutorialUploaded byPavan Sandeep V V
- Smith PredictorUploaded byvcharles
- Problem SetUploaded byMiguelaTay

- 550172c (MX-ing)Uploaded byRicardo Gamez Ortega
- ABB ACS550 Drives CatalogueUploaded byAnonymous hXUhpe7S
- Improvement of a Radon Counter Sensitivity Using High-Voltage Ion ChamberUploaded byEditor IJTSRD
- Chopper Tutorial.pdfUploaded byAnwesh Kumar Mishra
- Pe Lab Viva QuestionsUploaded bysujithmrinal
- 12-24V_Solar_Charge_Cont-web.pdfUploaded byttnaing
- Si3402Uploaded bydirk13
- Starvert IP5A Variable Frequency Drive Catalog c 18Uploaded byابو احمد السماوي
- Closed-Loop Control of Virtual FPGA-Coded Permanent MagnetUploaded bychethan
- AC901_SERVICEGUIDEUploaded bylazaro88700
- DC DC ConverterUploaded byckean_ng
- Variable Frequency DriveUploaded byAaron Palomino Ramirez
- Robot project jaseungUploaded byEthan Hunt
- Design and analysis of high frequency switched full-bridge dc-dc converter for ups in telecommunication applicationsUploaded byseventhsensegroup
- LG L226WA Service ManualUploaded bytristanleboss2
- Electronic Modular Control Panel II + Paralleling _ EMCP II + P _ Systems Operation _ Troubleshooting _ Testing and Adjusting _ CATERPILLARUploaded bypevare
- Push Pull DC AC InvertersUploaded bykarmveerhada
- parametros 785.pdfUploaded byadrian
- 975Uploaded byHuzaifa Saifee
- PWM BASED SPEED CONTROL OF DC MOTOR.Uploaded byAlexander Rox Dyne
- 1267Uploaded bynamchamtrang
- PWMUploaded byJonathan Tee Wei Hsien
- Advanced Motion Controls Dpralte-020b080Uploaded byElectromate
- A Control Method for SVPWM-based STATCOMUploaded byJothsna Praveena
- Newbie's Guide to AVR TimersUploaded byNitish Kumar
- 1569736195Uploaded bySudhanshu Ranjan
- A9RC397-GAMESA G90Uploaded byatguintu
- emlihUploaded bykokikokikou
- 13 KW S Band GaN Power Amplifier1Uploaded bymalirezazadeh5549
- 05754571Uploaded bydebasishmee5808