www.gusucode.com > control 案例程序 matlab源码代码 > control/SpecifyAdditionalLoopOpeningforComplementarySensitivityFExample.m
%% Specify Additional Loop Opening for Complementary Sensitivity Function Calculation % In the multiloop system of the following illustration, calculate the % inner-loop sensitivity at the output of |G2|, with the outer loop open. %% % % <<../getlooptransfer3.png>> % %% % Create a model of the system by specifying and connecting the numeric % plant models, tunable controllers, and |AnalysisPoint| blocks. |G1| and % |G2| are plant models, |C1| and |C2| are tunable controllers, and |X1| % and |X2| are |AnalysisPoint| blocks that mark potential loop-opening locations. G1 = tf(10,[1 10]); G2 = tf([1 2],[1 0.2 10]); C1 = tunablePID('C','pi'); C2 = tunableGain('G',1); X1 = AnalysisPoint('X1'); X2 = AnalysisPoint('X2'); CL = feedback(G1*feedback(G2*C2,X2)*C1,X1); %% % Calculate the complementary sensitivity, $T$, at |X2|, with the outer % loop open at |X1|. Specifying |X1| as the third input argument tells % |getCompSensitivity| to open the loop at that location. T = getCompSensitivity(CL,'X2','X1'); tf(T)