www.gusucode.com > slcontrol 案例源码程序 matlab代码 > slcontrol/ResynchronizeslTunerInterfacewithCurrentModelStateExample.m

    %% Resynchronize slTuner Interface with Current Model State  

%% 
% 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);