1、nonlinear adaptive controller
??已知非線性系統:
x
˙
=
θ
x
2
+
u
\dot{x}={\theta} x^{2}+u
x˙=θx2+u
自適應控制
假設
θ
{\theta}
θ 已知:
??現有一跟蹤問題:期望目標
x
d
{x_d}
xd?,則誤差為
e
=
x
d
?
x
e={x_d}-x
e=xd??x,控制目標:e趨近于0
e
˙
=
x
d
˙
?
x
˙
=
x
d
˙
?
θ
x
2
?
u
\dot{e}=\dot{x_d}-\dot{x}=\dot{x_d}-{\theta} x^{2}-u
e˙=xd?˙??x˙=xd?˙??θx2?u
定義lyapunov function:
V
(
e
)
=
1
2
e
2
V(e)=\frac{1}{2} {e}^2
V(e)=21?e2
V
(
e
)
˙
=
e
?
e
˙
=
e
?
(
x
d
˙
?
θ
x
2
?
u
)
\dot{V(e)}=e*\dot{e}=e*(\dot{x_d}-{\theta} x^{2}-u)
V(e)˙?=e?e˙=e?(xd?˙??θx2?u)
令控制器為:
u
=
x
d
˙
?
θ
x
2
+
K
e
u=\dot{x_d}-{\theta} x^{2}+Ke
u=xd?˙??θx2+Ke,帶入上式有:
V
(
e
)
˙
=
e
?
(
x
d
˙
?
θ
x
2
?
(
x
d
˙
?
θ
x
2
+
K
e
)
)
=
?
K
e
2
\dot{V(e)}=e*(\dot{x_d}-{\theta} x^{2}-(\dot{x_d}-{\theta} x^{2}+Ke))=-Ke^2
V(e)˙?=e?(xd?˙??θx2?(xd?˙??θx2+Ke))=?Ke2
V
(
e
)
˙
\dot{V(e)}
V(e)˙?負定,系統漸近穩定
這時對于誤差有:
e
˙
=
x
d
˙
?
x
˙
=
x
d
˙
?
θ
x
2
?
u
=
?
K
e
\dot{e}=\dot{x_d}-\dot{x}=\dot{x_d}-{\theta} x^{2}-u=-Ke
e˙=xd?˙??x˙=xd?˙??θx2?u=?Ke
完成非線性系統的反饋線性化,
假設
θ
{\theta}
θ 未知:
??
θ
{\theta}
θ 為一引數,
θ
˙
=
0
\dot{\theta}=0
θ˙=0,
θ
^
\hat{\theta}
θ^ 為
θ
{\theta}
θ的估計值,
θ
~
\tilde{\theta}
θ~為估計誤差,
θ
~
=
θ
?
θ
^
\tilde{\theta}={\theta}-\hat{\theta}
θ~=θ?θ^
求導:
θ
~
˙
=
θ
˙
?
θ
^
˙
=
?
θ
^
˙
\dot{\tilde{\theta}}=\dot{\theta}-\dot{\hat{\theta}}=-\dot{\hat{\theta}}
θ~˙=θ˙?θ^˙=?θ^˙
定義lyapunov function:
V
(
e
,
θ
~
)
=
1
2
e
2
+
1
2
θ
~
2
V(e,\tilde{\theta})=\frac{1}{2} {e}^2+\frac{1}{2} {\tilde{\theta}}^2
V(e,θ~)=21?e2+21?θ~2
求導為:
V
˙
(
e
,
θ
~
)
=
e
e
˙
+
θ
~
θ
~
˙
=
e
(
x
d
˙
?
θ
x
2
?
u
)
?
θ
~
θ
^
˙
(
令
u
=
x
d
˙
?
θ
^
x
2
+
k
e
)
=
?
e
θ
~
x
2
?
k
e
2
?
θ
~
θ
^
˙
=
?
k
e
2
?
θ
~
(
e
x
2
+
θ
^
˙
)
\begin{aligned} \dot{V}(e,\tilde{\theta})&=e{\dot{e}}+ {\tilde{\theta}}\dot{\tilde{\theta}} \\ &=e{(\dot{x_d}-{\theta} x^{2}-u)}- {\tilde{\theta}}\dot{\hat{\theta}}\\ &(令u=\dot{x_d}-\hat{\theta} x^{2}+ke)\\ &=-e{\tilde{\theta}}x^{2}-k e^{2}-{\tilde{\theta}}\dot{\hat{\theta}}\\ &=-k e^{2}-{\tilde{\theta}}(e x^{2}+\dot{\hat{\theta}}) \end{aligned}
V˙(e,θ~)?=ee˙+θ~θ~˙=e(xd?˙??θx2?u)?θ~θ^˙(令u=xd?˙??θ^x2+ke)=?eθ~x2?ke2?θ~θ^˙=?ke2?θ~(ex2+θ^˙)?
??
?
k
e
2
-k e^{2}
?ke2為負定,只需后一項為0,即
(
e
x
2
+
θ
^
˙
)
=
0
(e x^{2}+\dot{\hat{\theta}})=0
(ex2+θ^˙)=0,
V
˙
(
e
,
θ
~
)
=
?
k
e
2
\dot{V}(e,\tilde{\theta})=-k e^{2}
V˙(e,θ~)=?ke2,此時為半負定,由于
V
(
e
,
θ
~
)
≥
0
V(e,\tilde{\theta}) \geq 0
V(e,θ~)≥0,
V
¨
(
e
,
θ
~
)
=
?
2
k
e
e
˙
=
?
2
k
e
(
?
k
e
)
=
2
k
e
2
\ddot{V}(e,\tilde{\theta})=-2 k e \dot{e}=-2 k e(-k e)=2 k e^{2}
V¨(e,θ~)=?2kee˙=?2ke(?ke)=2ke2是有界的,因為
V
˙
\dot{V}
V˙ 半負定,
e
e
e 在Lyapunov意義下穩定,即有界,所以
V
˙
\dot{V}
V˙ 是一致連續的,滿足了Lypunov-like Lemma,所以當
t
→
0
t \rightarrow 0
t→0 時,
V
˙
→
0
\dot{V} \rightarrow 0
V˙→0, 即
e
→
0
e \rightarrow 0
e→0 ,
Lyapunov-like Lemma
如果標量函式 V ( x ) V(x) V(x) 滿足 :
(1) V ( x ) V(x) V(x) 有下界;
(2) V ˙ ( x ) \dot{V}(x) V˙(x) 半負定;
(3) V ˙ ( x ) \dot{V}(x) V˙(x) 對時間是一致連續的, 那么當 t → ∞ t \rightarrow \infty t→∞ 時, V ˙ ( x ) → 0 \dot{V}(x) \rightarrow 0 V˙(x)→0
控制器為:
u
=
x
˙
d
?
θ
^
x
2
+
k
e
(
其
中
θ
^
˙
=
?
e
x
2
)
=
x
˙
d
?
(
∫
0
t
?
e
x
2
d
τ
)
x
2
+
k
e
=
x
˙
d
+
x
2
∫
0
t
e
x
2
d
τ
+
k
e
\begin{aligned} u &=\dot{x}_{d}-\hat{\theta} x^{2}+k e &(其中\dot{\hat{\theta}}=-e x^{2}) \\ &=\dot{x}_{d}-\left(\int_{0}^{t}-e x^{2} d \tau\right) x^{2}+k e \\ &=\dot{x}_{d}+x^{2} \int_{0}^{t} e x^{2} d \tau+k e \end{aligned}
u?=x˙d??θ^x2+ke=x˙d??(∫0t??ex2dτ)x2+ke=x˙d?+x2∫0t?ex2dτ+ke?(其中θ^˙=?ex2)
遞推最小二乘辨識加控制:
末知引數向量
θ
\theta
θ 的最小二乘估計
θ
^
L
S
\hat{\boldsymbol{\theta}}_{L S}
θ^LS? 的遞推計算公式為
θ
^
L
S
(
k
)
=
θ
^
L
S
(
k
?
1
)
+
K
(
k
)
[
y
(
k
)
?
φ
T
(
k
?
1
)
θ
^
L
S
(
k
?
1
)
]
\hat{\boldsymbol{\theta}}_{L S}(k)=\hat{\boldsymbol{\theta}}_{L S}(k-1)+\boldsymbol{K}(k)\left[y(k)-\boldsymbol{\varphi}^{\mathrm{T}}(k-1) \hat{\boldsymbol{\theta}}_{L S}(k-1)\right]
θ^LS?(k)=θ^LS?(k?1)+K(k)[y(k)?φT(k?1)θ^LS?(k?1)]
K
(
k
)
=
P
(
k
?
1
)
φ
(
k
?
1
)
1
+
φ
T
(
k
?
1
)
P
(
k
?
1
)
φ
(
k
?
1
)
\boldsymbol{K}(k)=\frac{\boldsymbol{P}(k-1) \boldsymbol{\varphi}(k-1)}{1+\boldsymbol{\varphi}^{\mathrm{T}}(k-1) \boldsymbol{P}(k-1) \boldsymbol{\varphi}(k-1)}
K(k)=1+φT(k?1)P(k?1)φ(k?1)P(k?1)φ(k?1)?
P
(
k
)
=
[
I
?
K
(
k
)
φ
T
(
k
?
1
)
]
P
(
k
?
1
)
\boldsymbol{P}(k)=\left[\boldsymbol{I}-\boldsymbol{K}(k) \boldsymbol{\varphi}^{\mathrm{T}}(k-1)\right] \boldsymbol{P}(k-1)
P(k)=[I?K(k)φT(k?1)]P(k?1)
其中:
P
(
k
)
=
[
Φ
k
T
Φ
k
]
?
1
\boldsymbol{P}(k)=\left[\boldsymbol{\Phi}_{k}^{\mathrm{T}} \boldsymbol{\Phi}_{k}\right]^{-1}
P(k)=[ΦkT?Φk?]?1
Φ
k
=
[
?
T
(
0
)
φ
T
(
1
)
?
φ
T
(
k
?
1
)
]
\boldsymbol{\Phi}_{k}=\left[\begin{array}{c} \boldsymbol{\phi}^{\mathrm{T}}(0) \\ \boldsymbol{\varphi}^{\mathrm{T}}(1) \\ \vdots \\ \boldsymbol{\varphi}^{\mathrm{T}}(k-1) \end{array}\right]
Φk?=???????T(0)φT(1)?φT(k?1)???????
獲得最小二乘估計
θ
^
L
S
\hat{\boldsymbol{\theta}}_{L S}
θ^LS?,原系統變為:
x
˙
=
θ
^
L
S
x
2
+
u
\dot{x}={\hat{\boldsymbol{\theta}}_{L S}} x^{2}+u
x˙=θ^LS?x2+u
期望目標
x
d
{x_d}
xd?,則誤差為
e
=
x
d
?
x
e={x_d}-x
e=xd??x,控制目標:e趨近于0
e
˙
=
x
d
˙
?
x
˙
=
x
d
˙
?
θ
^
L
S
x
2
?
u
=
?
k
e
\begin{aligned} \dot{e}=\dot{x_d}-\dot{x}&=\dot{x_d}-{\hat{\boldsymbol{\theta}}_{L S}} x^{2}-u\\ &=-ke \end{aligned}
e˙=xd?˙??x˙?=xd?˙??θ^LS?x2?u=?ke?
所以控制器為:
u
=
x
d
˙
?
θ
^
L
S
x
2
+
k
e
\begin{aligned} u=\dot{x_d}-{\hat{\boldsymbol{\theta}}_{L S}} x^{2}+ke \end{aligned}
u=xd?˙??θ^LS?x2+ke?
2、利用狀態觀測器完成自適應控制
系統模型為:
x
˙
=
u
+
c
y
=
x
\begin{aligned} &\dot{x}=u+c \\ &y=x \end{aligned}
?x˙=u+cy=x?
定義觀測器為
x
^
˙
=
u
+
c
^
y
^
=
x
^
\begin{aligned} &\dot{\hat{x}}=u+\hat{c} \\ &\hat{y}=\hat{x} \end{aligned}
?x^˙=u+c^y^?=x^?
為了消除觀測器誤差,引入反饋增益
L
L
L:
e
=
x
?
x
^
e
˙
=
x
˙
?
x
^
˙
=
c
?
c
^
?
L
(
x
?
x
^
)
=
c
?
c
^
?
L
e
e
c
=
c
~
=
c
?
c
^
\begin{aligned} &e={x}-{\hat{x}}\\ &\dot{e}=\dot{x}-\dot{\hat{x}}=c-\hat{c}-L(x-\hat{x})=c-\hat{c}-L e \\ &e_{c}=\tilde{c}=c-\hat{c} \end{aligned}
?e=x?x^e˙=x˙?x^˙=c?c^?L(x?x^)=c?c^?Leec?=c~=c?c^?
設計lyapunov函式:
V
=
1
2
e
2
+
1
2
e
c
2
V=\frac{1}{2} e^{2}+\frac{1}{2} e_{c}^{2}
V=21?e2+21?ec2?
函式正定
求導數有:
V
˙
=
e
e
˙
+
e
c
e
˙
c
=
e
(
c
?
c
^
?
L
e
)
?
e
c
c
^
˙
=
?
L
e
2
+
e
e
c
?
e
c
c
^
˙
=
?
L
e
2
+
(
e
?
c
^
˙
)
e
c
\begin{aligned} \dot{V}&=e \dot{e}+e_{c} \dot{e}_{c}\\ &=e(c-\hat{c}-L e)-e_{c}\dot{ \hat{{c}}}\\ &=-Le^2+ee_{c}-e_{c}\dot{ \hat{{c}}}\\ &=-Le^2+(e-\dot{ \hat{{c}}})e_{c} \end{aligned}
V˙?=ee˙+ec?e˙c?=e(c?c^?Le)?ec?c^˙=?Le2+eec??ec?c^˙=?Le2+(e?c^˙)ec??
若使導數負定,則要求
(
e
?
c
^
˙
)
=
0
(e-\dot{ \hat{{c}}})=0
(e?c^˙)=0,有
e
?
c
^
˙
=
0
x
?
x
^
?
c
^
˙
=
0
x
=
x
^
+
c
^
˙
\begin{aligned} &e-\dot{ \hat{{c}}}=0\\ &{x}-{\hat{x}}-\dot{ \hat{{c}}}=0\\ &{x}={\hat{x}}+\dot{ \hat{{c}}} \end{aligned}
?e?c^˙=0x?x^?c^˙=0x=x^+c^˙?
根據自適應控制器的設計原則,控制器為:
u
=
?
x
?
c
^
=
?
x
^
?
c
^
˙
?
c
^
\begin{aligned} u&=-x-\hat{c}\\ &=-{\hat{x}}-\dot{ \hat{{c}}}-\hat{c} \end{aligned}
u?=?x?c^=?x^?c^˙?c^?
3、繪制系統框圖
模型參考自適應控制:
系統:
x
˙
=
a
x
+
b
u
\begin{aligned} \dot{x}=ax+bu \end{aligned}
x˙=ax+bu?
參考模型:
x
˙
m
=
a
m
x
m
+
b
m
u
m
\begin{aligned} \dot{x}_m=a_mx_m+b_mu_m \end{aligned}
x˙m?=am?xm?+bm?um??
控制器為:
u
=
θ
^
1
x
+
θ
^
2
u
m
u={\hat\theta_1}x+{\hat\theta_2}u_m
u=θ^1?x+θ^2?um?
控制器需滿足的條件:
θ
^
1
˙
=
x
e
θ
^
2
˙
=
?
u
m
e
\begin{aligned} &\dot{\hat\theta_1}=xe\\ &\dot{\hat\theta_2}=-u_me \end{aligned}
?θ^1?˙?=xeθ^2?˙?=?um?e?

4、設計李雅普諾夫函式
對于狀態方程:
[
x
˙
θ
˙
]
=
[
A
B
Φ
T
?
Φ
C
0
]
[
x
θ
]
\left[\begin{array}{l} \dot{{x}} \\ \dot{\theta} \end{array}\right]=\left[\begin{array}{ll} {A} & {B} \Phi^{T} \\ -\Phi {C} & 0 \end{array}\right]\left[\begin{array}{l} {x} \\ \theta \end{array}\right]
[x˙θ˙?]=[A?ΦC?BΦT0?][xθ?]
其中
P
A
+
A
T
P
=
?
Q
,
C
=
B
T
P
,
P
>
0
,
Q
>
0
PA+A^{T}P=-Q,C=B^{T}P,P>0,Q>0
PA+ATP=?Q,C=BTP,P>0,Q>0
構造lyapunov函式有:
V
(
x
,
θ
)
=
x
T
P
x
+
θ
T
θ
V(x,\theta)={x}^TP{x}+{\theta}^T{\theta}
V(x,θ)=xTPx+θTθ
求導為:
V
˙
(
x
,
θ
)
=
x
˙
T
P
x
+
x
T
P
x
˙
+
θ
˙
T
θ
+
θ
T
θ
˙
=
(
A
x
+
B
Φ
T
θ
)
T
P
x
+
x
T
P
(
A
x
+
B
Φ
T
θ
)
+
(
?
Φ
C
x
)
T
θ
+
θ
T
(
?
Φ
C
x
)
=
?
x
T
Q
x
\begin{aligned} \dot{V}(x,\theta)&=\dot{{x}}^TP{x}+{x}^TP\dot{{x}}+\dot{\theta}^T{\theta}+{\theta}^T\dot{\theta}\\ &= (Ax+{B} \Phi^{T}\theta)^TP{x}+{x}^TP(Ax+{B} \Phi^{T}\theta)+(-\Phi {C}x)^T{\theta}+{\theta}^T(-\Phi {C}x)\\ &=-x^TQx \end{aligned}
V˙(x,θ)?=x˙TPx+xTPx˙+θ˙Tθ+θTθ˙=(Ax+BΦTθ)TPx+xTP(Ax+BΦTθ)+(?ΦCx)Tθ+θT(?ΦCx)=?xTQx?
lyapunov函式導數負定,系統漸近穩定
能力有限僅供參考,歡迎提出寶貴意見!
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/349675.html
標籤:其他
