Troubleshoot Actuator Block Models
This example shows how to troubleshoot problems in a model that contains actuator blocks and cannot converge during simulation. Blocks that interface with the mechanical domain, like actuators, can cause solver problems. These problems arise because the mechanical domain can introduce variables that cause a high differential index, which the solver cannot always overcome. A high differential index occurs when there are not sufficient degrees of freedom in the model. This behavior can cause issues where a model makes physical sense, but generates errors when the solver cannot converge.
Examine the Model
Open the TroubleshootingActuatorModels
model. This model contains a Double-Acting Actuator (IL) block. A Fixed-Displacement Pump (IL) block drives the fluid flow into port A of the Double-Acting Actuator (IL) block, which displaces the piston. If you clear the Enable dynamic compressibility check box in the actuator, the model errors because the solver cannot converge. Without dynamic compressibility, the Mass and Inertia blocks do not have any compliance between them. The Mass block velocity and Inertia block angular velocity are both differential variables. A rigid constraint between the two differential variables results in a high differential index system of equations. In this model, the solver cannot overcome this rigid constraint.
When you select Enable dynamic compressibility, the model runs without errors. However, compressibility in the fluid causes oscillation in the piston position of the actuator. Additionally, modeling compressibility causes the simulation to run slowly.
To fix the model and improve model performance, you can:
Clear Enable dynamic compressibility. To allow the model to run without errors, introduce other forms of compliance between the Mass and Inertia blocks with a mechanical damper or fluid resistance.
Select Enable dynamic compressibility and optimize the model by dissipating the energy in the mechanical domain.
Fix Model With Mechanical Damper
You can run the model without enabling dynamic compressibility by breaking the rigid constraint between the Mass and Inertia Blocks with a damper. Attach a Translational Damper block between the Mass block and the Double-Acting Actuator (IL) block. Attach a Translational Spring block in parallel with the Translational Damper block. Because these blocks model a flexible rod between the actuator and the mass, the Mass and Inertia blocks are no longer rigidly connected.
To see a model that uses this configuration, open the TroubleshootingActuatorModelsDamping
model.
Fix Model With Fluid Resistance
You can also run the model without enabling dynamic compressibility by adding a source of fluid resistance, such as a flow resistance, pipe, orifice, or valve, between the Mass and Inertia blocks. Adding flow resistance introduces a dependence between pressure and flow. This dependence means that the pump no longer directly sets the pressure in the actuator, which breaks the numerical constraint.
Open the TroubleshootingActuatorModelsFlowResistance
model. This model uses a Flow Resistance (IL) block between the pump and the actuator to help dissipate the fluid energy that enters the actuator.
Fix Model With Dynamic Compressibility
If you select Enable dynamic compressibility, the model simulates, but the simulation speed is slow. To improve the model performance, dissipate the energy in the mechanical domain. In the TroubleshootingActuatorModels
model, the only mechanical load on the actuator piston is a Mass block. Unlike loads in other domains, a Mass block cannot dissipate energy. Because there is no energy dissipation, the model simulates slowly because it has many small oscillations that never dissipate.
If you attach a Translational Damper block in parallel with the Mass block to dissipate energy, the model can run much more efficiently. To see a model that uses this configuration, open the TroubleshootingActuatorModelsMass
model.