Analyze a DC Armature Winding Fault
This example shows how to create a fault in a model, analyze the fault response, and remove faults. To open a model with a block that supports fault modeling, enter:
openExample('simscape_shared/SimpleMotorArmatureWindingFaultExample')
Evaluate Baseline Results
Run the model without any faults to establish baseline results. The results in the figure are normal for a DC motor starting up and reaching steady state.
Configure and Analyze a Timed Fault
To include faults in your simulation, you must first save your model. By default, the
fault interface saves the fault information file and the fault model file in the same
directory, but you can specify a different directory in the Create Fault window. Blocks that
support faults have a Faults drop down menu in the block dialog box. To
add a new fault from the menu, click the Add fault
hyperlink. The Create
Fault window opens, which is where you specify the fault properties.
Open the DC Motor block dialog box and click Add
fault
to add an armature winding fault. Use the Create Fault window to create a
new fault with Trigger type set to Timed
,
and set Trigger fault at to 2
. By this point, the DC
motor is nearly at steady state.
When you click OK in the Create Fault window, Simscape saves the fault model file and the fault information file to the directory you specify. Once you create the fault, you can change the properties in the Property Inspector window.
Observe the oscillating behavior when the fault triggers. The DC motor reaches a new, slower steady-state speed.
The motor reaches the same steady-state speed regardless of the trigger time.
Configure and Analyze a Second Fault
Open the block dialog box for the DC Motor block, and
click the Open fault properties
hyperlink to add a second fault to the
block. Set Trigger type to Always On
. To
check which fault is currently enabled, click the Fault Table button from the Simscape Block
tab. Select the new fault and ensure any other faults are cleared.
Note that the motor is barely moving and the current is negligible despite sufficient voltage.
Delete Faults
You can delete a fault by right-clicking the fault in the Fault Table and selecting
Delete
. You can turn off fault modeling from the Fault Table of
from the Faults section of the Simscape Block tab. When the button indicates that fault
simulation is off, your model runs with the baseline results. If you want to delete the
faults and behaviors that you created without manually deleting each fault or model
element:
Close out of the model or models that contain faults.
Clear the associated fault models from memory using one of these methods:
If the fault model is open, close the fault model.
If the fault model has only been loaded into memory, clear the model from memory by using the
close_system
function.
Delete the fault information file and the fault models.
Deleting these files permanently deletes the faults, behaviors, and conditionals associated with the models that use the fault information file or fault model.