Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

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,val)
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,val) pushes the character vector val 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

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 label 'newData'.

usimfill('usim_model','newData'); 

View all of the dialog boxes, and see that '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'); 

Introduced in R2007a

Was this topic helpful?