- Sample times.
- Parameters that control the appearance or structure of a block such as the number of inputs of a Sum block.
- Priority, which allows you to control block execution order.
- Parameters that control the block algorithm, such as the ‘Integrator method’ parameter of a ‘Discrete-Time Integrator’ block.
Fast Restart: Is it possible to modify blockparameters, initial state and simulation stop-time between fast restarts?
9 views (last 30 days)
Show older comments
Hi,
I understand that the purpose of fastrestart is to allow tunable parameters and initial states. However, I find that in my simulation unless I recompile these changes are not propogated to the model. The issue I am facing is similar to this question which is still open: Simulink FastRestart doesnt change output - MATLAB Answers - MATLAB Central
- I have a few dozen blockparameters defined in the workspace (I dont prefer this but this is how I received it, the question still stands for general use cases. Of course I can change them all (40 something..) to variable resistances and have from workspace or input parameters but that is extremely time consuming and will also make the model very cluttered than it already is.)
- These block parameters set thermal resistances and initial temperature of nodes in my Simscape model.
- They are all run-time configurable.
- They change between fastrestarts - however the results do not reflect this.
Why is this the case? When I switch off fast-restart I see the expected behaviour. The fastrestart documentation doesnt speak specifically of blockparameters defined/modified in this manner.
0 Comments
Answers (1)
Epsilon
on 25 Feb 2025
Hi NV,
‘Fast Restart’ is indeed used to allow tuning of parameters without recompiling the model to save time and computation resources. However, to do so please make sure that the parameters are tunable. The non-tunable parameters are:
In some scenarios the output may not change when changing the value of the tunable parameters with fast restart on. This can be If a workspace variable is used to set the value of one or more block parameters and the value is changed during a simulation. In such a case updating the model is necessary to reflect the changes. To do so click on ‘Update Model’ in the debug tab.
Also, ensure duplicate variables are not present in the model workspace as they will take precedence over the base workspace variables and will not reflect the changes made in the base workspace.
Additionally, when tuning a block parameter that uses a fixed-point data type with best-precision scaling, it is important to specify minimum and maximum values for the parameter. This enables Simulink to calculate and apply the appropriate scaling to reflect the changes. To specify value ranges, see: https://www.mathworks.com/help/simulink/ug/checking-parameter-values.html
For further information please refer to the following documentation: https://www.mathworks.com/help/simulink/ug/using-tunable-parameters.html
0 Comments
See Also
Categories
Find more on Creating Custom Components and Libraries in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!