MATLAB: How to remove the effects of bodies in SimMechanics 4.1 (R2012b)

armbodyloadremoverobotsimmechanicsSimscape Multibody

I am using SimMechanics 4.1 (R2012b) to model a mechanical system where a body is effectively removed from the system during the simulation. An example of this would be a robot arm grabbing an object and suddenly dropping it, so it is removed from simulation.
Is there any way to do this in the product?

Best Answer

The ability to remove a body from simulation is not directly available in SimMechanics 4.1 (R2012b).
However, there are some workarounds that can model this to some extent.
1. SimMechanics First Generation
With First Generation blocks, the mass and inertia of a body can be dynamically altered during simulation using a Variable Mass & Inertia Actuator block. Therefore, the mass and inertia can be set to a very small number (but not zero), at the point that the object is removed.
2. SimMechanics Second Generation
Second Generation technology in SimMechanics 4.1 (R2012b) does not have a Variable Mass & Inertia Actuator block (see solution 1-ICUMET). However, the effects of a body can be modeled using a dynamic load.
Please refer to the attached model of a robot arm holding up a load for 10 seconds and then dropping it. This load is modeled as follows:
a. Currently, in SimMechanics Second Generation, bodies can only be actuated with force and torque (and not motion). Therefore, you can use a simple Proportional Controller to control the arm's position and to hold up the load at the end of the arm for the first 10 seconds of simulation.
b. There is a Signal Viewer inside the "Arm Controller" block in the attached model. Please look at the torque on the arm here. When the load is engaged, the torque is larger and when the load is dropped, the torque value decreases to account for the lost mass.