usimfill

Helper function for USS System blocks to set "User-defined Uncertainty" field or state of "Uncertainty value" menu

    Note   usimfill will be removed in a future release. Use ufind instead.

Syntax

usimfill(ModelName,str)
usimfill(ModelName,'Uncertainty value','Nominal')
usimfill(ModelName,'Uncertainty value','User defined')

Description

The command usimfill allows simple control of some parameters of all USS System blocks in a Simulink® model.

usimfill(ModelName,str) pushes the string in str into the Uncertainty value name field of all USS System blocks in the Simulink model specified by ModelName.

usimfill(ModelName,'Uncertainty value','Nominal') sets the Uncertainty value pulldown menu to Nominal for all USS System blocks in the Simulink model specified by ModelName. Only a limited number of characters are needed to make this specification, so usimfill(ModelName,'U','N') accomplishes the same effect.

usimfill(ModelName,'Uncertainty value','User defined') sets the Uncertainty value pulldown menu to User defined for all USS System blocks in the Simulink model specified by ModelName. Only a limited number of characters are needed to make this specification, so usimfill(ModelName,'U','U') accomplishes the same effect.

Examples

See Robustness Analysis in SimulinkRobustness Analysis in Simulink for a more detailed example of how to use usimfill.

Open the model file associated with the example.

open_system('usim_model'); 
unc_pole = ureal('unc_pole',-5,'Range',[-10 -4]); 
plant = ss(unc_pole,5,1,1); 
input_unc = ultidyn('input_unc',[1 1]); 
wt = makeweight(0.25,130,2.5); 
sensor_gain = ureal('sensor_gain',1,'Range',[0.1 2]); 

This has three USS System blocks. They are plant with a ureal atom named unc_pole; input_unc which is a ultidyn object, and sensor_gain which is a ureal atom.

Run usimfill on the model, filling in the field with the string 'newData'.

usimfill('usim_model','newData'); 

View all of the dialog boxes, and see that the string 'newData' has been entered.

Run usimfill on the model, changing the Uncertainty Selection to Nominal.

usimfill('usim_model','Uncertainty value','Nominal'); 

Similarly run usimfill on the model, changing the Uncertainty Selection to User Specified Uncertainty.

usimfill('usim_model','Uncertainty value','User defined'); 

Now generate a random sample of the uncertain atoms, and run the simulation

newData = usimsamp('usim_model',120); 
sim('usim_model'); 
Was this topic helpful?