If we have a transfer function in matlab (1/1+sT) and there is uncertainty (+- 20%) in the time constant 'T'. How can we simulate this transfer function including this uncertainty.
I would approach this problem by first generating the 'T' and then loading it to the model. The matlab rand function computes a value between 0 and 1. We can rescale it:
r = (up-lb)*rand(1) + lb;
since your value is +-20% of the nominal value, you can obtain a valid T within this range by scaling it by [0.8,1.2].
lb = 1 - 0.2;
up = 1 + 0.2;
Tnominal = 1;
T = Tnominal * ( (up-lb)*rand(1) + lb );
If you are using Simulink. you probably want to place the code above in Simulation Start Function (File-> Model properties->Callbacks->StartFcn). A random 'T' will be generated every time you run your simulink model.
For instance, you can use the LTI system block, where tf(1,[1 T]).
Hello, it is important to characterize your input uncertainty in order to perform the stochastic analysis proposed above. You can sample in this case the uniform PDF in the range [-20% +20%], otherwise, a normal distribution could be used. Look at your state of the art and find a precise definition for this uncertainty. Hiva Nasiri
explanation is a full valid method that I used too.
there are several ways to simulate uncertain parameters in Simulink. The easiest way is of course a stochastic approach, but you have to think think about your problem and which stochastic distribution fits best. Maybe a chi square distribution or F-score distribution fits better than the standard normal or gaussian distribution.