News from this site

 Rental advertising space, please contact the webmaster if you need cooperation


+focus
focused

classification  

no classification

tag  

no tag

date  

no datas

Sliding mode control quick start

posted on 2023-06-06 17:43     read(979)     comment(0)     like(1)     collect(2)


0. Introduction

Recently, the author was invited and asked me to help explain sliding mode control to the juniors who are just getting started . But the author doesn't know how to explain these basic knowledge to the students who are not getting started, so the author flipped through the good articles and videos written in recent years. Taken together, let's summarize a set of relatively basic articles that are suitable for beginners. Here we first post the notes of Wang Chongwei .
insert image description here
The corresponding video link is below:

【Advanced Control Theory】17

1. Purpose of sliding mode control

For sliding mode control, I think we need to understand its purpose before learning. At the beginning, our definition of sliding control is: sliding mode is a technology that first uses the controlled system to generate more than two subsystems, and then deliberately adds some switching conditions to generate sliding mode to achieve the control goal.

Sliding mode control (sliding mode control, SMC ) is also called variable structure control, which is a special kind of nonlinear control in essence, and nonlinearity is manifested as discontinuity of control. The difference between this control strategy and other controls is that the "structure" of the system is not fixed, but can be continuously changed in a dynamic process according to the current state of the system (such as deviation and its derivatives, etc.), Force the system to move according to the state trajectory of the predetermined "sliding mode".

For example sliding surfaces exist in sliding mode control s = 0 s=0 s=0, in the beginning, the system will reach the sliding surface in a finite time, and then it will move along the sliding surface. In the theoretical formulation of the sliding mode, the system is constrained to the sliding surface, so it is only necessary to consider the system as sliding on the sliding surface. However, the realization of the actual system is to use high-frequency switching to make the system approximately slide on the sliding surface. The control signal of high-frequency switching allows the system to chatter within a range very close to the sliding surface, and its frequency is not fixed. Although the overall system is nonlinear, in the figure below, when the system reaches the sliding surface, the ideal (no jump) system will be limited to s = 0 s=0 s=0On the sliding surface of , the sliding surface is a linear time-invariant system that is exponentially stable at the origin.
insert image description here

2. Advantages and disadvantages of sliding mode control

2.1 Advantages of sliding mode control:

The sliding mode can be designed and has nothing to do with object parameters and disturbances. It has fast response, insensitivity to parameter changes and disturbances (robustness), no need for online system identification, and simple physical implementation .

2.2 Disadvantages of sliding mode control:

When the state trajectory reaches the sliding mode surface, it is difficult to slide strictly along the sliding mode towards the equilibrium point, but it approaches the equilibrium point by crossing back and forth on both sides , resulting in chattering—the main problem in the practical application of sliding mode control. obstacle. At home and abroad , the purpose of reducing chattering is mainly achieved by improving the reaching law of the sliding mode .

3. Sliding mode control requires conditions

As mentioned above, the design of the sliding mode variable structure controller also includes two parts. One is that it can reach the sliding mode surface in a limited time from any position in the state space. s = 0 s = 0 s=0, and the second is that it can converge to the origin (balance point) on the sliding surface. This also means that we need to have a stable sliding surface, and the sliding surface is reachable. There are four conditions for this:

  • Stability condition: On the sliding mode surface of s=0, the state is convergent, that is, the sliding mode exists;
  • Accessibility condition: moving points outside the switching surface s=0 will reach the switching surface within a limited time;
  • Ensure the stability of sliding mode motion;
  • Meet the motion quality requirements of the control system.

The following will describe how to design a sliding mode control controller according to the four conditions. Part of the content here is based on the article Sliding Mode Control (Sliding Mode Control) and written with the author's understanding.

3.1 Sliding surface generation of the controlled system

The first step is that we need to understand that we need to find a sliding surface to keep the controlled system stable on the sliding surface.
For example, suppose there is a controlled system:
x ˙ 1 = x 2 x ˙ 2 = u

x˙1=x2x˙2=in
x˙1x˙2=x2=in

At this time, we need to design a sliding mode surface according to the controlled system. The sliding mode surface can generally be designed as the following form
s ( x ) = ∑ i = 1 n − 1 c i x i + x n s(x) = \sum_{i=1}^{n-1} c_i x_i + x_n s(x)=i=1n1cixi+xn
Because in sliding mode control, it is necessary to ensure that the polynomial p n − 1 + c n p n − 2 + ⋯ + c 2 p + c 1 p^{n − 1} + c_n p^{n − 2} + \cdots + c_2 p + c_1 pn1+cnpn2++c2p+c1For Hurwitz (simply speaking, this condition is to satisfy the state in s = 0 s=0 s=0can converge on the sliding surface).

What is Hurwitz, that is, the real part of the eigenvalue of the above polynomial is in the left half plane, which is negative.

We can see that there are two variables in the above-mentioned controlled system, so we need to take n=2 n=2 n=2,Right now s ( x ) = c 1 x 1 + x 2 s ( x ) = c_1 x_1 + x_2 s(x)=c1x1+x2, in order to ensure that the polynomial p + c 1 p+c_1 p+c1For Hurwitz, the polynomial is required p + c 1 = 0 p+c_1=0 p+c1=0The real part of the eigenvalue of is negative, that is, c 1 > 0 c_1>0 c1>0.

We know that sliding mode control needs to make the state x 1 x_1 x1and x 2 x_2 x2The derivatives of all reach zero, we make s = 0 s=0 s=0, analyze the result
{ c x 1 + x 2 = 0 x ˙ 1 = x 2    ⇒    c x 1 + x ˙ 1 = 0    ⇒    { x 1 ( t ) = e − c t x 1 ( 0 ) x 2 ( t ) = x ˙ 1 ( t ) = − c x 1 ( 0 ) e − c t \left\{

cx1+x2=0x˙1=x2
\right. ~~ \Rightarrow ~~ c x_1 + \dot{x}_1 = 0 ~~ \Rightarrow ~~ \left\{
x1(t)=It isctx1(0)x2(t)=x˙1(t)=cx1(0)It isct
\right. {cx1+x2=0x˙1=x2    cx1+x˙1=0    {x1(t)=It isctx1( 0 )x2(t)=x˙1(t)=cx1( 0 ) andct
The status can be seen through the above formula x 1 x_1 x1and x 2 x_2 x2Both eventually tend to zero, and the speed is tightening at an exponential rate. Exponential rate means that when t = 1 / c t=1/c t=1/c, the process of going to zero is completed 63.2 % 63.2\% 63.2%,when t = 3 / c t=3/c t=3/c, the process of going to zero is completed 95.021 % 95.021\% 95.021%. Then we adjust the parameters c c cThe size can realize the adjustment of the zero speed, c c cThe bigger it is, the faster it is.

Therefore if satisfied s = c x 1 + x 2 = 0 s=cx_1 + x_2=0 s=cx1+x2=0, then the state of the system x 1 x_1 x1and x 2 x_2 x2will also approach zero along the sliding surface ( s = 0 s=0 s=0called the sliding surface).

3.2 Design of reachability controller

After getting the sliding surface, it proves that the stability condition of the controlled system is established, and the next step is the accessibility condition, that is, the state x x xStarting from any point in the state space, it can be reached in finite time s = 0 s=0 s=0On the sliding surface of , we can use the Lyapunov indirect method to analyze at this time, as we can see from the front, the switching function s s sis the state variable x x xfunction, take the following Lyapunov function

V = 1 2 s 2 V = \frac{1}{2} s^2 IN=21s2

Time derivative can be obtained
V ˙ = s s ˙ = s ( − sgn ( s ) − s ) = − sgn ( s ) s − s 2 = − ( ∣ s ∣ + s 2 ) < 0

IN˙=ss˙=s(sgn(s)s)=sgn(s)ss2=(|s|+s2)<0
IN˙=ss˙=s(sgn(s)s)=sgn(s)ss2=( s +s2)<0

To make the system stable, we need to make V ˙ < 0 \dot{V}<0 IN˙<0,Right now s s ˙ < 0 s \dot{s}<0 ss˙<0. At this time the system for s s sis asymptotically stable, there is no guarantee that its finite time to s = 0 s=0 s=0on the sliding surface (asymptotically stable is when t t tAs it tends to infinity, the state variable x x xtend to 0 0 0, that is, arrives in infinite time), so we need s s ˙ < − σ s \dot{s}<-\sigma ss˙<p, σ \sigma pis a very small positive number. The above is the necessary basis for the establishment of the accessibility condition\color{red}{The above is the necessary basis for the establishment of the accessibility condition} The above is the necessary basis for the establishment of the accessibility condition.

But in fact, every design cannot always be judged by the Lyapunov function , so people put forward the concept of reaching law. The commonly used reaching laws are as follows, among which sgn ( s ) \text{sgn}(s) sgn(s)is a symbolic function, s > 0 , sgn ( s ) = 1 ; s < 0 , sgn ( s ) = − 1 ; s = 0 , sgn ( s ) = 0 s>0,\text{sgn}(s)=1; s<0, \text{sgn}(s)=-1; s=0, \text{sgn}(s)=0 s>0 ,sgn(s)=1 ;s<0 ,sgn(s)=1 ;s=0 ,sgn(s)=0:

  1. Constant speed approach law: s ̇ = − ϵ sgn ( s ), ϵ > 0 \dot{s} = -\epsilon ~\text{sgn}(s), ~~~~\epsilon > s˙=ϵ sgn(s),    ϵ>0

  2. Exponential reaching law: s ˙ = − ϵ  sgn ( s ) − k s ,      ϵ > 0 , k > 0 \dot{s} = -\epsilon ~\text{sgn}(s) - k s, ~~~~\epsilon > 0, k>0 s˙=ϵ sgn(s)ks,    ϵ>0 ,k>0

  3. Power reaching law: s ˙ = − k ∣ s ∣ α  sgn ( s ) − k s ,      k > 0 , 0 < α < 1 \dot{s} = -k |s|^\alpha ~\text{sgn}(s) - k s, ~~~~k>0, 0<\alpha<1 s˙=k s a sgn(s)ks,    k>0 ,0<a<1

Generally, we need to complete the adjustment of these parameters during use. Generally, we use the exponential approach rate, and set ϵ \epsilon ϵand k k kThe values ​​of are all set to 1, which simplifies to:

s ˙ =  sgn ( s ) − s \dot{s} = ~\text{sgn}(s) - s s˙= sgn(s)s

Then we know s ( x ) = c 1 x 1 + x 2 s ( x ) = c_1 x_1 + x_2 s(x)=c1x1+x2,but s ˙ =  sgn ( s ) − s = c 1 x 1 ˙ + x 2 ˙ = c 1 x 2 + u \dot{s} = ~\text{sgn}(s) - s = c_1 \dot{x_1} + \dot{x_2} = c_1x_2+u s˙= sgn(s)s=c1x1˙+x2˙=c1x2+in. Then we can get the controller aww infor:

u =  sgn ( s ) − s − c 1 x 2 u = ~\text{sgn}(s) - s - c_1x_2 in= sgn(s)sc1x2

This gives us two necessary conditions, namely, the existence of a sliding surface s s sand the reachability controller aww in.

4. Sliding mode control Python code

Below is the simplest python code

…For details, please refer to Gu Yueju



Category of website: technical article > Blog

Author:Soledad

link:http://www.pythonblackhole.com/blog/article/83202/e16f8670e75a6d9e433e/

source:python black hole net

Please indicate the source for any form of reprinting. If any infringement is discovered, it will be held legally responsible.

1 0
collect article
collected

Comment content: (supports up to 255 characters)