Simulink Fault Analyzer Essentials, Part 1: Introducing Simulink Fault Analyzer - MATLAB & Simulink
Video Player is loading.
Current Time 0:00
Duration 0:00
Loaded: 0%
Stream Type LIVE
Remaining Time 0:00
 
1x
  • Chapters
  • descriptions off, selected
  • captions off, selected
      Video length is 9:09

      Simulink Fault Analyzer Essentials, Part 1: Introducing Simulink Fault Analyzer

      From the series: Simulink Fault Analyzer Essentials

      Simulink Fault Analyzer™, a new product in R2023b, lets you model complex fault behavior and trigger conditions without modifying your design, manage faults across Simulink®, Simscape™, and System Composer™, analyze fault effects using the Simulation Data Inspector, and perform safety analysis while leveraging simulation. Simulink Fault Analyzer is a workflow-based solution to help engineers working on safety-critical systems ensure their safety requirements are valid and their designs are robust.

      Published: 23 Aug 2023

      So, Pat. You were a controls engineer, right?

      Yes, I was. I worked on helicopter flight controls and jet engine controls on aircraft just like this.

      These aircrafts are cool. It must have been fun working on new control loss, right?

      It was. But we spent a lot of time worrying about whether the control software is robust against faults and other abnormal behavior. We had multiple expensive software leases focused on improving our fault detection, mitigation logic, and other mode logic.

      Oh, really? What made these so expensive?

      Well, a lot of the budget went to robustness testing. We had a difficult time knowing if we had tested all the edge cases. I lost sleep over this.

      Sorry to hear that. So how did you test for robustness?

      We injected faults using hardware in the loop on a setup that looked a lot like this. We injected short circuits, open circuits, signal drifts, things like that.

      Did you ever try injecting faults through desktop simulations to catch issues earlier?

      Oh, sure. We tried something like this. We usually added some switches and some constants, then injected a faulty value at the beginning of simulation.

      You sounded a bit cautious earlier. What issues did you have with this approach?

      For starters, we had to modify the design. That was a pain, especially if we wanted to generate code from the design model. We could only model simple faults, too. It was also difficult to analyze fault effects, such as whether faults were adequately mitigated. And we also had to understand how faults related to hazards. That was a lot to maintain.

      Wow. That is definitely a lot to maintain. What if I had a better approach for you?

      OK, let's see it.

      Firstly, you mentioned having to modify your design to add faults. With the Fault Analyzer app, you can add faults to signals without dirtying your design model. While adding faults, you can choose the type of the fault behavior. In this case, I will be adding a bias fault to simulate a high temperature fault. This fault behavior is stored in a separate model. We call this as fault model. All the mapping information is stored externally in a fault information file. After the fault is added, you can simulate it and observe its effects on the model.

      That's great. But how would I manage a set of faults?

      That's where Fault Table can help. With the Fault Table, you can view faults for the entire model hierarchy. You can see here that I have added two faults on the same signal. You can have as many faults as you want on a signal, but only one of them can be active for a given simulation. The Fault Table also helps you manage faults across multiple domains such as Simulink, Simscape, and System Composer.

      Right, because many Simscape users have been modeling faults for years now. And it makes sense to start thinking about faults early on when using System Composer to model system architecture. Glad to see this all come together.

      I completely agree. Fault modeling is not new to our customers. It's a common workflow which we want to enhance across multiple domains.

      OK, so we can simulate faults and other abnormal behavior without dirtying the model and configure faults across multiple domains. This is great. I can't wait to start simulating some short circuits and open circuits in Simulink.

      Oh, those are just basic faults. You can actually do more. For instance, you can model delays or inject noise into the signals. You can also register your own fault libraries and use them. If you want to add a one-off fault behavior, you can choose custom fault behavior and use the power of Simulink to model wide variety of abnormal fault behaviors.

      Oh, wow. So Mahesh, you showed me what I can inject and where I can inject it. I also want to be able to configure when to inject it.

      You can control that as well using the fault triggers. You can inject through the simulation, or at a specific time after the start of simulation, or based on a system condition. We call those conditionally-triggered faults.

      Conditionally-triggered faults? What do you mean by that?

      A conditional is an expression that you can use to model a specific system condition. Let's say you want to trigger a fault when the speed is greater than 200 kilometers per hour. You can write a simple expression, then map the speed symbol in the expression to the speed signal in the model. This conditional can then be used as a trigger for multiple faults. You can also log these conditionals and view them in Simulation Data Inspector and export them for other users.

      This is great. But I don't want to just inject one version of a fault. I want to modify it and measure how robust my fault detection and mitigation logic are.

      This is where multiple simulation features can help. We have extended the concept of design study to include faults. This particular model has about seven faults. Using design study, you can set up seven simulations where one fault is active for each simulation. You can also set up various permutations and combinations of faults, parameter values, and variables, and run them in parallel.

      Wow, these are some great user interfaces. But--

      You want to do this programmatically, right?

      I thought you'd never ask.

      Everything I showed can also be done through APIs. This allows you to extend the functionality and automate the workflows.

      Who doesn't love automation? But you haven't addressed my other pain point yet-- managing the relationship between faults and hazards. Oh, did I mention that I had to keep our safety engineers happy? They were always asking for help conducting failure modes and effects analysis. Got anything for my safety engineer colleagues responsible for the FMEAs?

      We got something for them, too. The Safety Analysis Manager provides a way to author and manage safety artifacts such as FHA and FMEA. You can use default templates that we provide or register your own. The columns can contain textual data, checkboxes, enumerated data, or derived values. You can use the power of MATLAB to compute the derived values. You can also add meta information for each of the artifact. You can add links to model elements, faults, test cases, or even cells in other spreadsheets.

      We want to go a step further and let engineers use the power of simulation to validate safety analysis artifacts. For example, you can use the analysis function to run custom scripts in which you can run simulations corresponding to each row of an FMEA and to see if a given fault was mitigated correctly or not. The results of the analysis can be annotated back onto the FMEA using different types of flags such as warnings and errors.

      One last thing-- similar to fault APIs, we also have safety analysis manager APIs that you can use to extend the functionality and automate your workflows.

      Doing FMEA in MATLAB? I never thought I'd see the day. Thanks, Mahesh. With Simulink Fault Analyzer, you can model complex fault behavior and trigger conditions without modifying your design, manage faults across Simulink, Simscape, and System Composer, simulate faults, explore them using design studies and analyze fault effects, and perform safety analysis while leveraging simulation. Simulink Fault Analyzer is a workflow based solution to help engineers working on safety critical systems ensure their safety requirements are valid and their designs are robust.

      Up Next:

      View full series (6 Videos)

      View more related videos