Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Comparison of Different DC Motor Positioning Control Algorithms

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

MIPRO 2014, 26-30 May 2014, Opatija, Croatia

Comparison of different DC motor positioning


control algorithms

N. Baac*, V. Sluki*, M. Puškari*, B. Štih*, E. Kamenar**, S. Zelenika**


* University of Rijeka, Faculty of Engineering, Rijeka, Croatia
** University of Rijeka, Faculty of Engineering and Centre for Micro and Nano Sciences and Technologies, Rijeka,
Croatia

ekamenar@riteh.hr

Abstract – A comparison between different DC motor II. DC MOTOR POSITIONING CONTROL ALGORITHMS
positioning control algorithms is performed in this work.
Transient responses while employing a PID controller, a A. PID control
cascade controller and a state-space controller are
considered. LabVIEW programming environment with a One of the most common controllers in industrial
suitable acquisition card and a miniature DC motor with an applications and control systems is the Proportional-
integrated encoder are used for experimental assessment. Integral-Derivative (PID) controller. The transfer
Calculations and control system simulations are made using function of an ideal parallel PID structure can be
Matlab. The PID controller is implemented via the expressed as (refer to the list of symbols at the end of the
predefined PID block in LabVIEW. In turn, the state-space paper) [1]:
controller is modelled by using Matlab while the accuracy of
the results is confirmed experimentally using LabVIEW. ܷሺ‫ݏ‬ሻ ͳ
‫ܩ‬ோ ሺ‫ݏ‬ሻ ൌ ൌ ‫ܭ‬௉ ሺͳ ൅ ൅ ܶ஽ ‫ݏ‬ሻ (1)
The cascade controller is developed as a series of two ‫ܧ‬ሺ‫ݏ‬ሻ ܶூ ‫ݏ‬
Proportional-Integral (PI) controllers, one representing the
positioning and the other the velocity loop. The obtained The PID parameters are defined as:
results allow establishing that positioning control via the - KP proportional gain
state-space controller has the fastest response and the lowest - TI integral time
settling times. - TD derivative time
I. INTRODUCTION E(s) can be calculated as the difference between the
reference position Y0(s) and the actual position Y(s):
A widely used actuator in positioning systems is a
Direct Current (DC) motor. It finds application in many ‫ܧ‬ሺ‫ݏ‬ሻ ൌ ܻ଴ ሺ‫ݏ‬ሻ െ ܻሺ‫ݏ‬ሻ (2)
of today’s mechatronics systems such as robots, precision
positioning machines or industrial applications. In the time domain, the PID controller can be
Positioning control of mechatronic devices is also used in expressed as:
situations when there is a need for an accurate response in ͳ ௧ ݀݁ሺ‫ݐ‬ሻ
a predictable and repeatable manner. In a pick-and-place ‫ݑ‬ሺ‫ݐ‬ሻ ൌ ‫ܭ‬௉ ή ቆ݁ሺ‫ݐ‬ሻ ൅ න ݁ሺ߬ሻ݀߬ ൅ ܶ஽ ቇ (3)
ܶூ ଴ ݀‫ݐ‬
machine for production of Printed Circuit Boards (PCB),
for example, components must be placed precisely on the Using the finite time values:
board before the soldering process. Another example is a
‫ ݐ‬՜ ݇ܶ௦ (4)
robot manipulator that uses several motors for 2D or 3D
positioning of the robotic arms. Although stepper motors a discretized form of PID controller can be obtained [1]:
are sometimes employed for these purposes, DC motors ௞
can also be a viable solution. However, when DC motors ܶ௦
‫ݑ‬ሺ݇ܶ௦ ሻ ൌ ‫ܭ‬௉ ή ൭݁ሺ݇ܶ௦ ሻ ൅ ෍ ݁ሺ݅ܶ௦ ሻ
are used, a feedback sensor is needed in order to establish ܶூ
positioning control [1, 2]. ௜ୀ଴ (5)
ܶ஽
A DC motor with an embedded quadrature rotational ൅ ሾ݁ሺ݇ܶ௦ ሻ െ ݁ሺ݇ܶ௦ െ ܶ௦ ሻሿ൱
ܶ௦
incremental encoder as a feedback sensor is employed in
this work. Three different control algorithms are The PID controller is implemented in this work via
compared in the terms of simulations in Matlab and the predefined PID block in LabVIEW. The tuning of the
experimental results obtained by using the LabVIEW PID controller parameters is conducted in two steps. The
programming environment. Ziegler-Nichols method is used first to achieve a rough
estimate of the gains; in a second step, an experimental
method of fine-tuning of PID parameters is performed.

1654
Figure 1. Cascade control scheme Figure 2. z-transformation of the state-space model

B. Cascade control considered process in a discrete form can thus be


Cascade control is composed of two loops: the described as:
velocity and the position loop. In the simplest form, an ‫ܠ‬ሾ݇ ൅ ͳሿ ൌ ‫࢞۾‬ሾ݇ሿ ൅ ‫ݑۿ‬ሾ݇ሿ
analogue command (set point velocity) is compared with (7)
the signal from the feedback sensor (incremental ‫ݕ‬ሾ݇ሿ ൌ ۱‫ܠ‬ሾ݇ሿ
rotational quadrature encoder) to generate voltage that
induces rotational motion. The produced torque will The P and Q matrices can be defined by using the
speed up or slow down the actuator in order to reach the fundamental matrix (s) [4]:
velocity set point. The most known velocity loop is the ઴ሺ‫ݏ‬ሻ ൌ ሺ‫ݏ‬۷ െ ‫ۯ‬ሻିଵ
Proportional-Integral (PI) loop and it is constituted by
two parameters: a proportional gain (KP), which scales ‫ ۾‬ൌ खି૚ ሼ઴ሺ‫ݏ‬ሻሽ
the velocity error, and an integral time constant (TI), (8)
which defines the integration time. A velocity loop itself ઴ሺ‫ݏ‬ሻ
cannot ensure that the actuator stops in a certain position. ‫ ۿ‬ൌ खି૚ ቊ ቋ ۰
Hence, one of the common configurations is to place a ‫ݏ‬
positioning loop in cascade (series) with the PI velocity The process can also be described by applying the z-
controller (Fig. 1) [3]. transformation of the equations of the state-space model
Tuning of the regulators in cascade can often prove to [4]:
be a challenging task since there are four parameters to ‫܆‬ሺ‫ݖ‬ሻ ൌ ሺ‫ݖ‬۷ െ ‫۾‬ሻି૚ ‫ܷۿ‬ሺ‫ݖ‬ሻ
tune [3]. The parameters are thus tuned in this work by
using a custom developed Matlab model. The resulting ܻሺ‫ݖ‬ሻ ൌ ۱ሺ‫ݖ‬۷ െ ‫۾‬ሻି૚ ‫ܷۿ‬ሺ‫ݖ‬ሻ
parameters are then implemented in the LabVIEW (9)
environment where additional online fine tuning is ܻሺ‫ݖ‬ሻ
performed in order to match better real system response. ‫ܩ‬ሺ‫ݖ‬ሻ ൌ ൌ ۱ሺ‫ݖ‬۷ െ ‫۾‬ሻି૚ ‫ۿ‬
ܷሺ‫ݖ‬ሻ
C. State-space control
Now the state-space controller equation can be
State-space control derives from the state-variable defined:
method of representing differential equations. When
compared with transfer-function based control, state- ܷሺ‫ݖ‬ሻ ൌ െ‫܆ۺ‬ሺ‫ݖ‬ሻ (10)
space control is designed by working directly with the The basic principle of the synthesis of the state-space
state-space-variable description of the system [2]. controller is to achieve the desired closed-loop dynamics
Advantages of state-space design are particularly with proper values of the L vector. These values can be
relevant for Multiple-Input – Multiple-Output (MIMO) obtained by using the following equations:
systems, although the system considered in this work is a ‫܆ݖ‬ሺ‫ݖ‬ሻ ൌ ሺ‫ ۾‬െ ‫ۺۿ‬ሻ‫܆‬ሺ‫ݖ‬ሻ
Single-Input – Single-Output (SISO) system. A further (11)
advantage of this method is its robustness to dynamic ȁ‫ݖ‬۷ െ ‫ ۾‬൅ ‫ۺۿ‬ȁ ൌ Ͳ
perturbations in the system [2].
where the roots of equation (11) are correlated with the
A process with one input u(t) and one output y(t) can poles of the desired closed-loop dynamics. The state-
hence be described in a state-space model as [4-6]: space controller gain vector L can then be calculated by
݀‫ܠ‬ሺ‫ݐ‬ሻ using Ackermann’s formula [4]. The block diagram of the
ൌ ‫ܠۯ‬ሺ‫ݐ‬ሻ ൅ ۰‫ݑ‬ሺ‫ݐ‬ሻ resulting state-space model is shown in Fig. 2.
݀‫ݐ‬ (6)
‫ݕ‬ሺ‫ݐ‬ሻ ൌ ۱‫ܠ‬ሺ‫ݐ‬ሻ D. DC motor model in state-space
where A is the system matrix which correlates the current The behaviour of a DC motor can be modelled as [5]:
state with its change, B is the control matrix and
determines how the system input affects the state change ݀߮
ൌ߱ (12)
and C is the output matrix which determines the ݀‫ݐ‬
relationship between the system state and its output. The

1655
݀߱ ‫ܭ‬௠ TABLE I. FAULHABER 2342 DC MOTOR CHARACTERISTICS
‫ܬ‬ ൅ܾή߱ ൌ ሺ‫ ݑ‬െ ‫ܭ‬௘ ή ߱ሻ
݀‫ݐ‬ ܴ௔ Moment of inertia ‫ܬ‬ ͷǤ͹ ή ͳͲି଻ ‰ ή ଶ

For simplicity, the armature time constant is 


Torque constant ‫ܭ‬௠ ͳ͵ǡͶ ή ͳͲିଷ
neglected. 

In turn, in state-space a DC motor can be described Back-EMF constant ‫ܭ‬௘ ͳǡͶ ή ͳͲିଷ
”’
as:
Armature resistance ܴ௔ ͳǡͻπ
Ͳ ͳ Ͳ
߮ ͳ ߮ ‫ܭ‬ ܷ௡ ͳʹ
‫ ݏ‬ቂ ቃ ൌ ൥Ͳ െ ൩ ή ቂ ቃ ൅ ൥ ௠ ൩ ή ‫ݑ‬ Nominal voltage
߱ ߱
ܶ௠ ‫ ܬ‬ή ܴ௔ Nominal armature current ‫ܫ‬௔௡ ͹ͷ

‫ ܬ‬ή ܴ௔ (13) Friction coefficient b ͳ
ܶ݉ ൌ ”’
ܾ ή ܴ௔ ൅ ‫ܭ‬௠ ή ‫ܭ‬௘

‫ܫ‬௔௡ III. EXPERIMENTAL SET-UP


ܾ ൌ ‫ܭ‬௠
߱ The assessment of the characteristics of the described
The DC motor transfer function is: positioning control algorithms is performed on an
experimental set-up, whose block-scheme is shown in
‫ܭ‬௠ Fig. 3. The system is composed of a DC motor coupled
Ȱሺ‫ݏ‬ሻ ‫ ܬ‬ή ܴ௔
‫ܩ‬ሺ‫ݏ‬ሻ ൌ ൌ (14) with a gearbox and an encoder, the operational amplifier
ȳሺ‫ݏ‬ሻ ‫ ݏ‬ଶ ൅ ‫ ݏ‬ή ͳ and the control system based on the National Instruments
ܶ௠ (NI) hardware and the LabVIEW software.
while the respective discretized model in state-space is: A. Actuator and encoder
߮ ͳ ߙ ή ܶ௠ ߮ ‫ ܭ‬ή ܶ௠ ߛ ή ܶ௠ The main component of the experimental set-up is the
‫ݖ‬ቂ ቃ ൌ ൤ ൨ήቂ ቃ൅ ቂ ቃή‫ݑ‬
߱ Ͳ ߚ ߱ ‫ ܬ‬ή ܴ௔ ߙ Faulhaber 2342 DC motor with an embedded planetary
gearbox and an incremental rotational encoder [7]. The

ି ೞ main characteristics of the actuator are given in Table I.
ߚൌ݁ ்೘
As shown in Fig. 4, the shaft of the actuator is connected
(15)
to the gearbox unit (1) with a reduction ratio 1:64. On the
ߙ ൌͳെߚ opposite side, an encoder (2) is installed.
ܶ௦ The used encoder is an incremental encoder with 2
ߛൌ െߙ channels (A and B) with a 90 degree phase delay and 12
ܶ௠
cycles per revolution (cpr). Two encoder channels enable
The requirements for aperiodic closed-loop dynamics not only position and speed but also the direction of
imply then: movement to be determined. A very important parameter
ͳ for encoder measurements is the encoding type, which
ߦൌ directly affects encoder resolution. In this application,
ξʹ rising and falling edges on both channels are counted
(16)
ͳ (Fig. 5). This type of encoding is usually referred as X4
߱௡ ൌ encoding [8-10].
ܶ௠ ξʹ
while the recommended sample time is [5]:
ͲǤʹ
ܶ௦ ൌ (17)
߱௡
Vector L can hence be approximately calculated as
[5]:
‫ ܬ‬ή ܴ௔ ͲǤͶͻͺ͵
‫ۺ‬ൌ ሾ ͲǤͲ͸͹ʹሿ (18)
‫ܭ‬௠ ή ܶ௠ ܶ௠
By inserting the characteristic values for the used DC
motor (see Table I), vector L becomes:
‫ ۺ‬ൌ ሾͳǤͳͳ͹͵ ͲǤͲͲͳͳሿ (19)
To estimate finally the variables used in the control
algorithm, the Matlab software is used.
Figure 3. Experimental set-up scheme

1656
Figure 4. DC motor with gearbox and encoder

B. National Instruments Hardware


The electronics of the experimental set-up is based on
the National Instruments PXI-1050 chassis, including a
PXI-8196 embedded controller and a PXI-6221 Data
Acquisition Card (DAQ) which is connected to a SCB-68
connector block [11]. The SCB-68 has 68 terminals with
digital and analogue inputs and outputs. Counter inputs Figure 6. PID regulation VI: front panel (up), block diagram (down)
are used for connecting the encoder while the analogue
output is used for driving the DC motor.
A. PID control
IV. LABVIEW CONTROL IMPLEMENTATION PID control is implemented in LabVIEW by using the
The LabVIEW development environment is used for predefined PID block from the LabVIEW Control, Design
implementing the control algorithms and storing and Simulation Module. The respective front panel as
measurement data. This configuration meets the well as the main elements of the block diagram are shown
requirements for embedded system design such as real- in Fig. 6.
time computing, wide choice of peripheral equipment and
Input and output channels have to be selected first.
extensive support for accessing instrumentation
hardware. Moreover, its library contains predefined
mathematical blocks that process acquired data to enable
appropriate outputs. In the considered case, the DAQmx
Start Task block is used to trigger the used channels. The
acquired data is then passed to the DAQmx Read block
that, due to continuous position readings, is located
within the time loop. Similarly, voltage output is driven
using the DAQmx Write block. On the other hand,
measurements are stored in a CSV file. This file is
created by using a Write-to-spread sheet file block which
enables to capture the data that can subsequently be used
for further analysis in Matlab.

Figure 5. Reading and encoding signals from the encoder Figure 7. Cascade control VI: front panel (up), block diagram (down)

1657
Figure 9. State-space transient response

V. EXPERIMENTAL RESULTS AND DISCUSSION


To test the performances of the described DC motor
position control systems, a set of experiments using PID,
cascade and state-space control typologies is performed.
All tests are made with an input step command from 0ι to
200. DC motor input voltage is limited to േ5V. The
parameters of the PID and the cascade controllers are
Figure 8. State-space control VI: front panel (up), block diagram (down) given in Tables II and III both for the simulations and the
Using the DAQmx counter as input, information about experiments. It is interesting to notice here that the
position is obtained from the channels of the encoder. simulations did not allow the correct integral time of the
This is compared to the defined reference position so as positioning loop of the cascade control to be determined.
to determine the analogue input to the actuator. This value will thus be obtained in future investigations.
B. Cascade control The comparison of simulated and experimentally
obtained transient responses in the case of the state-space
The front panel and the block diagram of the cascade
controller is shown in Fig. 9 and Table IV. From the
control scheme are shown in Fig. 7. The front panel
magnified detailed view of the system dynamic response
allows the following input parameters to be defined:
during settling, it can be seen that an aperiodic transient
number of pulses per revolution, input and output
response occurs with a negligible difference in rise times
channels, decoding type, position measurement units,
between the simulated and actual results. In the case of
parameters for the PI regulators as well as the file path.
the PID and the cascade controllers, due to simplified
For a given reference position, the dynamic response of
modelling assumption, some discrepancies of the
the system can be visualised via a waveform chart and/or
simulated and experimental dynamic results occur. Future
a circular gauge. The number of full motor shaft
investigations will be done to obtain better matching of
revolutions is also shown. The inferred velocity is hence
the simulated and experimental results.
calculated as shown in the block diagram in Fig. 7.
Experiments allowed establishing that a disadvantage of
the used method is that, for sample times shorter than 50
ms, the velocity signal results in errors because the
computational routines are slower than motor’s response.
C. State-space control
The state-space regulator is implemented in LabVIEW
using equations (12-19) – Fig. 8. The measured position
and velocity are scaled by the gain vector L using
equation (19). These values are then compared to the
desired reference values. Since there are no additional
time constants (no additional poles) added to the system,
the state-space control algorithm has faster response
times than the PID and the cascade controller. On the
other hand, since state-space control has only
proportional gain, a residual steady-state error is present.
To minimize this error, the reference position is
multiplied with a compensation gain. Figure 10 Combined experimental results

1658
TABLE II PARAMETERS FOR THE PID CONTROL METHOD be achieved by using real-time hardware (e.g. the NI
MATLAB Experiment FPGA module) or if direct measurement of velocity would
Proportional gain ‫ܭ‬௣ 0.576 0.6 be possible. PID control results in negligible steady-state
Integral time ܶூ [ms] 0.313 0.3 errors and acceptable rise and settling times.
Derivate time TD [ms] 0.021 0.02
LIST OF SYMBOLS
TABLE III PARAMETERS FOR THE CASCADE CONTROL METHOD A system matrix
B control matrix
MATLAB Experiment b friction coefficient [mNm/rpm]
Proportional gain ‫ܭ‬௣ 13.56 13.905 C output matrix
Positioning loop E(s), e(t) difference between the reference and the process
Integral time ܶூ [ms] ? 4
Proportional gain ‫ܭ‬௣ value
0.508 0.508
Velocity loop GR(s) PID transfer function
Integral time ܶூ [ms] 5 5
Ian nominal armature current [mA]
J motor inertia [kg.m2]
TABLE IV DYNAMIC RESULTS FOR THE STATE-SPACE CONTROL k finite time values factor (k=1, 2, 3, …)
METHOD Ke back EMF constant [V/rpm]
Km torque constant [Nm/A]
MATLAB Experiment KP proportional gain
Rise time ߬௥ [ms] 430 390 L state-space controller gain vector
Percent overshot ߪ [%] 0.35 0.5 P system matrix in discrete domain
Settling time ߬௦ [ms] 580 550 Q control matrix in discrete domain
Steady-state error [%] 0 0.04 Ra armature resistance []
s Laplace variable
t time variable
TABLE V COMPARISON OF DYNAMICS FOR DIFFERENT CONTROL T I , TD integral and derivative time constants
METHODS (EXPERIMENTS) Tm mechanical time constant
TS sample period
PID Cascade S.S. U(s), u(t) output from the controller
Rise time ߬௥ [ms] 425 1120 390 Un nominal voltage [V]
Percent overshot ߪ [%] 0 6.35 0.5 Y(s), y(t) process value
Settling time ߬௦ [ms] 800 3500 550 Y0(s) reference position
Steady-state error [%] 0 0.1 0.04 z discrete (z) domain variable
t time change [ms]
 motor shaft angle change []
The comparison of transient responses obtained  attenuation coefficient
experimentally for all three used controllers is given in  percent overshot [%]
Fig. 10. Rise time, percent overshoot, settling time and r rise time [ms]
steady-state error for each control algorithm are in turn s settling time [ms]
given in Table V. It can be concluded that the fastest  motor shaft position []
 velocity of the motor shaft [rpm]
response is obtained by using the state-space control  fundamental matrix
algorithm. The PID control algorithm results, however, in
the smallest steady-state error. REFERENCES
[1] E. Kamenar and S. Zelenika, “Micropositioning mechatronics
VI. CONCLUSIONS AND OUTLOOK system based on FPGA architecture,” Proc. 36th International
An overview of different DC motor control Convention on Information and Communication Technology,
approaches is given in this work. A conventional PID Electronics and Microelectronics MIPRO, pp. 138-143, 2013.
controller is employed first. The respective parameters are [2] G. F. Franklin, J. D. Powel and A. Emami-Naeini, “Feedback
control of dynamic systems – 2nd ed.,” Addison-Wesley, 1991.
obtained using the Zieger-Nichols method and fine tuning.
[3] URL: www.machsupport.com
A cascade controller is developed next. Finally, the state-
space controller with positioning and velocity loop is [4] D. Matika, “Sustavi digitalnog upravljanja (Digital control
systems),” University of Rijeka, 2005.
employed. A Matlab model of the used actuator is
[5] R. Cupec, “Diskretni sustavi upravljanja,” University of Osijek,
established in order to simulate different control 2008. URL: http://www.etfos.unios.hr/upload/OBAVIJESTI/
approaches. Controllers are then implemented in the obavijesti_diplomski/diskretni_sustavi_upravljanja_19-11-
LabVIEW environment and experiments are conducted. 2009.pdf
[6] K. J. Astrom and B. Wittenmark, “Computer controlled systems:
By comparing experimental results (Table V), it is theory and design – 3rd ed.,“ Prentice Hall, 1996.
concluded that positioning control via the state-space
[7] URL: www.faulhaber.com/uploadpk/EN_2342_CR_DFF.pdf
controller has the fastest response and the lowest settling
[8] URL: www.gurley.com/Encoders/Understanding_Quadrature.pdf
times. Cascade control can be efficiently used, although
[9] G. S. Gordon, "Square Waves And Pulses: A Clarification,"
the tuning of its parameters can often be cumbersome and Measurements & Control, 1988.
computationally more intensive due to the presence of two [10] URL: www.dynapar.com/uploadedFiles/Downloads/Encoder_
PI blocks and the needed velocity calculation. This all Glossary_of_Terminology.pdf
limits the execution time which directly affects system’s [11] URL: www.ni.com
dynamic response. Improvements of cascade control could

1659

You might also like