Hi,(adsbygoogle = window.adsbygoogle || []).push({});

I have designed a variable-based observer analytically on paper. Now it's time to implement it in Simulink/matlab.

Suppose we have followings in a tire model. The EOM says:

[tex]J\dot{\omega} = T-R_eF_x[/tex]

[tex]m\dot{v}_x = F_x[/tex]

where J is the inertia of the wheel, [itex]\omega[/itex] is the angular velocity , m is the mass and v is the translation velocity or horizontal speed, T is the torque input and Fx is the driving force. R is the effective radius of the velocity. The goal is to observe the effective radius, angular velocity and horizontal velocity using a sliding mode observer.

A theorem says:

'A system is generically observable if the whole state can be expressed as a function of y, of u and a finite number of their derivatives'

this tell us :

[tex] Rang_K [dy \: d\dot{y} ...\: dy^{n-1}]^T = n[/tex]

further more:

[tex] \Gamma = [dy \: d\dot{y} ...\: dy^{n-1}]^T[/tex]

and the system is observable if [itex] \frac{\partial \Gamma}{\partial x} \neq 0 [/itex].

Let's do the canonical form of observability

we know:

[tex]\dot{x} = f(x) + \Delta f(x,t) + \chi (y,u)[/tex]

[tex] y = h(x)[/tex]

Then :

clearly the term [itex] \chi[/itex] is a output input dependend which is based on known parameters. then it should not affect the observability. We assume further that the term [itex] \Delta f [/itex] is a bounded uncertainty and does not affect the observability. Then we can remove these terms and get a simple system as :

[tex]\dot{x} = f(x)[/tex]

[tex] y = h(x)[/tex]

lets now say that the measurable outputs are [itex] \omega, v_x[/itex] and are [itex] x = \omega \: v_x \: R_e [/itex] and we have [itex] \dot{x} = [\dot{\omega} \: \dot{v}_x \: \dot{R}e] [/itex]

Then:

[tex]

\dot{x}= \begin{bmatrix}

\frac{F_x}{J} x_3\\

F_x/m\\

0

\end{bmatrix}+ \begin{bmatrix}

0\\

0\\

\eta

\end{bmatrix}+ \begin{bmatrix}

\frac{1}{J}u\\

0\\

0

\end{bmatrix}[/tex]

Recall from :

[tex] \Gamma =

\begin{bmatrix}

y_1\\ \dot{y_1} \\

y_2 \\ \dot{y_2}

\end{bmatrix}

[/tex]

That gives:

[tex] \Gamma =

\begin{bmatrix}

x_1\\ T/J - F_x /J * x_3\\

x_2 \\ F_x/m

\end{bmatrix}

[/tex]

We introduce [itex] \zeta = [y \: \dot{y} .. y^{n-1}]^T = \Gamma(x)[/itex] then [itex]\hat{\dot{x}} =[ \frac{\partial \Gamma(x)}{\partial x}]^{-1} \hat{\dot{\zeta}}[/itex]

with introducing [itex] \zeta[/itex] we get following:

[tex] \dot{\zeta} = A\zeta +

\begin{bmatrix}

0\\

0\\

.\\

.\\

\theta(\zeta)

\end{bmatrix} [/tex]

where :

[itex]

A=\begin{bmatrix}

0 &1 &0 &... &0 \\

0& 0 &1 & .. &0 \\

..& .. & .. & .. &. \\

..& .. & .. &.. &1 \\

.. & .. &.. & .. &0

\end{bmatrix} \: \: C=[1 \: 0 \: ...\: 0] , \: \theta = y^n[/itex]

An observer for such system is

[tex]\hat{ \dot{\zeta}} = A\hat{\zeta} +

\begin{bmatrix}

0\\

0\\

.\\

.\\

\theta(\zeta)

\end{bmatrix}+ k(y,\hat{\zeta})[/tex] And that gives

[tex] \hat{\dot{x}} = f(\hat{x}, y) + \chi (y,u) + [\frac{\partial \Gamma}{\delta \hat{x}}]^{-1} k(y,\hat{x})[/tex]

Using a High Order Sliding Mode Differentiation following can be designed:

[tex] \hat{\dot{x}} = f(\hat{x}, y) + \chi (y,u) + [\frac{\partial \Gamma}{\delta \hat{x}}]^{-1}

\begin{bmatrix}

\gamma_1\\

\gamma_2\\

.\\

.\\

\gamma_n

\end{bmatrix}[/tex] where

[tex]

\begin{bmatrix}

\gamma_1\\

\gamma_2\\

.\\

.\\

\gamma_n

\end{bmatrix} =

\begin{bmatrix}

a_1 L^{\frac{1}{n+1}}|y-\hat{x}_1|^{\frac{n}{n+1}}sign(y-\hat{x}_1)\\

a_2 L^{\frac{1}{n}}|\gamma _1|sign(\gamma_1)\\

.\\

.\\

a_n L sign(\gamma_{n-1})

\end{bmatrix}[/tex]

The problem is now how to implement this in simulink since its not a statespace system. Can anybody tell me or give me a hint about how to do this in simulink.

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# MATLAB Sliding mode observer in Matlab or Simulink

Have something to add?

Draft saved
Draft deleted

**Physics Forums | Science Articles, Homework Help, Discussion**