Rachel Gomez

Troubleshooting Tips and Techniques
Simscape™ simulations can stop before completion with one or more error messages. This section discusses generic error types and error-fixing strategies. You might find the previous section, How Simscape Simulation Works, useful for identifying and tracing errors.

If a simulation failed:

Review the model configuration. If your error message contains a list of blocks, look at these blocks first. Also look for:

Wrong connections — Verify that the model makes sense as a physical system. For example, look for actuators connected against each other, so that they try to move in opposite directions, or incorrect connections to reference nodes that prevent movement. In electrical circuits, verify polarity and connections to ground.

Wrong units — Simscape unit manager offers great flexibility in using physical units. However, you must exercise care in specifying the correct units, especially in the Simulink-PS Converter and PS-Simulink Converter blocks. Start analyzing the circuit by opening all the converter blocks and checking the correctness of specified units.

Try to simplify the circuit. Unnecessary circuit complexity is the most common cause of simulation errors.

Break the system into subsystems and test every unit until you are positive that the unit behaves as expected.

Build the system by gradually increasing its complexity.

It is recommended that you build, simulate, and test your model incrementally. Start with an idealized, simplified model of your system, simulate it, verify that it works the way you expected. Then incrementally make your model more realistic, factoring in effects such as friction loss, motor shaft compliance, hard stops, and the other things that describe real-world phenomena. Simulate and test your model at every incremental step. Use subsystems to capture the model hierarchy, and simulate and test your subsystems separately before testing the whole model configuration. This approach helps you keep your models well organized and makes it easier to troubleshoot them.



Rachel Gomez