Uncertain state-space model creation for Simscape models
Version 1.0.2 (45 KB) by
András Szántó
Uncertain parameters cannot be assigned to Simscape components. Post calculation is necessary to get the uncertain state-space model.
Essence of the function: modeling parameter uncertainties based on multiple linearizations: nominal linearization, and linearizations with constant parameter change according to the uncertainty ranges.
Motivation: uncertain parameters cannot be assigned to Simscape components. In this case, only nominal linearization is possible. Either a Simulink derivation of the system is necessary for the uncertain state-space model, or some kind of post calculation, like in this function.
Limitations:
- Only one parameter is changed at once for the uncertainties. The combined effect is the sum of these separate effects. If 2 nonlinearities depend on each other, this may not be an accurate model.
- One uncertain parameter affects the matrix elements linearly. For this, a mean slope is calculated, based on the nominal matrix element, and the matrix elements related to the upper and lower bounds of the uncertain parameter. If the ratio of these 2 slopes is far from 1, the model may not be accurate. The ratios are included in the ucparams_results output, so they can be checked (9th row). Update: the slope calculation method can be selected in the 4th row of the ucparams input. In the example, for the state0_rollangle parameter, the slope between 1 deg and 30 deg is more relevant than the slope between 0 deg and 1 deg. (The 0 deg to 1 deg interval is just for the convenience of the method, it is not relevant.) So the slope is calculated with this relevant 'second' interval.
Created in MATLAB 2018b.
File Exchange Dependency: Simscape Multibody Multiphysics Library (only for the truth1.slx test case model).
This is a custom method I used in my Master's Thesis titled “Model-in-Loop development of the control of a gyroscopically-balanced bicycle”. In the thesis, I applied the Control System Tuner App for the control development.
Link to the thesis: https://www.researchgate.net/publication/351849507_Model-in-Loop_development_of_the_control_of_a_gyroscopically-balanced_bicycle
Link to test case videos: https://www.youtube.com/playlist?list=PLEGTtQuYygkx0pyFDXwhreAjSOyTkeIiM
Cite As
András Szántó (2023). Uncertain state-space model creation for Simscape models (https://www.mathworks.com/matlabcentral/fileexchange/92855-uncertain-state-space-model-creation-for-simscape-models), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2018b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.