I want to implement a system where the inertia of a robot changes as it moves, but I’m not sure how to vary the inertia. How can I implement this effectively?
There is not a variable inertia component in the PLECS library. You can define one from the fundamental equations.
Attached is a model showing two different implementations. One uses just the dJ/dt variable with the total inertia calculated inside the component, while the other is structured more akin to the variable inductor and variable capacitor components in the PLECS library, with a J and dJ/dt input. The second one lets you specify the differential angular momentum (dJ/dw) as the input to the first terminal, similar to how a variable inductor you can specify the differential inductance (dL/di).
Note that the component is based on a Controlled Speed component and therefore cannot be coupled directly with other speed sources or inertia. You will need to put a damper and/or spring in between. Also note you can’t have a step change in inertia, as that is a step change in stored energy - the inertia must be a continuous function.
VariableInertia.plecs (38.4 KB)