Sensitivity analysis in simulink

2 次查看(过去 30 天)
Ilias Bouchkira
Ilias Bouchkira 2022-6-24
回答: Paul 2022-6-30
Hi everyone,
I have made a block on simulink for my process (see Figure). I wonder if it is possible to carry out a sensitivity analysis to see the effect of the inputs (Highlighted in yellow) on the outputs (red).
Many thanks in advance;

回答(2 个)

patrick1704
patrick1704 2022-6-30
Well, sensitivities are in the end gradients and the easiest way to get them is by means of finite differences. Because your model seems to use hard-coded settings in the blocks, you may need to update it slightly to get sensitivities.
One option is to introduce a top-level input block with the size as the number of the variables you want to pertube and also add an output block with all outputs you want to analyse. Then, you could just programmatically evaluate the model: Execute particular phase of simulation of model - MATLAB model - MathWorks Deutschland or simulate it Simulate a Simulink model - MATLAB sim - MathWorks Deutschland. First, you would have to evaluate the model for the nominal behaviour and afterward, you would have to perturbe all inputs individually to get additional timehistories that you can use to calculate the sensitivities in Matlab.
Another option could be to use linmod: Extract continuous-time linear state-space model around operating point - MATLAB linmod - MathWorks Deutschland, which also gives you the gradients in one time instant.
In the end, the solution mainly depends on if you want sensitivities in one time instant or over the whole simulation horizon.

Paul
Paul 2022-6-30
This page might be of interest.

类别

Help CenterFile Exchange 中查找有关 Manual Performance Optimization 的更多信息

产品


版本

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by