www.gusucode.com > control 案例程序 matlab源码代码 > control/AnalysisPointLocationsInControlSystemModelExample.m
%% Analysis-Point Locations in Control System Model % Build a closed-loop model of a cascaded feedback loop system, and get % a list of analysis point locations in the model. %% % Create a model of the following cascaded feedback loop. $C_{1}$ and $C_{2}$ % are tunable controllers. $AP_{1}$ and $AP_{2}$ are points of interest % for analysis, which you mark with |AnalysisPoint| blocks. % % <<../getloopid1.png>> % G1 = tf(10,[1 10]); G2 = tf([1 2],[1 0.2 10]); C1 = tunablePID('C','pi'); C2 = tunableGain('G',1); AP1 = AnalysisPoint('AP1'); AP2 = AnalysisPoint('AP2'); T = feedback(G1*feedback(G2*C2,AP2)*C1,AP1); %% % |T| is a |genss| model whose Control Design Blocks include the tunable % controllers and the switches |AP1| and |AP2|. %% % Get a list of the loop-opening sites in |T|. points = getPoints(T) %% % |getPoints| returns a cell array listing loop-opening sites in the model. %% % For more complicated closed-loop models, you can use |getPoints| to keep % track of a larger number of analysis points.