R2024a

New Features, Bug Fixes

MATLAB Classes for Simscape Multibody Enhancements: Programmatically specify joint primitive actuations and compute joint primitive accelerations

You can now programmatically specify actuation forces or torque for joint primitives of a compiled multibody model, compute the corresponding dynamics of the model, and measure the resulting accelerations of desired joint primitives.

You can specify actuation forces or torque for the prismatic, revolute, and spherical joint primitives. To specify the actuations, use the simscape.multibody.JointActuationDictionary structure with the simscape.multibody.PrismaticPrimitiveActuationForce, simscape.multibody.RevolutePrimitiveActuationTorque, and simscape.multibody.SphericalPrimitiveActuationTorque classes. To compute the dynamics of the model based on the specified actuations, use the computeDynamics method.

After computing the dynamics of the model, you can use the jointPrimitiveAcceleration method to measure the accelerations of the prismatic, revolute, spherical, constant velocity, and lead screw joint primitives in the model. The outputs follow the SI unit conventions.

Custom Tire Force and Torque Block: Model custom tires

You can use the Custom Tire Force and Torque block to create custom tire models for off-road or on-road scenarios. To model a custom tire, use the output signals from the block to compute the tire force and torque and then feed the computed signals back to the block as inputs. You must compute the tire force and torque with respect to the contact frame of the tire. The tire force must have nonnegative value, otherwise the Custom Tire Force and Torque block clips the force to zero. In addition, you must ensure the units of the force and torque are consistent during the simulation.

The Custom Tire Force and Torque block has two methods to determine the contact point and normal. For a rough ground surface, such as off-road scenarios or speed bumps, set the Contact Frame Computation Method parameter to Weighted Penetration. To avoid computational challenges due to the rough surface, the block computes equivalent planes of the rough surface by using the weighted penetration normal method. The block uses the equivalent planes to determine the contact point and normal.

If you set Contact Frame Computation Method to Closest Point, the block uses the same method that the Magic Formula Tire Force and Torque block uses to determine the contact point and normal.

Joint Block Enhancement: Lock the degrees of freedom of joints

You can now lock the degrees of freedom of these joints:

A locked joint keeps a constant position and has zero velocity. The constraints introduced from a locked joint contribute to the constraint force and torque in the joint.

To lock a joint at its assembled position throughout a simulation, under the Mode Configuration section, set Mode to Locked. You can also use an input signal to lock a joint during a simulation. For example, if the input signal of the mode port is 1, the joint becomes locked. To enable the mode port, in the block dialog box, under the Mode Configuration section, set Mode to Provided by Input.

The simulation returns an error if you use these settings for a locked joint:

  • Under the Actuation section, set the Force or Torque parameter to Automatically Computed.

  • Under the Actuation section, set the Motion parameter to Provided by Input.

Spatial Contact Force Block Enhancement: Measure the rotation matrices of the contact frames of a point cloud

You can now measure the rotation matrices of the contact frames of a point cloud. The output is a 3-D array that has N 3-by-3 matrices, where N equals the number of points in the point cloud. Each 3-by-3 matrix of the array is the rotation matrix of the corresponding contact frame with respect to the reference frame. The reference frame can be the reference frame of either the base or follower geometry of the Spatial Contact Force block. If a point is not in contact with the other geometry, the corresponding matrix is an identity matrix.

Featured Examples