Main Content

Manually Trigger Faults in Models

Since R2024b

Before you configure your fault simulation studies, you may want to manually control when faults inject during simulation to experiment with their effects. You can specify which faults you want to manually inject by assigning them a manual trigger. You can define the trigger type for new faults or for existing faults that have assigned behavior by updating the Trigger type property.

Create Manual Triggers

You can define manual triggers for new faults or existing faults. To define new faults with manual triggers:

  1. Add a fault to your model. Open the block dialog box for a Simscape block that supports faults and click the Add fault hyperlink for a fault you want to add.

  2. Select Additional triggers for the Trigger type parameter. Click Open fault properties, which opens the fault in the Property Inspector window. In the Property Inspector, set Trigger type to Manual.

To define manual triggers on existing faults, update the fault properties.

  1. Open the Fault Table pane. In the Simscape Block tab, click Faults > Fault Table.

  2. Expand the model element list. Right-click the fault you want to update and click Properties.

  3. In the Property Inspector, set the Trigger type property to Manual.

You can also specify the trigger type programmatically by accessing the Fault object properties. Set the TriggerType property to "Manual".

Control Fault Injection

After you create a manually triggered fault, you can control it by using the Current Configuration tab in the Fault Dashboard pane. In the Simscape Block tab, click FaultsFaults > Fault Dashboard. The Current Configuration tab displays the enabled faults and their injection status.

The Fault Dashboard tab for a model with two enabled faults. The Status column shows the top fault with an OFF button and the bottom fault with a depressed ON button.

You can turn manually triggered faults on or off by clicking the button in the Status column. Select a fault in the table to highlight the fault in the model.

See Also

Related Topics