Skip to content
MathWorks - Mobile View
  • Accedere al proprio MathWorks AccountAccedere al proprio MathWorks Account
  • Access your MathWorks Account
    • Il Mio Account
    • Il mio Profilo utente
    • Associa Licenza
    • Disconnettiti
  • Prodotti
  • Soluzioni
  • Università
  • Assistenza
  • Community
  • Eventi
  • Acquista MATLAB
MathWorks
  • Prodotti
  • Soluzioni
  • Università
  • Assistenza
  • Community
  • Eventi
  • Acquista MATLAB
  • Accedere al proprio MathWorks AccountAccedere al proprio MathWorks Account
  • Access your MathWorks Account
    • Il Mio Account
    • Il mio Profilo utente
    • Associa Licenza
    • Disconnettiti

Video e Webinar

  • MathWorks
  • Video
  • Home Video
  • Cerca
  • Home Video
  • Cerca
  • Contatta l’ufficio addetto alle vendite
  • Software di prova
4:03 Video length is 4:03.
  • Description
  • Full Transcript
  • Related Resources

Debug Baseline Test Failures Using Model Slicer

Model Slicer helps you to manage and debug large models by selecting specific signals and time windows and then highlighting the related model construct. Learn how you can use Model Slicer to debug a baseline test failure and localize the error. When you simulate the model in debug mode, the model components that impact the failed signal are highlighted for each time step. You can move between failure regions to debug the cause of the baseline differences.

When working with large, complex systems, issues might appear at specific times in a simulation.   How do you localize the problem to debug it faster?

Model slicer helps you to manage and debug large models by selecting signals and time windows of interest and then highlighting the related model construct.

In this video we present how to use model slicer to debug baseline test failure with Simulink Test

In this Fuel Controller System, we launch the Simulink Test App and then launch the Test Manager.

There is a baseline test that we run in debug mode.  This test compares simulation outputs to a fixed baseline

Three signals failed.  

Let’s look at the results of the fuel signal in the Simulation data inspector.  It shows the difference versus the baseline.   

We can use the debug option that appears if the test fails to enter debug mode

From here we launch Model Slicer.

This will set up the debug environment.

The test case is rerun to create new debug results to make sure the failure still exists in the current state of the model.   

The failed signal is automatically plotted in the debugging results and set as the starting point for model slicer

The simulation pauses at the model start time to continue debugging.

The model components that impact the failed signal are highlighted for each time step.

You can use the Step Back and Step Forward buttons to move one step back or forward in simulation time.

For each step the data dependencies highlighted and the port value labels for the active signals are updated

In the Test Manager, click Continue to Failure to continue the model simulation to the beginning of the next failure point. The data cursors show the bounds of the failure region.

At the failure the difference between the Baseline and Sim Output is 0.007.

By tracing the fuel signal back in the model, we see that the it depends on the To Plant subsystem

Inspecting the To Plant there is no change in the value being propagated.

Let’s take a look further back at the Fuel Rate Control

We see that the the fb_correction value is 0. The difference between the Baseline and the Sim Output is 0.007, which is a small value. It might be that fb_correction is not calculated correctly.

In the airflow calc block, we can see that the constant 0 is being pass through the integrator switch block because the control port is evaluating to false.  

To see why this is false, we can turn on highlighting of control dependencies.  

This tells us that fuel_mode value is LOW but Fuel_mode is being compared to the enumerated constant value of RICH.  This is the problem.  It  should be LOW.

Now I exit debug mode.   And make the change to the model.

Next the test is re run and it passes!

Model slicer help isolate the cause of the error to help us fix it.

To learn more or to request a trial of Simulink Check and Simulink Test visit our web page

Related Products

  • Simulink Check
  • Simulink Test

3 Ways to Speed Up Model Predictive Controllers

Read white paper

A Practical Guide to Deep Learning: From Data to Deployment

Read ebook

Bridging Wireless Communications Design and Testing with MATLAB

Read white paper

Deep Learning and Traditional Machine Learning: Choosing the Right Approach

Read ebook

Hardware-in-the-Loop Testing for Power Electronics Control Design

Read white paper

Predictive Maintenance with MATLAB

Read ebook

Electric Vehicle Modeling and Simulation - Architecture to Deployment : Webinar Series

Register for Free

How much do you know about power conversion control?

Start quiz
Related Information
Related Information
Try debugging test cases with Model Slicer

Feedback

Featured Product

Simulink Check

  • Request Trial
  • Get Pricing

Up Next:

5:14
Find Potential Design Errors Using Model-Based Testing

Related Videos:

30:05
Best Practices for DO-178 Compliant Software using...
32:45
Model-Based Design for DO-178C Software Development with...
1:50
What Is Simulink Coverage?
1:41
What Is Simulink Test?

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

  • Switzerland (English)
  • Switzerland (Deutsch)
  • Switzerland (Français)
  • 中国 (简体中文)
  • 中国 (English)

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • Contatta l’ufficio addetto alle vendite
  • Software di prova

MathWorks

Accelerating the pace of engineering and science

MathWorks è leader nello sviluppo di software per il calcolo matematico per ingegneri e ricercatori

Scopri…

Scopri i nostri prodotti

  • MATLAB
  • Simulink
  • Software per studenti​
  • Supporto hardware
  • File Exchange

Prova o Acquista

  • Download
  • Software di prova
  • Contattaci
  • Prezzi e licenze
  • Come acquistare

Impara ad utilizzare i nostri prodotti

  • Documentazione
  • Tutorial
  • Esempi
  • Video e Webinar
  • Formazione

Ricevi supporto tecnico

  • Aiuto all'installazione
  • MATLAB Answers
  • Consulenza
  • License Center
  • Contatta l'assistenza

Informazioni su MathWorks

  • Lavora con noi
  • Sala stampa
  • Missione sociale​
  • Casi dei clienti
  • Informazioni su MathWorks
  • Select a Web Site United States
  • Centro di fiducia
  • Marchi
  • Informativa sulla privacy
  • Antipirateria
  • Stato dell'applicazione

© 1994-2022 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

Unisciti alla discussione