文档库 最新最全的文档下载
当前位置:文档库 › Utilities

Utilities

Utilities
Utilities

Continuous Angle

Convert discontinuous, bounded angular output from sensor to continuous, unbounded angular output

Library

Utilities

Description

The Continuous Angle block converts a measured angle signal restricted to the semiopen interval (-180o, +180o] degrees or (-π,+π] radians to a continuous, unbounded angle not restricted to any interval. This block requires the angle and the angular velocity as input signals. The continuous, unbounded angle is the output signal.

Caution Each Continuous Angle block in a model adds a normal Simulink state to the model. Use this block with caution if you are trimming or linearizing your model.

The Continuous Angle block does not add any mechanical states to your model.

The Joint Sensor block outputs the absolute rotational measurement of revolute motion as a bounded angle in the interval (-180o, +180o] degrees or (-π,+π] radians. Motion that crosses the boundaries of this interval causes discontinuities in the measured angle, from +180o to -180o or vice versa. Use the Continuous Angle block if you want to convert this restricted angular measurement to an unbounded measurement.

Dialog Box and Parameters

The dialog has one active area, Parameters.

Parameters

Angle measured in

Choose the units for the input angle and the output continuous angle, either deg (degrees) or rad

(radians). The default is deg.

Rate measured in

Choose the units for the input rate (angular velocity), either deg/s (degrees/second) or rad/s

(radians/second). The default is deg/s

Example

The tutorial Modeling and Simulating a Closed-Loop Machine in the Modeling, Simulating, and Visualizing Simple Machines chapter produces this angular motion output for the Revolute3 and Revolute 2 joints:

The Revolute3 angle is restricted to the interval (-180o, +180o], so values passing either limit of this interval are mapped to the opposite end of the interval. The Revolute2 angle is not restricted, but instead touches genuine turning points in its motion.

After passing the angles and angular velocities through Continuous Angle blocks, the Revolute3 angular motion appears different:

Revolute3's motion is unchanged, but its angle is now continuous, with no interval restriction. Revolute2's angle is unchanged.

See Also

Joint Sensor

See Trimming Mechanical Models and Linearizing Mechanical Models in the Analyzing Motion chapter for more about states.

See Utilities.

? 1984-2011-The MathWorks, Inc. -Site Help-Patents-Trademarks-Privacy Policy-Preventing

Piracy-RSS

Mechanical Branching Bar

Map multiple sensor or actuator lines to one sensor or actuator port on Joint, Constraint, or Driver, or to one Body coordinate system port on Body

Library

Utilities

Description

The Mechanical Branching Bar bundles multiple actuator and sensor connection lines into one line, allowing you to connect multiple actuators and/or sensors to a single connector port on a Joint, Constraint, or Driver, or to a single Body coordinate system (CS) port on a Body. You can choose any number of sensor/actuator ports on the Mechanical Branching Bar.

In the case of a Body, a single Body CS port represents a single Body CS. If the needed Body CS port does not exist, open the Body dialog and create one. You can connect the selected Body CS to multiple Body Actuators and Sensors through the Mechanical Branching Bar.

In the case of a Joint, you need a single sensor/actuator port on the Joint. If the needed port does not exist, open the Joint's dialog and create one. You can connect this sensor/actuator port to multiple Actuators and Sensors through the Mechanical Branching Bar.

Using the Mechanical Branching Bar, you can connect a Joint block to any combination of Joint Sensors, Joint Actuators, Joint Initial Condition Actuators, and Joint Stiction Actuators. The Actuator and Sensor dialogs display the Joint's primitives as if they were directly connected to the Joint.

The procedure for Constraints and Drivers is the same as it is for Joints, except that you need to choose to measure reaction forces/torques or to actuate motions.

Cascading Mechanical Branching Bars and Avoiding Closed Loops

You can connect multiple Mechanical Branching Bar blocks in series, creating a cascade. Connect the mechanical side of the first Branching Bar to a Joint, Constraint, Driver, or Body. Then connect its sensor/actuator side to the mechanical side of the second Branching Bar, and so on.

The only restriction on cascading Mechanical Branching Bars is that you must avoid connecting them into closed loops.

The following diagram shows a cascade, starting at a Body.

Dialog Box and Parameters

The dialog has one active area, Connection parameters .

Connection Parameters

Example

Without the Mechanical Branching Bar, you must connect multiple Sensors and Actuators to a Joint by creating a sensor/actuator port on the Joint for each Sensor and each Actuator:

Mechanical Branching Bar. You should also not connect the sensor/actuator side of one Mechanical Branching

Bar to the sensor/actuator side of another Mechanical Branching Bar.

Number of branches

Using this spinner menu, you can set the number of extra connector ports needed for connecting Actuator and Sensor blocks to the Mechanical Branching Bar. The default is 2

.

With the Mechanical Branching Bar block, you can combine all the sensor and actuator ports for a single Joint into one sensor/actuator port:

See Also

Body, Body Actuator, Body Sensor, Constraint & Driver Sensor, Driver Actuator, Joint Actuator, Joint Initial Condition Actuator, Joint Sensor, Joint Stiction Actuator

? 1984-2011-The MathWorks, Inc. -Site Help-Patents-Trademarks-Privacy Policy-Preventing

Piracy-RSS

RotationMatrix2VR

Convert 3-by-3 rotation matrix to equivalent VRML form of rotation axis and angle

Library

Utilities

Description

A rotation with respect to an initial orientation has many equivalent representations. A common and important one is the 3-by-3 orthogonal rotation matrix R, where R-1 = R T and R T R = RR T = I, the 3-by-3 identity matrix. Another important representation is the combination of rotation axis (a unit vector n) and angle of rotation θ about that axis. The sign of rotation follows the right-hand-rule.

The RotationMatrix2VR block converts the 3-by-3 rotation matrix representation of orientation to its equivalent representation as a rotation axis and angle about that axis, the form used in Virtual Reality Modeling Language (VRML) for orienting bodies. The input and output signals are bundled Simulink signals.

The most common use of rotations is to represent the orientation of a body with respect to some coordinate system (CS) axes.

Dialog Box and Parameters

The dialog has no active areas.

Representations of Rotation Signals

The rotation matrix R has the form:

The input signal to the RotationMatrix2VR block is the R matrix components passed column-wise and bundled into a single 9-component Simulink signal: [R11 R21 R31 R12 ...].

The output signal is the equivalent rotation represented as the axis of rotation, a unit vector n = (n x,n y,n z), with n·n = n x2 + n y2 + n z2 = 1,

and the angle of rotation θ about that axis. The sign of the rotation follows the right-hand rule. The output signal is bundled into a single 4-component Simulink signal:

[n x n y n zθ].

See Also

Body

See Representations of Body Motion and Representations of Body Orientation for more details on representing body rotations.

See entries on axis-angle rotation, Euler angles, quaternion, and rotation matrix in the Glossary for summaries

of body orientation representations.

For more on virtual reality and VRML, see the Simulink?3D Animation? User's Guide.

? 1984-2011-The MathWorks, Inc. -Site Help-Patents-Trademarks-Privacy Policy-Preventing

Piracy-RSS

相关文档