Vous êtes sur la page 1sur 6

Digital Implementation of Sliding Mode Fuzzy Controllers for Boost Converters

Liping Guo, John Y. Hung, and R. M. Nelms


Department of Electrical & Computer Engineering
Auburn University, AL 36849-5201

Abstract: Nonlinear controllers such as fuzzy controllers and implemented in discrete-time, the control action (in this case,
sliding mode controllers have been applied to boost converters ON or OFF of the switch) can only be activated at each
because of their nonlinear properties. Although both fuzzy and sampling instant and the control effort is constant over each
sliding mode controllers have desirable characteristics, they sampling period. Thus, the system is able to approach the
have disadvantages in practice which prevent them from being
applied extensively. A sliding mode fuzzy controller is proposed
sliding mode but not able to stay on it. These practical issues
to control boost converters. The sliding mode fuzzy controller prevent sliding mode control from being extensively applied
combines the advantages of both fuzzy controllers and sliding to DC-DC converters.
mode controllers. It also has advantages of its own that are well Fuzzy controllers have been applied to control DC-DC
suited for digital control design and implementation. A sliding converters [4-7]. These controllers do not need an exact
mode fuzzy controller is designed and verified with mathematical model for the system, and are well suited to
experimental results using a prototype boost converter with a nonlinear time-variant systems. However, fuzzy controllers
DSP-based digital controller. Experimental results indicate that are usually designed based on expert knowledge of the
the sliding mode fuzzy controller is able to obtain the desired converters, and extensive tuning is required based on trial and
transient response under varying operating points. There is no
chattering in steady state.
error method. The tuning can be quite time-consuming. In
addition, the response is not easy to predict.
I. INTRODUCTION In this paper, a sliding mode fuzzy controller is applied
to control a boost converter. The sliding mode fuzzy
Traditionally, controllers for DC-DC converters are
controller combines the advantage of both fuzzy controllers
designed using classical control methods such as frequency
and sliding mode controllers, and also has its unique
response and root locus design methods which are based on
advantages that facilitate its design and digital
small signal models of the DC-DC converters. The small
implementation. First of all, the sliding mode fuzzy controller
signal models are linear approximations; thus, they are only
can be implemented like a regular fuzzy controller. The
valid around an operating point and change due to changes in
output from the sliding mode fuzzy controller is the duty
operating point. For a boost converter’s small signal model,
cycle directly; therefore, a constant switching frequency is
the poles and a right-half plane zero, as well as the magnitude
achieved. Secondly, since sliding mode fuzzy controllers can
of the frequency response, are all dependent on the duty cycle
be designed systematically based on the principles of sliding
D and the load resistance R. Since controllers based on
mode control, the amount of time needed for tuning is
classical control methods are designed using a fixed small
significantly reduced compared to a pure fuzzy controller and
signal model at one nominal operating point, they are not able
the system’s response can be predicted. Last, but not the
to respond satisfactorily to operating point variations and load
least, oscillation in steady state is eliminated by incorporating
disturbance. Many nonlinear controllers are applied to boost
a boundary layer into the rule base of the fuzzy controller.
converters to solve this problem. Among them are sliding
A sliding mode fuzzy controller has been implemented
mode controllers and fuzzy controllers.
on a TI TMS320F2812 DSP for a prototype boost converter.
Sliding mode control is a powerful method that is able to
The high computation power of DSPs allows the digital
yield a very robust closed-loop system under plant
implementation of more advanced control algorithms. The
uncertainties and external disturbances. The system can be
primary advantages of digital control over analog control are
entirely independent of effects due to modeling uncertainties,
higher immunity to environmental changes such as
parameter fluctuations and disturbances [3]. Obviously, that
temperature and aging of components, increased flexibility by
is a very attractive property for the control of boost
changing the software and more advanced control techniques.
converters. However, several disadvantages exist for sliding
In addition, analog implementation of the sliding mode fuzzy
mode control. First of all, an assumption for sliding mode
controller will require a considerable amount of complex
control is that the control can be switched from one value to
hardware.
another infinitely fast. In practice, it is impossible due to time
delay for control computation and physical limitations of the
switching devices. As a result, the duty cycle oscillates in II. CONFIGURATION OF SLIDING MODE FUZZY CONTROLLERS
steady state, which induces oscillation in the output voltage.
The second disadvantage is that the sliding mode controller The configuration of a closed-loop fuzzy controller for a
will generate an ON-OFF control for the boost converter, and boost converter is shown in Fig. 1 [7]. The output voltage of
the switching frequency is not constant. The third the boost converter is scaled and sampled by an AD
disadvantage is when the sliding mode controller is converter. The DSP uses the sampled data to create two

0-7803-9547-6/06/$20.00 ©2006 IEEE. 1424


inputs to the fuzzy controller: the error e[k] and the change of III. DESIGN OF A SLIDING MODE FUZZY CONTROLLER
error ce[k]. Both e[k] and ce[k] are scaled by g0 and g1,
There are four steps involved to design a sliding mode
respectively.
fuzzy controller: (1) a switching function that represents a
The fuzzy controller is made of four sections:
desired system dynamics is first designed, (2) from the
fuzzification, rule table, inference mechanism and
switching function, inputs to the sliding mode fuzzy
defuzzification. The fuzzification interface converts its inputs
controller and their scaling factors can be determined, (3) a
into information that the inference mechanism can use to
rule base is designed according to the switching function, and
activate and apply rules. The rule table contains the expert’s
(4) the other parts of the sliding mode fuzzy controller are
linguistic description of how to achieve good control. The
designed, including the inference mechanism and the
inference mechanism evaluates which control rules are
defuzzification method [1]. The four steps will be followed to
relevant in the current situation, and the defuzzification
design a sliding mode fuzzy controller for a boost converter.
interface converts the conclusion from the inference
mechanism into the control output. The output of the fuzzy
A. Switching Function
controller is the change of duty cycle. The output of the fuzzy
A switching function is first designed to represent the
controller scaled by an output gain h is added to the previous
desired system dynamics. It is often of lower order than the
duty cycle d[k-1] to obtain the new duty cycle d[k], which is
plant. Since a boost converter’s small signal model is second
written in (1).
order, a first order switching function is designed, which is
d[k] = d[k-1]+h×∆d[k] (1) shown in (2), where e is the output voltage error, and e& is its
derivative.
The integration of the fuzzy controller’s output increases the
system type and improves steady-state error. s ( x) = e& + λe (λ>0) (2)
A sliding mode fuzzy controller shares the same
configuration of the ordinary fuzzy controller shown in Fig. The dynamics in (2) respresent a stable first order system
1. In an ordinary fuzzy controller, the input gains g0, g1, and with a pole at –λ. The time constant τ is 1/ λ seconds, and the
output gain h and the rule base are designed based on the in- settling time is 4/λ seconds. For the boost converter, to obtain
depth knowledge of the converter, and tuned using a trial and a settling time of 10 ms, the time constant τ should be 2.5 ms,
error method. In a sliding mode fuzzy controller, the input and λ = 1/τ = 400. The switching function designed for the
gains g0, g1 and the rule table are designed based on the sliding mode fuzzy controller for the boost converter is given
principles of sliding mode control. The only variable that in (3). s(x)=0 is called the switching line, and it is plotted in
needs to be tuned is the output gain h. Therefore, the time Fig. 2. The step response of (3) is simulated, and shown in
required for tuning is greatly reduced for a sliding mode Fig. 3. The settling time of the step response is 10 ms, and
fuzzy controller. there is no overshoot.

s ( x ) = e& + 400e (3)


+ +
Unregulated Regulated
Input
Boost Converter
Input e&
- -
Duty cycle
Linear
gain
s (x)=0

d[k]=d[k-1]+h*dd[k] PWM AD
]
Stage Converter

e
Defuzzification g0 e[k]
Fuzzification
Rule table
g1 ce[k]

Inference
Mechanism

Fig. 1. Fuzzy controller for a boost converter Fig. 2. Switching function of the sliding mode fuzzy
controller

1425
Fig. 4. Membership functions of the inputs e[k] and ce[k]
of the sliding mode fuzzy controller for the boost converter

The two input scaling factors g0 and g1 have a


significant impact on the controller’s performance, and
usually requires extensive tuning when designing an ordinary
Fig. 3. Step response of switching function in (3) fuzzy controller. In the sliding mode fuzzy controller, g0 and
g1 can be directly determined from the switching function in
(5). Experiments with a prototype boost converter indicates
In the digital implementation, e& is approximated as
that if the scaling factor g0 of e[k] is less than 1, the
shown in (4), where e[k] is error of the kth sample of the
sensitivity of the controller to the voltage error is reduced,
output voltage, and T is the sampling period. In this
which could lead to steady-state error. Therefore, g0 is
experiment, the sampling frequency is chosen to be 150 kHz,
chosen to be 1, and the scaling factor g1 of ce[k] becomes
and T is 6.67µs.
1/(400T), which equals 375 when the sampling frequency is
150 kHz.
e[k ] − e[k − 1]
e& = (4)
T C. Rule Base
In an ordinary sliding mode controller, the switching line
Substituting (4) into (3), (5) is the switching function divides the state space into two semi-planes, as is shown in
when the sliding mode fuzzy controller is implemented in Fig. 2. Within the semi-planes positive and negative control
discrete-time, where ce[k] is the difference between e[k] and outputs are applied to move the state vectors (e, e&) towards
e[k-1]. the switching line s(x) = 0. In the sliding mode fuzzy
controller design, the rule base is derived based on the
e[k ] − e[k − 1] ce[k ] (5) principle of ordinary sliding mode control. The variable ci is
s ( x) = + 400e[k ] = + 400e[k ]
T T the change of the duty cycle taken from the rule table. The
relationship between ci and the switching function s(x) is
B. Inputs and Their Scaling Factors shown in Fig. 5. The sign of ci is determined by the sign of
From the switching function in (5), it is determined that the switching function s(x). ci is negative when s(x)>0, and
the sliding mode fuzzy controller for the boost converter has positive when s(x)<0. The magnitude of ci increases as the
two inputs. The first input is the error in the output voltage distance between the actual state and the switching line
e[k]=ADC[k]-Ref, where ADC[k] is the converted digital s(x)=0 increases. ±L defines the threshold for entering the
value of the kth sample, and Ref is the digital value boundary layer. Outside the boundary layer, the control has a
corresponding to the desired output voltage. The second input relay characteristic, and within the layer, the control is a high-
ce[k]=e[k]-e[k-1] is the difference between the error of the kth gain linear control.
sample and the error of the (k-1)th sample. The two inputs are A small 7×7 rule base for the sliding mode fuzzy
multiplied by the scaling factors g0 and g1, respectively, and controller is shown in Table I for illustration purposes. In the
then fed into the sliding mode fuzzy controller. table, N stands for negative, P stands for positive, and Z
The membership functions for e[k] and ce[k] are shown represents zero. B means big, M means medium and S stands
in Fig. 4. Each universe of discourse is divided into 33 fuzzy for small. For example, NB means negative big.
subsets: N16,N15,N14,…,N1,Z,P1,…,P15,P16, where N A 33×33 rule table is derived for the sliding mode fuzzy
indicates negative, Z represents zero and P indicates positive. controller for the boost converter based on the principles
The variables µe(e[k]) and µce(ce[k]) are the membership above. There is a trade off between the size of the rule base
degrees assigned to each fuzzy subset to quantify the and the performance of the sliding mode fuzzy controller.
certainty the input can be classified linguistically into the More membership functions results in finer control. The
corresponding fuzzy subsets. output of the controller has less variation when either of the

1426
inputs has small changes, and a more accurate control is controller is added to the previous sampling period’s duty
achieved. cycle d[k-1]. The integration of the controller’s output
increases the system type and improves the steady state error.
N
ci ∑w ×c i i
∆d [k ] = i =1
N
(7)

∑w i =1
i

IV. IMPLEMENTATION OF SLIDING MODE FUZZY


s(x) CONTROLLERS
-L L
For the experiment the boost converter’s input voltage is
5 V, the output voltage is 12 V, and the nominal duty cycle D
is 58%. C is 1056 µF, L is 250 µH, and R is 25 Ω.
The sliding mode fuzzy controller is implemented on a
TI TMS320F2812 DSP. The DSP features a 150 MHz, fixed
Fig. 5. Function between ci and s(x) point 32-bit CPU, 128k on-chip flash memory. The C28x
DSP generation is efficient with C and C++, hence enabling
TABLE I control algorithms to be developed in high level languages.
7×7 RULE BASE OF THE SLIDING MODE FUZZY CONTROLLER The DSP supports the peripherals used for embedded control,
Change in error (CE) such as the event manager module for pulse-width-
NB NM NS Z PS PM PB modulation (PWM) and a dual 12-bit, 16-channel ADC. The
PB Z NS NM NM NB NB NB conversion rate of the ADC is 80 ns. The sampling and the
PM PS Z NS NM NM NM NB switching frequency of the sliding mode fuzzy controllers
PS PM PS Z NS NS NM NB implemented on the TMS320F2812 DSP is 150 kHz. The
Error (E)

Z PM PM PS Z NS NM NM faster clock frequency and ADC conversion time of the


NS PB PM PS PS Z NS NM F2812 DSP allows a faster sampling and switching
NM PB PM PM PM PS Z NS frequency.
NB PB PB PB PM PM PS Z A sliding mode fuzzy controller is a nonlinear algorithm.
It requires frequent use of multiplification and division
In an ordinary fuzzy controller, the rule table is often instructions with high accuracy. Most DSPs are not optimized
designed by in-depth knowledge of the plant. It is then tuned for nonlinear algorithms. There are unique challenges to
using trial and error method. Extensive tuning requires a large implement a sliding mode fuzzy controller on a DSP.
amount of time. On the other hand, the rule base of a sliding When implementing a sliding mode fuzzy controller in
mode fuzzy controller is designed based on the principle of real time, two main issues are the amount of time it takes to
sliding mode control, and the amount of time required for compute the output of fuzzy controllers and the amount of
tuning is reduced significantly. memory used.
A. Computation time
D. Inference Mechanism and Defuzzification Method In each sampling period of the controller computation,
The results of the inference mechanism include the centers in the membership function and their corresponding
weighing factor wi and the change in duty cycle ci of the membership degrees need to be calculated. The efficiency of
individual rule. The weighing factor wi is obtained by the implementation of fuzzy controllers becomes even more
Mamdani’s min fuzzy implication of µe(e[k]) and µce(ce[k]), important when there are many inputs to the fuzzy controller
where wi = min{µe(e[k]), µce(ce[k])} and µe(e[k]), µce(ce[k]) or each input has many membership functions. The reason is
are the membership degrees. ci is looked up in the rule table that the number of rules increases exponentially with an
[7]. The change in duty cycle inferred by the ith rule, zi, is increase in the number of inputs. For the fuzzy controller
written in (6). designed for the boost converter, there are two inputs, and
each input has 33 membership functions. Therefore, there are
z i = w i × c i = min{ µ e ( e[ k ]), µ ce ( ce [ k ])} × c i (6) totally 332=1089 rules. In real time, it is prohibitive to
calculate the 1089 membership degrees and to sum up 1089
values in the numerator and denominator in (7). The sampling
The center of average method is used to obtain the
frequency of the fuzzy controller will have to be quite low
sliding mode fuzzy controller’s output ∆d[k], which is given
because of the long computation time.
in (7). When using triangle-shaped membership functions,
there are at most four rules that are effective at any one time; Triangle-shaped membership functions are used to solve
this problem. For triangle-shaped membership functions,
therefore, N=4. The output of the sliding mode fuzzy

1427
there are at most four rules that are active at any time. is shown in Fig. 7. The settling time is about 10ms at nominal
Therefore, only four centers and four membership degrees input voltage. The maximum transient error is about 400 mV.
need to be calculated instead of going through all the rules in When the input voltage increases from 4V to 7V, the settling
the rule base. The reduction of computation time is time decreases and the maximum transient error decreases.
significant especially when the rule base is large. It is much Transient responses in Fig. 6 and 7 indicate that the
more efficient to calculate only four centers and experimental result’s settling time and overshoot at nominal
corresponding membership degrees than 1089 of them. input voltage match the desired dynamics represented by the
Of the 33 subsets, there are 16 subsets for the positive switching function in (2). A settling time of less than or equal
and negative parts of the universe of discourse, respectively. to 10 ms is achieved. When the input voltage increases, the
The computation time and code size of the sliding mode settling time for both the start up and load transient response
fuzzy controller can be reduced when the number of subsets decreases. The output voltage is stable in steady state.
for the positive and negative parts is a power of 2, because
shift instructions can be used to calculate the membership
degrees instead of calling the subroutine of division
functions. 4
B. Memory Usage
There is a trade off between the size of the rule base and
3
the performance of the fuzzy controller. A 17×17 rule base
was designed and implemented for the boost converter. 2
Experimental results indicate that the sliding mode fuzzy
controller with a 33×33 rule base exhibits less oscillation
1
during steady state and faster transient response is achieved
by increasing the output gain h. More membership functions 1—Vin=4V
result in finer control for the same universe of discourse. The 2—Vin=5V
output of the controller has less variation when either of the 3—Vin=6V
inputs changes slightly. Therefore, a more accurate control is 4—Vin=7V
achieved and chattering and oscillation are reduced.
However, increase of the rule base results in a larger amount
of memory used. The size of the rule base is determined
based on the balance of the performance of the controller and Fig. 6. Start up transient response of the boost converter
the amount of memory used. with different input voltage
In addition, a Gaussian low-pass filter is added to (2 V/div, 5 ms/div)
decrease the noise in the difference of error ce[k] at steady
state. The noise is mainly introduced by the quantization
errors and the switching action in the converter circuit. The
change in error is calculated using ce[k]=e[k]-ev[k-1], where
ev[k-1] = e[k-1]/4 + e[k-2]/2 + e[k-3]/4 and is obtained using
the Gaussian low-pass filter. The coefficients of the Gaussian
filter are [1/4 1/2 1/4]. The Gaussian filter reduces the high 4
frequency noise, and it is characterized by narrow bandwidth,
3
sharp cutoff frequency and low overshoot. The filter is very
simple to implement on the TI DSP. Because the coefficients
of the filter are 1/2 and 1/4, a shift instruction is used instead
of calling the function to divide two numbers, therefore
reducing the computation time.
1 1—Vin=4V
2
V. EXPERIMENTAL RESULTS 2—Vin=5V
3—Vin=6V
The start up transient response when the input voltage 4—Vin=7V
varies from 4V to 7V is shown in Fig. 6. The settling time is
about 8 ms with very little overshoot at the nominal input
voltage of 5V. As the input voltage increases from 4V to 7V,
the settling time decreases. When the input voltage is 4V, the Fig. 7. Transient response of the boost converter when
settling time is only 5 ms. the load current changes from 0.24 A to 0.48 A
The transient response of the boost converter when the (200 mV/div, 2 ms/div)
load changes from 0.24A to 0.48A at different input voltages

1428
Previous work was done to design and implement [4] L. Guo, J. Y. Hung, and R. M. Nelms, “Experimental
ordinary fuzzy controllers for boost converters [4, 5]. Two evaluation of a Fuzzy Controller Using a Parallel Integrator
structures of fuzzy controllers were applied to the prototype Structure for DC-DC Converters,” 2005 IEEE International
boost converter during start up and steady state to obtain both Symposium on Industrial Electronics, Dubrovnik, Croatia,
fast transient and stable steady state response without steady June 2005
state error. While for the sliding mode fuzzy controller, only
one structure is used for all operating points. It indicates that [5] L. Guo, J. Y. Hung, and R. M. Nelms, ““Comparative
the sliding mode fuzzy controller is able to perform well under Evaluation of Linear PID and Fuzzy Control for a Boost
operating point variations. Converter,” The 31th Annual Conference of the IEEE
Industrial Electronics Society, Raleigh, NC, Nov 2005
VI. SUMMARY
[6] W. C. So, C. K. Tse and Y. S. Lee, “Development of a
A sliding mode fuzzy controller is designed and Fuzzy Logic Controller for DC/DC Converters: Design,
implemented to control a boost converter. Sliding mode fuzzy Computer Simulation, and Experimental Evaluation,” IEEE
controllers combine the advantages of ordinary sliding mode Trans on Power Electronics, Vol. 11. pp. 24-32, January 1996
controllers and fuzzy controllers. The rule base and the
scaling factors are derived from the switching function, [7] T. Gupta, R. R. Boudreaux, R. M. Nelms and J. Y. Hung,
instead of from expert knowledge of the plant when “Implementation of a Fuzzy Controller for DC-DC converters
designing an ordinary fuzzy controller. Using an Inexpensive 8-b Microcontroller,” IEEE Trans on
Besides sharing the advantages of sliding mode control Industrial Electronics, Vol. 44. pp. 661-669, October 1997
and fuzzy control, sliding mode fuzzy control has advantages
of its own that are appealing to digital control design and [8] V. S. C. Raviraj, P. C. Sen, “Comparative Study of
implementation. Oscillation in the duty cycle is eliminated by Proportional-Integral, Sliding mode, and Fuzzy Logic
Controllers for Power Converters”, IEEE Trans on Industry
including a boundary layer into the rule base. In addition, the Applications, Vol. 33, No. 2, March/April 1997
controller’s output is duty cycle directly; thus, a constant
switching frequency can be maintained. Also, the sliding [9] J. Mahdavi, A. Emadi and H. A. Toliyat, “Application of
mode fuzzy controller can be designed systematically; State Space Averaging Method to Sliding Mode Control of
therefore, the amount of time needed for tuning is PWM DC/DC Converters”, 32nd IEEE Industry Applications
Society Annual Meeting, pp. 820-827, Oct 1997
significantly reduced. In addition, system response can be
predicted from the switching function.
[10] D. Cortes, J. Alvarez and J. Alvarez, “Robust Sliding
The sliding mode fuzzy controller is implemented as a Mode Control for the Boost Converter”, VIII IEEE
digital controller using a TMS320F2812 DSP. Major issues International Power Electronics Congress, pp. 208-212, Oct
associated with digital implementation of sliding mode fuzzy 2002
controllers are addressed. Experimental result for a prototype
boost converter indicates that the sliding mode fuzzy [11] Y. Shi and P. C. Sen, “Application of Variable Sturcture
Fuzzy Logic Controller for DC-DC Converters”, The 27th
controller responds well to variations of operating point and Annual conference of the IEEE Industrial Electronics
load disturbances with different input voltages. Desired Society, pp. 2026-2031, Nov
transient response that matches the switching function is
achieved. There is no oscillation at the steady state. [12] M. Ahmed, M. Kuisma, K. Tolsa and P. Silventoinen,
“Implementing Sliding Mode Control for Buck Converter”,
ACKNOWLEDGMENT 2003 IEEE 34th Annual Power Electronics Specialist
This research was supported by the Center for Space Power Conference, Vol. 2, pp. 634-637, June 2003
and Advanced Electronics with funds from NASA grant
NCC3-511, Auburn University, and the Centers' industrial
partners.
REFERENCES
[1] D. Driankov, H. Hellendoorn and M. Reinfrank, An
Introduction to Fuzzy Control. Springer 1996

[2] K. M. Passino, S. Yurkovich, Fuzzy Control. Addison-


Wesley 1997

[3] J. Y. Hung, W. Gao and J. C. Hung, “Variable Structure


Control: A Survey”, IEEE Transaction on Industrial
Electronics, Vol. 40, No. 1, Feb 1993

1429

Vous aimerez peut-être aussi