Guy on Simulink

Simulink & Model-Based Design

What’s New in Simulink R2023a?

Each new release, I am always excited to share my favorite new Simulink features. As Simulink and our modeling and simulation technologies continue to mature, I am noticing that my release highlights are becoming more geared toward workflows than single features – and this is exciting!
Here is my top three for what's new in Simulink R2023a.

Simulink Debugger

In R2023a, we finally retired the old Simulink Debugger. To replace it, we are introducing the capability to step block by block in the Simulink canvas. I plan to follow up with a blog post dedicated to this, but here is an animation to give you an idea of what this new feature looks like. What you will see:
  • I added a breakpoint for the simulation to break when the output of the Sum block is greater than or equal to zero.
  • I enabled the new option "Pause within time step" to allow block-by-block stepping.
  • I enabled Port Value Display for most signals in the model. (For that, hit Ctrl+A to Select All and click on "Show port value display label on selected signals" in the toolstrip)
  • The Step In button allows to step inside MATLAB Function blocks and Stateflow charts seamlessly.
  • It is also possible to step block-by-block in Iterator Subsystems.
inCanvasDebuggerGif.gif
Note that the command-line interface of the Simulink Debugger is still available for more advanced use cases.

Variant Assembly Subsystem

This feature was introduced in MATLAB R2022b, but I decided to wait before highlighting it because we added enhancements making it more useful in R2023a.
The key advantage of the Variant Assembly Subsystem is that it enables you to add or remove variant choices without modifying the model. All you have to do is specify a list of Subsystem or Model files to be included as variant choices. This can be done in two ways.

Option 1: Label mode

When the variant control mode is set to Label, the list of variant choices is specified using the Variant choices specifier field. In this field, you can type anything that will be evaluated as a cell array of strings, where each string is the name of a model on the MATLAB path:
With the model configured as in the above screenshot, if I was to receive a new Subsystem or Model, I could simply place it in the folder Controller_subsystem_choices and it would automatically become a new available variant choice.
For a more advanced example, I recommend looking at Control Variant Choices in Masked Variant Assembly Subsystem Block Using Mask Parameter Object. You will see that the way we mask the Variant Assembly Subsystem and use a method of a MATLAB object passed as mask parameter has a lot in common with how I control variants in my slPart blog post series.

Option 2: Expression Mode

When the variant control mode is set to Expression, the list of variant choices is specified through an enumeration, where each member is the name of a model on the MATLAB path.
where the enumeration is defined as:
As it is the case for the Variant Subsystem, expression mode enables the Variant Assembly Subsystem to support all the activation times.

Display of Parameter Values in Simscape blocks

The capability to display parameter values in block dialogs added in R2022b to Simulink blocks has now been extended to Simscape blocks. Here is an example with the Translational Mechanical Converter (IL):
And for a Simscape Multibody block in the Property Inspector

Now it's your turn

Have a look at the R2023a release notes and let us know in the comments below which R2023a features you would like to see covered on this blog.
|
  • print

댓글

댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.