Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
11 views

Design and Implementation of PID Control

The document discusses implementing a PID controller in a programmable logic controller to control the position of a DC motor for a conveyor system. It provides background on PID controllers and why they are commonly used in industrial applications. The paper then describes the methodology used to design and test the PID controller in the PLC for the conveyor system's DC motor.

Uploaded by

muhammad shahbaz
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Design and Implementation of PID Control

The document discusses implementing a PID controller in a programmable logic controller to control the position of a DC motor for a conveyor system. It provides background on PID controllers and why they are commonly used in industrial applications. The paper then describes the methodology used to design and test the PID controller in the PLC for the conveyor system's DC motor.

Uploaded by

muhammad shahbaz
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

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: sharfi@ump.edu.my

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

artificially high value [3][6]. The PID controllers solution. Implementation of PID into PLC offers
function is to maintain the output at a level that the easier way to troubleshoot a system as
there is no difference (error) between the process compared to the system using microprocessor,
variable and the setpoint in as fast microcontroller or other controllers. With this
response as possible advantage, the men in charge do not have to
troubleshoot the system from a scratch when
The PID controller based on an input-output there is system problems happen.
inversion procedure which is allow to determine
a closed form expression of the command signal
to be applied to the closed loop system. To
3 Problem Solution
obtain the best possible PID control for a
particular application, the gain setting for each 3.1 Research Methodology
mode must initially be made. These setting are
different for each system. While the system is START
actually running, tuning the adjustment are often
be made to the gain setting to attain optimal LITERATURE REVIEW

performance. Gain adjustments can be performed MATLAB SIMULATION


by trial and error or automatically by auto tune
controller [7]. HARDWARE CONFIGURATION AND
INTERFACING

Although the general PID concepts and the PLC PROGRAMMING

effects of adjusting the Kp , Ki and Kd constants


NO
are the same, when using a programmable logic TESTING

controller to perform a PID control function, YES


there are some minor differences in the way PID EXPERIMENTATION

is adjusted. The PID control unit of a PLC


DATA ANALYSIS
performs all the necessary PID calculation on the
iterative basis [8]. The PID calculation are not REPORT WRITING
done continuously, but are triggered by a timing
function. END

Figure 1: Research Methodology

2 Problem Formulation 3.2 Block Diagram of Conveyor


DC Motor are easily damage without
contribution of control methodology in it system. System
Frequently, the desired performance
characteristics of control systems are specified in
terms of the transient response. The transient DC Motor
response of a practical control system usually Classical
exhibits damped oscillation before reaching On-off
Hardware
steady state. As for DC motor, having a high Controller
overshoot is an undesired condition since the
starting current is very high. The position of PLC System
single phase DC Motor of a conveyor system has
been controlled by using PID controller. The
position control of DC motor is very difficult
when it is done by using traditional control Figure 2: Implementation of On-off controller in
techniques, as it requires a very complex PLC
mathematical model. By using PID controller, System
we can eliminate the need for the mathematical
modeling and allows easy realization as a
Proceedings of the 3rd WSEAS/IASME International Conference on Dynamical Systems and Control, Arcachon, France, October 13-15, 2007 268

Kd = Derivative Controller Mode Gain


DC Motor
PLC PID Here, Pout acts as the accelerator, which
Controller
Hardware accelerates the target position. Besides, Iout and
Dout are terms which reducing error to minimal
error position (zero-errorposition) and reducing
PLC System oscillation due to load variation respectively.

For convenience, and Kd are expressed in term of

Figure 3: Implementation of On-off controller K p , i.e. Ki = K p /Ti and K d = K pTd where Ti is the
in PLC
integral time of the controller and Td is the rate
System
time.

Hence, the mathematical representation of the


system is
3.2.1 PID Controller Equation

The output of the system, u t( ) is the sum of u t( ) = K pe t( )+ K p ∫t e t( )dt + K pTd


three correcting terms, i.e. de( )t
Ti 0 dt
u t( ) = Pout + Iout + Dout
or in the s-domain representation
I D
where Pout , out and out are the contributions to
the output from the PID controller from each of
the three terms, which defined as UE( )( )Ss = K p ⎛⎜⎜⎝1+T sd + T s1i ⎞⎟⎟⎠

Pout = K pe t( )
t

Iout = K e t dt( ) and 3.3 Hardware Configuration


Dout = Kd Implementations of Classical Controller
and PID controller in PLC are the same in
de hardware configuration and installation
( ) but different in software part using ladder
t ; programming.
dt Instructions sets used in Classical
Controller is too complex and very
where: lengthy to program as compared to PID
t = Time of the PLC clock controller. The advantages of
u t( ) = Output implementing of PID controller requires
e t( ) = Error = Setpoint – Process no complex instruction set for
programming and having simpler
variable K p = Proportional
calculation and algorithm as compared to
Controller Mode Gain Classical Controller. In hardware
Ki = Integral Controller Mode Gain configuration of the PLC system, the
physical connection of the motor with the
Proceedings of the 3rd WSEAS/IASME International Conference on Dynamical Systems and Control, Arcachon, France, October 13-15, 2007 269

solid state relay is shown in Figure 4. A


pulse I/O board is used to generate PWM
output to the solid state relay to 3.5 Results
meet high speed processing operation.
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
compared to On-off classical Controller. It shows
that complex calculation of classical controller
algorithm does require improvement of
mathematical modeling PID only needs human
experience from decision making method.

Table 1: Comparison of Position Error


Figure 4: Physical Connection of the Hardware Percentage
Type of Position Error
3.4 Hardware Connection Controller Percentage (%)

In automation industries, a DC motor was On-off Controller 5.45


considered to be a variable speed motor
PID controller 3.25
and an AC motor was considered as a
constant speed motor. Although the future
trend is towards the AC drives, DC drives
are currently used in many industries 3.5.1 P-Controller Mode
because of the torque speed
characteristics of DC motor that can be In Figure 5 shows the step response if only the P
varied over a wide range while retaining (Proportional) controller is applied in the PLC in
high efficiency compared to AC motors. Figure 3.3. A proportional controller allows
In robotic and actuations applications, a tighter control of the process variable because its
wide variety of speed or position control output can take any value between fully on and
is required. While, in many manipulators, fully off, depending on the magnitude of the
DC motor are used to follow a error signal. With proportional band, the
predetermined speed or position track controller output is proportional to the error or a
under variable loads. change in measurement and offset (deviation
from setpoint) is present. This steady state error
is the difference between the attained value of
In Figure 4 the system configuration of the controller and the required value. In this
the motor position controller using either PLC, the gain for P is 110 and the set point is 3.
the PID control input is shown. There As we can see, there is overshoot at 3.8 and it
PLC analogue card is inserted into the over the target value which is 3. In the end the
PLC system so that the analog interface system doesn't settle out any quicker than it
can be connected to the DC motor. This would have with lower gain, but there is more
system consist of analog interface, is an overshoot. If we kept increasing the gain we
interfacing which converts the encoder would eventually reach a point where the system
data into PID control inputs. Based on the just oscillated around the target and never settled
encoder reading, the PID will control the out-the system would be unstable.
motor position plant and sending
compensated voltage output that control
the DC motor position. The PID
controller
Proceedings of the 3rd WSEAS/IASME International Conference on Dynamical Systems and Control, Arcachon, France, October 13-15, 2007 270

3.5.3 PID-Controller Mode


In Figure 7 show the step response if the entire
element in PID controller is applied in the
system. As the proportional gain is increased, the
controller responds faster. If the proportional
gain is too high, the controller may become
unstable and oscillate. The integral gain acts as a
stabilizer. It provides power even if the error is
zero. The Derivative controller counteracts the
KP and KI terms when the output changes
quickly. This helps reduce overshoot and ringing
Figure 5: Response in MATLAB and it has no effect on final error. In this PLC,
Proportional mode the gain for Proportional is 100, Integral is 20
and the gain for Derivative is 15. The step
response for this system became smooth and the
3.5.2 PI-Controller Mode response is better than if we use P, PI, and PD.
There is no overshoot; the rise time is faster and
less error. The settling time is exactly at the set
In Figure 6, it shows that when the P
point which is 3.
(Proportional) and I (Integral) gain is
applied in the PLC. To eliminate the
offset error, the controller needs to
change its output until the process
variable error is zero. Integral action
gives the controller a large gain at low
frequencies that results in eliminating
offset and "beating down" load
disturbances. It also can reduce the final
error in a system. Summing 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
Figure 7: Response in MATLAB
see that the steady state error still occur
Proportional+Derivative+Integal Mode
but it is now at the set point input which
is 3. However the overshoot became
greater than before which is at 4.3. The 4 Conclusion
rise time is also faster than just using the
proportional controller. 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,
Figure 6: Response in MATLAB
Programmable controller design forElectro-
Proportional+Integral mode
pneumatic Systems, Journal of Material
Proceedings of the 3rd WSEAS/IASME International Conference on Dynamical Systems and Control, Arcachon, France, October 13-15, 2007 271

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, Delmar, 2002
[4] S. Gerks¡ic¡ et al. / Control Engineering
Practice 14 (2006) 935–948, Advanced
Control Algorithms Embedded in a
Programmable Logic Controller, 22 July
2005.
[5] Paul H. Lewis and Chang Yang (1997).
Basic Control Systems Engineering:
Prentice Hall
[6] Carl Knopse, Guest Editor, PID Control,
IEEE
Control System Magazine, February
2006
[7] Carl Knopse, Guest Editor, PID Control,
IEEE Control System Magazine, February2006
[8] John R. Hackworth and Frederick D.
Hackworth, Jr. Programmable Logic
Controllers, Programming Methods
and applications,
Pearson Prentice Hall, 2004.

You might also like