Professional Documents
Culture Documents
PC-based PID Speed Control in DC Motor
PC-based PID Speed Control in DC Motor
The speed control system of the DC motor is shown 3. DC motor mathematics model and the
in Figure1. The main purpose is to link PC via USB control theory
transmission line and data acquisition module (NI
DAQ USB-6008), then control the motor system to 3.1 DC motor mathematic model
achieve the speed control of motor and analyze the
response of the motor by software. This DC motor system is a separately excited DC
motor, which is often used to the velocity tuning and
the position adjustment. This paper focuses on the
study of DC motor linear speed control, therefore, the
separately excited DC motor is adopted. Make use of
the armature voltage control method to control the DC
motor velocity, the armature voltage controls the
distinguishing feature of method as the flux fixed, is
also a field current fixedly. The control equivalent
circuit of the DC motor by the armature voltage control
method is shown in Figure 3.
2.2 System functional block diagram system Fig. 3 The control equivalent circuit of the DC
structure motor using the armature voltage control
method
This system is to generate a pulse signal through the
disc of the rotary shaft and the photo interrupt module where
in DC motor. And compute the numbers of pulses
received in unit time with 8051[7], then calculate the R a : the armature resistance
speed of motor. We display the motor currently speed
using four SEG7 display, compare the output feedback L a : the armature inductance
signal with the input signal through D/A converter[8],
then execute the parameter adjustment of the PID i a : the armature current
controller through the designed program under the
if
: the field current
401
ea From equation (7) the armature inductance is very
: the input voltage
small in practices, hence, the transfer function of DC
eb motor speed to the input voltage can be simplified as
: the back electromotive force (EMF) follows,
Tm: the motor torque Ω (s ) K
= m (8)
ω E a (s) τs + 1
: an angular velocity of rotor
Where K = KT is a motor gain,
J : rotating inertial measurement of motor bearing m
R a B + KbKT
B : a damping coefficient R aJ is the motor time constant
τ=
R aB + K bK T
Because the back EMF e b is proportional to speed ω From equation (8), the transfer function can be drawn
directly, then the DC motor system block diagram which is shown in
Figure 5.
dθ(t) (1)
e b (t) = K b = K bω (t)
dt
Making use of the KCL voltage law can get
di a (t) (2)
e a (t) = R a i a (t) + L a + e b (t)
dt
Fig. 5 Simplified block diagram of DC motor
From Newton law, the motor torque can obtain armature voltage control system
2
T m (t) = J
d θ(t)
+ B
dθ
= K T ia (t) (3) 3.2 PID control theory
2 dt
dt
Take (1), (2), and (3) into Laplace transform, The development of PID control theories has already
respectively, the equations can be formulated as 60 years so far, PID control has been one of the control
follows: system design method of the longest history. However,
E a (s ) = ( R a + L a s ) I a (s ) + E b (s ) (4) this method is still extensively used now
[9][10][11][12]. The PID controller includes a
proportional term, integral term and derivative term,
E b (s ) = K b Ω (s ) (5)
where the proportional term is to adjust the output of
controller according to all of the magnitude of error,
Tm (s) = BΩ(s) + JsΩ(s) = K T I a (s) (6) the integral term is used to remove the steady state
error of control system and improve the steady state
Fig. 4 describes the DC motor armature control system
response, the derivative term is used to predict a trend
function block diagram from equations (1) to (6).
of error and improve the transient response of the
system. These functions have been enough to the most
control processes. Because the structure of PID
controller is simple, it is the most extensive control
method to be used in industry so far. The PID
controller is mainly to adjust an appropriate
proportional gain (KP), integral gain (KI), and
differential gain (KD) to achieve the optimal control
Fig. 4 DC motor armature voltage control
performance. The PID controller system block diagram
system function block diagram
of this paper is shown in Figure 6.
The transfer function of DC motor speed with
respect to the input voltage can be written as follows,
Ω (s ) KT
G (s) = =
E a (s) ( L a s + R a )( Js + B) + K b K T
(7)
402
transient response of system become slow down. It
cannot improve a steady state error of system, has not a
bigger function for the system. But this phenomenon is
only to limit in the first order control system. The
integral controller can remove a steady state error
while the step inputs, but it will be unstable if the
integral gain is excessive.
403
Fig. 9 PC-based speed monitor system Fig. 11 Front panel of PC-based PID DC motor
speed control system.
4.2 Monitor system design
404
Fig.13 (e) The simulation response PID speed control
in DC motor for R=1, KP =5, KI=5, KD=0.01
Fig.13 (a) The simulation response PID speed From above simulation response results shown as
control in DC motor for R=1, KP =3, KI=2, KD=0.01 Figure 13.(a)-(e), we know when the system is joined
the integral control, it can be accelerated the steady
state response time. To make use of simulation results,
can be verified as a result of basis with the actual
measurement.
Fig.13 (d) The simulation response PID speed control Fig.14 (a) The response of the DC motor speed
in DC motor for R=1, KP =5, KI=4, KD=0.01 control for R=1, KP =3, KI=2, KD=0.01
405
the transient response become slower, but cannot
improve a steady state error. Raising the KI can remove
a margin of the steady state error. Through the
experimental results, we can know that the system will
produce an unstable phenomenon when KP is greater
than 7, KI is greater than 8. Therefore, the best control
parameters of this system are chosen as R=1, KP =5,
KI=5, KD=0.01.
Fig.14 (b) The response of the DC motor speed
control for R=1, KP =3, KI=3, KD=0.1
7. Conclusions
This paper proposes to design PID controller to
control the speed of DC motor using the LabVIEW
software program, and display the speed of motor in
real-time in order to obtain the system response of PID
controller. Then assist this system to simulate with the
software of VisSim. Because the DAQ card has the
capabilities of data scratch and transmission, matches
with the LabVIEW virtual instrument characteristic
and analysis. The real-time monitor of application on
the motor not only can substitute the traditional
Fig.14 (c) The response of the DC motor speed control instrument but also can be as the monitor basis of the
for R=1, KP =5, KI=2, KD=0.01 machine operating normally or not. This programming
system is based on a structure of the PC, and combines
the DC motor supervision needed instrument, and then
replaces other hardware equipments with the cheaper
and more efficient method to provide operators with
the graphical interface of an easy and kind operation.
Through the actual tuning KP, KI, KD gains, the
responses of this system can be obtained under the
different condition. After the actual control parameters
transfer into VisSim for simulation, to compare the
results of actual response with its theory is rather near.
The development system can be set up a
fundamental to supervise and control the outdoor
Fig.14 (d) The response of the DC motor speed factory from the indoor office. We can supervise and
control for R=1, KP =5, KI=4, KD=0.01 control all motors in the factory or instrument
equipment indoors, and also monitor the factory
operational condition from the outside. In other words,
this system can monitor the motor currently, and also
can join all equipments which are desired to supervise
and control to perform a whole supervision system in
early future.
8. References
[1] Wang, J. B., Control of Electric Machinery. Gau Lih
Book co., Ltd, Taipei Taiwan, 2001.
Fig.14 (e) The response of the DC motor speed
control for R=1, KP =5, KI=5, KD=0.01
[2] DAQ USB-6008 User Manual., National Instruments,
1999
To compare with Figure 14 (a) to (e), can be
relatively obtain, if raise KP then can get a quicker [3] Shiau, T. J., J. L. Wang and S. W. Chu., Program
transient response, and can reduce a steady state error Design of Virtual Instrument Control LabVIEW 7X.
of the system in PID controller. To raise KD, will make Gau Lih Book co., Ltd, Taipei Taiwan, 2004
406
Microcomputer. Knowledge and Execution Co., Ltd.
[4] Liau, J. C., A Study of LabVIEW Aided in DC Motor Taichung, Taiwan, 2002.
Speed Monitoring System. National Taiwan Ocean
University Department of Mechanical & Mechatronic [9] Yang, K. C., Remote Fuzzy Control in DC Motor
Engineering, 2000. Speed Monitoring System. National Taiwan Ocean
University Department of Mechanical & Mechatronic
[5] LabVIEW Basics I Course Manual., National Engineering, 2001.
Instruments, 1999.
[10] Huang, J. M., University Automatic Control,
[6] Srinivasan, M. B., A. Shirkhodaie, and M. Malkani, University City Books Enterprise Inc, Kaohsiung
LabVIEW program design for on-linedataacquision Taiwan, 2004.
and dpredictive maintenance. Proceedings of the
Thirtieth IEEE Souteastern Symposinm on System [11] Baek, S. M. and T. Y. Kuc., “An adaptive PID learning
Theory, 1998, pp.520-524. control of DC motor”, IEEE International, Volume.3,
1997, pp.2877-2882.
[7] Li, K. Y., S. S. Huang and R. C. Chen, 8051/52
Application of Microcontroller. Skinfo Book co., Ltd, [12] Ker, D. S., Automatic Control Simulation Analysis.
Taipei Taiwan, 1998. Gau Lih Book co., Ltd, Taipei, Taiwan, 2004.
407