## 2 Hybrid Dynamics of Underactuated Systems with Variant Constraints
: _(Impulse calculation for general systems with variant constraints)_  
_For system (1) with variant external constraints Equation (2), if \(\Delta t_{vc}\approx 0\), then the impulse Equation (4) caused by the constraint variation is explicitly given as_  
\[\tilde{\lambda}=-\Big{[}\mathbf{W}^{\mathrm{T}}(\mathbf{q})\mathbf{M}^{-1} \mathbf{W}(\mathbf{q})\Big{]}^{-1}\mathbf{W}^{\mathrm{T}}(\mathbf{q})\dot{ \mathbf{q}}(t_{vc}^{-}) \tag{7}\]  
_for adding constraints, and_  
\[\tilde{\lambda}=\Big{[}\mathbf{W}^{\mathrm{T}}(\mathbf{q})\mathbf{M}^{-1} \mathbf{W}(\mathbf{q})\Big{]}^{-1}\mathbf{W}^{\mathrm{T}}(\mathbf{q})\dot{ \mathbf{q}}(t_{vc}^{+}) \tag{8}\]  
_for reducing constraints._  
Proof. : It is intuition that the following equation is satisfied:  
\[\frac{\partial V(\mathbf{q})}{\partial\dot{\mathbf{q}}}=0. \tag{9}\]  
In addition, considering assumption Equation (5) and using condition Equation (6), we can conclude that  
\[\frac{\partial L(\mathbf{q},\dot{\mathbf{q}})}{\partial\mathbf{q}}=0\ \ \ \text{and}\ \ \ \frac{\partial\mathbf{W}(\mathbf{q})}{\partial\mathbf{q}}=0 \tag{10}\]for all \(t\in\Delta t_{vc}\) since the Lagrangian \(L(\mathbf{q})\) and the constraints \(\mathbf{W}(\mathbf{q})\) are invariant during the instant \(t\in\Delta t_{vc}\). By integrating system (1) on every interval \(\Delta t_{vc}\)[6; 7], we have  
\[\mathbf{M}\cdot\Delta\dot{\mathbf{q}}=\mathbf{W}(\mathbf{q}) \boldsymbol{\tilde{\lambda}}, \tag{11}\]  
where  
\[\Delta\dot{\mathbf{q}}=\dot{\mathbf{q}}(t_{vc}^{+})-\dot{\mathbf{q}}(t_{vc}^{ -}). \tag{12}\]  
Combining with Equations (11) and (12), it follows that  
\[\dot{\mathbf{q}}(t_{vc}^{+})-\dot{\mathbf{q}}(t_{vc}^{-})=\mathbf{M}^{-1} \mathbf{W}(\mathbf{q})\boldsymbol{\tilde{\lambda}}. \tag{13}\]  
From Equation (2), we have  
\[\mathbf{W}^{\mathrm{T}}(\mathbf{q})\dot{\mathbf{q}}\left(t_{vc}^{+}\right)=0 \tag{14}\]  
for adding constraints, and  
\[\mathbf{W}^{\mathrm{T}}(\mathbf{q})\dot{\mathbf{q}}\left(t_{vc}^{-}\right)=0 \tag{15}\]  
for reducing constraints. Substituting Equation (13) into Equation (14), it follows that  
\[\mathbf{W}^{\mathrm{T}}(\mathbf{q})\dot{\mathbf{q}}(t_{vc}^{-})+ \mathbf{W}^{\mathrm{T}}(\mathbf{q})\mathbf{M}^{-1}\mathbf{W}(\mathbf{q}) \boldsymbol{\tilde{\lambda}}=0. \tag{16}\]  
Then, Equation (7) can be obtained. Substituting Equation (13) into Equation (15), it follows that  
\[\tilde{\lambda}=\Big{[}\mathbf{W}^{\mathrm{T}}(\mathbf{q})\mathbf{M}^{-1} \mathbf{W}(\mathbf{q})\Big{]}^{-1}\mathbf{W}^{\mathrm{T}}(\mathbf{q})\dot{ \mathbf{q}}(t_{vc}^{+}) \tag{8}\]0  
Then, Equation (8) can be obtained. This completes the proof. For the underactuated systems considered in this paper, we partition the generalized coordinates into \(\mathbf{q}=(\mathbf{q}_{x},\mathbf{q}_{s})\in\Re^{n-l}\times\Re^{l}\), of which \(\mathbf{q}_{x}\) is called the external variables and the external variables are assumed to be passive, and \(\mathbf{q}_{s}\) is called the shape variables and the shape variables are assumed to be actuated. The shape variables are defined to be the variables that are shown in the inertia matrix \(\mathbf{M}(\mathbf{q}_{s})\) of the system. Otherwise, the coordinates \(\mathbf{q}_{x}\) that are not shown in \(\mathbf{M}(\mathbf{q}_{s})\) are defined to be the external variables. Based on the definitions suggested by [PERSON] [25], system (1) can be partitioned as  
\[ \begin{array}{l}\frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial T}{\partial \mathbf{q}_{s}}+\frac{\partial V}{\partial\mathbf{q}_{s}}=\mathbf{W}_{x}( \mathbf{q})\boldsymbol{\lambda},\\ \frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial T}{\partial\mathbf{q}_{s}}-\frac{ \partial L}{\partial\mathbf{q}_{s}}=\mathbf{W}_{s}(\mathbf{q})\boldsymbol{ \lambda}+\mathbf{u},\end{array}  \tag{18}\]  
where \(\mathbf{u}\in\Re^{s}\), \(\mathbf{W}_{x}(\mathbf{q})\in\Re^{(n-s)\times m}\), \(\mathbf{W}_{s}(\mathbf{q})\in\Re^{s\times m}\), and both of the equations \(\frac{\partial T}{\partial\mathbf{q}_{s}}=0\) and \(\frac{\partial V}{\partial\mathbf{q}}=0\) are utilized in Equation (18).