You are on page 1of 17

SCHOOL OF MANUFACTURING ENGINEERING

MINI PROJECT PID Tuning Simulation Study GROUP MFG

SUBJECT CODE EPT361 MATRIX NO.


141050832
1. NURSYUHADA BT ABDULLAH
NAME
141050819
2. NORFARAHIN BT JAUHARI

141050817
3. NOR KAMILAH BT OTHMAN

141050816
4. NOR IZZATI BT IBRAHIMI HUSAIMI

141050768
5. FATIN SYAFIQAH BT MOHD AZMI

DATE 2/6/2017 SESSION/SEMESTER 2 2016/17

LECTURER/PLV 1. DR. SAZLI SAAD

LAB USE
MARKS

INTRODUCTION

RESULT&
DISCUSSION
CONCLUSION

FORMAT

TOTAL
ABSTRACT

In this paper a second order system is selected for study. The project focused on
speed control of DC motor. Plant to be controlled is a DC motor, the speed/velocity of DC
motor of which must adjust itself in accordance with the reference or command. PID
controllers are by and large generally utilized as a part of the industry because of their all-
around grounded established, effortlessness, support prerequisites, and simplicity of
returning to the web. In the previous four decades, there are various papers managing,
tuning of PID controller. Designing a PID controller to meet phase margin and gain margin
detail is a surely understood configuration procedure. If the phase and gain are not
determined deliberately, then the outline may not be ideal as we could be the large phase
margin that could give better execution. There are several methods for tuning a PID
controller. This paper takes a qualitative look at PID controller parameter(k p and k1 and kd )
using Process Reaction Curve and Ultimate Cycle Tuning Method Ziegler Nichols Method for
Tuning the PID controller. Results of simulation indicate the validity of the study. All
simulations have been done in SIMULINK software of MATLAB.

KEYWORD

Tuning algorithm, PID controller, MATLAB, Ziegler-Nichols method, guess and check
method, and Ultimate Cycle Tuning Method.

INTRODUCTION
A proportional-integral-derivative (PID controller) controller is one of the widely used
controllers in industries for controlling feedback systems. However, present some challenges
to control and instrumentation engineers in the aspect of tuning of the gains required for
stability and good transient performance. There are several prescriptive rules used in PID
tuning. An example is that proposed by Ziegler and Nichols in the 1940's .The parallel form
of a PID controller has transfer function:
U ( s) k
C( s )= =k p + i + k d s
E( s ) s
where:
Kp := Proportional Gain
Ki := Integral Gain
Kd :=Derivative gain
Ti := Reset Time =Kp/Ki
Td := Rate time or derivative time
PID controllers are sold in large quantities and are often the solution of choice when
a controller is needed to close the loop. The reason PID controllers are so popular is that
using PID gives the designer a larger number of options and those options mean that there
are more possibilities for changing the dynamics of the system in a way that helps the
designer. Moreover, other than producing the control activity, the same computerized PC can
be utilized for various different applications. PID controller measure an error value also
called actuating signal which is the difference between a measured the output value and a
desired value.

The fundamental structure of a PID control system is shown in Figure 1. Once the set
point has been changed, the error will be computed between the set point and the actual
output. The error signal, E(s),is used to generate the proportional, integral, and derivative
actions, with the resulting signals weighted and summed to form the control signal,
U(s),applied to the plant model. The new output signal will be obtained. This new actual
signal will be sent to the controller, and again the error signal will be computed. New control
signal, U(s),will be sent to the plant. This process will run continuously until steady-state.

Figure 1: PID control structure

MATHEMATIC MODEL OF THE SYSTEM

Numerical is used to solve some of following issues in PID controller. By using the numerical
method the mathematical model of PID controller has been develop to solve the certain
issues. The most problem detected is by auto tuning of PID controller hence the solution is
by numerical technique. The important equations are
By the derivation from PID equation, we get

This shown from software implementation mathematical model of PID controller equation

Proportional Constant is,

Integral Constant & derivative constant can be determined by

The equation will be represented as follow in discrete form,


The Proportional constant is:

PID CONTROL THEORY AND TUNING ALGORITHM


A proportional-integral-derivative controller (PID controller) is a generic control loop
feedback mechanism (controller) widely used in industrial control systems-a PID is the most
commonly used feedback controller. A PID controller calculates an "error" value as the
difference between a measured process variable and a desired set point. The controller
attempts to minimize the error by adjusting the process control inputs.

The PID controller calculation (algorithm) involves three separate constant


parameters, and is accordingly sometimes called three-term control: the proportional, the
integral and derivative values, denoted P, I, and D. Heuristically, these values can be
interpreted in terms of time: P depends on the present error, I on the accumulation of past
errors, and D is a prediction of future errors, based on current rate of change. The weighted
sum of these three actions is used to adjust the process via a control element such as the
position of a control valve or the power supply of a heating element.

In the absence of knowledge of the underlying process, a PID controller is the best
controller. By tuning the three parameters in the PID controller algorithm, the controller can
provide control action designed for specific process requirements. The response of the
controller can be described in terms of the responsiveness of the controller to an error, the
degree to which the controller overshoots the set point and the degree of system oscillation.
Note that the use of the PID algorithm for control does not guarantee optimal control of the
system or system stability.

Some applications may require using only one or two actions to provide the
appropriate system control. This is achieved by setting the other parameters to zero. A PID
controller will be called a PI, PD, P or I controller in the absence of the respective control
actions. PI controllers are fairly common, since derivative action is sensitive to measurement
noise, whereas the absence of an integral term may prevent the system from reaching its
target value due to the control action.

Figure 4: Block diagram of a basic PID control algorithm

The process of setting the optimal gains for P, I and D to get an ideal response from
a control system is called tuning. There are different methods of tuning of which the guess
and check method and the Ziegler Nichols method will be discussed.

The gains of a PID controller can be obtained by trial and error method. Once an
engineer understands the significance of each gain parameter, this method becomes
relatively easy. In this method, the I and D terms are set to zero first and the proportional
gain is increased until the output of the loop oscillates. As one increases the proportional
gain, the system becomes faster, but care must be taken not make the system unstable.
Once P has been set to obtain a desired fast response, the integral term is increased to stop
the oscillations. The integral term reduces the steady state error, but increases overshoot.
Some amount of overshoot is always necessary for a fast system so that it could respond to
changes immediately. The integral term is tweaked to achieve a minimal steady state error.
Once the P and I have been set to get the desired fast control system with minimal steady
state error, the derivative term is increased until the loop is acceptably quick to its set point.
Increasing derivative term decreases overshoot and yields higher gain with stability but
would cause the system to be highly sensitive to noise. Often times, engineers need to trade
off one characteristic of a control system for another to better meet their requirements.

The Ziegler-Nichols method is another popular method of tuning a PID controller. It is


very similar to the trial and error method wherein I and D are set to zero and P is increased
until the loop starts to oscillate. Once oscillation starts, the critical gain Kc and the period of
oscillations Pc are noted. The P, I and D are then adjusted as per the tabular column shown
below.

Control P Ti Td
P 0.5Kc - -
PI 0.45Kc Pc/1.2 -
PID 0.6Kc 0.5Pc Pc/8

RESULT & DISCUSSION


a. Open-loop system transient response.

Motor 1

Rise time 0.5995


Settling time 1.0684
Settling min 0.0341
Settling max 0.0361
Overshoot 0
Undershoot 0
Peak 0.0361
Peak time 8.8084

Motor 2
Rise time 6.3071
Settling time 9.1349
Settling min 0.2636
Settling max 0.2908
Overshoot 0
Undershoot 0
Peak 0.2908
Peak time 10
Motor 3

Rise time 0.7335


Settling time 3.8257
Settling min 0.8894
Settling max 1.1633
Overshoot 19.3712
Undershoot 0
Peak 1.1633
Peak time 1.5569

From the matlab Simulink, we get the value of rise time, settling time, overshoot,
undershoot, peak, and peak time for three different motor. For motor 1, the values are
0.5995s, 1.0684s, 0s, 0s, 0.0361s, and 8.8084s respectively. Next, the values for motor 2
are 6.3071s, 9.1349s, 0s, 0s, 0.2908s and 10s. After that, the values for motor 3 are
0.7335s, 3.8257s, 19.3712s, 0s, 1,1633s, and 1.5569s. By comparing the result of all the
three motor, there is slightly difference in each value. As we can see, for the rise time the
highest one is motor 2 with value 6.3071s while the lowest one is motor 1 with value of
0.5995s. Next, for the settling time the highest one is motor 2 with value 9.1349s while the
lowest one is motor 1 with value of 1.0684s. After that for the overshoot, the highest one is
motor 3 with value 19.3712s and for motor 1 and 2 are 0s. For undershoot, all the values is
0. Besides that, the highest peak value is from motor 3 with value 1.1633s while the lowest
one is 0.0361s from motor 1. Lastly, the peak time for motor 2 is the highest with the value
10s while the lowest one is 1.5569s.

From the graph, for motor 1 we can say that the graph shown a critically damped step
response so it means the damping frequency of the system is equal to 1. Next, for motor 2 is
overdamped step response because the damping frequency is greater than 1. Lastly, motor
3 is underdamped step response because the damping frequency is between 0 to 1.
b. Root locus analysis.

Motor 1

From the graph of the root locus above, the first gain which is K value is 0 while the
second gain is 1.68 and the third gain is 8.51.Then,for the value of pole, the first value is
-9.74,the second value is -4.77 and the third value is -7-2.29i.Next,for the value of damping,
the first and second value is 1 while the third value is 0.95.Next,for the value of overshoot,
the first and second value is 0 while the third value is 0.0069.Next,for the value of frequency,
the first value is 9.74,the second value is 4.77 and the third value is 7.37.So,as we can see
there is slightly different in each value of gain, pole, damping, overshoot and frequency.
Motor 2

From the graph of the root locus above, the first gain which is K value is 0 while the
second gain is 2.22 and the third gain is 20.6.Then,for the value of pole, the first value is
-3.89,the second value is -0.492 and the third value is -2.08-1.9i.Next,for the value of
damping, the first and second value is 1 while the third value is 0.74.Next,for the value of
overshoot, the first and second value is 0 while the third value is 3.17.Next,for the value of
frequency, the first value is 3.89,the second value is 0.492 and the third value is 2.82.So,as
we can see there is slightly different in each value of gain, pole, damping, overshoot and
frequency.
Motor 3

From the graph of the root locus above, the first gain which is K value is 15.2 while the
second gain is 6.95.Then,for the value of pole, the first value is -1+8.58i and the second
value is -1-5.98i .Next, for the value of damping, the first is 0.116 and second value is
0.165.Next,for the value of overshoot, the first is 69.3 and second value is 59.1.Next,for the
value of frequency, the first value is 8.63 and the second value is 6.06.So,as we can see
there is slightly different in each value of gain, pole, damping, overshoot and frequency.
d. Closed loop system using PID Controller and controller Turning.

MOTOR 1

From the PID Tuner above, based on the controller parameter table, after tuning the
Kp value is 1.8163, the Ki value is 1.2958,the Kd value is 0.2852 and the Kn value is
2.8857.Then,based on the performance and robustness table, the rise time is 1.25s,settling
time is 4.18s,overshoot is 9.15% and peak value is 1.09.Lastly,as we can see the closed
loop stability is stable.
MOTOR 2

From the PID Tuner above, based on the controller parameter table, after tuning the
Kp value is 0.015228, the Ki value is 0.0033784, the Kd value is -0.01325 and the Kn value is
0.43109.Then,based on the performance and robustness table, the rise time is 4.47,settling
time is 14.7,overshoot is 8.57% and peak value is 1.09.Lastly,as we can see the closed loop
stability is stable.
MOTOR 3

From the PID Tuner above, based on the controller parameter table, after tuning the
Kp value is 0.0042724, the Ki value is 2.1723e-05, the Kd value is -0.29491 and the Kn value is
0.014487.Then,based on the performance and robustness table, the rise time is
251s,settling time is 890s,overshoot is 6.96% and peak value is 1.07.Lastly,as we can see
the closed loop stability is stable.
CONCLUSION

In conclusion, we can analyse and determine the PID controller parameter (k p ,ki and
kd ) using process reaction curve and ultimate cycle turning method for turning the PID
controller. A proportional controller (kp ) will effect the reducing the rise time by reduce but
never eliminate the steady state error. A derivative controlled (k d ) will have the effect of
increasing the stability of the system reducing the overshoot and improving the transient
response. An integral control (ki ) will have the effect eliminating the steady state error for a
constant step input. It makes the transient response slower. PID control and its variation
used in the industry, also PID Controller has the optimum control dynamic including zero
steady state error, fast response (short rise time),no oscillation and higher stability.

REFERENCES

1.http://physics.wm.edu/~evmik/classes/Physics_252_Analog_Electronics/lab_manuals/Lab
Manual_Chpt11.pdf

2. https://www.electrical4u.com/transient-state-and-steady-state-response-of-control-system/

3. http://ieeexplore.ieee.org/document/7831677/

4. http://article.sapub.org/10.5923.j.ajis.20120205.04.html

You might also like