Background


Improve Advisor

The Improve Advisor was capable of robotically apply the next modifications:
- Configure the mannequin to make use of the solver “daessc” for Simscape fashions with differential algebraic equations. This new solver is extra sturdy to resolve the kind of equations produced by Simscape.
- Change the Solver Configuration block to make use of state-based absolute and relative consistency tolerances throughout initialization. Launched in R2022b, this gives higher robustness and effectivity in the course of the initialization, particularly when utilizing Simscape nominal values.

- Replace Simscape bodily sign blocks to propagate items, which was not potential in 2016. In my case, for instance, it set the unit of the PS Fixed block to “rad/s” as a result of that is what the Revolute Joint downstream expects.

After only a few clicks, the mannequin was prepared to make use of in MATLAB R2024a.
Locking Joints
In 2016, as a way to hold the shot within the hand of the athlete, we needed to implement a customized power rule that might be disabled on the time of releasing the shot. This was not perfect as a result of this power rule was computationally costly and making the simulation gradual.
So the primary enchancment I did to the mannequin is leveraging the “mode” property of Simscape Multibody joints. This characteristic, launched a couple of releases in the past, permits any joint to be locked or unlocked primarily based on an enter sign.

This provides an enter port to the Be a part of block that I can management from my Stateflow chart.

Strong Block Frames


With these modifications, here’s what the mannequin appears like:

Logging Simscape Variables as Simulink Indicators
When deciding on a Simscape block, go to the Simscape Block tab within the toolstrip and allow Log Variables. Within the Mannequin Knowledge Editor, you will notice a Simscape Variables tab seem the place you may choose which variables to log and provides them the title you need.

When simulating the mannequin, they are going to present up within the “logsout”.
out.logsout
Design Examine

I created a design research with an array of 10 values from 45 levels to 135 levels.
ShoulderAngleVar = simulink.multisim.Variable(“shoulderAngle”, linspace(45,135,10));
d = simulink.multisim.DesignStudy(mdl,ShoulderAngleVar);
out = parsim(d,‘ShowProgress’,‘off’,‘UseFastRestart’,‘on’);
plot3(out(i).logsout.get(‘x’).Values.Knowledge,…
out(i).logsout.get(‘y’).Values.Knowledge,…
out(i).logsout.get(‘z’).Values.Knowledge)
Now it is your flip
Do not miss the shot put occasions on the Paris Olympics:
Are you utilizing the Improve Advisor when upgrading to new MATLAB releases? Are you benefiting from the brand new options add to Simscape and Simulink? Have you ever tried the brand new Design Examine? Tell us within the feedback under.