You are on page 1of 23

Eng. & Tech.Journal, Vol. 27, No.

12, 2009 Represent Different Types of Sliding


Mode Controllers by VHDL

Represent Different Types of Sliding Mode Co ntrollers


b y VH DL

Yousra Abd Mohammed* , Dr. Ekhlas H. Karam **


& Mohammed H. Khudair** *
Received on:28/4/2008
Accepted on:7/5/2009
Abstract
This paper focus on represent and implementation the conventional sliding mode
control (SMC), in addition to some types of the common enhancement SMC
approaches using reconfigurable hardware technology based on Field Programmable
Gate Arrays (FPGAs); this is because FPGAs are highly attractive options for
hardware implementation. The enhancement SMC approaches that used here are:1)
the conventional SMC with boundary layer, 2) PI sliding mode controller, and 3)
boundary SMC with new approximation sign function. The main key of this work is to
implement these SMC approaches in high volume FPGA devices, a low area and fast
clock speed device, where these approaches are implemented in Xilinx Vertix family
Xcv1000-fg680-4 FPGA (the occupation rate is 86% and maximum net delay is 0.032
ns). All the architectures in VHDL, verified the functionality using Active-HDL
simulator, and synthesis the data paths using ISE 4.1i software package synthesis tool
and Xilinx place and route tool of this package. Finally, to test the performances of the
enhancement SMC approaches, computer simulation is performed on linear and
nonlinear system models in order to compare the performance of these SMC
approaches to illustrate which approach between them give more efficient
performance than the others.

Keywords: Conventional SMC, enhancement SMC, VHDL, linear and nonlinear


systems.

(Sliding mode controllers) ‫ﺘﻤﺜﻴل ﺃﻨﻭﺍﻉ ﻤﺨﺘﻠﻔﺔ ﻤﻥ ﻤﺴﻴﻁﺭﺍﺕ ﺍﻟﻁﺭﻴﻘﺔ ﺍﻟﻤﻨﺯﻟﻘﺔ‬


(VHDL) ‫ﺒﻠﻐﺔ ﺍﻟﻭﺼﻑ ﺍﻟﻤﺎﺩﻱ‬

‫ﺍﻟﺨﻼﺼﺔ‬
‫ ﺒﺎﻻﻀﺎﻓﺔ‬, (SMC) ‫ﻫﺫﺍ ﺍﻟﺒﺤﺙ ﻴﺭﻜﺯﻋﻠﻰ ﺘﻤﺜﻴل ﻭﺘﻁﺒﻴﻕ ﺴﻴﻁﺭﺓ ﺍﻟﻨﻤﻁ ﺍﻟﻤﻨﺯﻟﻘﺔ ﺍﻟﺘﻘﻠﻴﺩﻴﺔ‬
Sliding mode ) ‫ﺍﻟﻰ ﺒﻌﺽ ﺃﻻﻨﻭﺍﻉ ﻤﻥ ﺍﻟﻁﺭﻕ ﺍﻟﻤﺤﺴﻨﺔ ﺍﻟﺸﺎﺌﻌﺔ ﻟﻤﺴﻴﻁﺭﺍﺕ ﺍﻟﻨﻤﻁ ﺍﻟﻤﻨﺯﻟﻘﺔ‬
‫( ﺒﺄﺴﺘﺨﺩﺍﻡ ﺘﻘﻨﻴﺔ ﺒﺭﻤﺠﺔ ﻭﺍﻋﺎﺩﺓ ﺒﺭﻤﺠﺔ ﺍﻟﻤﺎﺩﻴﺎﺕ ﻤﺴﺘﻨﺩﺓ ﻋﻠﻰ ﺭﻗﺎﻗﺔ ﺍﻟﻤﺼﻔﻭﻓﺎﺕ‬controllers
‫ ﻭﺫﻟﻙ ﺒﺴﺒﺏ ﺍﻥ ﻫﺫﻩ ﺍﻟﺭﻗﺎﻗﺎﺕ ﻫﻲ ﺨﻴﺎﺭﺍﺕ ﺠﺫﺍﺒﺔ ﺠﺩﺍ" ﻟﺘﻨﻔﻴﺫ ﺍﻟﻜﻴﺎﻥ‬, (FPGA) ‫ﺍﻟﻤﺒﺭﻤﺤﺔ‬
(Sliding mode) ‫ﺍﻟﻬﺩﻑ ﺍﻻﺴﺎﺴﻲ ﻤﻥ ﻫﺫﺍ ﺍﻟﺒﺤﺙ ﻫﻭ ﺘﻨﻔﻴﺫ ﺃﺭﺒﻌﺔ ﺃﻨﻭﺍﻉ ﻤﻥ ﺍﻟﻤﺴﻴﻁﺭﺍﺕ ﻨﻭﻉ‬.‫ﺍﻟﻤﺎﺩﻱ‬

2494

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

‫ﻓﻲ ﻫﺫﺍ ﺍﻟﻌﻤل ﻗﺩ ﺘﻡ‬.‫( ﻭﺫﻟﻙ ﻟﻐﺭﺽ ﺍﻟﻤﺴﺎﺤﺔ ﺍﻟﻘﻠﻴﻠﺔ ﻭﺍﻟﺴﺭﻋﺔ ﺍﻟﻌﺎﻟﻴﺔ ﻟﻠﺘﻨﻔﻴﺫ‬FPGA) ‫ﺒﺄﺴﺘﺨﺩﺍﻡ ﺍل‬
‫ ( ﺒﺤﻴﺙ ﻜﺎﻨﺕ ﻨﺴﺒﺔ ﺍﻟﻤﺴﺘﺨﺩﻡ ﻤﻥ‬Xcv1000-fg680-4) ‫ﺍﺴﺘﺨﺩﺍﻡ ﺭﻗﺎﻗﺔ ﺍﻟﻤﺼﻔﻭﻓﺎﺕ ﺍﻟﺒﺭﻤﺠﻴﺔ ﻨﻭﻉ‬
‫ ﻭﻟﻐﺭﺽ ﺍﻟﺘﺄﻜﺩ ﻤﻥ ﺍﻻﺩﺍﺀ ﺍﻟﻭﻅﻴﻔﻲ‬.0.032 ns ‫ ﻭﺘﺄﺨﻴﺭ ﺼﺎﻓﻲ ﺃﻗﺼﺎﻩ‬%86 ‫ﻫﺫﻩ ﺍﻟﺭﻗﺎﻗﺔ ﻫﻭ‬
‫( ﺒﺎﺴﺘﺨﺩﺍﻡ‬Timing Simulation) ‫ﺒﺼﻭﺭﺓ ﺼﺤﻴﺤﺔ ﻟﻠﻤﺴﻴﻁﺭﺍﺕ ﻓﻘﺩ ﺘﻡ ﺃﺠﺭﺍﺀ ﺍﻟﻤﺤﺎﻜﺎﺓ ﺍﻟﻭﻗﺘﻴﺔ‬
synthesis the data ) ‫( ﻭﻻﻜﻤﺎل ﺒﺎﻗﻲ ﺍﻟﻌﻤﻠﻴﺎﺕ ﺍﻟﺘﻨﻔﻴﺫﻴﺔ‬Active-HDL simulator) ‫ﺒﺭﻨﺎﻤﺞ ﺍل‬
‫ﻭﺃﺨﻴﺭﺍ ﻭﻟﻐﺭﺽ ﺘﺠﻴﻙ‬.( ISE 4.1i) ‫( ﻓﻘﺩ ﺘﻤﺕ ﺒﺄﺴﺘﺨﺩﺍﻡ ﺒﺭﻨﺎﻤﺞ‬paths and place and route
‫ ﺍﻨﺠﺯﺕ ﻋﺩﺓ ﻤﺤﺎﻜﺎﺓ ﺤﺎﺴﻭﺒﻴﺔ ﻋﻠﻰ ﻨﻤﺎﺫﺝ ﻷﻨﻅﻤﺔ ﺨﻁﻴﺔ ﻭﻏﻴﺭ ﺨﻁﻴﺔ ﺒﺄﺴﺘﺨﺩﺍﻡ‬,‫ﻋﻤل ﻫﺫﻩ ﺍﻟﻤﺴﻴﻁﺭﺍﺕ‬
Mat. Lab. ‫ﺒﺭﻨﺎﻤﺞ ﺍل‬

Introduction
as well as excite unmodelled and high
Sliding Mode Control (SMC) is frequency plant dynamics [8].
a technique derived from Variable There exist several techniques to
Structure Control (VSC) which were eliminate chattering. The widely-
discussed first in the Soviet literature adopted approach to chattering-free
[1, 2], and have been widely VSC is the so-called boundary layer,
developed in recent years. where the discontinuous VSC control
Comprehensive surveys of variable law signum function is applied to a
structure control can be found in [3, small vicinity around the sliding
4]. SMC is often favored basic control surface (see [4, 9]). Unfortunately,
approach, especially because the boundary layer controllers do not
insensitivity property toward the guarantee asymptotic stability but
parametric uncertainties and the rather uniform ultimate boundedness
external disturbances [5]. [10]. As a consequence, there exists a
trade-off between the smoothness of
SMC are characterized by control signals and the control
control laws that are discontinuous accuracy. Some boundary layer width
on a certain manifold in the state modification techniques to improve
space, the so-called sliding surface [2, tracking precision are discussed in [9,
6]. The control law is designed such 11]. Nevertheless, these proposed
that the representative point’s methods in practice lead to a
trajectories of the closed-loop system computational burden when
are attracted to the sliding surface and implemented, or are applicable only to
once on the sliding surface they slide linear systems [7].
towards the origin [7]. However the Another solution to chattering
major drawback in the SMC approach problem is to attempt to smooth the
is the undesired phenomenon of signum function to obtain a
chattering because of the continuous approximation. The
discontinuous change of control laws signum function is seen to be relay-
across the sliding surface. In practical like in nature. The ideal relay
engineering systems, chattering may characteristic is often impossible to
cause damage to system components, implement. One possible answer is to

2495

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

replace the signum function by a substantially more complex than the


sigmoid-like function to induce simple gates provided on the gate
pseudo-sliding instead of ideal sliding array. In addition, the term field
[12]. In some cases, the control signal programmable highlights the
is thought to comprise of ‘low’ and customizing of the IC by the user,
‘high’ frequency components. A rather than by the foundry
natural solution is to pass the manufacturing the FPGA [14].
discontinuous control signal through a Several different types of structures
low pass filter to eliminate the high for FPGAs are available
frequency component in the control commercially. All of them have a
signal[13]. Using higher order sliding basic structure that consists of many
modes(HOSM) is another possible logic blocks or logic cells,
solution to the chattering problem accompanied by a large number of
[13].This paper aims to present the pre-laid lines for connecting these
some of the common approaches that logic blocks. [15].Depending on the
provide an effective way to resolve FPGA type, special-purpose structures
the chattering problem. All these are placed into the array. Most often,
approaches are of fixed structure then these are configurable RAM blocks
implement these approaches in and clock distribution elements,
addition to the conventional SMC multipliers, adders, etc. Around the
with the FBGA technique to become periphery of the chip are the I/O cells,
easy use with different control which commonly contain one or more
systems. The paper is organized as flops to enable high-performance
follows. In section II un introduction synchronous interfaces [16].
to FBGA technique is presented. In Field Programmable Gate Array
section III some basic concepts of the (FPGA) is an integrated circuit that
SMC approach is given. In section III, can be bought off the shelf and
the enhancement approaches of SMC reconfigured by designers themselves.
will be presented in section IV and With each reconfiguration, which
implemented with FBGA platform in takes only a fraction of a second, an
section V. In section VI we will show integrated circuit can perform a
several computer simulation results of completely different function. From
the SMC approaches. Finally, several FPGA families available on
conclusions are drawn in section VII. the market, we have chosen the high
performance Virtex family from
II. Field Programmable Gate Array Xilinx, Inc. [17]. FPGA devices from
and VHDL this family consist of thousands of
FPGA: The Field-Programmable universal building blocks, known as
Gate Array (FPGA) places fixed cells Configurable Logic Blocks (CLBs),
on the wafer, and the FPGA designer connected using programmable
constructs more complex functions interconnects, Reconfiguration is able
from these cells. However, the cells to change a function of each CLB and
provided on the FPGA can be

2496

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

connections among them, leading to a III. Basic Concepts on Sliding Mode


functionally new digital circuit [17]. Control
VHDL: The acronym VHDL The first step in SMC is to define a
stands for the VHSIC Hardware time-varying sliding surface S(t) that
Description Language. The acronym is linear and stable. Three S(t) acting
VHSIC, in turn, refers to the Very on the tracking-error expression are
High Speed Integrated Circuit selected in this work, these sliding
program. [18]. VHDL is a language surfaces are:
for describing digital systems at many 1) derivative-differential equation
levels of abstractions ranging from the which is defined as:
algorithmic level to the gate level S (t ) = λ e(t ) + e&(t ) ..(1)
[19]. Such description can be used by
a simulator for simulating the 2) integral-differential equation that
behavior of the system without having is defined as:
t
to actually construct the system.
Alternative synthesis compiler can ∫
S (t ) = e(t ) + λi e (t ) d t ..(2)
0
utilize such a description for creating
3) derivative-integral-differential
description of the digital hardware for
that is defined as:
implementing the system [20].A t

circuit or subcircuit described with


VHDL code is called a design entity,

S (t ) = λe(t ) + e&(t ) + λi e(t ) dt …(3)
0

or just entity. It has two main parts: where λ, λi are a strictly positive
the entity declaration and the constant, and e(t ) = rd (t ) − y(t ) is the
architecture [21]. In VHDL an entity
is the equivalent of an IC package in tracking errors, the rd (t ) is the
electronics. A package is defined by desired input (setpoint) and y(t) is the
its name and the number and nature of output measurement (state). while
ports it used to exchange data and e&(t ) is the time derivative of the
interact with external circuits. It is not t

relevant to the function that the ∫


tracking error e(t) and ( e (t ) d t ) is an
0
component performs, the resources it
uses, or the complexity by which it is integration term to reduce the system
characterized [22]. Architecture, steady state error.
continuing with the analogy of an IC, Sliding mode means that once
is equivalent to the internal electronic the state trajectory e has reached the
circuit that performs the function for sliding surface S = 0 the system
which the component has been trajectory remains on it while sliding
designed. At this stage all the signals into the origin e=0, independently of
the entity uses to communicate with model uncertainties, unmodeled
the external world are defined and frequencies, and disturbances [24]. By
unchangeable [23]. choosing the Lyapunov function
candidate:

2497

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

1 one will explained with the sliding


V= S (t ) T S (t ) ≥ 0 …(4) function of Eq.(3), but we can use any
2
and depending on the time derivative sliding function with these controllers
for the above Equation, a reaching as will given in next sections.
condition (sliding condition) is However these approaches are:
obtained as;
IV.1 SMC with Boundary Layer
S (t ) S& (t ) ≤ −η S (t ) …..(5)
T Slotine [4] proposed a technique
to change the dynamics near to the
where η is a positive constant that sliding surface in order to avoid a real
guarantees the system trajectories hits discontinuity and at the same time to
the sliding surface in a finite time. preserve the sliding mode properties.
This technique introduces boundary
Equation(5) provides a sufficient layer(BL) on both sides of the sliding
reaching condition such that the surface in order avoid the chattering
tracking error e(t) will asymptotically effect in the control signal. The thin
converge to zero [25]. In order to BL neighboring the sliding surfaces is
meet that condition, the control law u defined as [24];
of Fig. 1 is chosen as follows
B(t ) = 2Φ, Φ > 0 …..(8)
u = K sgn(S ) …. (6)
where Φ is the boundary layer
where the sliding gain K>0 and sgn(S) thickness, let S is the distance
is a sign(or signum) function, which between state e and sliding surface
is defined as S = 0 . Then a state e is located inside
− 1 if S < 0 the BL if S ≤ Φ , and it is located

sgn( S) =  0 if S = 0 ….. (7) outside if S > Φ ,see Fig. 2, to
 1 if S > 0
 remedy the control discontinuity in
As explained before, using a sign the boundary layer, the signum
function often cases a chattering function ( sgn(S) ) is replaced by a
problem. In the next section different saturation function, see Fig. 3 of the
enhancement sliding mode form [2].
control(ESMC) approaches that used sgn( S ), if S ≥ Φ
for avoided or reduce chattering 
sat ( S ) =  S
problem are presented and  , if S < Φ
implemented with FBGA technique. Φ
IV. Different ESMC Approaches …..(9)
In this section, three SMCs are
Although, the sliding variable will
given, the first and the third approach
reach within the vicinity of the sliding
of these will explained for the sliding
surface. However, the accuracy and
function of Eq.(1), while the second
robustness of the sliding mode are

2498

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

partially lost [5]. Let ε = λ − 1Φ , be σ& PI + KI σ PI > 0 for all σ PI > 0


the boundary layer width. As shown σ& PIi + KI σ PI < 0 for all σ PI < 0
in [6], the tracking errors exist within ….(11)
a guaranteed precision ε . Therefore,
the larger the boundary layers the Inequalities (11) imply that ρ PI
smaller the control chattering and the increases for all σ PI > 0 , and ρ PI
greater the tracking errors [2].
decreases for all σ PI < 0 [26].
IV.2 PI Sliding Mode Controller
IV.3 Boundary SMC with New
A proportional-integral Approximation sign Function
combination of the sliding function is
proposed in the boundary layer in The sliding function of Eq.(3) is
place of the signum function by [7]. used in this section and in order to
This continuous controller can force reduce the chattering effect in the
the system states to reach the sliding SMC and to avoid simulation
surface and attain high tracking difficult, the function in Eq.(12)[11,
performance. The equation for this 27] has been used to approximate the
saturated proportional-integral sign function( sgn(S) ) of Eq.(7);
functions is given by [7];
S
 1 if σ PI > 1 sgn a ( S ) ≈ ….(12)
 i t S + δs
ρ PI (σ PI ) = σ PI + K I ∫ σ PI if − 1 ≤ σ PI ≤ 1,
 i0t where δ s is a small positive constant,
 −1 if σ PI < −1 and can be used to trade-off between
….(10) maintaining ideal performance and
S obtaining smooth control action[13],
where σ PI = ; K I > 0 is an in this case the saturation function of
Φ
Eq.(9) becomes
integral gain, and ti 0 is the initial time
sgn a ( S ), if S ≥ Φ
when the system states enter the 
sat ( S ) =  S
boundary layer B (t ) in Eq.(8).
 , if S < Φ
If σ PI ≥ 1 the integration term in Φ
….(13)
Eq.(10) will be reset to zero to prepare
for the system state entering boundary V. Proposed FPGA Design and
layer. It is assumed that the chosen Implementation of Sliding
integration gains KI are sufficiently Mode Controllers
large such that The proposed design in field
programmable gate arrays as shown in
Fig.4 is divided into four components;
each component is represented one

2499

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

type of sliding mode controllers FI=010, therefore Eq.(2) is


(SMCs) as shown in the following Implemented, finally Eq.(3) is
points: implemented when SF=10 that means
FI=011.
1- SMC1: is represented the The final output (control action) of
conventional SMC. the proposed FPGA sliding mode
2- SMC2: is represented SMC with controllers design is determined by
boundary layer. the output chip select, inputs to this
3- SMC3: is represented PI sliding chip are the four enable signals of
mode controller. controller chips select
4- SMC4: is represented the (EN1,EN2,EN3,and EN4) and the
boundary SMC that have new output control action of each
approximation sign function. controllers (U1,U2,U3,and U4). The
output of the output chip select is only
Each of these controller works the control action of the chosen
independent of others, so the user is working controller according to
decided which controller is done enable signals as demonstrated in
depending on controller chip select as Table(3). The design and
shown in Table(1), this table shows implementation operation of this
how the user can be selected any of proposed FPGA design is done by
these four types of controllers; so using ISE 4.1i package based on
when the chip select pins S2 S1(2-bit VHDL language (combination of
vector signal) equal to (00) this leads structural and behavioral architecture)
that the signal (EN1) is active so that and Xilinx Vertix family (Xcv1000-
the first type of these controllers fg680-4) FPGA as hardware device;
(general SMC) is selected; but when so the design become more reliable
(S2 S1)=10, i.e. (EN2) is active and adaptable for future
,therefore the second controller (SMC developments.
with boundary layer) is selected and The functionality behaviors of
so on. There are three types of sliding these controllers are verified using
function (S (t)) to this proposed SMCs timing simulation tools of Active-
design, in order to chose which of HDL program, therefore some of
these three inputs is active simulation results are presented in this
(implemented); there is a sliding paper as shown in Figs. from 5 to 11.
function chip select inside each of Synthesis, map, and timing constraint
these four controllers, the inputs to reports are shown in Figs.12, 13, and
this chip is SF (2-bit vector signal) 14.
and the output is FI (3-bit vector Finally to show how the final
signal); therefore any of sliding FPGA design of the sliding mode
equations is implemented as shown in controllers works, take for examples
Table (2). The signal FI=001 by the Fig. 5 and Fig. 6 for behavioral
assertion of SF to 00, so Eq.(1) is simulation. In Fig. 5 for ‫=גּ‬c=2, k=10
implemented; but when SF=01, and by the assertion of these signals

2500

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

((S= (S2S1) =00) and SF=00), this conventional SMC are given in the
lead to 4-bit enable vector (EN) equal Appendix A (see this Appendix A).
to 0001 that mean EN1 is active and For simplicity, we refer to the first
FI=001, therefore the first type of ESMC approach(SMC with boundary
controllers is selected and layer) as E1-SMC, The second
implemented the first sliding function ESMC (PI-sliding mode controller) as
equation for different values of error E2-SMC, while the third one (
(e) and change of error (ce), so the boundary SMC with new
control action (u) is the output of the approximation sign function) is refer
first controller(general). as E3-SMC, note that this controller
In Fig. 6 for ‫=גּ‬c=1, k=10, use δ s = 0.05 for all the tested
Φ=f=0.5, S2S1=01 and SF=00, this systems.
lead to 4-bit enable vector (EN) equal A. Linear Models
to 0010 that mean EN2 is active and Two second-order linear systems
FI=001, therefore the second type of examples have been tested; the first
controllers (SMC with boundary example is a system with the transfer
layer) is selected and implemented the function
first sliding function equation for
different values of error (e) and 2
G(s) = …(14)
change of error (ce), so the control s + 4s + 3
2

action (u) is the output of the second


Suitable control parameters that
controller.
satisfy Eq.(5) are selected for each
VI. Simulation Results SMC approach, these parameters are
In this section and with Matlab
given in Table(4), we refer to the
Simulink (version 7.0 and R2006a),
parameter that is not used as “---”.
we show some computer simulation
This table also shows the type of the
results using the ESMC approaches
sliding function that is used by these
that presented in this paper. In these
controllers. If the unit step input
simulations, several linear and
(r d(t)=1) is used, then the response of
nonlinear systems are tested (taken the close loop system (without SMC
from ref.[28]) in addition to linear
or any controller) for the above plant
unstable and linear time varying
will track the desired input without
examples (these two examples are oscillation but with steady state error
presented in Appendix B) to illustrate
more than 40% (see the appendix),
the performance of the these methods
where the steady state error is
for step or ramp or parabolic reference
calculated by;
inputs, and also to show which
approach between them give ess = lim e(t ) …(15)
t →∞
remarkable performance, as good as
But, if ESMC approaches are used to
(if not better than) the other
approaches, while the simulation control this system (see output, error
results for these systems with unity and control signal form Fig.15), then
feedback (without controller) and with it clearly reveals that the system with

2501

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

all the ESMCs track the input without Fig. 16c shows that the control
any oscillation but with steady state signals of E1-SMC and E2-SMC are
error less than 0.6%, 0.8%, and 2.26% smooth more than the control signal
for E2-SMC, E3-SMC, and E1-SMC of E3-SMC.From the above linear
in respectively, that mean the E2- examples, it is easy to conclude that
SMC and E30-SMC are given better all the performance of ESMCs is
performance than the E1-SMC remarkable especially E2-SMC, this is
although it use smaller boundary because the structure of it contain the
thickness ( Φ = 0.2 ) than the other. integral term KI that help to improve
Furthermore, it is obvious from these the performance of it, therefore it has
results that all ESMCs regulate the steady state error less than E1-SMC
system with remove the chattering and E3-SMC.
from the control comparing with
conventional SMC which suffer from B. Nonlinear Models
this problem. Two examples are chosen here for
The second linear example has the simulation and comparison, as
following transfer function. mention in above these examples are
1 taken from [28]. The first nonlinear
G(s) = … (16) example has the following simple
s( s + 100)
mathematical model:
Which is only marginally stable,
the sliding functions and the control y& (t ) = 0.0001 y(t ) + u (t )
… (17)
parameters that used for this example
are given in Table(5). If reference is For ramp input and controller
parabolic signal r d(t)=0.15t2, then parameters given in Table (6), this
results are shown in Fig.16. This table table show that all the ESMCs use the
shows that all the SMCs use the sliding function of Eq.(2), The
sliding function of Eq.(2). We simulation results are given by Fig.
observed from Fig.16a, that all the 17, we observed from these results
SMCs approaches are able to track the that all the SMCs approaches produce
parabolic signal, it is also clearly faster convergence rate to the desired
reveals from Fig.16b that the E2-SMC ramp input without chattering and
has less than 0.0072% steady state with smaller error comparing with the
error, and the steady state error with conventional SMC, see the appendix
E1-SMC and E3-SMC is less than to show the difference between these
0.738% and 0.753% in respectively, controller. Finally the enhancement
which mean that the performance of SMC approaches have been compared
E1-SMC and E3-SMC is same but by using a another nonlinear example
model from [28], this model is
since E1-SMC use λi = 5.1 this make
described by;
the steady state error became smaller
than the E3-SMC. y&(t ) = − y(t ) + 0.5 y2 (t ) + d (t ) + u(t )
….(18)

2502

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

cost, speed and easy development.


The controller parameters are Computer simulation is performed on
given in Table(7), this table show that linear and nonlinear systems using
E1-SMC and E2-SMC use the sliding Matlab Simulink version 7.0 and
function of Eq.(1), while E3-SMC use R2006a, the results from these
the sliding function of Eq.(2). simulations show that all
However, the simulation results of enhancement SMC approaches that
such system for unit step input r d(t)=1 have used in this paper are able to
are shown in Fig. 18, track the desired input with no or
The simulation results small chattering, and with zero or
demonstrate one again that all the small steady state error spatially the
ESMCs enhance the performance of PI sliding mode controller.
the simulated example than the References
conventional SMC spatially the E2-
SMC, where all SMCs produce a good [1] S. Emelyanov: “Variable Structure
tracking response, and they are Control Systems”; Moscow:
effective for eliminating chattering Nauka, 1967.
even in the presence of noisy
disturbance specially by E2-SMC [2] V. Utkin:” Sliding Modes and
which achieved steady state error less Their Application in Variable
than 0.1%, while E1-SMC and E3- Structure Systems”; Moscow:
SMC achieved 3.57%, 0.5% error Nauka, In Russian, 1974.
steady state in respectively.
From the simulation results of the [3] R. A. DeCarlo, S.H Zak, and G.P.
above linear and two nonlinear Matthews: “Variable Structure
examples, it can be concluded that the Control of Nonlinear Multivariable
system response with all the ESMCs Systems: a Tutorial”; Proceeding
give efficient results esptially the E2- of IEEE, Vol.76, No.3, pp.212-
SMC which perform steady state error 232, Mar. 1988.
more smaller than the other
[4] J. Y. Hung, W. Gao, and J. C.
approaches due to the integral part KI
Hung: “Variable Structure
in structure of it.
Control: a Survey”; IEEE
Transactions on Industrial
VII. Conclusions Electronics, Vol.40, No.1, pp.2-
This paper aims to present and
22, Feb. 1993.
implement some of the common
enhancement approaches that provide [5] Utkin, V.I.:” Sliding Modes in
an effective way to resolve the Control and Optimisation”,
chattering problem, in addition to the Springer-Verlag, 1981.
conversional SMC with the FPGA
technique to become easy use with [6] Y. Itkis: “Control Systems of
different control systems, this is Variable Structure”; New York,
because FPGA provide a low area Wiley, 1976.

2503

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

[7] T. V. M. Nguyen, Q. P. Ha and H. Chattering-Free (Higher Order)


T. Nguyen;” A Chattering-Free Sliding Mode Control for a
Variable Structure Controller for Vector-Controlled Induction
Tracking of Robotic Machine”; Control Conference,
Manipulators”; Faculty of 2004.5thAsian, Vol. 2, Issue,
Engineering, University of 20-23, pp. 1362 – 1370, July
Technology, Sydney, 2003. 2004.
[8] H. G. Kwatny and T. L. Siu; [14] R. C. Dorf: "The Electrical
“Chattering in Variable Structure Engineering Handbook"; CRC
Feedback Systems”; in Proc. Press LLC, 2000.
IFAC 10th World Congr., vol. 8,
pp. 307-314, 1987. [15] I. W. Chen: "The VLSI
Handbook"; CRC Press LLC,
[9] J.J.E. Slotine and W. Li:” Applied USA, 2000.
Nonlinear Control”; Englewood
Cliffs, NJ, Prentice Hall, [16] M. Balch: "Complete Digital
Englewood cliff, New Jersey, Design"; McGraw-Hill
1991. companies Inc., USA, 2003.

[10] M. Corless and G. Leitmann: [17] Xilinx, Inc.: "Virtex 2.5 V Field
“Continuous State Feedback Programmable Gate Arrays";
Guaranteeing Uniform Ultimate available at http://www.xilinx.com.
Boundedness for Uncertain [18] Z. Navabi: “VHDL: Analysis and
Dynamic Systems”; IEEE Modeling of Digital Systems”;
Transactions on Automatic McGrow-Hill Companies, Inc.,
Control, Vol. 26, pp. 89-94, Oct. 1993.
1981.
[19] J. BHASKER: “A VHDL
[11] M. Chen, Y. Hwang, and M. Primer”; Prentice-Hall, Inc.,
Tomizuka, “A State-Dependent Third Edition, 1999.
Boundary Layer Design for
[20] M. Zwolinski: “Digital System
Sliding Mode Control ”, IEEE
Design with VHDL”; Prentice-
Transactions on Automatic
Hall, Inc., 2000.
Control, Vol. 47, No. 10, pp.
1677-1681, Oct. 2002. [21] S. Brown and Z. Vranesic:
“Fundamentals of Digital Logic
[12] Edwards C.and Spurgeon S.K.;
with VHDL Design”; McGrow-
” Sliding Mode Control: Theory
Hill Companies, Inc., 2000.
and Applications”;
Taylor&Francis, UK, 1998. [22] S. Sjoholm and L. Lindh:
“VHDL for Designers”;
[13] Goh, K.B.; Dunnigan, M.W.; Prentice-Hall, Inc., 1997.
Williams, B.W. “Robust

2504

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

[23] Peter J. Ashenden: “The VHDL


Cookbook”; First Edition, July
1990.
[24] R. Palm, D. Driankov and H.
Hellendoorn:” Model Base Fuzzy
Control: Fuzzy Gain Schedulers
and Sliding Mode Fuzzy
Controllers”; Springer-Verlag
Berlin Heidelberg, 1997.
[25] N. H. Quang:” Robust Low Level
Control of Robotic
Excavation”; Ph.D., Thesis,
Australian Centre for Field
Robotics, University of Sydney,
and Mar. 2000.
[26] S.L. Salas and E. Hill:” Calculus:
One and Several Variables”;
New York: Wiley, 1990.
[27] Oscar Camacho, Rubén Rojas,
Luís González:” Sliding Mode
Control Proposal for Variable
Dead Time Processes”; Rev.
INGENIERÍA UC. Vol. 11, No
3, Dec. 2004.
[28] Heidar A.Malki, Huaidong Li.
And Guanrong Chen,:”New
Design and Stability Analysis of
Fuzzy Proportional-Derivative
Control Systems”; IEEE
Transactions on Fuzzy Systems,
Vol. 2, No.4, pp. 245-254, Nov.
1994.

2505

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech. Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding Mode
Controllers by VHDL

Table (1) Sliding mode controllers select. Table(5): Example(2) parameters.


S1 S2 EN1 EN2 EN3 EN4 SMC type K Φ λi KI λ
0 0 1 0 0 0 E1-SMC 400 0.5 5.1 --- ---
1 0 0 1 0 0 E2-SMC 400 0.5 5 1 ---
0 1 0 0 1 0 E3-SMC 400 0.5 5 --- ---
1 1 0 0 0 1
Table (6): Example (3) parameters.
Table (2) Sliding function select.
SF FI Note SMC type K Φ λi KI λ
00 001 S(t)=Eq.1 E1-SMC 8 0.5 0.1 --- ---
01 010 S(t)=Eq.2 E2-SMC 8 0.5 0.1 0.1 ---
10 011 S(t)=Eq.3 E3-SMC 8 0.5 0.2 --- ---

Table(3) Control actions of SMCs select. Table (7): Example (4) parameters.
U EN1 EN2 EN3 SMC type K Φ λi KI λ
U=U1 1 0 0 E1-SMC 2 0.5 --- --- 3.5
U=U2 0 1 0 E2-SMC 2 0.5 --- 0.122 3.5
U=U3 0 0 1 E3-SMC 2 0.5 0.3 --- ---
U=U4 0 0 0

Table (4): Example(1) parameters.


SMC Φ λi
K KI λ
type
E1-SMC 6.5 0.2 --- --- 2
E2-SMC 6.5 0.5 --- 0.3 2
E3-SMC 6.5 0.5 0.15 --- 2

2513

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech. Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding Mode
Controllers by VHDL

rd e u us y
SMC Process
+ _
-

Figure1: Closed loop control system with


sliding mode controller.

e&
S=0
S=0

Figure.2: The sliding surface and the boundary


layer.

−Φ
Φ

Figure.3: The saturation


function.
Figure. 4: The proposed FPGA design for
SMCs.
(c= ‫גּ‬and ‫ גּ‬c1= ‫ גּ‬and f=Φ)

2513

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

Figure. 5: General sliding mode controller with sliding function of Eq.(1)

Figure. 6: SMC with boundary layer with saturation function with sliding
Function of Eq.(1) when s< Φ and when s>= Φ

Figure. 7: SMC with PI sliding control law with sliding function of Eq.(1)
2508

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

Figure. 8: PI sliding mode controller with sliding function of Eq.(2)

Figure. 9: PI sliding mode controller with sliding function of Eq.(3)

Figure. 10: Boundary SMC with new approximation sign function with sliding function of
2509
Eq.(1)

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

Figure. 11: Boundary SMC with new approximation sign function with
sliding function of Eq.(2)

Figure.12: Map report Figure.13: Synthesis report

Figure. 14: Timing constraint report

2510

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

1 15

0.8
10

O utpout R espo nse


Output Response

0.6
5
0.4

0 E1-SMC
E1-SMC
0.2 E2-SMC
E2-SMC
E3-SMC
E3-SMC
0 -5
0 2 4 6 8 10 0 2 4 6 8 10
Time(Se c) Time(Sec)
Fig. 15a: The output response of ESMCs for the linear Fig.16a: The output response of ESMCs with linear second
system of example(1) with a unit step input. order system of example(2) with a parabolic input.

1
0.01
E1-SMC
E2-SMC
0.8 E3-SMC 0.008
Erro r Sig na l

E r r o r S ig n a l

0.6
0.006

0.4 0.004

E1-SMC
0.2 0.002 E2-SMC
E3-SMC
0 0
0 2 4 6 8 10 0 2 4 6 8 10
Time(Sec) Time(Sec)
Fig. 15b: Error signal curves for linear system Fig. 16b: Error signal curves for linear system
of example(1) with ESMCs. of example(2) with ESMCs.
7
350
E1-SMC
6 E2-SMC
E3-SMC
300
Control Signal

5
250
C o n tr o l S ig n a l

4 200

3 150

2 100 E1-SMC
E2-SMC
1 50 E3-SMC
0 2 4 6 8 10
Time(Sec) 0
0 2 4 6 8 10
Time(Sec)
Fig. 16c: Control signal curves for linear
Fig. 15c: Control signal curves for linear system system of example(2) with ESMCs.
of example(1) with ESMCs.

2511

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding
Mode Controllers by VHDL

12 1

10
0.8
O utp o u t R e s po n se

O u t p o u t R e sp o n se
8
0.6
6

0.4
4
E1-SMC
E2-SMC 0.2 E1-SMC
2
E3-SMC E2-SMC
E3-SMC
0 0
0 2 4 6 8 10 0 2 4 6 8 10
Time(Sec) Time(Sec)
Fig. 17a: The output response of ESMCs with Fig.18a: The output response of ESMCs with
nonlinear system of example(3) with a ramp input. nonlinear system of example(4) with a unit step input.

0.07 1
E1-SMC
0.06 E1-SMC
E2-SMC
0.8 E2-SMC
0.05 E3-SMC
E3-SMC
Error Signal

E r r o r S ig n a l

0.04
0.6
0.03

0.02 0.4

0.01
0.2
0

-0.01 0
0 2 4 6 8 10 0 2 4 6 8 10
Time(Sec) Time(Sec)
Fig. 17b: Error signal curves for nonlinear Fig. 18b: Error signal curves for nonlinear
system of example(3) with ESMCs. system of example(4) with ESMCs.

1.4 2
1.2 1.8 E1-SMC
E2-SMC
1 1.6 E3-SMC
C o ntr ol SIg na l

C o n t r o l S ig n a l

0.8 1.4

1.2
0.6
1
0.4 E1-SMC
E2-SMC 0.8
0.2 E3-SMC
0.6
0
0 2 4 6 8 10 0.4
Time(Sec) 0 2 4 6 8 10
Fig. 17c: Control signal curves for nonlinear Time(Sec)
system of example(3) with ESMCs. Fig. 18c: Control signal curves for nonlinear
system of example(4) with ESMCs.

2512

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech. Journal, Vol. 27, No.12, 2009 Represent Different Types of Sliding Mode
Controllers by VHDL

Appendix A

This appendix illustrate the simulation results (output response, error signal, and
control signal) of the four examples that are given in section VI when the control
system uses the conventional SMC(u=Ksgn(S)) with sliding function of Eq.(1) for
examples 1,2,4 and with sliding function of Eq.(2) for example 3. The inputs and
the control parameters with this controller for each example are given in Table
(A.1), the values of K parameters are same the values of K in the ESMCs
approaches except in example 2 and 4. Also this appendix illustrate the response
of the tested example (with unity feedback) without controller.
Table (A.1): input and parameters for the simulation examples .
Example Type of input K λ λi
No.
Ex.1 Step input 6.5 2 ---
Ex.2 Parabolic input -400 -6 ---
Ex.3 Ramp input 8 --- 0.1
Ex.4 Step input -2 -8 ---
The results for the simulation examples are shown in the following figures, where
the dished line ’---‘ refer to response of these examples without controller, while
the sold line ’__’ refer to response of these examples with the conventional SMC.

2513

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of
Sliding Mode
Controllers by VHDL

Appendix B

This appendix illustrate the simulation results (output response, error


signal, and control signal) of two additional examples, the first one is
1
linear unstable system with G ( s) = which has two root lies at the
( s − 5)
2

right half plane, the second one is linear time varying model
y& (t ) = a (t ) y(t ) + b(t )u (t ) , where a(t)=0.001t and b(t)=0.15t, t is varying
from zero to 10Sec. The sliding functions, types of controllers and the
control parameters that are used for controlling these examples are given in
Table(B.1) and Table(B.2). This appendix also illustrates the response of
these simulated examples without controller (with unity feedback).

Table (B.1): types of controllers and control Table (B.2): types of controllers and control
parameters for the linear unstable example. parameters for the linear time varying example.
SMC type K Φ λi KI λ SMC type K Φ λi KI λ

E2-SMC 35 0.5 --- --- 3 E1-SMC 4 0.5 .00001 --- 2

2314

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of
Sliding Mode
Controllers by VHDL

E2-SMC 35 0.5 --- 0.3 3 E2-SMC 4 0.5 .00001 .0001 2

E3-SMC 35 0.5 .005 --- 3 E3-SMC 4 0.5 .0002 --- 2

Conventional 10 --- --- --- 3 Conventional 4 --- .00001 --- 2


SMC SMC

If reference is unit step signal, then the results for the simulation examples
are shown in the following figures. As in appendix A, in the figures
without legend, the dished line ’---‘ refer to response of these examples
without controller, while the sold line ’__’ refer to response of these

2315

PDF created with pdfFactory Pro trial version www.pdffactory.com


Eng. & Tech.Journal, Vol. 27, No.12, 2009 Represent Different Types of
Sliding Mode
Controllers by VHDL

examples with the conventional SMC. We observed from Fig.B2 and


Fig.B4, that all the ESMCs approaches track the desired input signal, with
zero or a small steady state error.

2316

PDF created with pdfFactory Pro trial version www.pdffactory.com

You might also like