Main Content

回转一种l Measurements

回转S.ensing Overview

您可以按不同格式测量帧旋转。这些包括轴角,四元度和变换。通过不同的格式可获得变换传感器在联合块中,块和有限的程度[1]。测量格式的选择取决于模型。选择最方便的格式。

测量旋转

旋转是一个相对数量。一帧的旋转仅对另一帧有意义。这样,具有旋转感测能力的块需要两个帧来进行测量:测量和参考帧。在这些块中,从动框架端口识别测量的框架;基帧端口标识测量的参考帧。

S.imscape™ Multibody™defines the rotation formats according to standard conventions. In some cases, more than one convention exists. This is the case, for example, of the quaternion. To properly interpret rotation measurements, review the definitions of the rotation formats.

轴角测量

轴角是更简单的旋转测量格式之一。此格式使用两个参数来完全描述旋转:轴矢量和角度。轴角度格式的有用性直接从欧拉的旋转定理遵循。根据定理,可以将任何3-D旋转或旋转序列描述为绕单个固定轴的纯旋转。

要按轴角格式测量帧旋转,请使用变换传感器堵塞。Block Property Inspector包含分开Axis一种ndAngleparameters that you can select to expose the corresponding physical signal (PS) ports (labeled axs and q, respectively). Because the axis-angle parameters are listed separately, you can choose to measure the axis, the angle, or both.

轴输出是表单中的3D单元向量[一种X一种y一种Z.]。This unit vector encodes the rotation direction according to the right-hand rule. For example, a frame spinning in a counterclockwise direction about the +X axis has rotation axis [1 0 0]. A frame spinning in a clockwise direction about the same axis has rotation axis [-1 0 0].

这一种ngle output is a scalar number in the range 0–π. This number encodes the extent of rotation about the measured axis. By default, the angle is measured in radians. You can change the angle units in thePS-Simulink Converter块用于与Simulink接口万博1manbetx®blocks.

四元数测量

四元数是基于超复印号的旋转表示。四元数由标量部分组成,S.和矢量,V., 部分。标量部分编码旋转角度,向量部分编码旋转轴。

A key advantage of quaternions is the singularity-free parameter space. Mathematical singularities, which are present in Euler angle sequences, result in the loss of rotational degrees of freedom. This phenomenon is known as gimbal lock. InSimscape multibody.那gimbal lock causes numerical errors that lead to simulation failure. The absence of singularities means that quaternions are more robust for simulation purposes.

要测量四元格式的帧旋转,请使用:

  • 转换传感器在两个普通帧之间测量旋转时块。这回转menu of the property inspector contains a四元数您可以选择公开相应的物理信号端口的参数(标记为问:)。

  • A joint block that has a spherical primitive when measuring the 3-D rotation between the two joint frames. TheS.ensingmenu of the property inspector contains a位置您可以选择公开相应的物理信号端口的参数(也标有标记问:)。有关更多信息,请参阅球面关节块参考页面。

四元数输出是四元素行向量, 问: = S. V. 的) , 在哪里:

S. = cos θ 2 的)

一种nd

V. = [ X y Z. ] θ 2 的)

θis the angle of rotation and[XyZ.]是旋转轴的单位矢量。注意,对于任何给定的旋转,有两个四元数。它们是彼此的否定,但代表相同的旋转。例如,四元数[10.0.0.]一种nd[-10.0.0.]both represent the identity rotation.

转换测量

旋转变换是一个3×3编码帧旋转的矩阵。就底架轴而言[XyZ.]B.,从动框架轴[XyZ.]F是:

[ X y Z. ] B. = [ R. X X R. X y R. X Z. R. y X R. y y R. y Z. R. Z. X R. Z. y R. Z. Z. ] [ X y Z. ] F

每个矩阵列包含在基帧中解析的跟随器框架轴的坐标。例如,第一列包含从动框架X轴的坐标,如在基帧中解析。类似地,第二和第三列分别包含Y和Z轴的坐标。在带有旋转矩阵的向量上运行从跟随器帧转换到基帧的向量。

You can sense frame rotation in terms of a rotation matrix using the Transform Sensor block. The property inspector for this block contains aTransformoption that when selected exposes a physical signal port labeled R. Use this port to output the rotation matrix signal, for example, for processing and analysis in a Simulink subsystem—after converting the output physical signal to a Simulink signal through the PS-Simulink Converter block.

相关例子

更多关于


[1]焊接关节是一个例外