Sliding mode observer in Matlab or Simulink

In summary, the conversation discusses the design and implementation of a variable-based observer for a tire model. The goal is to observe the effective radius, angular velocity, and horizontal velocity using a sliding mode observer. The conversation also mentions the use of a state-space block and a transfer function block in Simulink to represent the system and simulate its behavior. The scope block can be used to visualize the output and compare it with the actual values.
  • #1
Payam30
46
1
Hi,
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 news on Phys.org
  • #2


Hi there,

Thank you for sharing your work on designing a variable-based observer for a tire model. It seems like you have a good understanding of the underlying principles and theories involved.

To implement this in Simulink, you can use the "State-Space" block to represent your system. This block allows you to define the state equations and output equations in a matrix form, similar to the ones you have in your post. You can also use the "Transfer Fcn" block to represent the high-order sliding mode differentiation.

You can then use these blocks to create a model of your system in Simulink and use it to simulate and analyze the behavior of your observer. You can also use the "Scope" block to visualize the output of your observer and compare it with the actual values of the variables.

I hope this helps. Good luck with your implementation!
 

1. What is a sliding mode observer in Matlab or Simulink?

A sliding mode observer is a control design technique used to estimate the state variables of a system in real-time. It is a type of observer that utilizes a sliding mode control algorithm to minimize the error between the actual and estimated states of a system.

2. How does a sliding mode observer work?

A sliding mode observer works by continuously updating the estimated state variables using a sliding mode control algorithm. This algorithm adjusts the observer gain to minimize the error between the actual and estimated states, ensuring accurate state estimation in real-time.

3. What are the advantages of using a sliding mode observer in Matlab or Simulink?

Some advantages of using a sliding mode observer in Matlab or Simulink include robustness to disturbances and modeling errors, fast convergence, and the ability to handle nonlinear systems. It also does not require knowledge of the system model, making it useful for real-world applications.

4. What are some applications of a sliding mode observer?

A sliding mode observer can be used in a variety of applications, including control systems, fault detection and diagnosis, state estimation, and signal processing. It is commonly used in industries such as aerospace, automotive, and robotics for accurate and robust state estimation.

5. How can I implement a sliding mode observer in Matlab or Simulink?

In Matlab or Simulink, a sliding mode observer can be implemented by using the Simulink Control Design toolbox or by writing custom code using the Matlab programming language. There are also many online resources and tutorials available to help guide the implementation process.

Similar threads

  • Linear and Abstract Algebra
Replies
10
Views
146
Replies
22
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • Programming and Computer Science
Replies
31
Views
2K
  • Advanced Physics Homework Help
Replies
7
Views
268
Replies
1
Views
859
  • Differential Equations
Replies
2
Views
1K
Replies
7
Views
1K
Replies
4
Views
1K
Replies
2
Views
678
Back
Top