MATLAB: Is it possible to switch between two or more actuators for a single joint in the mechanical model built with SimMechanics 2.7 (R2007b)

Simscape Multibody

I have two bodies connected to each other through a Revolute Joint. I would like to build a model so that I can choose between several actuators to drive this single joint. I would like to know if there is a physical signal switch block that I can use.

Best Answer

A physical signal switch block is not available in SimMechanics 2.7 (R2007b). For workarounds, see below.
There are two main challenges to working around this implementation:
1. In SimMechanics 2.7 (R2007b), actuators have to be directly connected to a Joint block in order for the Actuator to identify what kind of actuating mechanism is available for use. Thus one cannot have any switching mechanism between the Joint and the Actuator.
2. Each joint primitive can be actuated by no more than one joint actuator. Hence the second challenge in the model is to have two actuating mechanisms for the same joint.
To resolve the first issue, a Simulink Manual Switch can be used in conjunction with a Demux block to select one of the multiple actuating (Simulink) signals, prior to connecting to a SimMechanics Actuator block.
To resolve the second issue, two different joints can be used connected at either ends of a mass-less rigid body. Each joint block would have the same world co-ordinate position. Since they are connected by a massless (zero mass) body, they can be assumed to be the same joint, at the same position. Each actuator can be used to drive these two Joints blocks, but since they are connected together through a massless body, they actually form the same joint.
An example implementation of the above is provided in the attached model.