inject-faults

Automate fault injection in Simulink models using the MATLAB API.

917|94|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill inject-faults
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: inject-faults
Source: https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/verification-validation-and-test/inject-faults
Command: npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill inject-faults

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Simulink, Simulink Fault Analyzer, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of injecting faults into Simulink models to enable robustness analysis and safety validation.

Core Features & Use Cases

  • Fault Injection: Add, configure, and manage faults on Simulink, Simscape, and System Composer model signals.
  • Use Case: When analyzing a Simulink model for sensor failures or actuator malfunctions, this Skill can be used to simulate these faults and validate the model's robustness.

Quick Start

Use the inject-faults skill to add a stuck-at fault to the outport of the block 'Actuator'.

Frequently Asked Questions about inject-faults

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate fault injection in Simulink models for safety validation?

Automating fault injection in Simulink models uses MATLAB API to add and configure faults on signals, targeting robustness analysis and safety validation by simulating hardware and sensor faults. It manipulates port handles to apply behaviors like stuck-at faults.

Can I inject faults into Simscape and System Composer signals?

Yes, fault injection supports adding, configuring, and managing faults on Simulink, Simscape, and System Composer model signals. This allows you to simulate actuator malfunctions or sensor failures across different modeling environments for robustness analysis.

Do I need Simulink Fault Analyzer to inject faults into my model?

Yes, Simulink Fault Analyzer is a required dependency alongside Simulink to inject faults. These tools provide the necessary API and framework to manipulate port handles and associate fault behaviors with model signals for safety validation.

What is the best way to simulate a stuck-at fault on a Simulink block outport?

To simulate a stuck-at fault on a Simulink block outport, use the fault injection automation to target a specific block, such as an Actuator. The process manipulates port handles to automatically apply and configure the stuck-at behavior on the outport signal.

What types of faults can I simulate for robustness analysis in model-based design?

For robustness analysis in model-based design, you can simulate hardware faults and sensor failures. The fault injection process allows you to add and configure these faults on model signals to validate how your Simulink model responds to actuator malfunctions.

Are there limitations when automating fault injection for complex Simulink models?

Automating fault injection requires Simulink and Simulink Fault Analyzer to be present, as it relies on manipulating port handles and associated behaviors. Without these dependencies, the API cannot target or simulate the hardware and sensor faults needed for safety validation.