机器动力学人参数辨识
注:知识来源于哈工大《机器人力控》线上课程,网址:https://www.bilibili.com/video/BV1y7411H7fg?p=1
- 操作臂动力学方程
M ( θ ) θ ¨ + C ( θ , θ ˙ ) + B d ⋅ θ + D ( θ ˙ ) + G ( θ ) = τ (1) M(\theta)\ddot{\theta}+C(\theta,\dot{\theta})+B_d\cdot\theta+D(\dot{\theta})+G(\theta)= \tau \tag{1} M(θ)θ¨+C(θ,θ˙)+Bd⋅θ+D(θ˙)+G(θ)=τ(1)
M
M
M——惯性系数矩阵,
C
C
C——离心力、科氏力等力或力矩项
B
d
B_d
Bd——关节相对运动时的内部摩擦项中的黏性摩擦项
D
D
D——动摩擦项
G
G
G——重力或重力矩
其中:
M
(
θ
)
=
[
M
1
+
2
R
cos
θ
2
M
2
+
2
R
cos
θ
2
M
2
+
R
cos
θ
2
M
2
]
C
(
θ
,
θ
˙
)
=
[
−
2
R
θ
˙
1
θ
˙
2
sin
θ
2
−
R
θ
˙
2
2
sin
θ
2
R
θ
˙
1
2
sin
θ
2
]
B
d
=
[
B
d
1
0
0
B
d
2
]
D
(
θ
˙
)
=
[
D
1
s
g
n
(
θ
˙
1
)
D
2
s
g
n
(
θ
˙
1
)
]
G
(
θ
)
=
0
M
1
=
I
1
+
I
2
+
m
1
r
1
2
+
m
2
(
l
1
2
+
r
2
2
)
M
2
=
I
2
+
m
2
r
1
2
R
=
m
2
r
2
l
1
(2)
M(\theta)= \left[ \begin{matrix} M_1+2R\cos\theta_2 & M_2+2R\cos\theta_2\\ M_2+R\cos\theta_2 & M_2 \end{matrix} \right]\\ C(\theta,\dot\theta)= \left[ \begin{matrix} -2R\dot\theta_1\dot\theta_2\sin\theta_2-R\dot\theta_2^2\sin\theta_2\\ R\dot\theta_1^2\sin\theta_2 \end{matrix} \right]\\ B_d= \left[ \begin{matrix} B_{d1} & 0\\ 0 & B_{d2} \end{matrix} \right]\\ D(\dot\theta)= \left[ \begin{matrix} D_1sgn(\dot\theta_1)\\ D_2sgn(\dot\theta_1) \end{matrix} \right]\\ G(\theta)=0\\ M_1=I_1+I_2+m_1r_1^2+m2(l_1^2+r_2^2)\\ M_2=I_2+m_2r_1^2\\ R=m_2r_2l_1 \tag{2}
M(θ)=[M1+2Rcosθ2M2+Rcosθ2M2+2Rcosθ2M2]C(θ,θ˙)=[−2Rθ˙1θ˙2sinθ2−Rθ˙22sinθ2Rθ˙12sinθ2]Bd=[Bd100Bd2]D(θ˙)=[D1sgn(θ˙1)D2sgn(θ˙1)]G(θ)=0M1=I1+I2+m1r12+m2(l12+r22)M2=I2+m2r12R=m2r2l1(2)
- eg:以2-DOF操作臂为例
根据计算,有以下两种参数几何 P , ρ P,\rho P,ρ
P = { I 1 , I 2 , m 1 , m 2 , r 1 , r 2 , B d 1 , B d 2 , D 1 , D 2 } ∈ R 10 P= \lbrace I_1,I_2,m_1,m_2,r_1,r_2,B_{d1},B_{d2},D_1,D_2 \rbrace \in R^{10} P={I1,I2,m1,m2,r1,r2,Bd1,Bd2,D1,D2}∈R10 or ρ = { M 1 , M 2 , R , B d 1 , B d 2 , D 1 , D 2 } ∈ R 7 \rho= \lbrace M_1,M_2,R,B_{d1},B_{d2},D_1,D_2 \rbrace \in R^7 ρ={M1,M2,R,Bd1,Bd2,D1,D2}∈R7
选择哪一个组合参数?
选择
ρ
\rho
ρ ,维数小,这样可以提高计算效率
说明:
1.基底参数定义不唯一
2.参数识别不一定要是独立的物理参数,几个参数组合而成的组合参数也可以
3.尽可能选择组合参数
→
\rightarrow
→ 减少识别个数
逐次识别法:对操作臂的1自由度各轴逐次进行识别
同时识别法:对操作臂的多自由度各轴同时识别
- 机械臂动力学参数识别过程
- 逐次识别法
-
第一步识别 ρ 1 = { M 2 , B 2 , D 2 } T \rho_1=\lbrace M_2,B_2,D_2 \rbrace^T ρ1={M2,B2,D2}T
固定第一轴,让第二轴单独运动。
运动方程式:
[ θ ¨ 2 ( t ) θ ˙ 2 ( t ) s g n ( θ ˙ 2 ( t ) ) ] [ M 2 B 2 D 2 ] = τ 2 ( t ) (3) [\ddot\theta_2(t) \quad \dot\theta_2(t) \quad sgn(\dot\theta_2(t))] \left[ \begin{matrix} M_2\\B_2\\D_2 \end{matrix} \right] =\tau_2(t) \tag{3} [θ¨2(t)θ˙2(t)sgn(θ˙2(t))]⎣⎡M2B2D2⎦⎤=τ2(t)(3)
如何求解:-
测定所有时刻 t = t 1 , t 2 . . . . . . t N t=t_1,t_2......t_N t=t1,t2......tN下的所有值{ θ 2 , θ ˙ 2 , θ ¨ 2 , τ 2 \theta_2,\dot\theta_2,\ddot\theta_2,\tau_2 θ2,θ˙2,θ¨2,τ2 }
A N = [ θ ¨ 2 ( t 1 ) θ ˙ 2 ( t 1 ) s g n ( θ ˙ 2 ( t 1 ) ) ⋯ ⋯ ⋯ θ ¨ 2 ( t N ) θ ˙ 2 ( t N ) s g n ( θ ˙ 2 ( t N ) ) ] ρ = [ M 2 B 2 D 2 ] y N = [ τ 2 ( t 1 ) ⋯ τ 2 ( t N ) ] (4) A_N=\left[ \begin{matrix} \ddot\theta_2(t_1) & \dot\theta_2(t_1) & sgn(\dot\theta_2(t_1))\\ \cdots & \cdots & \cdots\\ \ddot\theta_2(t_N) & \dot\theta_2(t_N) & sgn(\dot\theta_2(t_N)) \end{matrix} \right] \quad \rho= \left[ \begin{matrix} M_2\\B_2\\D_2 \end{matrix} \right] \quad y_N= \left[ \begin{matrix} \tau_2(t_1)\\\cdots\\\tau_2(t_N) \end{matrix} \right] \tag{4} AN=⎣⎡θ¨2(t1)⋯θ¨2(tN)θ˙2(t1)⋯θ˙2(tN)sgn(θ˙2(t1))⋯sgn(θ˙2(tN))⎦⎤ρ=⎣⎡M2B2D2⎦⎤yN=⎣⎡τ2(t1)⋯τ2(tN)⎦⎤(4) -
进而得到:
A N ⋅ ρ 1 = y N (5) A_N \cdot \rho_1=y_N \tag{5} AN⋅ρ1=yN(5) -
由最小二乘法可得:
ρ = ( A N T ⋅ A N ) − 1 ⋅ A N ⋅ y N (6) \rho=(A_N^T \cdot A_N)^{-1} \cdot A_N \cdot y_N \tag{6} ρ=(ANT⋅AN)−1⋅AN⋅yN(6)
-
-
第二步识别 ρ 2 = { M 1 , B 1 , D 1 } T \rho_2=\lbrace M_1,B_1,D_1 \rbrace^T ρ2={M1,B1,D1}T
固定第二轴在多个不同的姿势,在不同的情况下分别让第一周单独运动
-
情况一
运动方程:
( M 1 + 2 R ) θ ¨ a 1 ( t ) + B 1 θ ˙ a 1 ( t ) + D 1 s g n ( θ ˙ a 1 ( t ) ) = τ a 1 ( t ) (7) (M_1+2R)\ddot\theta_{a1}(t)+B_1\dot\theta_{a1}(t)+D_1sgn(\dot\theta_{a1}(t))=\tau_{a1}(t) \tag{7} (M1+2R)θ¨a1(t)+B1θ˙a1(t)+D1sgn(θ˙a1(t))=τa1(t)(7)
也就是:
[ θ ¨ a 1 ( t ) θ ˙ a 1 ( t ) s g n ( θ ˙ a 1 ( t ) ) ] ( ρ 2 + [ 2 R 0 0 ] ) = τ a 1 ( t ) (8) [\ddot\theta_{a1}(t) \quad \dot\theta_{a1}(t) \quad sgn(\dot\theta_{a1}(t))] (\rho_2+ \left[ \begin{matrix} 2R\\0\\0 \end{matrix} \right]) =\tau_{a1}(t) \tag{8} [θ¨a1(t)θ˙a1(t)sgn(θ˙a1(t))](ρ2+⎣⎡2R00⎦⎤)=τa1(t)(8)
由最小二乘法可以得到 ρ 2 + [ 2 R 0 0 ] \rho_2+[2R \quad 0 \quad 0] ρ2+[2R00] -
情况三
运动方程 :
[ θ ¨ b 1 ( t ) θ ˙ b 1 ( t ) s g n ( θ ˙ b 1 ( t ) ) ] ρ 2 = τ b 1 ( t ) (9) [\ddot\theta_{b1}(t) \quad \dot\theta_{b1}(t) \quad sgn(\dot\theta_{b1}(t))] \rho_2 =\tau_{b1}(t) \tag{9} [θ¨b1(t)θ˙b1(t)sgn(θ˙b1(t))]ρ2=τb1(t)(9)
由最小二乘法得到 ρ 2 \rho_2 ρ2进一步可以得到 R R R
-
说明
上述过程只用2种情况,但是分的情况越细,参数识别越精确。
同时在不同情况下的参数识别可以存入数表,在使用时通过查表的方式得到参数,这样更加准确。
由于电流和力矩是完全随机的,实验时有一定的危险。
-