当前位置:网站首页>WBC learning notes (I): manually push WBC formula

WBC learning notes (I): manually push WBC formula

2022-06-26 08:33:00 Yu Getou

Introduce :WBC The controller is one of the most commonly used controllers for today's foot robot . Based on different priorities of multiple tasks , It can control the joint motor to meet the needs of each task in the order of priority .MIT Open source cheetah mini It uses MPC+WBIC Algorithm to control the landing point .

The derivation process refers to the following materials
mini cheetah in WBC Formula analysis
Based on the null space method (NUB) Full body control of (WBC) Simple implementation of
Robot Dynamics Lecture Notes
Due to my limited ability , about WBC The understanding of controller is not deep enough , Any mistakes in the derivation process are welcome to be criticized and corrected .
Contact information :[email protected]

2. Formula description

Δ q i = Δ q i − 1 + J i ∣ p r e † ( e i − J i Δ q i − 1 ) q ˙ i c m d = q ˙ i − 1 cmd  + J i ∣ p r e † ( x ˙ i d e s − J i q ˙ i − 1 c m d ) q ¨ i c m d = q ¨ i − 1 c m d + J i ∣ p r e d y n ‾ ( x ¨ i c m d − J ˙ i q ˙ − J i q ¨ i − 1 c m d ) \begin{array}{l} \Delta \mathbf{q}_{i}=\Delta \mathbf{q}_{i-1}+\boldsymbol{J}_{i \mid p r e}^{\dagger}\left(\mathbf{e}_{i}-\boldsymbol{J}_{i} \Delta \mathbf{q}_{i-1}\right) \\\\ \dot{\mathbf{q}}_{i}^{\mathrm{cmd}}=\dot{\mathbf{q}}_{i-1}^{\text {cmd }}+\boldsymbol{J}_{i \mid p r e}^{\dagger}\left(\dot{\mathbf{x}}_{i}^{\mathrm{des}}-\boldsymbol{J}_{i} \dot{\mathbf{q}}_{i-1}^{\mathrm{cmd}}\right) \\\\ \ddot{\mathbf{q}}_{i}^{\mathrm{cmd}}=\ddot{\mathbf{q}}_{i-1}^{\mathrm{cmd}}+\overline{J_{i \mid p r e}^{\mathrm{dyn}}}\left(\ddot{\mathbf{x}}_{i}^{\mathrm{cmd}}-\dot{\boldsymbol{J}}_{i} \dot{\mathbf{q}}-\boldsymbol{J}_{i} \ddot{\mathbf{q}}_{i-1}^{\mathrm{cmd}}\right) \end{array} Δqi=Δqi1+Jipre(eiJiΔqi1)q˙icmd=q˙i1cmd +Jipre(x˙idesJiq˙i1cmd)q¨icmd=q¨i1cmd+Jipredyn(x¨icmdJ˙iq˙Jiq¨i1cmd)
where
J i ∣ p r c = J i N i − 1 N i − 1 = N 0 N 1 ∣ 0 ⋯ N i − 1 ∣ i − 2 N 0 = I − J c † J c N i ∣ i − 1 = I − J i ∣ i − 1 † J i ∣ i − 1 \begin{array}{l} \boldsymbol{J}_{i \mid p r c}=\boldsymbol{J}_{i} \boldsymbol{N}_{i-1} \\\\ \boldsymbol{N}_{i-1}=\boldsymbol{N}_{0} \boldsymbol{N}_{1 \mid 0} \cdots \boldsymbol{N}_{i-1 \mid i-2} \\\\ \boldsymbol{N}_{0}=\boldsymbol{I}-\boldsymbol{J}_{c}^{\dagger} \boldsymbol{J}_{c} \\\\ \boldsymbol{N}_{i \mid i-1}=\boldsymbol{I}-\boldsymbol{J}_{i \mid i-1}{ }^{\dagger} \boldsymbol{J}_{i \mid i-1} \end{array} Jiprc=JiNi1Ni1=N0N10Ni1i2N0=IJcJcNii1=IJii1Jii1

  • The derivation process involves linear algebra Pseudo inverse matrix and Zero space , You can refer to the description in Wikipedia
    Pseudo inverse matrix
    Zero space
  • q \mathbf{q} q: Robot configuration matrix , It reflects the position of each joint . If joint i For rotating joints , be q i {q}_i qi Represents the angle of rotation . If joint i To move a joint , be q i {q}_i qi Represents the displacement .

Next, we mainly derive the following formula :
q ˙ i c m d = q ˙ i − 1 c m d + J i ∣ p r e † ( x ˙ i d e s − J i q ˙ i − 1 c m d ) \dot{\mathbf{q}}_{i}^{\mathrm{cmd}}=\dot{\mathbf{q}}_{i-1}^{\mathrm{cmd}}+\boldsymbol{J}_{i \mid p r e}^{\dagger}\left(\dot{\mathbf{x}}_{i}^{\mathrm{des}}-\boldsymbol{J}_{i} \dot{\mathbf{q}}_{i-1}^{\mathrm{cmd}}\right) q˙icmd=q˙i1cmd+Jipre(x˙idesJiq˙i1cmd)

(1) First, understand the representation of tasks .
Suppose there is n A mission , namely n Target states , use x i , i = 1 , . . . n x_i,i=1,...n xi,i=1,...n Express , Based on the knowledge of forward kinematics ,
x i ˙ = J i q ˙ ⋮ x n ˙ = J n q ˙ \dot{x_i}=J_i\dot{q}\\ \vdots\\ \dot{x_n}=J_n\dot{q} xi˙=Jiq˙xn˙=Jnq˙

(2) Redundant control
q ˙ = J † x ˙ + ( I − J † J ) y \dot{q}=J^{\dagger}\dot{\boldsymbol{x}}+\left(I-J^{\dagger}J\right) y q˙=Jx˙+(IJJ)y
This is also WBC The control of the The core idea , That is to say y y y Is an arbitrary vector that satisfies the number of rows .
For control tasks x \boldsymbol{x} x Come on , ( I − J † J ) \left(I-J^{\dagger}J\right) (IJJ) Is a zero vector matrix , Equivalent to one “ filter ”, hold And control x \boldsymbol{x} x Irrelevant robot degrees of freedom are filtered out .
namely , No matter what y y y What is it? , Will not control x \boldsymbol{x} x Any impact . such , We can adopt y y y To control lower priority control tasks , Without affecting high priority tasks .
As shown in the figure : Subspace A Represents the operation space under the first task ,B Represents the operation space of the second task ,C Represents the remaining redundant degrees of freedom .
 Insert picture description here
(3) Derivation process
Task a :
x 0 ˙ = J 0 q ˙ − − − − − ( 1 ) ↓ q ˙ = J 0 † x 0 ˙ + ( I − J 0 † J 0 ) y − − − − − ( 2 ) \boldsymbol{\dot{x_0}}=J_0\dot{q}-----(1)\\\\ \downarrow \\\\ \dot{q}= J^{\dagger}_0\dot{\boldsymbol{x_0}}+\left(I-J^{\dagger}_0J_0\right) y -----(2) x0˙=J0q˙(1)q˙=J0x0˙+(IJ0J0)y(2)
Task 2 :
x 1 ˙ = J 1 q ˙ − − − − − ( 3 ) ↓ q ˙ = J 1 † x 1 ˙ + ( I − J 1 † J 1 ) y − − − − − ( 4 ) \boldsymbol{\dot{x_1}}=J_1\dot{q}-----(3)\\\\ \downarrow \\\\ \dot{q}= J^{\dagger}_1\dot{\boldsymbol{x_1}}+\left(I-J^{\dagger}_1J_1\right) y-----(4) x1˙=J1q˙(3)q˙=J1x1˙+(IJ1J1)y(4)
take (2) Plug in (3) in
x 1 ˙ = J 1 J 0 † x 0 ˙ + J 1 ( I − J 0 † J 0 ) y ↓ x 1 ˙ − J 1 J 0 † x 0 ˙ = J 1 ( I − J 0 † J 0 ) y \boldsymbol{\dot{x_1}}=J_1J^{\dagger}_0\dot{\boldsymbol{x_0}}+J_1\left(I-J^{\dagger}_0J_0\right) y\\\\ \downarrow \\\\ \boldsymbol{\dot{x_1}}-J_1J^{\dagger}_0\dot{\boldsymbol{x_0}}=J_1\left(I-J^{\dagger}_0J_0\right) y x1˙=J1J0x0˙+J1(IJ0J0)yx1˙J1J0x0˙=J1(IJ0J0)y
According to the parameter definition in the above formula :
N 0 = I − J 0 † J 0 J 1 ∣ 0 = J 1 N 0 ↓ x 1 ˙ − J 1 J 0 † x 0 ˙ = J 1 ∣ 0 y N_0=I-J^{\dagger}_0J_0\\\\ J_{1\mid0}=J_1N_0\\ \downarrow \\ \boldsymbol{\dot{x_1}}-J_1J^{\dagger}_0\dot{\boldsymbol{x_0}}=J_{1\mid0}y N0=IJ0J0J10=J1N0x1˙J1J0x0˙=J10y
because J 1 ∣ 0 J_{1\mid0} J10 It is also a redundancy matrix , So the treatment method is as follows :
y = J 1 ∣ 0 † ( x 1 ˙ − J 1 J 0 † x 0 ˙ ) + ( I − J 1 ∣ 0 † J 1 ∣ 0 ) z ↓ y = J 1 ∣ 0 † ( x 1 ˙ − J 1 J 0 † x 0 ˙ ) + N 1 ∣ 0 z − − − − ( 5 ) y =J_{1\mid0}^{\dagger}(\boldsymbol{\dot{x_1}}-J_1J^{\dagger}_0\dot{\boldsymbol{x_0}})+ (I-J_{1\mid0}^{\dagger}J_{1\mid0})z\\ \downarrow\\ y =J_{1\mid0}^{\dagger}(\boldsymbol{\dot{x_1}}-J_1J^{\dagger}_0\dot{\boldsymbol{x_0}})+ N_{1\mid0}z ----(5) y=J10(x1˙J1J0x0˙)+(IJ10J10)zy=J10(x1˙J1J0x0˙)+N10z(5)
take (5) Daihui (2) in
q ˙ = J 0 † x 0 ˙ + N 0 J 1 ∣ 0 † ( x 1 ˙ − J 1 J 0 † x 0 ˙ ) + N 0 N 1 ∣ 0 z ↓ q ˙ = J 0 † x 0 ˙ + N 0 J 1 ∣ 0 † ( x 1 ˙ − J 1 J 0 † x 0 ˙ ) + N 1 z \dot{q}= J^{\dagger}_0\dot{\boldsymbol{x_0}}+N_0J_{1\mid0}^{\dagger}(\boldsymbol{\dot{x_1}}-J_1J^{\dagger}_0\dot{\boldsymbol{x_0}})+N_0N_{1\mid0}z\\ \downarrow\\ \dot{q}= J^{\dagger}_0\dot{\boldsymbol{x_0}}+N_0J_{1\mid0}^{\dagger}(\boldsymbol{\dot{x_1}}-J_1J^{\dagger}_0\dot{\boldsymbol{x_0}})+N_1z q˙=J0x0˙+N0J10(x1˙J1J0x0˙)+N0N10zq˙=J0x0˙+N0J10(x1˙J1J0x0˙)+N1z
According to the properties of zero space projection
N 0 J 1 ∣ 0 † = J 1 ∣ 0 † ↓ q ˙ = J 0 † x 0 ˙ + J 1 ∣ 0 † ( x 1 ˙ − J 1 J 0 † x 0 ˙ ) + N 1 z N_0J_{1\mid0}^{\dagger}=J_{1\mid0}^{\dagger}\\ \downarrow\\ \dot{q}= J^{\dagger}_0\dot{\boldsymbol{x_0}}+J_{1\mid0}^{\dagger}(\boldsymbol{\dot{x_1}}-J_1J^{\dagger}_0\dot{\boldsymbol{x_0}})+N_1z N0J10=J10q˙=J0x0˙+J10(x1˙J1J0x0˙)+N1z
Based on the previous discussion
q ˙ 0 c m d = J 0 † x 0 ˙ \dot{q}^{cmd}_0= J^{\dagger}_0\dot{\boldsymbol{x_0}} q˙0cmd=J0x0˙
If there is no free redundancy , Then we can get the final result
q ˙ 1 c m d = q ˙ 0 c m d + J 1 ∣ 0 † ( x ˙ 0 c m d − J 1 q ˙ 0 c m d ) \dot{q}_1^{cmd}= \dot{q}^{cmd}_0+J_{1\mid0}^{\dagger}(\boldsymbol{\dot{x}_0^{cmd}}-J_1\dot{q}^{cmd}_0) q˙1cmd=q˙0cmd+J10(x˙0cmdJ1q˙0cmd)
Compare the formulas to be derived , You can actually see that , The form has been consistent . So no further iterations .

原网站

版权声明
本文为[Yu Getou]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202170556033503.html