www.gusucode.com > slcontrol 案例源码程序 matlab代码 > slcontrol/ResynchronizeslLinearizerInterfacewithCurrentModelStateExample.m
%% Resynchronize slLinearizer Interface with Current Model State %% % 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);