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

    %% Specify Temporary Loop Opening to Get Plant Model  
% Obtain the plant model transfer function, |G|, for the |ex_scd_simple_fdbk|
% model.   

%% 
% Open the |ex_scd_simple_fdbk| model. 
mdl = 'ex_scd_simple_fdbk';
open_system(mdl);   

%%
% In this model:
%
% $$\begin{array}{l}
% K(s) = {K_p} = 3\\
% G(s) = \frac{1}{{s + 5}}.
% \end{array}$$
%

%% 
% Create an |slLinearizer| interface for the model. 
sllin = slLinearizer(mdl);  

%% 
% To obtain the plant model transfer function, use |u| as the input point
% and |y| as the output point. To eliminate the effects of feedback, you
% must break the loop. You can break the loop at |u|, |e|, or |y|. For this
% example, break the loop at |u|. Add these points to |sllin|. 
addPoint(sllin,{'u','y'});  

%% 
% Obtain the plant model transfer function. 
sys = getIOTransfer(sllin,'u','y','u');
tf(sys) 

%%
% The second input argument specifies |u| as the input, while the fourth
% input argument specifies |u| as a temporary loop opening.
%
% <<../analysis_pt_u_in_break.png>>
%

%%
% |sys| is the transfer function from |du| to |y|, which is equal to $G$.