www.gusucode.com > slcontrol 案例源码程序 matlab代码 > slcontrol/SensitivityFunctionAtAnalysisPointExample.m
%% Sensitivity Function at Analysis Point % For the |ex_scd_simple_fdbk| model, obtain the sensitivity at the plant % input, |u|. %% % 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 sensitivity at the plant input, |u|, add |u| as an analysis % point to |sllin|. addPoint(sllin,'u'); %% % Obtain the sensitivity at the plant input, |u|. sys = getSensitivity(sllin,'u'); tf(sys) %% % The software uses a linearization input, |du|, and linearization output % |u| to compute |sys|. % % <<../getsensitivity1.png>> % %% % |sys| is the transfer function from |du| to |u|, which is equal to $(I+KG)^{-1}$.