Skip to content
MathWorks - Mobile View
  • MathWorks アカウントへのサインインMathWorks アカウントへのサインイン
  • Access your MathWorks Account
    • マイ アカウント
    • コミュニティのプロファイル
    • ライセンスを関連付ける
    • サインアウト
  • 製品
  • ソリューション
  • アカデミア
  • サポート
  • コミュニティ
  • イベント
  • MATLAB を入手する
MathWorks
  • 製品
  • ソリューション
  • アカデミア
  • サポート
  • コミュニティ
  • イベント
  • MATLAB を入手する
  • MathWorks アカウントへのサインインMathWorks アカウントへのサインイン
  • Access your MathWorks Account
    • マイ アカウント
    • コミュニティのプロファイル
    • ライセンスを関連付ける
    • サインアウト

ビデオ・Webセミナー

  • MathWorks
  • ビデオ
  • ビデオ ホーム
  • 検索
  • ビデオ ホーム
  • 検索
  • 営業へのお問い合わせ
  • 評価版
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

Bridging Wireless Communications Design and Testing with MATLAB

Read white paper
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

  • 営業へのお問い合わせ
  • 評価版

MathWorks

Accelerating the pace of engineering and science

MathWorksはエンジニアや研究者向け数値解析ソフトウェアのリーディングカンパニーです。

ディスカバー…

製品を見る

  • MATLAB
  • Simulink
  • 学生向けソフトウェア
  • ハードウェア サポート
  • File Exchange

製品評価版の入手または製品の購入

  • ダウンロード
  • 評価版ソフトウェア
  • 営業へのお問い合わせ
  • 価格とライセンス
  • MathWorksストア

使い方を学ぶ

  • ドキュメンテーション
  • チュートリアル
  • 例
  • ビデオ・Webセミナー
  • トレーニング

サポートを受ける

  • インストールのヘルプ
  • MATLAB Answers
  • 技術コンサルティング
  • ライセンスセンター
  • サポートへのお問い合わせ

MathWorks について

  • 採用情報
  • ニュースルーム
  • 社会貢献
  • ユーザー事例
  • MathWorks について
  • Select a Web Site United States
  • トラストセンター
  • 商標
  • プライバシー ポリシー
  • 違法コピー防止
  • アプリケーション ステータス

© 1994-2022 The MathWorks, Inc.

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

MATLAB を語ろう