目录
摘要
介绍了三种经典的非线性机器人模型,分析了它们的动力学模型和控制方法。
Acrobot
介绍
Acrobot是一种两连杆机器人,如上图所示,但是这个机器人只有在肘关节有驱动源,这个东西如果直译过来是体操机器人,取名的愿意大概是平衡木项目中,人倒立在平衡木上,手部和平衡木形成一个铰链,但是这个铰链并不受力,主要是依靠腰部调整重心来保持平衡。
动力学方程
对于复杂机器人,使用牛顿法建立动力学方程就太阴间了,使用拉格朗日方程,得到两连杆的动能为*(第二根杆动能的计算方法:刚体平面运动的动能为质心的平动能量和绕质心的转动能量之和,可以先计算第二根杆的质心的平动能量,而后根据肘部关节和质心的速度差得到相对转动速度,求解整理可得下式,公式中的转动惯量为绕端点的转动惯量)*:
T
1
=
1
2
I
1
q
˙
1
2
T
2
=
1
2
(
m
2
l
1
2
+
I
2
+
2
m
2
l
1
l
c
2
c
2
)
q
˙
1
2
+
1
2
I
2
q
˙
2
2
+
(
I
2
+
m
2
l
1
l
c
2
c
2
)
q
˙
1
q
˙
2
T_{1}=\frac{1}{2} I_{1} \dot{q}_{1}^{2}\\ T_{2}=\frac{1}{2}\left(m_{2} l_{1}^{2}+I_{2}+2 m_{2} l_{1} l_{c 2} c_{2}\right) \dot{q}_{1}^{2}+\frac{1}{2} I_{2} \dot{q}_{2}^{2}+\left(I_{2}+m_{2} l_{1} l_{c 2} c_{2}\right) \dot{q}_{1} \dot{q}_{2}
T1=21I1q˙12T2=21(m2l12+I2+2m2l1lc2c2)q˙12+21I2q˙22+(I2+m2l1lc2c2)q˙1q˙2
势能为:
U
=
−
m
1
g
l
c
1
c
1
−
m
2
g
(
l
1
c
1
+
l
c
2
c
1
+
2
)
U=-m_{1} g l_{c 1} c_{1}-m_{2} g\left(l_{1} c_{1}+l_{c 2} c_{1+2}\right)
U=−m1glc1c1−m2g(l1c1+lc2c1+2)
带入拉格朗日方程并整理成一下形式:
M
(
q
)
q
¨
+
C
(
q
,
q
˙
)
q
˙
=
τ
g
(
q
)
+
B
u
\mathbf{M}(\mathbf{q}) \ddot{\mathbf{q}}+\mathbf{C}(\mathbf{q}, \dot{\mathbf{q}}) \dot{\mathbf{q}}=\tau_{g}(\mathbf{q})+\mathbf{B u}
M(q)q¨+C(q,q˙)q˙=τg(q)+Bu
式中,
M
(
q
)
=
[
I
1
+
I
2
+
m
2
l
1
2
+
2
m
2
l
1
l
c
2
c
2
I
2
+
m
2
l
1
l
c
2
c
2
I
2
+
m
2
l
1
l
c
2
c
2
I
2
]
,
C
(
q
,
q
˙
)
=
[
−
2
m
2
l
1
l
c
2
s
2
q
˙
2
−
m
2
l
1
l
c
2
s
2
q
˙
2
m
2
l
1
l
c
2
s
2
q
˙
1
0
]
,
τ
g
(
q
)
=
[
−
m
1
g
l
c
1
s
1
−
m
2
g
(
l
1
s
1
+
l
c
2
s
1
+
2
)
−
m
2
g
l
c
2
s
1
+
2
]
,
B
=
[
0
1
]
.
\begin{array}{c} \mathbf{M}(\mathbf{q})=\left[\begin{array}{cc} I_{1}+I_{2}+m_{2} l_{1}^{2}+2 m_{2} l_{1} l_{c 2} c_{2} & I_{2}+m_{2} l_{1} l_{c 2} c_{2} \\ I_{2}+m_{2} l_{1} l_{c 2} c_{2} & I_{2} \end{array}\right], \\ \mathbf{C}(\mathbf{q}, \dot{\mathbf{q}})=\left[\begin{array}{cc} -2 m_{2} l_{1} l_{c 2} s_{2} \dot{q}_{2} & -m_{2} l_{1} l_{c 2} s_{2} \dot{q}_{2} \\ m_{2} l_{1} l_{c 2} s_{2} \dot{q}_{1} & 0 \end{array}\right], \\ \tau_{g}(\mathbf{q})=\left[\begin{array}{cc} -m_{1} g l_{c 1} s_{1}-m_{2} g\left(l_{1} s_{1}+l_{c 2} s_{1+2}\right) \\ -m_{2} g l_{c 2} s_{1+2} \end{array}\right], \quad \mathbf{B}=\left[\begin{array}{l} 0 \\ 1 \end{array}\right] . \end{array}
M(q)=[I1+I2+m2l12+2m2l1lc2c2I2+m2l1lc2c2I2+m2l1lc2c2I2],C(q,q˙)=[−2m2l1lc2s2q˙2m2l1lc2s2q˙1−m2l1lc2s2q˙20],τg(q)=[−m1glc1s1−m2g(l1s1+lc2s1+2)−m2glc2s1+2],B=[01].
Cart-Pole
驱动小车来控制单摆的角度。
动力学方程
系统能量如下所示:
T
=
1
2
(
m
c
+
m
p
)
x
˙
2
+
m
p
x
˙
θ
˙
l
cos
θ
+
1
2
m
p
l
2
θ
˙
2
U
=
−
m
p
g
l
cos
θ
\begin{array}{l} T=\frac{1}{2}\left(m_{c}+m_{p}\right) \dot{x}^{2}+m_{p} \dot{x} \dot{\theta} l \cos \theta+\frac{1}{2} m_{p} l^{2} \dot{\theta}^{2} \\ U=-m_{p} g l \cos \theta \end{array}
T=21(mc+mp)x˙2+mpx˙θ˙lcosθ+21mpl2θ˙2U=−mpglcosθ
带入拉格朗日方程并整理得到:
M
(
q
)
q
¨
+
C
(
q
,
q
˙
)
q
˙
=
τ
g
(
q
)
+
B
u
(1)
\mathbf{M}(\mathbf{q}) \ddot{\mathbf{q}}+\mathbf{C}(\mathbf{q}, \dot{\mathbf{q}}) \dot{\mathbf{q}}=\tau_{g}(\mathbf{q})+\mathbf{B u}\tag{1}
M(q)q¨+C(q,q˙)q˙=τg(q)+Bu(1)
M ( q ) = [ m c + m p m p l cos θ m p l cos θ m p l 2 ] , C ( q , q ˙ ) = [ 0 − m p l θ ˙ sin θ 0 0 ] τ g ( q ) = [ 0 − m p g l sin θ ] , B = [ 1 0 ] \begin{array}{c} \mathbf{M}(\mathbf{q})=\left[\begin{array}{lc} m_{c}+m_{p} & m_{p} l \cos \theta \\ m_{p} l \cos \theta & m_{p} l^{2} \end{array}\right], \quad \mathbf{C}(\mathbf{q}, \dot{\mathbf{q}})=\left[\begin{array}{cc} 0 & -m_{p} l \dot{\theta} \sin \theta \\ 0 & 0 \end{array}\right] \\ \tau_{g}(\mathbf{q})=\left[\begin{array}{c} 0 \\ -m_{p} g l \sin \theta \end{array}\right], \quad \mathbf{B}=\left[\begin{array}{l} 1 \\ 0 \end{array}\right] \end{array} M(q)=[mc+mpmplcosθmplcosθmpl2],C(q,q˙)=[00−mplθ˙sinθ0]τg(q)=[0−mpglsinθ],B=[10]
平面四旋翼
这个动力学方程很简单,假设两个螺旋桨的力为u1,u2,则动力学模型如下
m
x
¨
=
−
(
u
1
+
u
2
)
sin
θ
m
y
¨
=
(
u
1
+
u
2
)
cos
θ
−
m
g
I
θ
¨
=
r
(
u
1
−
u
2
)
\begin{array}{c} m \ddot{x}=-\left(u_{1}+u_{2}\right) \sin \theta \\ m \ddot{y}=\left(u_{1}+u_{2}\right) \cos \theta-m g \\ I \ddot{\theta}=r\left(u_{1}-u_{2}\right) \end{array}
mx¨=−(u1+u2)sinθmy¨=(u1+u2)cosθ−mgIθ¨=r(u1−u2)
控制系统
本节要做的事情是对于Acrobot和Cart-pole,控制他们在不稳定不动点附近的行为,为了完成这一点,我们可以在不稳定不定点周围进行线性化,而后使用LQR算法设计控制器。
线性化系统
主要针对的是不稳定不动点进行线性化,可以得到下边的式子:
x
˙
=
f
(
x
,
u
)
≈
f
(
x
∗
,
u
∗
)
+
[
∂
f
∂
x
]
x
=
x
∗
,
u
=
u
∗
(
x
−
x
∗
)
+
[
∂
f
∂
u
]
x
=
x
∗
,
u
=
u
∗
(
u
−
u
∗
)
\dot{\mathbf{x}}=\mathbf{f}(\mathbf{x}, \mathbf{u}) \approx \mathbf{f}\left(\mathbf{x}^{*}, \mathbf{u}^{*}\right)+\left[\frac{\partial \mathbf{f}}{\partial \mathbf{x}}\right]_{\mathbf{x}=\mathbf{x}^{*}, \mathbf{u}=\mathbf{u}^{*}}\left(\mathbf{x}-\mathbf{x}^{*}\right)+\left[\frac{\partial \mathbf{f}}{\partial \mathbf{u}}\right]_{\mathbf{x}=\mathbf{x}^{*}, \mathbf{u}=\mathbf{u}^{*}}\left(\mathbf{u}-\mathbf{u}^{*}\right)
x˙=f(x,u)≈f(x∗,u∗)+[∂x∂f]x=x∗,u=u∗(x−x∗)+[∂u∂f]x=x∗,u=u∗(u−u∗)
由于是不动点,所以f(x,u)= 0,整理1式,可以写成以下形式:
x
˙
=
[
q
˙
M
−
1
(
q
)
[
τ
g
(
q
)
+
B
(
q
)
u
−
C
(
q
,
q
˙
)
q
˙
]
]
≈
A
l
i
n
(
x
−
x
∗
)
+
B
l
i
n
(
u
−
u
∗
)
\begin{aligned} \dot{\mathbf{x}} &=\left[\begin{array}{c} \dot{\mathbf{q}} \\ \mathbf{M}^{-1}(\mathbf{q})\left[\tau_{g}(\mathbf{q})+\mathbf{B}(\mathbf{q}) \mathbf{u}-\mathbf{C}(\mathbf{q}, \dot{\mathbf{q}}) \dot{\mathbf{q}}\right] \end{array}\right] \\ & \approx \mathbf{A}_{l i n}\left(\mathbf{x}-\mathbf{x}^{*}\right)+\mathbf{B}_{l i n}\left(\mathbf{u}-\mathbf{u}^{*}\right) \end{aligned}
x˙=[q˙M−1(q)[τg(q)+B(q)u−C(q,q˙)q˙]]≈Alin(x−x∗)+Blin(u−u∗)
将矩阵求偏导,并且转化坐标可以得到:
x
‾
˙
=
A
l
i
n
x
‾
+
B
l
i
n
u
‾
\dot{\overline{\mathbf{x}}}=\mathbf{A}_{l i n} \overline{\mathbf{x}}+\mathbf{B}_{l i n} \overline{\mathbf{u}}
x˙=Alinx+Blinu
式中,两个矩阵依次是:
A
l
i
n
=
[
0
I
M
−
1
∂
τ
g
∂
q
+
∑
j
M
−
1
∂
B
j
∂
q
u
j
0
]
x
=
x
∗
,
u
=
u
∗
B
l
i
n
=
[
0
M
−
1
B
]
x
=
x
∗
,
u
=
u
∗
\begin{array}{l} \mathbf{A}_{l i n}=\left[\begin{array}{cc} \mathbf{0} & \mathbf{I} \\ \mathbf{M}^{-1} \frac{\partial \tau_{g}}{\partial \mathbf{q}}+\sum_{j} \mathbf{M}^{-1} \frac{\partial \mathbf{B}_{j}}{\partial \mathbf{q}} u_{j} & \mathbf{0} \end{array}\right]_{\mathbf{x}=\mathbf{x}^{*}, \mathbf{u}=\mathbf{u}^{*}} \\ \mathbf{B}_{l i n}=\left[\begin{array}{c} \mathbf{0} \\ \mathbf{M}^{-1} \mathbf{B} \end{array}\right]_{\mathbf{x}=\mathbf{x}^{*}, \mathbf{u}=\mathbf{u}^{*}} \end{array}
Alin=[0M−1∂q∂τg+∑jM−1∂q∂BjujI0]x=x∗,u=u∗Blin=[0M−1B]x=x∗,u=u∗
线性系统的可控性
根据目标和上边的线性化,把复杂非线性系统转化成了线性系统,所以接下来讨论线性系统的可控性,这里不详细介绍了只做以下区分
可控性vs欠驱动
欠驱动系统未必是不可控的,可控意味着存在一条轨迹,能使系统从任意点回归到原点,而欠驱动会限制这个轨迹的某些特征,但是欠驱动并不意味着轨迹不存在。
LQR算法
这里对LQR算法只是一个初步介绍,细节下文书分解LQR算法是一种优化算法,首先定义系统的耗能函数为:
J
(
x
0
)
=
∫
0
∞
[
x
T
(
t
)
Q
x
(
t
)
+
u
T
(
t
)
R
u
(
t
)
]
d
t
,
x
(
0
)
=
x
0
,
Q
=
Q
T
>
0
,
R
=
R
T
>
0
J\left(\mathbf{x}_{0}\right)=\int_{0}^{\infty}\left[\mathbf{x}^{T}(t) \mathbf{Q} \mathbf{x}(t)+\mathbf{u}^{T}(t) \mathbf{R u}(t)\right] d t, \quad \mathbf{x}(0)=\mathbf{x}_{0}, \mathbf{Q}=\mathbf{Q}^{T}>0, \mathbf{R}=\mathbf{R}^{T}>0
J(x0)=∫0∞[xT(t)Qx(t)+uT(t)Ru(t)]dt,x(0)=x0,Q=QT>0,R=RT>0
式中,等号左边表示从x0点到原点需要消耗的函数,Q和R都是对阵正定矩阵,可以使用LQR算法找到一个线性矩阵K,使得:
u
(
t
)
=
−
K
x
(
t
)
\mathbf{u}(t)=-\mathbf{K} \mathbf{x}(t)
u(t)=−Kx(t)
这样控制信号u和状态信号x联系起来,使得系统可控,下面使用python-control库举一个例子。
from control import lqr
import numpy as np
A = np.array([[1, 2], [3, 4]])
B = np.array([[1, 0], [0, 0]]) # A,B是系统动力学
Q = np.array([[1, 2], [2, 5]])
R = np.array([[2, 1], [1, 5]])
K, S, E = lqr(A, B, Q, R)
print(K)
输出如下:
需要注意的是LQR对线性系统来说确实是很好用的,但是对非线性系统来说,LQR算法在吸引阈上有些缺陷,离原点太远线性化水平就不够了,这点上,它不如robust control。
PFL算法
在之前的章节,我们提到了欠驱动系统不能简化成双积分器的形式,但是仍然可以将系统动力学的一部分线性化。这种技术被称为部分反馈线性化(PFL)。
考虑之前提到的Cart-pole系统,小车的动力学是受到单摆动力学的影响的,这样我们可以做一件非常神奇的事情,就是控制小车的拉力,这个力可以完全抵消单摆的影响,这样就简化了小车的动力学,而后通过小车的动力学我们也可以间接控制单摆的角度。
当我们线性化驱动关节的时候,这个方法叫做collocated PFL,当我们线性化非驱动关节的时候,叫做non-collocated PFL,接下来介绍cart-pole中的PFL
cart-pole的PFL
Collocated
对上边的公式,为了方便分析,我们可以设定所有的物理参数都是1(重力加速度也为1),可以得到下式:
θ
¨
=
−
x
¨
c
−
s
x
¨
(
2
−
c
2
)
−
s
c
−
θ
˙
2
s
=
f
x
\begin{array}{c} \ddot{\theta}=-\ddot{x} c-s \\ \ddot{x}\left(2-c^{2}\right)-s c-\dot{\theta}^{2} s=f_{x} \end{array}
θ¨=−x¨c−sx¨(2−c2)−sc−θ˙2s=fx
可以施加外力为:
f
x
=
(
2
−
c
2
)
x
¨
d
−
s
c
−
θ
˙
2
s
f_{x}=\left(2-c^{2}\right) \ddot{x}^{d}-s c-\dot{\theta}^{2} s
fx=(2−c2)x¨d−sc−θ˙2s
带入可得此时系统动力学是:
x
¨
=
x
¨
d
θ
¨
=
−
x
¨
d
c
−
s
,
\begin{array}{l} \ddot{x}=\ddot{x}^{d} \\ \ddot{\theta}=-\ddot{x}^{d} c-s, \end{array}
x¨=x¨dθ¨=−x¨dc−s,
仔细观察方程,发现和单摆章节提到的无阻尼情况是十分类似的,只是输入力不是u,而是x_doubledot*c,因此单摆可以可以视为没有小车的影响,通过调整小车的加速度,来控制单摆的角度也就完成了
Non-collocated
在Collocated中,我们线性化了x,现在我们线性化θ,经过整理可以得到:
x
¨
=
−
θ
¨
+
s
c
θ
¨
(
c
−
2
c
)
−
2
tan
θ
−
θ
˙
2
s
=
f
x
\begin{array}{c} \ddot{x}=-\frac{\ddot{\theta}+s}{c} \\ \ddot{\theta}\left(c-\frac{2}{c}\right)-2 \tan \theta-\dot{\theta}^{2} s=f_{x} \end{array}
x¨=−cθ¨+sθ¨(c−c2)−2tanθ−θ˙2s=fx
同样的,可以设置施加的外力为:
f
x
=
(
c
−
2
c
)
θ
¨
d
−
2
tan
θ
−
θ
˙
2
s
f_{x}=\left(c-\frac{2}{c}\right) \ddot{\theta}^{d}-2 \tan \theta-\dot{\theta}^{2} s
fx=(c−c2)θ¨d−2tanθ−θ˙2s
得到系统方程:
θ
¨
=
θ
¨
d
x
¨
=
−
1
c
θ
¨
d
−
tan
θ
.
\begin{aligned} \ddot{\theta} &=\ddot{\theta}^{d} \\ \ddot{x} &=-\frac{1}{c} \ddot{\theta}^{d}-\tan \theta . \end{aligned}
θ¨x¨=θ¨d=−c1θ¨d−tanθ.
需要注意的是,上面的线性化只有当cosθ不为0才成立。
普遍形式
对于有的关节有驱动有的关节没有驱动这样的欠驱动系统,我们可以把系统的动力学改写成下面这种形式:
M
11
q
¨
1
+
M
12
q
¨
2
=
τ
1
M
21
q
¨
1
+
M
22
q
¨
2
=
τ
2
+
u
\begin{array}{l} \mathbf{M}_{11} \ddot{\mathbf{q}}_{1}+\mathbf{M}_{12} \ddot{\mathbf{q}}_{2}=\tau_{1} \\ \mathbf{M}_{21} \ddot{\mathbf{q}}_{1}+\mathbf{M}_{22} \ddot{\mathbf{q}}_{2}=\tau_{2}+\mathbf{u} \end{array}
M11q¨1+M12q¨2=τ1M21q¨1+M22q¨2=τ2+u
q1表示所有的欠驱动铰链,而t包含了重力和科里奥利力的影响,而且:
M
(
q
)
=
[
M
11
M
12
M
21
M
22
]
\mathbf{M}(\mathbf{q})=\left[\begin{array}{ll} \mathbf{M}_{11} & \mathbf{M}_{12} \\ \mathbf{M}_{21} & \mathbf{M}_{22} \end{array}\right]
M(q)=[M11M21M12M22]
M是个正定矩阵,所以M11和M22也全部是正定矩阵
Collocated线性化
这个是要线性化所有的驱动关节,因此,可以整理上边的方程,得到下面的方程:
q
¨
1
=
M
11
−
1
[
τ
1
−
M
12
q
¨
2
]
(
M
22
−
M
21
M
11
−
1
M
12
)
q
¨
2
−
τ
2
+
M
21
M
11
−
1
τ
1
=
u
\begin{array}{c} \ddot{\mathbf{q}}_{1}=\mathbf{M}_{11}^{-1}\left[\tau_{1}-\mathbf{M}_{12} \ddot{\mathbf{q}}_{2}\right] \\ \left(\mathbf{M}_{22}-\mathbf{M}_{21} \mathbf{M}_{11}^{-1} \mathbf{M}_{12}\right) \ddot{\mathbf{q}}_{2}-\tau_{2}+\mathbf{M}_{21} \mathbf{M}_{11}^{-1} \tau_{1}=\mathbf{u} \end{array}
q¨1=M11−1[τ1−M12q¨2](M22−M21M11−1M12)q¨2−τ2+M21M11−1τ1=u
可以整理第二个方程,得到需求的q2,然后带入1式,就使得q1和q2解耦。
Non-Collocated线性化
同样我们也可以把方程整理成下边这种形式:
q
¨
2
=
M
12
+
[
τ
1
−
M
11
q
¨
1
]
(
M
21
−
M
22
M
12
+
M
11
)
q
¨
1
−
τ
2
+
M
22
M
12
+
τ
1
=
u
\begin{array}{c} \ddot{\mathbf{q}}_{2}=\mathbf{M}_{12}^{+}\left[\tau_{1}-\mathbf{M}_{11} \ddot{\mathbf{q}}_{1}\right] \\ \left(\mathbf{M}_{21}-\mathbf{M}_{22} \mathbf{M}_{12}^{+} \mathbf{M}_{11}\right) \ddot{\mathbf{q}}_{1}-\tau_{2}+\mathbf{M}_{22} \mathbf{M}_{12}^{+} \tau_{1}=\mathbf{u} \end{array}
q¨2=M12+[τ1−M11q¨1](M21−M22M12+M11)q¨1−τ2+M22M12+τ1=u
式中,M+表示广义逆矩阵。(这里不在多介绍,感兴趣可以去阅读原文)
Swing-up 控制
调整能量
我们在上一章使用了调整能量的方法控制倒立摆,事实上,这个方法适用范围很广泛,可以用于控制acrobot和cart-pole系统。
cart-pole
我们可以使用PFL来控制系统的能量,让小车在原点附近摆动,而单摆在连续的转动,系统的动力学方程如下:
x
¨
=
u
θ
¨
=
−
u
c
−
s
\begin{array}{c} \ddot{x}=u \\ \ddot{\theta}=-u c-s \end{array}
x¨=uθ¨=−uc−s
单摆的能量是**(此处忽略小车的运动对单摆能量的影响,正如前面说的控制目标是让小车在原点摆动,速度较小,所以忽略)**:
E
(
x
)
=
1
2
θ
˙
2
−
cos
θ
E(\mathbf{x})=\frac{1}{2} \dot{\theta}^{2}-\cos \theta
E(x)=21θ˙2−cosθ
目标能量是
E
d
=
1
E^{d}=1
Ed=1
定义能量差,并对时间求导可得:
E
~
˙
(
x
)
=
E
˙
(
x
)
=
θ
˙
θ
¨
+
θ
˙
s
=
θ
˙
[
−
u
c
−
s
]
+
θ
˙
s
=
−
u
θ
˙
cos
θ
\begin{aligned} \dot{\tilde{E}}(x) &=\dot{E}(\mathbf{x})=\dot{\theta} \ddot{\theta}+\dot{\theta} s \\ &=\dot{\theta}[-u c-s]+\dot{\theta} s \\ &=-u \dot{\theta} \cos \theta \end{aligned}
E~˙(x)=E˙(x)=θ˙θ¨+θ˙s=θ˙[−uc−s]+θ˙s=−uθ˙cosθ
因此可以取控制信号u为:
u
=
k
θ
˙
cos
θ
E
~
u=k \dot{\theta} \cos \theta \tilde{E}
u=kθ˙cosθE~
系统的能量方程为:
E
~
˙
=
−
k
θ
˙
2
cos
2
θ
E
~
.
\dot{\tilde{E}}=-k \dot{\theta}^{2} \cos ^{2} \theta \tilde{E} .
E~˙=−kθ˙2cos2θE~.
需要注意的是,此处只是保证了能量误差不会增大,但不一定会收敛到0,如果系数是0,能量差会保持在一个定值。但是如果系统能满足一下条件:
∫
0
t
θ
˙
2
(
t
′
)
cos
2
θ
(
t
′
)
d
t
′
→
∞
,
t
→
∞
\int_{0}^{t} \dot{\theta}^{2}\left(t^{\prime}\right) \cos ^{2} \theta\left(t^{\prime}\right) d t^{\prime} \rightarrow \infty, \quad t \rightarrow \infty
∫0tθ˙2(t′)cos2θ(t′)dt′→∞,t→∞
则能量差一定会回到0,这个理论是之后在李雅普诺夫章节提出的LaSalle理论,请听下回分解,但是从直觉上来看呢,这个式子说明了:对于时间,积分里的方程不恒等于0,所以斜率永远是负数,从而最终收敛。
要进一步控制系统动力学的话,我们需要使用PD控制器,使得小车的控制方程如下所示:
x
¨
d
=
k
E
θ
˙
cos
θ
E
~
−
k
p
x
−
k
d
x
˙
\ddot{x}^{d}=k_{E} \dot{\theta} \cos \theta \tilde{E}-k_{p} x-k_{d} \dot{x}
x¨d=kEθ˙cosθE~−kpx−kdx˙
总结
这种通过改变能量从而改变系统状态的控制方法是欠驱动控制方法里的代表方法,它的思路就是通过一些方法(这里是改变能量)来去除系统的非线性,而后寻找合适的李雅普诺夫方程来证明系统的稳定性。
参考文献
@ b o o k u n d e r a c t u a t e d , t i t l e = " U n d e r a c t u a t e d R o b o t i c s " , s u b t i t l e = " A l g o r i t h m s f o r W a l k i n g , R u n n i n g , S w i m m i n g , F l y i n g , a n d M a n i p u l a t i o n " , h o w p u b l i s h e d = " C o u r s e N o t e s f o r M I T 6.832 " , a u t h o r = " T e d r a k e , R u s s " , y e a r = 2022 , u r l = " h t t p : / / u n d e r a c t u a t e d . m i t . e d u " , @book{underactuated, title = "Underactuated Robotics", subtitle = "Algorithms for Walking, Running, Swimming, Flying, and Manipulation", howpublished = "Course Notes for MIT 6.832", author = "Tedrake, Russ", year = 2022, url = "http://underactuated.mit.edu", } @bookunderactuated,title="UnderactuatedRobotics",subtitle="AlgorithmsforWalking,Running,Swimming,Flying,andManipulation",howpublished="CourseNotesforMIT6.832",author="Tedrake,Russ",year=2022,url="http://underactuated.mit.edu",