File Exchange

image thumbnail

Fault Injection Block (FIBlock)

version 1.0.2 (95.2 KB) by Tagir Fabarisov
FIBlock allows to conduct a fault injection experiment in Simulink models


Updated 17 Jun 2020

GitHub view license on GitHub

Fault Injection Block for Simulink models.
FIBlock allows to conduct a fault injection experiment in Simulink models
Co-authors: Mustafa Saraoğlu
and Andrey Morozov

Please refer to a comprehensive article regarding the FIBLock:
This block allows to conduct a fault injection experiment (refer to help if needed).
-name of the block instance.
-type of fault: Stuck-at, Package drop, Bias/Offset, Bit flips, Time delay, Noise.
-fault event: Failure probability, Mean Time to Failure, Failure Rate Distribution.
-fault effect: Once, Constant time, Infinite time, Mean Time to Repair.

Failure rate distribution is not supported yet! Bit flips, Time delay, and Noise faults may have some bugs :D In different FIBlock instances, the 'name' of the block in GUI must be different (must be an integer number).

This block allows to conduct a fault injection experiment. Specify:

1) Number of the block instance (e.i. 'name' of the fault injector, name shall be unique).

2) Type of fault:
-Stuck-at. The block output stays constant, preserving the latest correct value before the error occurrence.
-Package drop. The correct output is replaced by the specified Value, emulating a package drop.
-Bias/Offset . The defined positive or negative Bias value is added to the block output.
-Noise. A random noise value is added. The Boundaries are defined as the percentage of the correct value.
-Time delay. A delay is introduced into the signal. During the delay the value is zero.
-Bit flips. The defined Number of bits are inverted in the binary representation of the correct value.

3) Fault event:
-Failure probability. Errors are injected based on the constant Failure probability for each execution of the block function.
-Mean Time to Failure. Errors are injected according to the specified MTTF. Normal distribution.

4) Fault effect:
-Once. An error appears only one time during a simulation.
-Constant time. The block produces erroneous output during the specified Time period.
-Infinite time. The block produces erroneous output until the end of the simulation.
-Mean Time to Repair. Normally distributed MTTR regulates the time of the error effect.

FIBlock also provide, what we call, a chained fault injection. Second output of the FIBlock emits a trigger flag. This output signal could be connected to the second input of the FIBlock. In case of the fault injection, this signal will force trigger fault injectionin second FIBlock.

Made By Tagir Fabarisov, TU Dresden 2020, GNU General Public License v3.0

Cite As

Tagir Fabarisov (2020). Fault Injection Block (FIBlock) (, GitHub. Retrieved .

Comments and Ratings (3)

Andrey Morozov

Mustafa Saraoglu

Tagir Fabarisov

FYI: there is an example Simulink model included to the package with two FIBlock.
You can read more here:

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!