Documentation

Fault

Model electrical fault

Library

Passive Devices

Description

The Fault block allows you to represent an electrical fault as an instantaneous change in resistance. You can use it to replicate both open-circuit and short-circuit fault behaviors. The block can trigger fault events:

  • At a specific time

  • When a predefined voltage range or current range is exceeded

  • When an external trigger signal goes high or low

Optionally, the external trigger option also permits the fault to be reset when the trigger signal reverts. You can enable or disable all three trigger mechanisms separately, or use them together if more than one trigger mechanism is required in a simulation.

When no fault is triggered, the resistance between the two electrical ports is defined by the Unfaulted resistance parameter value. The default value for this parameter is inf ohms, i.e. the ports are open-circuit. When a fault is triggered, the block changes the resistance between the two electrical ports to the Faulted resistance value. The default value for this parameter is 1e-3 ohms, i.e. the ports are short-circuited.

You can choose whether to issue an assertion when a fault occurs, by using the Reporting when a fault occurs parameter. The assertion can take the form of a warning or an error. By default, the block does not issue an assertion.

The physical output X represents the fault state; it is 1 if the block is faulted, and 0 otherwise. The physical signal input F is the external fault trigger signal and is used only if Enable external fault trigger is set to Yes.

Parameters

Main Tab

Unfaulted resistance

Resistance between the + and – ports when there is no fault. The default value is inf Ω.

Faulted resistance

Resistance between the + and – ports when the block is in the faulted state. The default value is 1e-3 Ω.

Reporting when a fault occurs

Choose whether to issue an assertion when a fault occurs:

  • None — The block does not issue an assertion. This is the default.

  • Warn — The block issues a warning.

  • Error — Simulation stops with an error.

Temporal Trigger Tab

Enable temporal fault trigger

Select Yes to enable time-based fault triggering. The default value is No.

Simulation time for fault event

Set the simulation time at which you want the block to enter the fault state. This parameter is visible only if the Enable temporal fault trigger parameter is set to Yes. The default value is 1 s.

Behavioral Trigger Tab

Enable behavioral fault trigger

Select Yes to enable behavioral fault triggering. The default value is No.

Permissible voltage range

Specify a vector of length 2 that defines the permissible voltage range. If the voltage exceeds this range for longer than the Time to fail when exceeding voltage range parameter value, then the block enters the fault state. This parameter is visible only if the Enable behavioral fault trigger parameter is set to Yes. The default value is [-100, 100] V.

Time to fail when exceeding voltage range

Set the maximum length of time that the voltage can exceed the permissible voltage range without triggering the fault. This parameter is visible only if the Enable behavioral fault trigger parameter is set to Yes. The default value is 1 s.

Permissible current range

Specify a vector of length 2 that defines the permissible current range. If the current exceeds this range for longer than the Time to fail when exceeding current range parameter value, then the block enters the fault state. This parameter is visible only if the Enable behavioral fault trigger parameter is set to Yes. The default value is [-1, 1] A.

Time to fail when exceeding current range

Set the maximum length of time that the current can exceed the permissible current range without triggering the fault. This parameter is visible only if the Enable behavioral fault trigger parameter is set to Yes. The default value is 1 s.

External Trigger Tab

Enable external fault trigger

Select Yes to enable external fault triggering. The physical signal input F provides the external fault trigger signal. The default value is No.

External fault trigger

Choose the fault condition:

  • Faulted if F >= Fault threshold — The fault occurs when the external signal value becomes greater than, or equal to, the Fault threshold parameter value. This is the default.

  • Faulted if F <= Fault threshold — The fault occurs when the external signal value becomes less than, or equal to, the Fault threshold parameter value.

This parameter is visible only if the Enable external fault trigger parameter is set to Yes.

Fault threshold

The threshold value that triggers the fault when the external signal crosses it in the direction, specified by the fault condition. This parameter is visible only if the Enable external fault trigger parameter is set to Yes. The default value is 0.5.

Fault resets when fault trigger reverts

Select Yes to have the fault reset when the trigger signal reverts. The default value is No. This parameter is visible only if the Enable external fault trigger parameter is set to Yes.

Ports

The block has the following ports:

+

Positive electrical port.

-

Negative electrical port.

F

Physical signal input port that provides the external fault trigger signal.

X

Physical signal output port that indicates the fault state. Outputs 1 if the block is faulted, and 0 otherwise.

See Also

Introduced in R2015b

Was this topic helpful?