0% found this document useful (0 votes)
41 views

Design and Implementation of PID Controller in Pro

This document summarizes a research paper that designed and implemented a PID controller in a programmable logic controller for position control of a DC motor in a conveyor system. The researchers first developed classical and PID controllers in simulation software then implemented them in a PLC. They compared the performance of the two controllers and found the PID controller provided better control of the DC motor position with minimal overshoot and error. The PID controller was able to maintain the output at the setpoint level faster and with less difference between the process variable and setpoint.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Design and Implementation of PID Controller in Pro

This document summarizes a research paper that designed and implemented a PID controller in a programmable logic controller for position control of a DC motor in a conveyor system. The researchers first developed classical and PID controllers in simulation software then implemented them in a PLC. They compared the performance of the two controllers and found the PID controller provided better control of the DC motor position with minimal overshoot and error. The PID controller was able to maintain the output at the setpoint level faster and with less difference between the process variable and setpoint.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/237698465

Design and Implementation of PID Controller in Programmable Logic


Controller for DC Motor Position Control of the Conveyor System

Article · January 2007

CITATIONS READS

2 5,314

4 authors, including:

Muhammad Sharfi Najib Mo Sha


Universiti Malaysia Pahang Universiti Malaysia Pahang
47 PUBLICATIONS   275 CITATIONS    47 PUBLICATIONS   798 CITATIONS   

SEE PROFILE SEE PROFILE

Raja Mohd Taufika Raja Ismail


Universiti Malaysia Pahang
92 PUBLICATIONS   883 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Development of Brain and Voice Signature for building or laboratory entrance View project

Modeling and Control of Photovoltaic Distributed Generation Integration in grid system View project

All content following this page was uploaded by Muhammad Sharfi Najib on 03 October 2014.

The user has requested enhancement of the downloaded file.


Proceedings of the 3rd WSEAS/IASME International Conference on Dynamical Systems and Control, Arcachon, France, October 13-15, 2007 266

Design and Implementation of PID Controller in Programmable Logic


Controller for DC Motor Position Control of the Conveyor System
MUHAMMAD SHARFI NAJIB, MOHD SHAWAL JADIN, RAJA M. TAUFIKA RAJA ISMAIL,
MOHD RUSLLIM MOHAMED
Faculty of Electrical & Electronics Engineering,
Universiti Malaysia Pahang,
Karung Berkunci 12, 25000 Kuantan, Pahang,
MALAYSIA
E-mail: [email protected]

Abstract: - Direct Current (DC) motor position control using Programmable Logic Controller (PLC)
is one of the applications which are widely used in automation industries. The aim of this project is
to implement a Proportional Integral Derivative (PID) controller in a DC motor control system of
The Conveyor System. The project is consists of two stages, classical controller and PID controller.
The classical controller and PID controller were implemented in PLC and the results of both methods
were compared. The system response of both controllers were compared and analyzed. Throughout
the analysis, the PID control system illustrated better performance as compared to the classical
control system controller in DC motor position control.

Key-Words: - PID controller, conveyor system, PLC, DC Motor, automation, position control

1 Introduction benefits to the industry [3]. Many nonlinear


Any controller design for any system commonly processes can be controlled using the well-known
needs some knowledge about the system before it and industrially proven PID controller [4]. A
will be developed. This involves a mathematical considerable direct performance increase
description of the relation among inputs to the (financial gain) is demanded when replacing a
process, its variables and its output, that is called conventional control system with an advanced one
the model of the system. The model can be [4]. The maintenance costs of an inadequate
represented as a set of transfer functions, which is conventional control solution may be less obvious.
usually called mathematical modeling. Modeling The tricky part of controller design is to figure out
for the complex systems can be a very difficult just how much of a corrective effort the controller
task. For example, in a complex system such as a should apply to the process in each case. Some
multiple inputs and multiple outputs system, the situation requires tighter control of the process
inaccurate models will cause the systems is variable than On-Off control can provide.
unstable or has a bad system performance. Proportional control provides better control
because its output operate linearly anywhere
Proportional Integral Derivative (PID) controllers between fully on and fully off [5]. As its name
are widely used in industrial practice over 60 implies, its output changes proportionally to the
years ago. The invention of PID control is in 1910 input error signal. Proportional controller simply
(largely owing to Elmer Sperry’s ship autopilot) multiplies the error by a constant to compute its
and the straightforward Ziegler-Nichols (Z-N) next output. In 1930s the control engineers
tuning rule in 1942 [1]. Today, PID is used in discovered that the error could be eliminated
more than 90% of practical control systems, altogether by automatically resetting the set point
ranging from consumer electronics such as to an artificially high value [3][6]. The PID
cameras to industrial processes such as chemical controllers function is to maintain the output at a
processes. The PID controller helps get our output level that there is no difference (error) between the
(velocity, temperature, position) where we want it, process variable and the setpoint in as fast
in a short time, with minimal overshoot, and with response as possible
little error [2]. It also the most adopted controllers
in the industry due to the good cost and given The PID controller based on an input-output
Proceedings of the 3rd WSEAS/IASME International Conference on Dynamical Systems and Control, Arcachon, France, October 13-15, 2007 267

inversion procedure which is allow to determine a 3.1 Research Methodology


closed form expression of the command signal to
be applied to the closed loop system. To obtain the
best possible PID control for a particular START

application, the gain setting for each mode must LITERATURE REVIEW
initially be made. These setting are different for
each system. While the system is actually running, MATLAB SIMULATION

tuning the adjustment are often be made to the


HARDWARE CONFIGURATION AND
gain setting to attain optimal performance. Gain INTERFACING
adjustments can be performed by trial and error or
automatically by auto tune controller [7]. PLC PROGRAMMING

TESTING
NO
Although the general PID concepts and the effects
of adjusting the K p , K i and K d constants are the YES
EXPERIMENTATION
same, when using a programmable logic controller
to perform a PID control function, there are some DATA ANALYSIS
minor differences in the way PID is adjusted. The
PID control unit of a PLC performs all the REPORT WRITING

necessary PID calculation on the iterative basis


END
[8]. The PID calculation are not done
continuously, but are triggered by a timing
Figure 1: Research Methodology
function.

3.2 Block Diagram of Conveyor System

2 Problem Formulation
DC Motor are easily damage without contribution PLC Classical DC Motor
of control methodology in it system. Frequently, Hardware On-off
the desired performance characteristics of control Controller
systems are specified in terms of the transient
response. The transient response of a practical PLC System
control system usually exhibits damped oscillation
before reaching steady state. As for DC motor,
having a high overshoot is an undesired condition
since the starting current is very high. The Figure 2: Implementation of On-off controller in PLC
position of single phase DC Motor of a conveyor System
system has been controlled by using PID
controller. The position control of DC motor is
very difficult when it is done by using traditional PLC PID DC Motor
control techniques, as it requires a very complex Hardware Controller
mathematical model. By using PID controller, we
can eliminate the need for the mathematical
modeling and allows easy realization as a solution. PLC System
Implementation of PID into PLC offers the easier
way to troubleshoot a system as compared to the
system using microprocessor, microcontroller or
other controllers. With this advantage, the men in Figure 3: Implementation of On-off controller in PLC
charge do not have to troubleshoot the system System
from a scratch when there is system problems
happen.

3 Problem Solution 3.2.1 PID Controller Equation


Proceedings of the 3rd WSEAS/IASME International Conference on Dynamical Systems and Control, Arcachon, France, October 13-15, 2007 268

The output of the system, u (t ) is the sum of three Implementations of Classical Controller and PID
correcting terms, i.e. controller in PLC are the same in hardware
configuration and installation but different in
u (t ) = Pout + I out + Dout software part using ladder programming.
Instructions sets used in Classical Controller is
too complex and very lengthy to program as
where Pout , I out and Dout are the contributions to the compared to PID controller. The advantages of
output from the PID controller from each of the three implementing of PID controller requires no
terms, which defined as complex instruction set for programming and
having simpler calculation and algorithm as
Pout = K p e(t ) compared to Classical Controller. In hardware
t configuration of the PLC system, the physical
I out = K i ∫ e(t )dt and connection of the motor with the solid state relay
0 is shown in Figure 4. A pulse I/O board is used to
de(t ) generate PWM output to the solid state relay to
Dout = K d ;
meet high speed processing operation.
dt

where:
t = Time of the PLC clock
u (t ) = Output
e(t ) = Error = Setpoint – Process variable
K p = Proportional Controller Mode Gain
K i = Integral Controller Mode Gain
K d = Derivative Controller Mode Gain

Here, Pout acts as the accelerator, which accelerates the


target position. Besides, I out and Figure 4: Physical Connection of the Hardware
Dout are terms which
reducing error to minimal error position (zero-error-
position) and reducing oscillation due to load variation 3.4 Hardware Connection
respectively.
In automation industries, a DC motor was
For convenience, and K d are expressed in term of K p , considered to be a variable speed motor and an
i.e. K i = K p / Ti and K d = K p Td where Ti is the integral AC motor was considered as a constant speed
motor. Although the future trend is towards the
time of the controller and Td is the rate time. AC drives, DC drives are currently used in many
industries because of the torque speed
Hence, the mathematical representation of the system is characteristics of DC motor that can be varied
over a wide range while retaining high efficiency
Kp t
de(t ) compared to AC motors. In robotic and
u (t ) = K p e(t ) +
Ti ∫ e(t )dt + K T
p d
dt
actuations applications, a wide variety of speed
0 or position control is required. While, in many
manipulators, DC motor are used to follow a
or in the s-domain representation predetermined speed or position track under
variable loads.
U (s) ⎛ 1 ⎞
= K p ⎜⎜1 + Td s + ⎟
E(S ) ⎝ Ti s ⎟⎠
In Figure 4 the system configuration of the motor
position controller using either the PID control
input is shown. There PLC analogue card is
inserted into the PLC system so that the analog
3.3 Hardware Configuration interface can be connected to the DC motor. This
system consist of analog interface, is an
Proceedings of the 3rd WSEAS/IASME International Conference on Dynamical Systems and Control, Arcachon, France, October 13-15, 2007 269

interfacing which converts the encoder data into would be unstable.


PID control inputs. Based on the encoder
reading, the PID will control the motor position
plant and sending compensated voltage output
that control the DC motor position. The PID
controller

3.5 Results

In Table 1, it is shown that the implementation of


programmable logic PLC with PID controller
will produce a better control system performance
of a DC Motor position with less error as Figure 5: Response in MATLAB Proportional
compared to On-off classical Controller. It shows mode
that complex calculation of classical controller
algorithm does require improvement of
mathematical modeling PID only needs human 3.5.2 PI-Controller Mode
experience from decision making method.
In Figure 6, it shows that when the P
Table 1: Comparison of Position Error (Proportional) and I (Integral) gain is applied in
the PLC. To eliminate the offset error, the
Percentage controller needs to change its output until the
Type of Position Error process variable error is zero. Integral action
gives the controller a large gain at low
Controller Percentage (%) frequencies that results in eliminating offset and
On-off Controller 5.45 "beating down" load disturbances. It also can
reduce the final error in a system. Summing
PID controller 3.25 even a small error over time produces a drive
signal large enough to move the system toward
a smaller error. In this system, the gain for
Integral is 20. In this graph we can see that the
3.5.1 P-Controller Mode steady state error still occur but it is now at the
set point input which is 3. However the
In Figure 5 shows the step response if only the P overshoot became greater than before which is
(Proportional) controller is applied in the PLC in at 4.3. The rise time is also faster than just
Figure 3.3. A proportional controller allows using the proportional controller.
tighter control of the process variable because its
output can take any value between fully on and
fully off, depending on the magnitude of the error
signal. With proportional band, the controller
output is proportional to the error or a change in
measurement and offset (deviation from set-
point) is present. This steady state error is the
difference between the attained value of the
controller and the required value. In this PLC, the
gain for P is 110 and the set point is 3. As we can
see, there is overshoot at 3.8 and it over the target
value which is 3. In the end the system doesn't
settle out any quicker than it would have with Figure 6: Response in MATLAB
lower gain, but there is more overshoot. If we Proportional+Integral mode
kept increasing the gain we would eventually 3.5.3 PID-Controller Mode
reach a point where the system just oscillated In Figure 7 show the step response if the entire
around the target and never settled out-the system element in PID controller is applied in the
Proceedings of the 3rd WSEAS/IASME International Conference on Dynamical Systems and Control, Arcachon, France, October 13-15, 2007 270

system. As the proportional gain is increased, Delmar, 2002


the controller responds faster. If the proportional [4] S. Gerks¡ic¡ et al. / Control Engineering Practice 14
gain is too high, the controller may become (2006) 935–948, Advanced Control Algorithms
unstable and oscillate. The integral gain acts as a Embedded in a Programmable Logic Controller, 22 July
stabilizer. It provides power even if the error is 2005.
zero. The Derivative controller counteracts the [5] Paul H. Lewis and Chang Yang (1997). Basic
KP and KI terms when the output changes Control Systems Engineering: Prentice Hall
quickly. This helps reduce overshoot and ringing [6] Carl Knopse, Guest Editor, PID Control, IEEE
and it has no effect on final error. In this PLC, Control System Magazine, February
the gain for Proportional is 100, Integral is 20 2006
and the gain for Derivative is 15. The step [7] Carl Knopse, Guest Editor, PID Control,
response for this system became smooth and the IEEE Control System Magazine, February2006
response is better than if we use P, PI, and PD. [8] John R. Hackworth and Frederick D.
There is no overshoot; the rise time is faster and Hackworth, Jr. Programmable Logic Controllers,
less error. The settling time is exactly at the set Programming Methods and applications,
point which is 3. Pearson Prentice Hall, 2004.

Figure 7: Response in MATLAB


Proportional+Derivative+Integal Mode

4 Conclusion

The design and implementation of PID based on PLC


has been presented in this project. The development of
the PID was done after series detail study of PID
theories and OMRON CQM1H PLC manual. Through
the study of this project, it has proved that PID can be
implemented into PLC with certain optimization, with
the proper hardware installations and knowledge about
PLC programming.
.

References:
[1] J. Swder,G.Wszoek,W.Carvalho, Programmable
controller design forElectro-pneumatic Systems, Journal
of Material Processing Technology 164- 1655(2005)
14659-1465
[3] Aurelio Piazzi and Antonio Visioli, A Noncausal
Approach for PID control, Journalof Process Control, 4
March 2006.
[2] Terry Bartelt, Industrial Control Electronics:
Devices, Systems and Applications, Second Edition,

View publication stats

You might also like