全程滑模控制器的设计
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
式中, F ( x ) = 2 + e 参数选取:
−t
> ∆f ( X , t ) 。
α = 2 , β = 1 , k = 0.02 , p = 5 , q = 3 , T f = 3 , δ 0 = 0.05 , δ1 = 2 。
3
2 仿真结果
1.5 1 0.5 x11,x11d 0 -0.5 -1 -1.5 0 2 4 time/s 6 8 x11 x11d
31 = x32 ⎧x ⎪ 32 = x33 ⎨x ⎪x ⎩ 33 = x33 cos x11 sin x21 + cos t sin x23 + u3
设计滑模面函数为
s (t ) = CE (t ) − CP(t )
其中, C = ( C1
C2
⎛ 4 0 0 4 0 0 1 0 0⎞ ⎜ ⎟ C3 ) = ⎜ 0 4 0 0 4 0 0 1 0 ⎟ , ⎜0 0 4 0 0 4 0 0 1⎟ ⎝ ⎠
解得
⎧a00 = −35 ⎧a01 = −20 ⎧ a02 = −5 ⎧a03 = − 2 3 ⎪a = 84 ⎪a = 1 ⎪ a = 10 ⎪a = 45 ⎪ 12 ⎪ 10 ⎪ 13 ⎪ 11 , , , ⎨ ⎨ ⎨ ⎨ ⎪a20 = −70 ⎪a21 = −36 ⎪ a22 = −7.5 ⎪a23 = − 2 3 ⎪ ⎪ ⎪ ⎪ ⎩ a32 = 2 ⎩a31 = 10 ⎩a30 = 20 ⎩a33 = 1 6
图 2-1 状态 x11 的跟踪性能
1.5 1 0.5 x21,x21d 0 -0.5 -1 -1.5 0 2 4 time/s 6 8
x21 x21d
图 2-2 状态 x21 的跟踪性能
4
1.5
x31 x31d
1 x31,x31d
0.5
0
-0.5 0
2
4 time/s
6
8
图 2-3 状态 x31 的跟踪性能
T
u3 ) ∈ R 3
T
⎛ −1.5 y12 cos(3 y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a21/Tf^5*De3_0+a22/Tf^4*DDe3_0+a23/Tf^3*DDDe3_0; D3=a30/Tf^7*e3_0+a31/Tf^6*De3_0+a32/Tf^5*DDe3_0+a33/Tf^4*DDDe3_0; n=1; t=0; Dt=0.001; for i=1:8000 %参考信号及其一、二阶导数 x11d=sin(pi/2*t); Dx11d=pi/2*cos(pi/2*t); DDx11d=-(pi/2)^2*sin(pi/2*t); x21d=cos(pi*t); Dx21d=-pi*sin(pi*t); DDx21d=-pi^2*cos(pi*t); x31d=1; Dx31d=0; DDx31d=0;
7
%跟踪误差及其一、二阶导数 e=[x11-x11d;x21-x21d;x31-x31d]; De=[x12-Dx11d;x22-Dx21d;x32-Dx31d]; DDe=[x13-DDx11d;x23-DDx21d;x33-DDx31d]; if t<=Tf p1=e1_0+De1_0*t+1/2*DDe1_0*t^2+1/6*DDDe1_0*t^3+A1*t^4+B1*t^5+C1*t^6+D1*t^7; Dp1=De1_0+DDe1_0*t+1/2*DDDe1_0*t^2+A1*4*t^3+B1*5*t^4+C1*6*t^5+D1*7*t^6; DDp1=DDe1_0+DDDe1_0*t+A1*4*3*t^2+B1*5*4*t^3+C1*6*5*t^4+D1*7*6*t^5; DDDp1=DDDe1_0+A1*4*3*2*t+B1*5*4*3*t^2+C1*6*5*4*t^3+D1*7*6*5*t^4;
40
20
u1 u2 u3
0
u
-20
-40 0
2
4 time/s
6
8
图 2-4 控制量 u1 、 u2 和 u3
0.2 0 -0.2 0 1 0 -1 0 s 2 4 time/s 6 s s放大图 s1 s2 s3 8
s1 s2 s3 2 4 time/s 6 8
图 2-5 滑模面 s1 、 s2 和 s3
函数 pi (t ) 是一个在 t = T f 时刻三阶可微的连续函数,由此可以得到四组四元一次方程 组:
⎧1 + a00 + a10 + a20 + a30 = 0 ⎪ 4 a + 5a + 6 a + 7 a = 0 ⎪ 00 10 20 30 ⎨ ⎪12a00 + 20a10 + 30a20 + 42a30 = 0 ⎪ ⎩24a00 + 60a10 + 120a20 + 210a30 = 0 ⎧1 + a01 + a11 + a21 + a31 = 0 ⎪1 + 4a + 5a + 6a + 7 a = 0 ⎪ 01 11 21 31 ⎨ ⎪12a01 + 20a11 + 30a21 + 42a31 = 0 ⎪ ⎩24a01 + 60a11 + 120a21 + 210a31 = 0 ⎧0.5 + a02 + a12 + a22 + a32 = 0 ⎪1 + 4a + 5a + 6a + 7 a = 0 ⎪ 02 12 22 32 ⎨ ⎪1 + 12a02 + 20a12 + 30a22 + 42a32 = 0 ⎪ ⎩24a02 + 60a12 + 120a22 + 210a32 = 0
1 全程滑模控制器设计
考虑如下的三阶非线性系统
, y; t ) + g ( , y; t )u + ∆f ( , y; t ) + d (t ) y = f ( y, y y, y y, y
其中, y = ( y1
y2
y3 ) ∈ R 3 , d (t ) = 0 , u = ( u1 u2
1
E (t ) = ( eT
T e
e T ) , e = ( e1 e2
e3 ) = ( x11 − x11d
T
x21 − x21d
x31 − x31d ) , x11d 、
T
x21d 、 x31d 为期望轨迹;
P (t ) = ( p1 (t )
p2 (t )
p3 (t ) ) ,其中
T
x33 ,且 y1 = x11 , y2 = x21 , y3 = x31 ,于是得到下面三组状态方程 ⎧x 11 = x12 ⎪ 12 = x13 ⎨x ⎪ 2 2 ⎩ x13 = −1.5 x13 cos(3 x21 ) + sin t sin x22 cos(3 x11 ) + u1 ⎧x 21 = x22 ⎪ 22 = x23 ⎨x ⎪ −t ⎩ x23 = 3x22 sin(3 x31 ) + e cos x13 sin x31 + u2
2
⎧1 ⎪ 6 + a03 + a13 + a23 + a33 = 0 ⎪ ⎪0.5 + 4a + 5a + 6a + 7a = 0 03 13 23 33 ⎨ ⎪1 + 12a03 + 20a13 + 30a23 + 42a33 = 0 ⎪ ⎪ ⎩1 + 24a03 + 60a13 + 120a23 + 210a33 = 0
5
3 Matlab 程序
clear clc Tf=3; p=5; q=3; alpha=2; beta=1; k=0.02; delta0=0.05; delta1=2; a00=-35; a10=84; a20=-70; a30=20; a01=-20; a11=45; a21=-36; a31=10; a02=-5; a12=10; a22=-7.5; a32=2; a03=-2/3; a13=1; a23=-2/3; a33=1/6;
n ⎛ n ⎧ n 1 (k ) ⎞ j + n +1 a jl k (l ) (0) e t t ≤ Tf ⎪∑ ei (0)t + ∑ ⎜ ⎟ ⎜ ∑ j −l + n +1 i ⎟ pi (t ) = ⎨ k =0 k ! j =0 ⎝ l =0 T f ⎠ ⎪ t > Tf ⎩0 a a a 1 1 ⎧ i (0)t + e i (0)t 2 + (0) + 02 i (0) ei (0)t 3 + [ 00 e (0) + 01 e e 4 i 3 i ⎪ei (0) + e 2 6 Tf Tf T f2 ⎪ ⎪ a03 a a a a (0) + 12 (0) + 13 e e (0)]t 5 ei (0)]t 4 + [ 10 e (0) + 11 e ⎪+ 3 i 2 i 5 i 4 i T T T T T f f f f ⎪ f ⎪ a a a ⎪+[ 20 e (0) + a21 e (0) + 22 0 ≤ t ≤ Tf e (0) + 23 e (0)]t 6 5 i 4 i 3 i ⎨ T6 i Tf Tf Tf f ⎪ ⎪ a30 a31 a a i (0) + 32 e (0) + 33 e (0)]t 7 ⎪+[ 7 ei (0) + 6 e 5 i 4 i Tf Tf Tf ⎪ Tf ⎪ ⎪ t > Tf ⎪ ⎩0
控制器为
2 1 ) ⎛ −1.5 x13 ⎞ cos(3x21 ) + 4( x12 − π 2 cos(π t 2) − p ⎜ ⎟ 2 p1 ) − p1 + π 3 8cos(π t 2) ⎟ ⎜ +4( x13 + π 4sin(π t 2) − ⎟ 2) u (t ) = − ⎜ 3x22 sin(3 x31 ) + 4( x22 + π sin(π t ) − p ⎜ ⎟ ⎜ +4( x23 + π 2 cos(π t ) − ⎟ p2 ) − p2 − π 3 sin(π t ) ⎜ ⎟ ⎜ x33 cos x11 sin x21 + 4( x32 − p ⎟ 3 ) + 4( x33 − p3 p3 ) − ⎝ ⎠ T c s α ks β ⎛ −k s k s ⎞ − ⎜ F ( x) + (e − 1) + (1 − e ) q p e ⎟ T n k k ⎝ ⎠ cn s + δ
2 2 ⎛ sin t sin y cos(3 y1 ) ⎞ ⎜ −t ⎟ , y; t ) = ⎜ e cos y, y y1 sin y3 ⎟ ∆f ( ⎜ ⎟ cos t sin y2 ⎝ ⎠
wk.baidu.com
为了表示成状态方程形式,引入状态变量 x11 、 x12 、 x13 、 x21 、 x22 、 x23 、 x31 、 x32 、