Tuesday, February 18, 2025
HomeMatlabShot Put – Olympics 2024 Replace » Man on Simulink

Shot Put – Olympics 2024 Replace » Man on Simulink


Background

I like to recommend visiting the 2016 weblog put up for extra background on how we put determined to simulate this Olympic occasion. In brief, on the shot put occasion the athlete must throw a “put”, a spherical weight, a far as they’ll inside a selected zone. That is usually completed by first spinning to generate momentum after which unwind and push the load.
ShotPut.gif
Let’s examine how I began with the 2016 mannequin and improved it utilizing new options accessible in MATLAB R2024a.

Improve Advisor

The very first thing I did when opening the mannequin from R2016 is to run the Improve Advisor. The Improve Advisor is a useful gizmo that may establish potential enhancements to a mannequin to make the most of new options. On this case, it flagged 3 objects:

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

One other characteristic added to Simscape Multibody that I like is the likelihood so as to add extra frames to the Strong blocks. For every part of the arm, I outlined frames at each ends of the limb.
That method, I can do away with the Inflexible Rework blocks that had for use earlier than. There may be nothing essentially flawed with utilizing Inflexible Rework, however I discover including frames to the Physique block makes the mannequin simpler to grasp at first look.

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

With these modifications completed, I made a decision to review the impression of some parameters on the simulation outcomes. For that, I can use the brand new Design Examine launched in R2024a.
First, I specified a variable shoulderAngle within the Inflexible Rework block controlling the shoulder angle and marked it as Run-Time tunable, so I can tune it when the mannequin is simulated in Quick Restart mode.

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.



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments