独轮和双轮移动机器人运动学模型
一、独轮移动机器人
独轮图
1. Configuration
q = ( x y θ ) q = \begin{pmatrix} x \\ y \\ \theta \end{pmatrix} q=⎝⎛xyθ⎠⎞
x, y 表示轮子与地面接触点坐标, θ \theta θ 是轮子方向转角。
2. 约束 Constraints
有几个轮子就有几个 pure rolling (纯滚动) 的约束
sin θ x ˙ − cos θ y ˙ = 0 \sin \theta \space \dot{x} - \cos \theta \space \dot{y} = 0 sinθ x˙−cosθ y˙=0
写成矩阵(Pfaffian Form)形式 A T ( q ) q ˙ = 0 A^{T}(q) \dot{q} = 0 AT(q)q˙=0,即:
( sin θ − cos θ 0 ) ( x ˙ y ˙ θ ˙ ) = 0 \begin{pmatrix} \sin \theta & -\cos \theta & 0 \end{pmatrix} \begin{pmatrix} \dot{x} \\ \dot{y} \\ \dot{\theta} \end{pmatrix} = 0 (sinθ−cosθ0)⎝⎛x˙y˙θ˙⎠⎞=0
3. 运动学模型
独轮只有一个轮子,所以只有一个 pure rolling,即只有一个运动学约束,k = 1,即 矩阵 A T A^{T} AT 有 k = 1 行,其 configuration q 有几个量,则 矩阵 A T A^{T} AT 有 n = 3 列。
然后
q
˙
∈
N
(
A
T
(
q
)
)
\dot{q} \in N(A^{T}(q))
q˙∈N(AT(q))
其中,零和空间 N 的维度为 n - k = 3 - 1 = 2,即, q ˙ \dot{q} q˙ 应有两个解 g 1 , g 2 g_{1}, g_{2} g1,g2 (也即输入),使得 Pfaffian Form 成立,计算后得:
q ˙ = g 1 ( q ) u 1 + g 2 ( q ) u 2 = ( cos θ sin θ 0 ) u 1 + ( 0 0 1 ) u 2 \dot{q} = g_{1}(q)u_{1} + g_{2}(q)u_{2} = \begin{pmatrix} \cos \theta \\ \sin \theta \\ 0 \end{pmatrix}u_{1} + \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix}u_{2} q˙=g1(q)u1+g2(q)u2=⎝⎛cosθsinθ0⎠⎞u1+⎝⎛001⎠⎞u2
即
x
˙
=
cos
θ
u
1
,
y
˙
=
sin
θ
u
1
,
θ
˙
=
u
2
\dot{x} = \cos \theta u_{1}, \space \dot{y}=\sin \theta u_{1}, \space\dot{\theta}=u_{2}
x˙=cosθu1, y˙=sinθu1, θ˙=u2
其中, u 1 = ω r , u 2 = Θ ˙ u_{1}=\omega r, u_{2} = \dot{ \Theta } u1=ωr,u2=Θ˙
4. Lie Bracket 与判断是否可控 Controllable
Lie Bracket的定义
g i ( x ) g_{i}(x) gi(x) 是一个 n 维向量域,当给定 g 1 ( x ) , g 2 ( x ) g_{1}(x), g_{2}(x) g1(x),g2(x)时,然后
g 3 = [ g 1 ( x ) , g 2 ( x ) ] = ∂ g 2 ∂ x g 1 − ∂ g 1 ∂ x g 2 g_{3} = [g_{1}(x), g_{2}(x)] = \frac{\partial g_{2}}{\partial x}g_{1} - \frac{\partial g_{1}}{\partial x}g_{2} g3=[g1(x),g2(x)]=∂x∂g2g1−∂x∂g1g2
g 3 g_{3} g3 就是一个新的向量域,称为 g 1 ( x ) , g 2 ( x ) g_{1}(x), g_{2}(x) g1(x),g2(x) 的 Lie Bracket.
判断是否可控 Controllable
对于所有得输入向量域 (Input vector filed), 把他们收集起来写成
Δ = { g 1 ( x ) , g 2 ( x ) , . . . , g m ( q ) , . . . , [ g i , g j ] , . . . , [ g i , [ g i , g k ] ] , . . . , a n d s o o n . . . } \Delta = \{ g_{1}(x), g_{2}(x), ..., g_{m}(q), ..., [g_{i}, g_{j}], ..., [g_{i}, [g_{i}, g_{k}]], ..., and \space so \space on... \} Δ={g1(x),g2(x),...,gm(q),...,[gi,gj],...,[gi,[gi,gk]],...,and so on...}
如果 维度 dim Δ \Delta Δ = n,则运动学模型是可控的。或者可以看 rank Δ \Delta Δ = n(我不知道为什么,但这是很常用的方法)
对于 独轮来说,
g 3 = [ g 1 , g 2 ] = ( sin θ − cos θ 0 ) g_{3} = [g_{1}, g_{2}] = \begin{pmatrix} \sin\theta \\ -\cos\theta \\ 0 \end{pmatrix} g3=[g1,g2]=⎝⎛sinθ−cosθ0⎠⎞
r a n k ( g 1 , g 2 ) = ( cos θ 0 sin θ sin θ 0 − cos θ 0 1 0 ) = n = 3 rank(g_{1}, g_{2}) = \begin{pmatrix} \cos \theta & 0 & \sin\theta \\ \sin \theta & 0 & -\cos\theta\\ 0 & 1 & 0\end{pmatrix}=n=3 rank(g1,g2)=⎝⎛cosθsinθ0001sinθ−cosθ0⎠⎞=n=3
二、两轮自行车 Bicycle
1. Configuration
自行车俯瞰图
q = ( x y θ ϕ ) q = \begin{pmatrix} x \\ y \\ \theta \\ \phi \end{pmatrix} q=⎝⎜⎜⎛xyθϕ⎠⎟⎟⎞
n = 4
2. 约束 Constraints
有几个轮子就有几个 pure rolling (纯滚动) 的约束,两个轮子就有俩约束,k = 2
对于后轮 Pure Rolling Constraint:
sin θ x ˙ − cos θ y ˙ = 0 \sin \theta \space \dot{x} - \cos \theta \space \dot{y} = 0 sinθ x˙−cosθ y˙=0
对前轮:
sin ( θ + ϕ ) x f ˙ − cos ( θ + ϕ ) y f ˙ = 0 \sin( \theta + \phi) \space \dot{x_{f}} - \cos (\theta + \phi) \space \dot{y_{f}} = 0 sin(θ+ϕ) xf˙−cos(θ+ϕ) yf˙=0
其中 x f , y f x_{f}, y_{f} xf,yf 要替换成 x,y, 即:
x f = x + l cos θ x_{f} = x + l \cos\theta xf=x+lcosθ
y f = y + l sin θ y_{f} = y + l \sin\theta yf=y+lsinθ
对时间求导,得:
x f ˙ = x ˙ − l sin θ θ ˙ \dot{x_{f}} = \dot{x} - l\sin \theta \space \dot{\theta} xf˙=x˙−lsinθ θ˙
y f ˙ = y ˙ + l cos θ θ ˙ \dot{y_{f}} = \dot{y} + l\cos \theta \space \dot{\theta} yf˙=y˙+lcosθ θ˙
最后全替换了,前轮约束公式就变成了下式:
sin ( θ + ϕ ) x ˙ − cos ( θ + ϕ ) y ˙ − l cos ϕ θ ˙ = 0 \sin(\theta + \phi) \dot{x} - \cos(\theta+\phi)\dot{y}-l\cos \phi \space \dot{\theta} = 0 sin(θ+ϕ)x˙−cos(θ+ϕ)y˙−lcosϕ θ˙=0
3. 运动学模型
A T ( q ) q ˙ = 0 ⇒ ( sin θ − cos θ 0 0 sin ( θ + ϕ ) − cos ( θ + ϕ ) − l cos ϕ 0 ) ( x ˙ y ˙ θ ˙ ϕ ˙ ) = 0 A^{T}(q) \dot{q} = 0 \Rightarrow \begin{pmatrix} \sin\theta & -\cos\theta & 0 & 0 \\ \sin(\theta+\phi) & -\cos(\theta+\phi) & -l\cos\phi & 0 \end{pmatrix}\begin{pmatrix} \dot{x} \\ \dot{y} \\ \dot{\theta} \\ \dot{\phi} \end{pmatrix}=0 AT(q)q˙=0⇒(sinθsin(θ+ϕ)−cosθ−cos(θ+ϕ)0−lcosϕ00)⎝⎜⎜⎛x˙y˙θ˙ϕ˙⎠⎟⎟⎞=0
有
n
−
k
=
2
n - k = 2
n−k=2,计算得:
q
˙
=
(
cos
θ
sin
θ
tan
θ
l
0
)
u
1
+
(
0
0
0
1
)
u
2
\dot{q} = \begin{pmatrix} \cos\theta \\ \sin\theta \\ \frac{\tan\theta}{l} \\ 0 \end{pmatrix}u_{1} + \begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix}u_{2}
q˙=⎝⎜⎜⎛cosθsinθltanθ0⎠⎟⎟⎞u1+⎝⎜⎜⎛0001⎠⎟⎟⎞u2
其中, u 1 = ± x 2 ˙ + y 2 ˙ , u 2 = ϕ ˙ u_{1}= \pm \sqrt{\dot{x^{2}} + \dot{y^{2}}}, \space\space u_{2} = \dot{\phi} u1=±x2˙+y2˙, u2=ϕ˙.
4. 判断是否可控
已知 g 1 , g 2 g_{1}, g_{2} g1,g2,计算:
g 3 = [ g 1 , g 2 ] = ( 0 0 − 1 l c o s 2 ϕ 0 ) g_{3} = [g_{1}, g_{2}] = \begin{pmatrix} 0 \\ 0 \\ -\frac{1}{lcos^{2}\phi} \\0 \end{pmatrix} g3=[g1,g2]=⎝⎜⎜⎛00−lcos2ϕ10⎠⎟⎟⎞
g 4 = [ g 1 , g 3 ] = ( − sin θ l 2 cos ϕ cos θ l 2 cos ϕ 0 0 ) g_{4} = [g_{1}, g_{3}] = \begin{pmatrix} -\frac{\sin\theta}{l^{2}\cos\phi} \\ \frac{\cos\theta}{l^{2}\cos\phi} \\ 0 \\0 \end{pmatrix} g4=[g1,g3]=⎝⎜⎜⎛−l2cosϕsinθl2cosϕcosθ00⎠⎟⎟⎞
则:
r a n k ( ∣ ∣ ∣ ∣ g 1 g 2 g 3 g 4 ∣ ∣ ∣ ∣ ) = 4 rank \begin{pmatrix} | &|&|&| \\ g_{1} &g_{2} &g_{3} &g_{4} \\ | &|&|&| \end{pmatrix} = 4 rank⎝⎛∣g1∣∣g2∣∣g3∣∣g4∣⎠⎞=4
则自行车约束可控!
一键三连!!!!