www.gusucode.com > slcontrol 案例源码程序 matlab代码 > slcontrol/ObtainComplementarySensitivityFunctionatAnalysisPointExample.m
%% Obtain Complementary Sensitivity Function at Analysis Point % Obtain the complementary sensitivity function, calculated at the plant % output, 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 calculate the complementary sensitivity function at the plant output, % use the |y| signal as the analysis point. Add this point to |sllin|. addPoint(sllin,'y'); %% % Obtain the complementary sensitivity function at |y|. sys = getCompSensitivity(sllin,'y'); tf(sys) %% % The software adds a linearization output at |y|, followed by a linearization % input, |dy|. %% % % <<../getcompsensitivity_y.png>> % %% % |sys| is the transfer function from |dy| to |y|, which is equal to $-(I+GK)^{-1}GK$.