Impact-Site-Verification: dbe48ff9-4514-40fe-8cc0-70131430799e

Search This Blog

Introduction to Variant Subsystems in Simulink

 Introduction to variant subsystems in Simulink®. Variant subsystems are subsystems in Simulink that can take on multiple behaviors. The user sets the active behavior before the model runs. You’ll learn why and where variant subsystems are used as well as how to create them yourself. 

Start by comparing variant subsystems against competing methods for modeling multiple behaviors in Simulink, such as enabled subsystems and multiport switch control. Then follow an example use case for variant subsystems where you’ll switch between two candidate algorithms for a given block in Simulink. In the last half of the demonstration, go step-by-step into the process of creating variant subsystems and switching between the implementation variants in different ways. 

The first method shown is a right-click menu-based switching method. The second method shown leverages MATLAB® code to switch between implementation variants. The latter method allows for full automation with variant subsystems requiring no user interaction. 

You can download the R2023b examples used in this video here: https://github.com/kschutz68/variant_...

Learn more:

- Implement Variations in Separate Hierarchy Using Variant Subsystems: https://bit.ly/42YM8uQ

Chapters:

00:00 The Many Ways of Modeling Multiple Behaviors under a common subysystem

00:50 A Practical Use-Case for Variant Subsystems: Digital Pre-distortion (DPD)

01:15 Digital Pre-distortion model walkthrough

02:00 Two DPD Algorithms of interest

02:30 Under the hood of the DPD coefficient subsystem

03:30 Run the model using the LMS update DPD variant

03:55 Visualize the DPD coefficients adapt using LMS

04:50 Switch to the RPEM update variant

05:50 Visualize the DPD coefficients update using RPEM

07:00 Alternatives to Variant Subsystems

07:15 Manually Rewire a Subsystem

08:10 Use Manual Switches to modify subsystem behavior

08:52 Use Enabled Subsystems and the Merge block

09:50 Use Multiport Switches

11:20 Creating Variant Subsystems: step-by-step

14:10 Switching between Variants – the hard way

15:40 Switching between Variants – an easier way using Label as control mode

17:10 Automate the switching between variant choices using Expression as the control mode

18:00 Using annotation callbacks and variant subsystems together

19:00 Using set_param to set the active variant

21:00 Relevant links in the documentation


No comments

Popular Posts

Followers