ON THE SAMPLING PERIOD IN FUZZY CONTROL
ALGORITHMS FOR SERVODRIVES
A Strategy for Variable Sampling
Dan Mihai
University of Craiova, Decebal Blvd, 107, Craiova, Romania
Keywords: Fuzzy control, Adaptive sampling period, On-line timing, Microcontroller, Servodrives.
Abstract: The paper deals with a variable control sampling period for the fuzzy control algorithms implemented on
low inertia servodrives. The robustness of the fuzzy control strategy is extended on the sampling period
values and hence an adaptive sampling algorithm is proposed. The author analyzes the possibility to vary
continuously the sampling frequency upon a basic process variable. Principles, models and simulation
results inserted here give reliance in this technique and an enhancement of the fuzzy control
implementation. The distribution of the sampling moments in different adaptive conditions and the
behaviour of the servodrive are obtained by means of some models and simulations in accordance with the
real-time target hardware system.
1 INTRODUCTION
The author found (Mihai, 2001) that the fuzzy logic
has the ability to drive the system in good conditions
for very different control sampling period - T values
over more than a magnitude order. In such a context,
the idea to vary continuously the T value, in
accordance with a dynamic parameter of the system,
finds a suitable application area. The standard digital
models become non-linear because the variable
coefficients and the classical algorithms are very
sensitive to T. A variable T means, in almost all the
approaches, acquisitions with a variable frequency.
Less studies and experience concern the real-time
control with a variable cycle. Most of the involved
authors and equipment use several pre-computed
constant values T. Computer graphics applications
refer to an adaptive sampling in term of an
adjustment of the sampling resolution in exploiting
the image (Adamson, 2005). The adapting sampling
in the fuzzy control could also provide means to
reduce noise in computer graphics, like for global
illumination algorithms (Xu, 2006). Also some other
special or non-conventional application fields
implement an adaptive sampling (radio telemetric
system for missiles, drying processes in food
industry). Although some papers still prove the
natural idea that a sampled-data fuzzy controller
recovers the performance of the continuous-time
fuzzy controller as the sampling period approaches
zero (Do Wan, 2007), several authors have noticed
that the fuzzy control is flexible and reliable for a
low rate control sampling (Popescu, 1997; Mihai,
2001). Using an adaptive sampling frequency for the
control of a servodrive is a complex task because of
the fast reaction speed of such a system and its high
associated performance.
2 THE FUZZY CONTROLLER
AND T VALUES
Although T seems, apparently, not being an essential
variable for the main characteristics of a FLC (fuzzy
sets and the rule base), this parameter is involved in
a fuzzy loop in two ways:
- as a real - time “integration step” of the system,
(acquisition–processing–control cycle;
- as an input FLC variables generator by:
Va
k
= V(kT); ΔVb
k
= V
k
–V
k-1
; Vck= (V
k
–V
k-1
) / T (1)
The author considered a low inertia servodrive with
DC motors. The figure 1 gives the essential structure
for the drive with disk rotor motor and an encoder.
The FLC entries are the normalized position error
and the normalized variation of the position error:
221
Mihai D. (2008).
ON THE SAMPLING PERIOD IN FUZZY CONTROL ALGORITHMS FOR SERVODRIVES - A Strategy for Variable Sampling.
In Proceedings of the Fifth International Conference on Informatics in Control, Automation and Robotics - SPSMC, pages 221-224
DOI: 10.5220/0001477702210224
Copyright
c
SciTePress
ε
αn k =
ε
αn k
· (α
*
-
α
k
) /
α
*
(2)
Δε
αnk
αnk
−ε
αnk-1
= [Τ ·(−ω
k
)]
n
=ω
k
·Δε
αnk max
max
(3)
α*/α
k
- the position set point/ the actual position;
N
α
*/N
αk
– same, in encoder pulses; ΔN
αk
- pulses
encoder during T; c
k
, c
kout
- the computed control
and its outputted value; Norm
i
: normalization
blocks; CPB: Control Processing Block; PS - Power
supply; T
gen
- torque generator; M - motor; En -
encoder. The encoder has N
p/r
pulses per revolution
and the speed is computed with:
ksp
r/p
kdiv1kk
ks
Nc
TN
Nk2
T
Δ=
Δπ
=
αα
ω
(4)
The simulation results from figure 2 are obtained
using a FLC from Fuzzy Toolbox (Guley, 1995),
with fuzzy sets and rules presented in (Mihai, 2008).
The quality of the results is proved by the final
position error (null) and the fuzzy state-space
trajectory, between the initial point (10, 0) and the
final point (0,0)–last window. When T increases, the
FLC task becomes more difficult. Although for the
whole range the controller succeeds in bringing the
system to the final point, some internal ringing or
steps appear. It is obviously also that for low
sampling frequencies, the speed (quite well filtered
by the mechanical system) is far from the position
error variation. Another model is designed as a fuzzy
position / speed loop for the same system but with a
Look-Up-Table (LUT) FLC-figure 3. An additional
argument for the adaptation of T is given by the real-
time recordings presented in figure 4, for an on-line
inference fuzzy control (Mihai, 2006). During every
T (SPER), each falling edge of the encoder pulses
(PULSE) leads to a fast hardware interrupt routine
(INTO) that up-dates the FLC entries. FUZZ is the
fuzzyfier task, INFER-the on-line inference task,
DEFUZ-defuzzification task and AUX concerns
other processing tasks, like savings. The 2 diagrams
were recorded for different conditions, revealing the
ability of the FLC to manage the microcontroller
resources even at maximum speed, when the
processing algorithm is interrupted at maximum rate.
However, the available time is very depending on
the motor speed. A higher speed could lead to the
situation when the control processor is no more able
to fulfil the real-time task inside T. Its adaptation to
the speed would be the solution. For adding
robustness related with the load variation, a special
strategy was proposed by the author keeping the
same reference LUT. Additional procedures were
implemented for on-line adaptation of the control to
the load value, both by an estimated current and
some external computations and decisions blocs.
Figure 1: The servodrive with FLC.
a.
b.
b.
Figure 2: Results: T=2.456 ms (a) and T=50 ms (b).
b.
Figure 3: Results for T = 2.456 ms (a) and T= 50 ms (b)
with a LUT based FLC.
a.
a.
ICINCO 2008 - International Conference on Informatics in Control, Automation and Robotics
222
a.
b.
Figure 4: An on-line T in fuzzy control.
3 A FUZZY CONTROLLER
WITH ADAPTIVE T VALUES
The idea is to relate T with the variation rate of the
main variable of the system. During the intervals
with small variations (or in steady state regimes), T
is greater and during the high rate dynamic regimes,
T decreases. The variation for the (generic) variable
v from the step t induces an adequate adaptation of T
at t+δt. The figure 5 gives an image of the principle
and helps for obtaining some relations. A first
possibility is to evaluate the amplitude variation for
the main variable during a constant time interval
(easily in real-time). Another idea is to use an
amplitude quantization of the v variable using a
constant step Δ and to evaluate then the time
intervals associated with this variation. They can be
directly assimilated with the adapted T. Next
relations make connects the derivative value and Δ.
v = f(t); Δ = f(t
i+1
) - f(t
i
) ; tg α
i
= Δ / T
i
(5)
T
i
= Δ / tg α
i
Δ / ( ⏐|df / dt|
ti
+ ε) (6)
Δ could be chosen by practical considerations. If
f is known, (5) is useful for evaluate T. If not, t
i
result by detecting the amplitude thresholds and by
that the next T value is available. ε is for a
limitation of max.T. A limitation is also necessary
for minT, (systemic, on-line processing constraints):
T
min
Τ ≤ Δ / ε (7)
For a servodrive where the main variable is the
position, let be the speed ω the variable v (the
variation of the position). It is more suitable to use a
T adaptation in accordance with the variation rate
not after the amplitude of the v variable. Indeed, for
that last case, even in a steady-state regime, the
sampling rate is high and for a low speed during a
strong dynamic regime the sampling has a slow
rate. If the main characteristic variable of the
system is the speed, v could be the acceleration.
The next idea is to adapt also the step value Δ
upon another characteristic variable of the
controlled system. The results for two Δ (constant)
values are depicted by figure 6, with the distribution
of the sampling moment. Position 1 is the sampled
position with an adaptive period. “State space FLC
path” is the trajectory of the system. The global
behaviour is good for both variants, the final
position error being null and the system response in
speed and position being a smooth one. Figures 7a
and 7b give the variations of T for Δ=2.456 and
Δ=20, during the whole regime. The max/min rate
values are almost 100/Δ=10 and 35/Δ=50. Figures
7c, 7d make visible the large variation range of the
max/min T along 3 magnitude ranges (logarithmic
scale).
The next idea is to use a variable quantization step
for adapting T as a double adaptive sampling
strategy. Another adaptation parameter is involved.
The fig. 8 gives the elements for that, considering
the speed as an additional modulator (by its change
rate) for the adaptive sampler of the position. In this
way, it is no more necessary to make different
experiments in order to adopt the best step value
Δ (Q). The distribution of the sampling moments is
different (fig. 8a) and the step value is variable (fig.
8b). The image of the new sampled position is given
by fig. 8c. The results from 8d concern another
values range for the modulator of the adaptive
sampler (a larger one – see Q_ad). It is depicted
also the quantified speed – Speed 1, as the source
of the modulator for the quantization step necessary
for the sampler with double adaptive T. The
overshoot for the position is related with its
quantized final values.
Figure 5: For adaptation of T values.
ON THE SAMPLING PERIOD IN FUZZY CONTROL ALGORITHMS FOR SERVODRIVES - A Strategy for Variable
Sampling
223
4 CONCLUSIONS
A variable sampling frequency could give a better
control. This approach leads to some serious
robustness problems for the classical algorithms but
not for the fuzzy control. A good robustness
regarding the sampling period for the fuzzy control
induced the idea to try a control with adaptive
sampling period. This idea is applied for a
servodrive - a fast and precise system. Several
variants were considered: adaptive sampler with a
constant quantized step, with a multi-step
modulation and with a continuous variation.
Figure 6: Main variables of the system for a step Δ = 2.5
(a), Δ = 20 (b) and T evolution.
Figure 7: T evolution in time and upon Δ.
Figure 8: Adaptive FLC /variable step.
REFERENCES
Adamson, A., Alexa, M., A. Nealen, 2005. Adaptive
sampling of intersectable models exploiting image and
object-space coherence, Symp. on Interactive 3D
graphics and games I3D '05, ACM Press.
Do Wan, K., Jin Bae, P., Young Hoon, J., 2007. Effective
digital implementation of fuzzy control systems based
on approximate discrete-time models, Automatica
(IFAC Jour.), Volume 43 , Issue 10, pp. 1671-1683.
Gulley N., Jang,J.S. R., 1995 Fuzzy Logic Toolbox for use
with Matlab, The Mathworks, Inc.
Mihai, D., 2001. Robustness of the Fuzzy Digital Control
Regarding the Sampling Frequency for a Servodrive
System, ELECTROMOTION '01, Bologna, pp. 431-
435.
Mihai, D., 2006. An Optimized Fuzzy Control Algorithm
for Servodrives. Some Real-Time Experiments, IS ’06,
London Proc., pp. 192-197.
Mihai, D., 2008. On the Sampling Period in Standard and
Fuzzy Control Algorithms for Servodrives. A
multicriterial design and a timing strategy for constant
sampling, INICO 08, Funchal - Madeira, Portugal.
Popescu, G.S., Pastravanu, A., Bogdan, I., 1997. PWM
AC/DC converter with reduced sampling frequency
fuzzy control, Proc. of the IEEE International Sym. on
Industrial Electronics, Vol. 3, pp. 1228 – 1231.
Xu, Q., Xing, L., Wang, W., Sbert M., 2006. Adaptive
sampling based on fuzzy inference, Proc. of the 4th
int. conference on Computer graphics and interactive
techniques in Australasia and Southeast Asia
GRAPHITE, ACM Press.
a.
b.
c.
d.
a.
b.
a.
b
.
c.
d.
ICINCO 2008 - International Conference on Informatics in Control, Automation and Robotics
224