- ADAMS 2018虚拟样机技术从入门到精通
- 陈峰华
- 1725字
- 2021-03-31 14:29:40
1.5 ADAMS动力学分析
1.5.1 ADAMS动力学方程
ADAMS中用刚体B的质心笛卡儿坐标和反映刚体方位的欧拉角作为广义坐标,即q=[x,y,z,ψ,θ,φ]T,令R=[x,y,z]T、γ=[ψ,θ,ϕ]T、q=[RT,γT]T。
构件质心参考坐标系与大地坐标系间的坐标变换矩阵为:

定义一个欧拉转轴坐标系,该坐标系的3个单位矢量分别为上面3个欧拉转动的轴,因而3个轴并不相互垂直。该坐标系到构件质心坐标系的坐标变换矩阵为:

构件的角速度表达为:

ADAMS中引入变量ωe为角速度在欧拉转轴坐标系分量:

考虑约束方程,ADAMS利用带拉格朗日乘子的拉格朗日第一类方程的能量形式得到如下方程:

T为系统广义坐标表达的动能,qj为广义坐标,Qj为在广义坐标qj 方向的广义力,最后一项涉及约束方程和拉格朗日乘子,表达了在广义坐标qj 方向的约束反力。
ADAMS中近一步引入广义动量:

简化表达约束反力为:

这样方程就简化为:

动能近一步表达为:

其中,M为构件的质量阵,J为构件在质心坐标系下的惯量阵。
将式(1-41)分别表达为移动方向与转动方向:


其中,。
式(1-43)简化为:


B中包含欧拉角,为了简化推导,ADAMS中并没有进一步推导,而是将其作为一个变量求解。
这样ADAMS中每个构件就具有了如下15个变量(而非12个)和15个方程(而非12个)。
变量:

方程:

集成约束方程ADAMS可自动建立系统的动力学方程——微分-代数方程:

其中,P为系统的广义动量,H为外力的坐标转换矩阵。
为了更好地说明ADAMS的建模过程,下面以一个单摆为例进行建模推导。
假设单摆的质量为M、惯量为I,杆长为2L,并在O点以转动副与地面相连接约束在地面的OXY平面内。在单摆质心处建立单摆的跟随坐标系——局部构件参考坐标系Op-Xp-Yp,其坐标在大地坐标系OXY中为(x,y),单摆的姿态角为θ。
系统的动能表达式:

广义动量表达式:

外力表达式:

约束方程:

约束方程的雅克比矩阵:

约束对应的拉格朗日乘子:

力、力矩平衡方程:

动量矩表达式:

运动学关系方程:

其方程集成表达为:

其中,系统需求解变量为:。
1.5.2 初始条件分析
在进行动力学、静力学分析之前,ADAMS会自动进行初始条件分析,以便在初始系统模型中各物体的坐标与各种运动学约束之间达成协调,保证系统满足所有的约束条件。
初始条件分析通过求解相应的位置、速度、加速度目标函数的最小值得到。
(1)对初始位置分析,需满足约束最小化问题。
Minimize:
Subject to:Φ(q)=0
q为构件广义坐标,W为权重矩阵,q0为用户输入的值,若用户输入的值为精确值,则相应权重较大,并在迭代中变化较小。利用拉格朗日乘子将上述约束最小化问题变为如下极值问题:

L取最小值,则由得:

因约束函数中存在广义坐标,故该方程为非线性方程,须用Newton-Raphson迭代求解。迭代方程如下:

(2)对初始速度分析,需满足约束最小化问题。
Minimize:
Subject to:
其中,为用户设定的准确的或近似的初始速度值,或者为程序设定的默认速度值;W为对应
的加权系数。
再利用拉格朗日乘子将上述约束最小化问题变为如下极值问题:

L取最小值,得:

该方程为线性方程组,可求解如下方程:

(3)对初始加速度、初始拉氏乘子的分析可直接由系统动力学方程和系统约束方程的两阶导数确定。
1.5.3 ADAMS动力学方程的求解
对于微分-代数方程的求解,ADAMS采用两种方式求解:第一种为对DAE方程的直接求解;第二种为DAE方程利用约束方程将广义坐标分解为独立坐标和非独立坐标,然后化简为ODE方程求解。DAE方程的直接求解将二阶微分方程降阶为一阶微分方程,通过引入将所有拉格朗日方程均写成一阶微分形式,该方程为I3微分代数方程。
(1)I3积分格式

运用一阶向后差分公式,上述方程组对(u q λ)求导可得Jacobian矩阵,然后利用Newton-Rapson求解。当积分步长h减小并趋近于0时,上述Jacobian矩阵呈现病态。为了有效地监测速度积分的误差,可采用降阶积分方法(Index reduction methods)。通常来说,微分方程的阶数越少,其数值求解稳定性越好。
ADAMS还采用两种方法来降阶求解,即SI2(Stabilized-Index Two)和SI1(Stabilized-Index One)方法。
(2)SI2积分格式

上式能同时满足Φ和求解不违约且当步长h趋近于0时Jacobian矩阵不会呈现病态现象。
(3)SI1积分格式

上式中,为了对方程组降阶,引入和
来替代拉格朗日乘子,即
λ,
μ。这种变化有效地将上述方程组的阶数降为1。因为只需要微分速度约束方程一次来显式地计算表达式
和
。
运用SI1积分器能够方便地监测q、u、η和ζ的积分误差,系统的加速度也趋向于更加精确。在处理有明显的摩擦接触问题时,SI1积分器十分敏感并具有挑剔性。