Vous êtes sur la page 1sur 2

Embedded application of fractional order the linear part (G( jw)) and the negative inverse description locus

control Ni (A). As can be observed from Fig. 1, this is a stable limit cycle
having parameters of the amplitude, Aosc , and the frequency, vosc.
R. Duma, P. Dobra and M. Trusca The equivalent gain of the relay is computed using:

4b
Ku =

= (1)
A practical closed loop fractional order control application is presented. Ni (Aosc )
pAosc
A fractional order PID (FOPID) controller has been designed for a DC
motor and the determined controller implemented in real-time on an In the case of the practical application presented in this Letter a
embedded system. The implementation aspects on the embedded bi-positional relay with b 50 and 1 5 is implemented in software.
control system are described. In addition, a simple implementation
The obtained limit cycle is transferred from the microcontroller over
approach for a FOPID controller is presented.
the controller area network (CAN) bus of the microcontroller and is
presented in Fig. 2. The speed of the motor sent over the CAN bus is
Introduction: An extension of the classical PID controller is the frac- an eight bit data type. To obtain the speed of the motor in rotations per
tional order PID (FOPID) controller. The PID controller has three par- minute, the value has to be scaled. As a consequence, the value for the
ameters which can be changed in order to tune the controller, while amplitude of the limit cycle oscillation used in (1) has to be divided by
the FOPID controller has ve. Thus, higher exibility and better 15. From the obtained limit cycle the amplitude of oscillation and the fre-
closed loop performance can be achieved using a FOPID controller. quency are determined (Aosc 8.5, vosc 7.629 rad/s).
Fractional order calculus is used in a wide range of science and engin-
eering elds and also in the eld of control systems [1, 2]. In the litera- 2550

ture there are few papers which present practical implementations of 2500

2450
FOPID controllers. A case study for FOPID control of a DC motor

speed, rad/s
2400
with an elastic shaft is presented in [3]. The paper [4] investigates 2350

several types of FOPID controllers for a laboratory servo system. The 2300

above-mentioned papers, which describe fractional order control 2250

2200
systems for DC motors, present only theoretical results. Practical 15.811 16 16.5 17 17.5 18 18.5 19 19.5
time, s
aspects on the implementation of a fractional controller on a microcon-
troller are presented in [5]. In this Letter a FOPID controller is designed Fig. 2 Limit cycle oscillation of DC motor
for a DC motor and a closed-loop control algorithm with a FOPID con-
troller is implemented on a Stellaris LM3S8962 microcontroller. As far The purpose of a controller in a closed loop control system is to com-
as we know, this is the rst report which presents the implementation of pensate for dominant time constants. A FOPID controller of the follow-
a FOPID controller on a microcontroller and the control of a real process ing form is used:
using the implemented code.
T1 s + 1
KFOID (s) = K1 = Kd s1m + Ki sm
Controller design and discretisation: The transfer function of a FOPID sm
controller is: The time constant T1 is chosen to be the mechanical time constant of the
Ki DC motor. The mechanical time constant is estimated from several step
KFOPID (s) = Kp + + Kd sm responses of the DC motor to be 0.07 s. The fractional order m is com-
sl
puted by imposing a xed phase margin gk = p/6, at the frequency esti-
where Kp is the proportional gain, Ki is the integration gain, Kd is the mated from the limit cycle, for the open loop system (fractional order
derivative gain, l and m are the integral and the derivative orders, controller and DC motor):
respectively.
gk = arg [KFOID (jvosc )G(jvosc )] + p =
p (2)
Im(.) atan(T1 vosc ) + m + arg [Ni (Aosc )]
2
From (2) m is computed to be 0.295. To simplify the discretisation of s m
the value of m is chosen to be 0.3.
Re(.)
To obtain the imposed phase margin at the oscillation frequency the
module of the open loop system must full the condition:
N1(A)
|KFOID (jvosc )G(jvosc )| = 1 (3)
LC(Aosc,osc)

G(j) From (3) K1 is determined:


vmosc
K1 = Ku  = 11.9305
1 + (T1 vosc )2
The proposed fractional order controller is a derivative-integral fractional
order controller with: Kd = K1 T1 = 0.8351, Ki = K1 = 11.9305,
l = m = 0.3 and d = 1 m = 0.6.
Fig. 1 Nyquist diagram of relay feedback system
For discretisation of the fractional order integrator, s20.3, and frac-
tional order differentiator, s 0.6, the Al-Alaoui [6] operator is used.
The method used for controller tuning is based on limit cycle The determined controller is presented below:
oscillation of the DC motor. A relay type nonlinearity is introduced in
the control loop. The negative inverse describing function of the 116.8 365.6z1 + 432.6z2 237.9z3 + 59.3z4
bi-positional relay with a hysteresis is:
 5.32z5 + 0.312z6
  KFOID (z1 ) =
p1 A 2 1 2.34z1 + 1.88z2 0.56z3 + 0.023z4
Ni (A) = 1 + j; A . 1
4b 1 + 0.0094z5 0.0003z6
(4)
where b is the amplitude of the output signal of the relay, 1 the hysteresis
of the relay and A the input sinusoidal signal.
In the case of a negative feedback system which consists of a non- Practical implementation: The setup presented in Fig. 3 has been used
linear component of type relay and a linear component limit cycles to test the approach proposed in this Letter. The DC motor used for the
appear. The parameters of the limit cycle can be estimated using the practical application has a nominal speed of 4500 RPM at 30 V. On the
Nyquist diagram, from the intersection point of the transfer locus of shaft of the motor an Agilent HEDS-5500 encoder is mounted. The

ELECTRONICS LETTERS 22nd November 2012 Vol. 48 No. 24


3400
encoder gives 1000 counts per revolution. The quadrature signals are 3200

applied at the encoder input type pins of a Stellaris LM3S8962 micro- 3000

speed, rad/s
2800
controller, on which the control algorithm is implemented. For real- 2600

time bidirectional data exchange between the PC and the microcontroller 2400

a USB to CAN converter is used. 2200

2000

1800
8 8.5 9 9.5 10 10.5 11 11.5 12 12.5 13 13.5 14 14.5 15 15.5 16 16.5 17 17.5 18 18.5 19
time, s

Fig. 5 Closed-loop response of DC motor using FOPID controller of fourth


order

Conclusion: We have presented the design and implementation of a


FOPID controller for a DC motor. The control algorithm is implemented
on a Stellaris LM3S8962 microcontroller. The main contribution of this
Letter is the real-time implementation of the FOPID controller on a
microcontroller and the control of the DC motor. A simple tuning
USB-CAN converter driver Stellaris LM3S8962 DC motor method for FOPID controllers is proposed. The practical approach pre-
sented in this Letter could be easily integrated by industry, because it
Fig. 3 Test setup for control of DC motor
proves that a FOPID controller can be easily implemented on an
embedded system.
The Stellaris LM3S8962 microcontroller is a xed point controller.
On xed point controllers the execution time of algorithms which
Acknowledgments: This paper was supported by project Progress and
utilise double data type is signicantly higher than in the case of algor- development through post-doctoral research and innovation in engineer-
ithms which utilise integer data types. The integer data type can be used
ing and applied sciences PRiDE Contract no. POSDRU/89/1.5/
for the implementation of the controller algorithm but with loss of accu-
S/57083. Project co-funded from European Social Fund through
racy. For the implementation of the FOPID controller presented in (4)
Sectorial Operational Program Human Resources 2007 2013.
the IQMath data type is used. The IQMath Library is a collection of
highly optimised and high precision mathematical functions which
allows the implementation of oating point algorithms on xed point # The Institution of Engineering and Technology 2012
microcontrollers. 24 May 2012
An embedded control system is used for ensuring real-time constraints doi: 10.1049/el.2012.1829
of the interrupts of the microcontroller. For controlling a DC motor a One or more of the Figures in this Letter are available in colour online.
synchronous interrupt for control algorithm computation is required. R. Duma, P. Dobra and M. Trusca (Automatic Control Department,
In the case of the application presented in this Letter the synchronous Technical University of Cluj Napoca, Romania)
interrupt is generated by the encoder velocity timer expiration. In this E-mail: dobra@aut.utcluj.ro
routine the speed of the motor is computed using the signals generated
by the encoder; the FOPID control algorithm computes a new value for References
the duty cycle of the control PWM signal and relevant data is sent over
the CAN bus. 1 Valerio, D., and Costa, J.S.: Introduction to single-input, single-output
The closed-loop response of the DC motor using the FOPID control- fractional control, IET Control Theory Appl., 2011, 5, (8),
ler dened in (4) is presented in Fig. 4, while the response using a pp. 10331057, DOI:10.1049/iet-cta.2010.0332
2 Jin, Y., Chen, Y.-Q., and Xue, D.: Time-constant robust analysis of a
FOPID controller of fourth order is presented in Fig. 5. The execution
fractional order [proportional derivative] controller, IET Control Theory
time on the microcontroller of the FOPID controller dened in (4) is Appl., 2011, 5, (1), pp. 164172, DOI:10.1049/iet-cta.2009.0543
40 ms, while of the fourth order is 30 ms. For extensive computation 3 Xue, D., Zhao, C., and Chen, Y.Q.: Fractional order PID control of a DC
applications a lower order FOPID controller can be used but with a motor with phase elastic shaft: a case study. Proc. of 2006 American
degree of the closed-loop control performances. Control Conf., Minneapolis, MN, USA, 2006, pp. 31823187
4 Barbosa, R.S., Machado, J.A.T., and Jesus, I.S.: On the fractional PID
3400 control of a laboratory servo system. Proc. of 17th IFAC World
3200
Congress, Seoul, Republic of Korea, 2008, pp. 1527315278
3000
5 Petras, I.: Fractional order feedback control of a DC motor, J. Electr.
speed, rad/s

2800

2600
Eng., 2009, 60, (3), pp. 117128
2400 6 Al-Alaoui, M.A.: Novel digital integrator and differentiator, Electron.
2200
Lett., 1993, 29, (4), pp. 376378
2000

1800
31.5 32 32.5 33 33.5 34 34.5 35 35.5 36 36.5 37 37.5 38 38.5 39 39.5 40 40.5 41 41.5 42
time, s

Fig. 4 Closed-loop response of DC motor using FOPID controller of sixth


order

ELECTRONICS LETTERS 22nd November 2012 Vol. 48 No. 24