Main Content

refresh

Resynchronize slLinearizer or slTuner interface with current model state

Description

refresh(s) resynchronizes the slLinearizer or slTuner interface, s, with the current state of the model. The interface recompiles the model for the next call to functions that either return transfer functions (such as getIOTransfer and getLoopTransfer) or functions that tune model parameters (such as systune or looptune). This model recompilation ensures that the interface uses the current model state when computing linearizations. Block parameterizations and values for tuned blocks are preserved. Use setBlockParam to sync blocks with the model.

Use this command after you make changes to the model that impact linearization. Changes that impact linearization include modifying parameter values and reconfiguring blocks and signals.

example

Examples

collapse all

Create an slLinearizer interface.

sllin = slLinearizer('scdcascade');

Generally, you configure the interface with analysis points, openings, operating points, and parameter values. Then, you linearize the model using the getIOTransfer, getLoopTransfer, getSensitivity, and getCompSensitivity commands. The first time you call one of these commands with sllin, the software stores the state of the model in sllin and uses it to compute the linearization.

You can change the model after your first call to getIOTransfer, getLoopTransfer, getSensitivity, or getCompSensitivity with sllin. Some changes impact the linearization, such as changing parameter values. If your change impacts the linearization, call refresh to get expected linearization results. For this example, change the proportional gain of the C2 PID controller block.

set_param('scdcascade/C2','P','10')

Trigger the interface to recompile the model for the next call to getIOTransfer, getLoopTransfer, getSensitivity, or getCompSensitivity.

refresh(sllin);

Create an slTuner interface.

st = slTuner('scdcascade','C2');

Generally, you configure the interface with analysis points, openings, operating points, and parameter values. Then, you tune the model block parameters using the systune and looptune commands. You can also analyze various transfer functions in the model using commands such as getIOTransfer and getLoopTransfer. The first time you call one of these commands with st, the software stores the state of the model in st and uses it to compute the linearization.

You can change the model after your first call to one of these commands. Some changes impact the linearization, such as changing parameter values. If your change impacts the linearization, call refresh to get expected linearization results. For this example, change the proportional gain of the C1 PID controller block.

set_param('scdcascade/C1','P','10')

Trigger the interface to recompile the model for the next call to commands such as getIOTransfer, getLoopTransfer, or systune.

refresh(st);

Input Arguments

collapse all

Interface to a Simulink model, specified as either an slLinearizer interface or an slTuner interface.

Version History

Introduced in R2013b