Skip to content
MathWorks - Mobile View
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
MathWorks
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out

Videos and Webinars

  • MathWorks
  • Videos
  • Videos Home
  • Search
  • Videos Home
  • Search
  • Contact sales
  • Trial software
2:23 Video length is 2:23.
  • Description
  • Full Transcript
  • Related Resources

Monitor Signals Without Adding Signal Lines with Observer Blocks

Debugging and testing signals nested in a hierarchy of a system requires additional signal lines to monitor the signals just for verification purposes. With Observer Blocks in Simulink Test™, you can monitor signals of a system for debugging or testing without perturbing interfaces or the dynamic response. You can probe internal signals and other elements without adding additional signal lines. In this video, learn how you can use an Observer model to map signals from your system model. You do not need to add ports, blocks, connections, or interfaces to your model. Observer blocks preserve your model simulation semantics, which can help increase confidence that your verification results apply to the implemented system.

To verify a design, you may need to access some signals buried deep inside a model hierarchy, but we don’t want to modify the design or its interface just for testing purposes.

Observers allow you to you monitor signals of your model while preserving the design’s dynamic response and interfaces. 

This test harness is testing a controller.

It has a Test Sequence block to drive the input scenarios and a Test Assessment block that is verifying the behavior of the controller.

The Test Assessment block needs access to five signals—two are accessible at the level, but the other three are inside the controller. 

Instead of modifying the controller to bring the signals to the Assessment, I will create an Observer model by simply selecting the input signals.

The Observer model is created with two Observer Ports. 

Another way to add signals is using the Observer Dialog.  

I will the select the signals inside the controller for observing and additional Observer Ports are added. 

Now that we have all the signals we need, let’s move the Test Assessment block inside of the Observer and connect it.   

Back in the Test Harness, you can see that the Observer Reference block was added to it. 

We will cut the Test Assessment block from the harness and paste it into the Observer model.

Finally, we will connect the Observer Ports to the inputs of the Test Assessment.

Now, we can simulate our test harness and Observer models. We don’t need to add any signals to connect the Observer Ports. 

After Simulation ends, we can take a look at the pass/fail results of the assessments in the Simulink Data Inspector.

With Observers, you can separate verification logic from the design and access any signal, at any hierarchy, without modifying the interfaces and without impacting the systems dynamic response. It helps avoid cluttering the model with additional signals required only for testing.

  

Related Products

  • Simulink Test

Learn More

Resources: Automating Verification and Validation with Simulink
Access Model Data Wirelessly by Using Observers
Requirements-Based Verification with Simulink Test (22:25)

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

Feedback

Featured Product

Simulink Test

  • Request Trial
  • Get Pricing

Up Next:

4:35
Adding UICONTROLS to MATLAB Without GUIDE for Simple...

Related Videos:

2:27
How to Plot Multiple Lines on the Same Figure
1:21
Reshape a Matrix Without Using a for Loop
4:20
Connecting to Instruments Without Writing Code
3:49
Connecting to DAQ Devices Without Writing Code

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

  • Contact sales
  • Trial software

MathWorks

Accelerating the pace of engineering and science

MathWorks is the leading developer of mathematical computing software for engineers and scientists.

Discover…

Explore Products

  • MATLAB
  • Simulink
  • Student Software
  • Hardware Support
  • File Exchange

Try or Buy

  • Downloads
  • Trial Software
  • Contact Sales
  • Pricing and Licensing
  • How to Buy

Learn to Use

  • Documentation
  • Tutorials
  • Examples
  • Videos and Webinars
  • Training

Get Support

  • Installation Help
  • MATLAB Answers
  • Consulting
  • License Center
  • Contact Support

About MathWorks

  • Careers
  • Newsroom
  • Social Mission
  • Customer Stories
  • About MathWorks
  • Select a Web Site United States
  • Trust Center
  • Trademarks
  • Privacy Policy
  • Preventing Piracy
  • Application Status

© 1994-2022 The MathWorks, Inc.

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

Join the conversation