The sliding mode control has a unique place in control theories. First, the exact mathematical treatment represents numerous interesting challenges for the mathematicians. Secondly, in many cases it can be relatively easy to apply without a deeper understanding of its strong mathematical background and is therefore widely used in engineering practice. This article is intended to constitute a bridge between the exact mathematical description and the engineering applications. After a short overview of the sliding mode control the article presents its mathematical foundations, namely the theory of differential equations with discontinuous righthand sides. The power electronic circuits, which always have some kind of switching elements, can be typically described by such differential equation. Such equations don’t fulfill the regular theorem of existence and uniqueness, but under certain conditions remain valid, if we interpret the solution of the differential equation according to the definition proposed by Filippov. The article presents a practical example of the definition proposed by Filippov per a sliding mode control of an LC circuit and an experimental application on uninterruptible power supply.
Recently most of the controlled systems are driven by electricity as it is one of the cleanest and easiest (with smallest time constant) to change (controllable) energy source. The conversion of electrical energy is solved by power electronics. One of the most characteristic common features of the power electronic devices is the switching mode. We can switch on and off the semiconductor elements of the power electronic devices in order to reduce losses because if the voltage or current of the switching element is nearly zero, then the loss is also near to zero. Thus, the power electronic devices belong typically to the group of variable structure systems (VSS). The variable structure systems have some interesting characteristics in control theory. A VSS might also be asymptotically stable if all the elements of the VSS are unstable itself. Another important feature that a VSS  with appropriate controller  may get in a state in which the dynamics of the system can be described by a differential equation with lower degree of freedom than the original one. In this state the system is theoretically completely independent of changing certain parameters and of the effects of certain external disturbances (e.g. nonlinear load). This state is called sliding mode and the control based on this is called sliding mode control which has a very important role in the control of power electronic devices.
The theory of variable structure system and sliding mode has been developed decades ago in the Soviet Union. The theory was mainly developed by Vadim I. Utkin [1] and David K. Young [2]. According to the theory sliding mode control should be robust, but experiments show that it has serious limitations. The main problem by applying the sliding mode is the high frequency oscillation around the sliding surface, the socalled chattering, which strongly reduces the control performance. Only few could implement in practice the robust behavior predicted by the theory. Many have concluded that the presence of chattering makes sliding mode control a good theory game, which is not applicable in practice. In the next period the researchers invested most of their energy in chattering free applications, developing numerous solutions.
After the introduction, the second section summarizes the mathematical foundations of sliding mode control based on the theory of the differential equations with discontinuous righthand sides, explaining how it might be applied for control relay. The third section shows how to apply the mathematical foundations on a practical example.
The first example introduces a problem that can often be found in the engineering practice. Assume that there is a serial LC circuit with ideal elements, which can be shorted, or can be connected to the battery voltage by a transistor switch (see Figure 41., where the details of the transistor switch are not shown). Assume that our reference signal has a significantly lower frequency than the switching frequency of the controller. Thus we can take the reference signal as constant.
Assume that we start from an energy free state, and our goal is to load the capacitor to the half of the battery voltage by switching the transistor. The differential equations for the circuit elements are:
$$C\frac{d}{dt}{u}_{c}={i}_{c}$$ and $$L\frac{d}{dt}{i}_{L}={u}_{L}$$ 
(4.1) 
Due to the serial connection ic = iL, thus the differential equation describing the system is:
$${u}_{AB}={u}_{c}+LC\frac{{d}^{2}}{d{t}^{2}}{u}_{c}$$ 
(4.2) 
Introduce relative units such way, that LC = 1 and Ubat = 1. Introduce the error signal voltage ue = Ur  uc, where Ur = 1/2 is the reference voltage of the capacitor. Thus, the differential equation of the error signal has the form:
$$u={u}_{e}+\frac{{d}^{2}}{d{t}^{2}}{u}_{e}$$ $,where$ $$u=\{\begin{array}{c}\frac{1}{2},\text{\hspace{1em}}\text{iftheswitchisinstate1}\\ \frac{1}{2},\text{\hspace{1em}}\text{iftheswitchisinstate2}\end{array}$$ 
(4.3) 
It is easy to see that the state belonging to the solution of (4.3) equation moves always clockwise along a circle on the phase plane $${u}_{e},\frac{d}{dt}{u}_{e}$$ (see Figure 42.).
The center of the circle depends on the state of the transistor. The statetrajectory is continuous, so the radius of the circle depends on in what state the system is at the moment of the last switching. Assume that we start from the state
$${u}_{e}=1/2,\frac{d}{dt}{u}_{e}=0$$ 
(4.4) 
and our goal is to reach by appropriate switching the state
$${u}_{e}=0,\frac{d}{dt}{u}_{e}=0$$ 
(4.5) 
Introduce the following switching strategy:
$$u=\frac{1}{2}\text{sign(}s\text{)}$$ 
(4.6) 
where
(4.7) 
This means that if the statetrajectory is over the s = 0 line, then we have to switch the circle centered at O1, if it is below the line, then we have to switch the circle centered at O2. Examine how we can remove the error. Consider Figure 43., according to (4.6) and (4.7)(4.4) at first we start over the s = 0 line on a circle centered at O1. Reaching the line we switch to the circle centered at O2 so that the statetrajectory remains continuous. After the second switching we experience an interesting phenomenon. As the state trajectory starts along the circle centered at O1, it returns immediately into the area, where the circle centered at the O2 has to be switched, but the statetrajectory can not stay on this circle either, new switching is needed. For the sake of representation, the statetrajectory in Figure 43.reaches significantly over to the areas on both sides of the s = 0 line. In ideal case the state trajectory follows the s = 0 line on a curve broken in each points consisting of infinitely short sections switched by infinitely high frequency. In other words, the trajectory of the error signal slides along the s = 0 line and therefore is called sliding mode.
Based on the engineering and geometric approach we feel that after the second switching, the behavior of the error signal can be described by the following differential equation instead of the second order (4.3):
$$0={u}_{e}+\lambda \frac{d}{dt}{u}_{e}$$ 
(4.8) 
This is particularly interesting because (4.8) does not include any parameter of the original system, but the $$\lambda $$ we have given. Thus we got a robust control that by certain conditions is insensitive to certain disturbances and parameter changes. Without attempting to be comprehensive investigate the possible effects of changing some attributes and parameters of the system. If we substitute the ideal lossless elements by real lossy elements, then the statetrajectory instead of a circle moves along a spiral with decreasing radius. If the battery voltage fluctuates, the center of the circle wanders. Both changes affect the section before the sliding mode and modifies the sustainability conditions of the sliding mode, but in either case, the sliding mode may persist (the state trajectory can not leave the switch line), and if it persists, then these changes will not affect the behavior of the sliding mode of the system.
The next section will discuss how we can prove our conjecture mathematically.
Consider the following autonomous differential equation system:
$$\frac{d}{dt}x(t)=f(x(t))$$ and $$x(t={T}_{0})={X}_{0}$$ 
(4.9) 
where
$$x\in {\Re}^{n}$$and $$f(x):{\Re}^{n}\to {\Re}^{n}$$ 
(4.10) 
If f(x) is continuous then we can write (4.5) as the integral equation:
(4.11) 
The approach of (4.9) according to (4.11) is called Carathéodory solution, which under certain conditions may also exist when f(x) is discontinuous . Recently, several articles and PhD theses dealt with it how to ease the preconditions which guarantee the existence of (4.11) concerning f(x), but for the introduced example none of the cases might be applied, we need a completely different solution.
Filippov recommends a solution, which is perhaps closer to the engineering approach described in the previous section [3] [4]. Filippov is searching the solution of (4.9) at a given point based on how the derivative behaves in the neighborhood of the given point, allowing even that the behavior of the derivative may completely different from its neighborhood on a zero set, and regarding the solution ignores the derivative on this set. Filippov’s original definition concerns nonautonomous differential equations, but this article deals only with autonomous differential equations.
Consider (4.9) and assume that f(x) is defined almost everywhere on an open subset of $${\Re}^{n}$$. Assume also that f(x) is measurable, locally bounded and discontinuous. Define the set K(x) for x $$\subset $$ f(x) by:
$$K(x):=\underset{\delta >0}{\cap}\underset{\mu N=0}{\cap}\text{conv}\text{\hspace{0.17em}}f(Q(x,\delta )N)$$ 
(4.12) 
where $$Q(x,\delta )$$ denotes the open hull with center x and the radius , is the Lebesgue measure, N is the Lebesgue null set and the word "conv" denotes the convex closure of the given set.
Filippov introduced the following definition to solve the discontinuous differential equation systems:
Definition:
An absolutely continuous vectorvalued function $$x(t):[{T}_{0},{T}_{2}]\to G\in {\Re}^{n}$$ is the solution of (4.9) if
$$\frac{d}{dt}x\subset K(x(t))$$ 
(4.13) 
for almost every $$t\subset [{T}_{0},{T}_{2}]$$. Note that if f(x) is continuous, then set K(x) has a single element for every x, namely f(x), thus the definition of Filippov is consistent with the usual differential equations (with continuous righthand side). However, if f(x) is not continuous, then this definition allows us searching a solution for (4.9) in such a domain of x, where f(x) is not defined.
.
Apply the definition of Filippov as a generalization of the introductory example in the case of such a controller with state feedback, where in the feedback loop only a relay can be found (see ???
Figure 44.). Assume that the state of the system can be described by the differential equation (4.9), where the vectorfunction f(x) is standing on the righthand side rapidly varies depending on the state of the relay. The control (switching) strategy should be the following. In the domain of the space $$G\in {\Re}^{n}$$defined by the fedback state variables define an n1 dimensional smooth regular hypersurface S (which can also be called as switching surface) using continuous $$s(x):{\Re}^{n}\to \Re $$ scalarvector function in the following way:
$$S:=\{x:s(x)=0\}$$ 
(4.14) 
The goal of the controller is to force the statetrajectory to this surface. Mark the points of the surface S with xs. With the help of this surface we can divide the domain G into two parts:
Let the differential equation for x on domain G and our switching strategy have the following form:
$$\frac{d}{dt}x=f(x)=\{\begin{array}{c}{f}^{+}(x),\text{\hspace{1em}}\text{if}\text{\hspace{1em}}x\in {G}^{+}\\ {f}^{}(x),\text{\hspace{1em}}\text{if}\text{\hspace{1em}}x\in {G}^{}\end{array}$$ 
( 4.17 ) 
where f +(x) and f (x) are uniformly continuous vectorvector functions.
Note that f(x) is not defined on the surface S, and we did not specify that f +(x) and f (x) must be equal on both sides of the surface S.
Outside the surface S we have to deal with an ordinary differential equation. Solution of (4.17) might be a problem in the xs(t) points of the surface S. According to definition (4.13), K is the smallest closed convex set, which you get in the following way: let’s take an arbitrary $$\delta >0$$ hull of all xs(t) points of the xs belonging to the surface S, exclude f(xs), where f(x) is not defined (remark: it is a null set N domain), and we complete the set of f(x) vectors belonging to the resulting set to a closed convex set. Obviously, the smaller the value of $$\delta >0$$, the smaller the resulting closed convex set. Finally, we need to take the intersection of the closed convex sets in the hull of all $$\delta >0$$ and N. Since f(x) is absolutely continuous, the following limits exist at any point of the surface S:
$$\begin{array}{c}\underset{x\to {x}_{s}}{\mathrm{lim}}f(x)={f}^{+}({x}_{S})\text{\hspace{1em}}\text{if}\text{\hspace{1em}}x\in {G}^{+}\\ \underset{x\to {x}_{s}}{\mathrm{lim}}f(x)={f}^{}({x}_{S})\text{\hspace{1em}}\text{if}\text{\hspace{1em}}x\in {G}^{}\end{array}$$ 
(4.18) 
It means that the $$\underset{\delta >0}{\cap}\underset{\mu N=0}{\cap}\text{\hspace{0.17em}}f(Q(x,\delta )N)$$ set belonging to any point xs(t) of the surface S has only two elements, f +(xs) and f (xs). We have to take the convex closure of these two vectors, which will be the smallest subset belonging to all $$\delta >0$$ values. In summary, the differential equation (4.9) with a (4.14) form discontinuity in the xs(t) points of S surface according to definition (4.13) can be described in the following form:

(4.19) 
To illustrate (4.19) see ???
Figure 45., where we drew f +(xSP) and f (xSP) vectors belonging to the point P of surface S. We marked the normal vector belonging to the point P of the surface with np. The change of the state trajectory in point xSP is given by the equivalent vector feq(xSP), which is the convex sum of vectors f +(xSP) and f (xSP).
Denote by Lfs(x) the directional derivative of the scalar function s(x) concerning the vector space f(x):
$${L}_{f}s\text{(}x\text{)}=(f\text{(}x\text{)}\u2022\text{grad(}s\text{(}x\text{))})$$ 
(4.20) 
where (a ● b) denotes the scalar product of vectors a and b. Since s(x) is uniformly continuous, the following limits exist at any point of the surface S:
$$\begin{array}{c}\underset{x\to {x}_{s}}{\mathrm{lim}}{L}_{f}s(x)={L}_{{f}^{+}}s({x}_{S})\text{\hspace{1em}}\text{if}\text{\hspace{1em}}x\in {G}^{+}\\ \underset{x\to {x}_{s}}{\mathrm{lim}}{L}_{f}s(x)={L}_{{f}^{}}s({x}_{S})\text{\hspace{1em}}\text{if}\text{\hspace{1em}}x\in {G}^{}\end{array}$$ 
(4.21) 
The value of should be defined such that $$\frac{d}{dt}{x}_{S}$$ and feq(xS) are orthogonal to the normal vector of the surface S (see Filippov 3. Lemma [3]):

(4.22) 
The equation (4.22) can be interpreted in the following way: in sliding mode, in the xs points of the sliding surface the change of the state trajectory can be described by an equivalent feq(xS) vector function that satisfies condition(4.22). Based on (4.19) and (4.22), we obtain

(4.23) 
From (4.23) can be expressed:

(4.24) 
If $${L}_{{f}^{+}}s({x}_{S})<0$$ and $${L}_{{f}^{}}s({x}_{S})>0$$ then on both sides of the surface S the vector space f(x) points towards the surface S (see Figure 46.). Therefore, if the state trajectory once reaches the surface S, it can not leave it. The state trajectory slides along the surface and therefore this state is called sliding mode.
Note that the two conditions separately defined on both sides of the surface S:
$${L}_{{f}^{+}}s(x)<0,\text{\hspace{1em}}\text{if}\text{\hspace{1em}}x\in Q({x}_{S},\delta )\cap {G}^{+}$$ 
(4.25) 
$${L}_{{f}^{}}s(x)>0,\text{\hspace{1em}}\text{if}\text{\hspace{1em}}x\in Q({x}_{S},\delta )\cap {G}^{}$$ 
(4.26) 
can be substituted by one inequality:
$$\frac{d}{dt}s{(x)}^{2}<0,\text{\hspace{1em}}\text{if}\text{\hspace{1em}}x\in Q({x}_{S},\delta )S$$ 
(4.27) 
Which can be interpreted as Lyapunov's stability criterion concerning whether the system remains on the surface S.
There are two energy storage elements (L and C) in the circuit of the introductory example, therefore the behavior of the circuit can be described by two state variables. The goal is to remove the voltage error, so it is practical to choose the error signal and the first time derivative of it as the state variables.
$$x=\left[\begin{array}{c}{u}_{e}\\ \frac{d}{dt}{u}_{e}\end{array}\right]=\left[\begin{array}{c}{U}_{r}{u}_{c}\\ \frac{d}{dt}{u}_{c}\end{array}\right]$$ 
(4.28) 
The state equation of the error signal, assuming that the reference signal Ur is constant:
$$\frac{d}{dt}\left[\begin{array}{c}{u}_{e}\\ \frac{d}{dt}{u}_{e}\end{array}\right]=\left[\begin{array}{cc}0& 1\\ \frac{1}{LC}& {a}_{22}\end{array}\right]\left[\begin{array}{c}{u}_{e}\\ \frac{d}{dt}{u}_{e}\end{array}\right]+\left[\begin{array}{c}0\\ \frac{1}{LC}\end{array}\right]({U}_{r}{u}_{AB})$$ 
(4.29) 
where a22 = 0, if we neglect the losses assuming ideal LC elements, while a22 = R/L, if we model the losses of the circuit with serial resistance. Based on (4.6) and (4.7), let the scalar function defining, the sliding surface be:
$$s(x)=\left[1\text{\hspace{1em}}\lambda \right]\text{\hspace{0.05em}}\text{\hspace{0.05em}}\left[\begin{array}{c}{u}_{e}\\ \frac{d}{dt}{u}_{e}\end{array}\right]$$ 
(4.30) 
Rewriting the matrix equation (4.29) to the form (4.17), we obtain:
$$\frac{d}{dt}x=f(x)=\{\begin{array}{c}{f}^{+}(x)=\left[\begin{array}{c}{f}_{1}\\ {f}_{2}{u}_{+}\end{array}\right],\text{\hspace{1em}}\text{iftheswitchisinstate1}\\ {f}^{}(x)=\left[\begin{array}{c}{f}_{1}\\ {f}_{2}\end{array}\right],\text{\hspace{1em}}\text{iftheswitchisinstate2}\end{array}$$ 
(4.31) 
where
$${f}_{1}=\frac{d}{dt}{u}_{e}$$ 
(4.32) 
$${f}_{2}=\frac{1}{LC}{u}_{e}{a}_{22}\frac{d}{dt}{u}_{e}+\frac{1}{LC}{U}_{r}$$ 
(4.33) 
$${u}_{+}=\frac{1}{LC}{U}_{bat}$$ 
(4.34) 
The directional derivative of the scalar function s(x) concerning the vector space f(x) on both sides of the surface S is:
$${L}_{{f}^{+}}s\text{(}{x}_{s}\text{)}=\frac{d}{dt}{u}_{es}+\lambda (\frac{1}{LC}{u}_{es}{a}_{22}\frac{d}{dt}{u}_{es}{u}_{+})={f}_{1s}+\lambda ({f}_{2s}{u}_{+})$$ 
(4.35) 
$${L}_{{f}^{}}s\text{(}{x}_{s}\text{)}=\frac{d}{dt}{u}_{es}+\lambda (\frac{1}{LC}{u}_{es}{a}_{22}\frac{d}{dt}{u}_{es})={f}_{1s}+\lambda {f}_{2s}$$ 
(4.36) 
Note that in our case f +(x) and f (x) can be defined on the surface S, therefore we do not need to calculate the limits in (4.21), the points $${u}_{es},\frac{d}{dt}{u}_{es}$$ belonging to the surface S can be directly substituted. At the same time, (4.27) is met only in the following domain:

(4.37) 
It means that, by the given control relay, only on a limited part of the surface S can be in sliding mode. By completing the relay control laws with additional members, we can reach that the condition of sliding mode is fulfilled on the whole S surface [5] [6]. In case of the control relay, based on (4.24) and (4.35), we get:

(4.38) 
Based on (4.17), (4.31), (4.35), and (4.38) the differential equation describing the system in sliding mode will be:
$$\frac{d}{dt}\text{\hspace{0.05em}}\text{\hspace{0.05em}}\left[\begin{array}{c}{u}_{es}\\ \frac{d}{dt}{u}_{es}\end{array}\right]=\frac{{f}_{1s}+\lambda {f}_{2s}}{\lambda {u}_{+}}\left[\begin{array}{c}{f}_{1s}\\ {f}_{2s}{u}_{+}\end{array}\right]+\frac{\lambda {u}_{+}{f}_{1s}\lambda {f}_{2s}}{\lambda {u}_{+}}\left[\begin{array}{c}{f}_{1s}\\ {f}_{2s}\end{array}\right]=\left[\begin{array}{c}{f}_{1s}\\ \frac{1}{\lambda}{f}_{1s}\end{array}\right]$$ 
(4.39) 
The differential equation (4.39) is basically the same as the equation of the sliding line, and thus we can describe the original system as a first order differential equation instead of a second order one:
$$s({x}_{s})=0={u}_{es}+\lambda \frac{d}{dt}{u}_{es}$$ 
(4.40) 
This way we proved, that the state belonging to the smooth regular sliding line S can be accurately followed by a state trajectory broken in each points consisting of infinitely short sections switched by infinitely high frequency. The solution of (4.40) is:
$${u}_{es}={U}_{es0}{e}^{\frac{1}{\lambda}t}$$ 
(4.41) 
where Ues0 is the ues error signal at the moment when the state trajectory reaches the surface S. Based on (4.41) we can see that $$\lambda $$ is the characteristic time constant of the sliding line. Note that equation (4.41) does not include any parameter of the original system. This means that in the abovedescribed ideal sliding mode the relay control law leads to a robust controller, insensitive to certain parameters and disturbances. The above derivation is only concerned with how the system behaves on the sliding surface, but we did not deal with the practically very important question of how to ensure that the state trajectory always reaches the sliding surface and stays on it.
Of course, in reality such an ideal sliding mode does not exist. From engineering point of view the challenge is the realization of a socalled chatteringfree approximation of it.
The following linear time invariant (LTI) system is considered; first the reference signal is supposed to be constant and zero.
$$\dot{x}=Ax+Bu$$, $$x\in {R}^{n},u\in {R}^{m}$$ 
(4.42) 
$$y=Cx+Du$$ $$y\in {R}^{l},l\le n$$ 
(4.43) 
The system (4.42) can be transformed to a regular form:
$$\left[\begin{array}{c}{\dot{x}}_{1}\\ {\dot{x}}_{2}\end{array}\right]=\left[\begin{array}{cc}{A}_{11}& {A}_{12}\\ {A}_{21}& {A}_{22}\end{array}\right]\cdot \left[\begin{array}{c}{x}_{1}\\ {x}_{2}\end{array}\right]+\left[\begin{array}{c}0\\ {B}_{2}\end{array}\right]\cdot u$$ 
(4.44) 
where$${x}_{1}\in {R}^{nm},{x}_{2}\in {R}^{m}$$
The switching surfaces of the sliding mode, where the control vector components have discontinuities, can be written in the following form:
$$\sigma ={x}_{2}+K{x}_{1}$$ $$\sigma \in {R}^{m}$$ 
(4.45) 
When sliding mode occurs, σ = x2 + Kx1 and x2 = Kx1. The design problem of the sliding surfaces can be regarded as a linear state feedback control design for the following subsystem:
$${\dot{x}}_{1}={A}_{11}{x}_{1}+{A}_{12}{x}_{2}$$ 
(4.46) 
In (4.46) equation, x2 can be considered as the input of the subsystem. A state feedback controller x2 = = Kx1 for this subsystem gives the switching surface of the whole VSS controller. In sliding mode
$${\dot{x}}_{1}=({A}_{11}{A}_{12}K){x}_{1}$$ 
(4.47) 
Various linear control design methods based on state feedback are applicable to the design of the switching surfaces.
According to LQ design the cost function (4.48) is minimized by solving the well known Riccati equation to achieve the optimal feedback gain for subsystem (4.46):
$$J={\displaystyle \underset{{t}_{s}}{\overset{\infty}{\int}}({x}_{1}^{T}Q{x}_{1}+2{x}_{1}^{T}N{x}_{2}+{x}_{2}^{T}R{x}_{2})dt.}$$ 
(4.48) 
where ts (can be assumed zero) is the time at which sliding mode begins. (For simplicity, N = 0 is assumed.)
The LQ optimal sliding surface is given by
$${K}_{LQ}={R}^{1}{A}_{12}^{T}P$$, $$\sigma ={x}_{2}+{K}_{LQ}{x}_{1}$$ 
(4.49) 
where P > 0 is a unique solution of the following Riccati equation:
$$P{A}_{11}+{A}_{11}^{T}PP{A}_{12}{R}^{1}{A}_{12}^{T}P+Q=0$$ 
(4.50) 
The frequency shaped sliding mode comes from frequency shaped LQ method. Frequency shaped LQ approach is based on frequency dependent weights. The cost function (4.48) can be written in the frequency domain using Perseval's theorem as
$$J=\frac{1}{2\pi}{\displaystyle \underset{\infty}{\overset{\infty}{\int}}({x}_{1}^{T}(j\omega )Q{x}_{1}(j\omega )+}{x}_{2}^{T}(j\omega )R{x}_{2}(j\omega ))d\omega .$$ 
(4.51) 
In the time domain (4.48), Q and R are constant matrices. If instead of a constant R, a frequency dependent weight matrix R(ω2) is introduced, control inputs for certain frequencies can be amplified or suppressed.
$$J=\frac{1}{2\pi}{\displaystyle \underset{\infty}{\overset{\infty}{\int}}({x}_{1}^{T}(j\omega )Q{x}_{1}(j\omega )+}{x}_{2}^{T}(j\omega )R({\omega}^{2}){x}_{2}(j\omega ))d\omega .$$ 
(4.52) 
We can choose R to have highpass characteristics for reduction of high frequency control inputs of the subsystem (4.46).
This idea is realized using state space representation. The frequency dependent weight R(ω2) must be a rational function of ω2 to solve this problem. The transfer function matrix W2(s) is defined as
$$R({\omega}^{2})={W}_{2}(j\omega )*{W}_{2}(j\omega )$$ 
(4.53) 
where W2(s)* stands for the conjugate transpose of W2(s). The subsystem (4.46) should be augmented by the states (written in the vector xw2) of W2(s). W2(s) has the following state space representation
$$\begin{array}{l}\tilde{u}={W}_{2}(s){x}_{2}\\ \frac{d}{dt}{x}_{w2}={A}_{w2}{x}_{w2}+{B}_{w2}{x}_{2}\\ \tilde{u}={C}_{w2}{x}_{w2}+{D}_{w2}{x}_{2}\end{array}$$ 
(4.54) 
Then the cost function (4.52) with a frequency dependent weight matrix R(ω2) can be rewritten in the time domain as
$$J={\displaystyle \underset{0}{\overset{\infty}{\int}}({x}_{a}^{T}{Q}_{a}{x}_{a}+2{x}_{a}^{T}{N}_{a}{x}_{2}+{x}_{2}^{T}{R}_{a}{x}_{2})dt.}$$ 
(4.55) 
where
$${\dot{x}}_{a}={A}_{a}{x}_{a}+{B}_{a}{x}_{2},{x}_{a}=\left[\begin{array}{c}{x}_{w2}\\ {x}_{1}\end{array}\right],$$ 
(4.56) 
$$\begin{array}{l}{A}_{a}=diag({A}_{w2},{A}_{11}),{B}_{a}=\left[\begin{array}{c}{B}_{w2}\\ {A}_{12}\end{array}\right],\\ {Q}_{a}=diag({C}_{w2}^{T}{C}_{w2},Q),{N}_{a}=\left[\begin{array}{c}{C}_{w2}^{T}{D}_{w2}\\ 0\end{array}\right],\\ {R}_{a}={D}_{w2}^{T}{D}_{w2}.\end{array}$$ 
(4.57) 
Minimization of this cost function with cross term between state and control input is formulated as solving the following Riccati equation:
$${P}_{a}{A}_{a}+{A}_{a}^{T}{P}_{a}({P}_{a}{B}_{a}+{N}_{a}){R}_{a}^{1}({B}_{a}^{T}{P}_{a}+{N}_{a}^{T})+{Q}_{a}^{T}=0$$ 
(4.58) 
The optimal switching plane is written using the solution of this Riccati equation as
$${K}_{FS}={R}_{a}^{1}({B}_{a}^{T}{P}_{a}+{N}_{a}^{T}).$$ $$\sigma ={x}_{2}+{K}_{FS}{x}_{a}$$ 
(4.59) 
Recently, linear control theory is well developed especially in the field of robust control. H∞ optimal control theory is an excellent result of this development. Hashimoto introduces H∞ control methods for the optimal sliding surface design based on H∞ norm.
The control goal is formulated through a norm minimization of the generalized plant G(jω), where H∞ norms are used to formulate the cost function. If G(jω) is a stable transfer matrix in the frequency domain, than the H∞ norms are
$${\Vert G(s)\Vert}^{\infty}=\underset{\omega}{\mathrm{sup}}{\sigma}_{\mathrm{max}}\left[G(j\omega )\right].$$ 
(4.60) 
Another kind of chattering is caused by the limited switching frequency of the control input. The robustness of continuoustime sliding mode control is obtained by high frequency switching of highgain control inputs. To adapt the slidingmode philosophy for a digital controller, the sampling frequency should be increased compared to other types of control method. To solve this problem asymptotic reaching of the sliding manifold has been proposed in literatures to avoid commutation. In an alternative idea, the samples of the system states belong to the sliding manifold after a finite number of sample steps.
Definition:
In the discretetime dynamic system
$${S}_{i}:=\{x:{s}_{i}(x)=0\}\text{\hspace{1em}}i=1,\text{\hspace{0.17em}}2\dots m.$$ 
(4.61) 
$${x}_{k+1}=F\left({x}_{k}\right)$$ $$x\in {\Re}^{n}$$ 
(4.62) 
a discretetime sliding mode takes place on the subset of a manifold $$s\left(x\right)=0,\text{\hspace{0.17em}}s\in {\Re}^{m}\left(m<n\right)$$if there exists an open neighborhood U of this subset such that from $$x\in U$$ it follows $$s\left(F(x)\right)\in \Sigma $$.
According to this definition, the observer equation should be discretized at each sampling instant.
$${\widehat{x}}_{k+1}={A}_{d}{\widehat{x}}_{k}+{B}_{d}{u}_{k}$$ $$\dot{x}=Ax+Bu\to $$ 
(4.63) 
where subscript k means the kth sampling time, i.e., t = kTs (Ts is the sampling period) and
$${A}_{d}={e}^{A{T}_{s}},$$ $${B}_{d}={\displaystyle \underset{0}{\overset{{T}_{s}}{\int}}{e}^{A({T}_{s}\tau )}Bd\tau}$$ 
(4.64) 
The sliding surface should be discretized as well:
$${\sigma}_{k}={\Lambda}_{d}{x}_{ek}$$, $$\sigma =\Lambda {x}_{e}=0\to $$ 
(4.65) 
It follows from the definition that
$${\sigma}_{k+1}=0$$ 
(4.66) 
for any $${x}_{k}\in U$$. The discretetime sliding mode exists if matrix $${\Lambda}_{d}{B}_{d}$$ is invertible and control Uk is designed to satisfy (4.46):
$${\sigma}_{k+1}={\Lambda}_{d}{x}_{ek+1}={\Lambda}_{d}({x}_{rk+1}{A}_{d}{x}_{k}{B}_{d}{u}_{k})$$ 
(4.67) 
By analogy with continuoustime systems, the solution of (4.67) is referred to as “equivalent control”.
$${u}_{eqk}={({\Lambda}_{d}{B}_{d})}^{1}{\Lambda}_{d}({x}_{rk+1}{A}_{d}{x}_{k})$$ 
(4.68) 
The control law is chosen as follows:
$${u}_{k}=\{\begin{array}{l}{u}_{eqk}\\ {u}_{\mathrm{max}}\frac{{u}_{eqk}}{\Vert {u}_{eqk}\Vert}\end{array}$$ $$\begin{array}{c}(\Vert {u}_{eqk}\Vert <{u}_{\mathrm{max}})\\ \\ (\Vert {u}_{eqk}\Vert >{u}_{\mathrm{max}})\end{array}$$ 
(4.69) 
where $${U}_{\mathrm{max}}$$ is the physical limit of control signal $${u}_{k}$$.
This type of discretetime sliding mode control law involves prediction. Knowledge of the model is necessary.
This static slide contains the basic idea of the sliding mode control. The controller plant is a DC motor, the actuator is a DCDC converter and the control method is bangbang.
This means that the DC motor is controller by a 2 state kind of relay which can accelerate or decelerate the motor. This control can switch when the system approaches the reference position but this causes big overshoot therefore the switching process must be occurred a little bit before that time. The question is: when. The next some slides give us the answer.
The bases of the transfer function are these equations:
$${V}_{a}={i}_{a}{R}_{a}+{L}_{a}\frac{d{i}_{a}}{dt}+k\phi \Omega $$ 
(4.70) 
$${T}_{E}=k\cdot \phi \cdot {i}_{a}$$ 
(4.71) 
$${T}_{E}{T}_{L}=J\frac{d\Omega}{dt}$$ 
(4.72) 
And the transfer function:
The basic of this derivation is the transfer function:
$${V}_{a}=\frac{{L}_{a}J}{k\phi}\frac{{d}^{2}\Omega}{d{t}^{2}}+k\phi \Omega +\frac{{R}_{a}J}{k\phi}\frac{d\Omega}{dt}+\frac{{R}_{a}}{k\phi}{T}_{L}+\frac{{L}_{a}}{k\phi}\frac{d{T}_{L}}{dt}$$ 
(4.73) 
where the 3rd, 4th and the 5th member can be neglected (red cross shows the neglecting):
$$\frac{{R}_{a}J}{k\phi}\frac{d\Omega}{dt}+\frac{{R}_{a}}{k\phi}{T}_{L}+\frac{{L}_{a}}{k\phi}\frac{d{T}_{L}}{dt}$$ 
(4.74) 
herefore:
$${V}_{a}=\frac{{L}_{a}J}{k\phi}\frac{{d}^{2}\Omega}{d{t}^{2}}+k\phi \Omega $$ 
(4.75) 
Introducing the “per unit”:
$$\tau =\frac{k\phi}{\sqrt{J\text{\hspace{0.17em}}{L}_{a}}}$$ 
(4.76) 
The nonload speed:
$${\omega}_{nl}=\ddot{\omega}+\omega $$ 
(4.77) 
This slide derives the error trajectory.
$${\omega}_{r}$$ – reference speed
$${\omega}_{e}={\omega}_{r}\omega $$ 
(4.78) 
$${\omega}_{e}$$ – speed error
$${\ddot{\omega}}_{e}=\ddot{\omega}$$ 
(4.79) 
if $${\omega}_{r}$$ is the step change
$${\omega}_{r}{\omega}_{nl}={\ddot{\omega}}_{e}+{\omega}_{e}$$ 
(4.80) 
This animated figure displays the error trajectory when the switch is on or off.
Theoretical background:
The motor can be considered as a second order storage element which responds to the step change with oscillation. This oscillation appears as a circle in the ($${\omega}_{e}$$;$${\dot{\omega}}_{e}$$) diagram. The centre of the circle is $${\omega}_{r}{\omega}_{nl}$$ when the switch is on ($${\omega}_{nl}=1$$) and $${\omega}_{r}$$ when the switch is off ($${\omega}_{nl}=0$$).
Operation:
At startup the switch is on and by clicking the switch it can be toggled between on and off state.
This animation sows the problem in case of the simplest control strategy. The process: the controller accelerates the motor until it reaches the reference speed. At this moment it switches and decelerates. But the system stores a lot of energy therefore overshoots. At the end of the overshoot the speed is higher than the reference and the system starts really slowing. But reaching again the reference speed and switching on the system would not accelerate immediately because of the storage capability. This process repeats and oscillation occurs.
$$\sigma ={\omega}_{e}+\lambda {\dot{\omega}}_{e}$$ 
(4.81) 
$$\lambda \ne 0$$ 
(4.82) 
$$\sigma =\omega =0$$ 
(4.83) 
The switching line is horizontal. To solve the oscillation problem the switching line should be rotated.
The animation cannot be controller actually. In the future built in buttons can be implemented is required.
This animated figure explains the effect of the rotated switching line.
The trajectory slides from $${\omega}_{r}$$ in the direction of the switching line. When reaches the centre of the circle changes and the curve again to the direction of the sw. line.
The control of the animation:
It starts automatically and at the end it can be restarted by pressing button.
This animation uses previously drawn figure. There is the possibility of changing this to function.
This static figure explains the robustness of the sliding mode control.
Theoretical background:
Once the control reaches the switching line the system becomes insensitive against disturbances because it won’t be able to leave the line. The way in which it reaches the line is independent from the result.
This animated slide derives the time function. Equations:
In sliding mode:
$$\sigma =0$$ 
(4.84) 
$${\omega}_{e}+\lambda \frac{\text{d}{\omega}_{e}}{\text{d}t}=0$$ 
(4.85) 
$$\text{d}t=\lambda \frac{\text{d}{\omega}_{e}}{{\omega}_{e}}$$ 
(4.86) 
$${\omega}_{e}=\text{C}\cdot {\text{e}}^{\frac{t}{\lambda}}$$ 
(4.87) 
Where:
C – constant depends on initial conditions
 time constant type controller parameter
This slide concludes the screens until now. The text of the slide:
The design of a slidingmode controller consists of three main steps:1. Design of a sliding surface, 2. Selection a the control law, which holds the system trajectory on the sliding surface,3. The key step is the chatteringfree implementation.
Application of sliding mode control
Measurement results of sliding mode control.