www.gusucode.com > control 案例程序 matlab源码代码 > control/MultiChannelAnalysisPointsExample.m
%% Multi-Channel Analysis Points % Create a block for marking two analysis points in a MIMO model. % % In the control system of the following illustration, consider each signal % a vector-valued signal of size 2. In other words, the signal $r$ represents % |{r(1),r(2)}|, $y$ represents |{y(1),y(2)}|, and so on. % % <<../loopswitch1.png>> % % % The feedback signal is therefore also a vector-valued signal of size 2. % Create a block for marking the two analysis points in the feedback path. %% AP = AnalysisPoint('X',2) %% % The |AnalysisPoint| block is stored as a variable in the MATLAB(R) workspace % called |AP|. In addition, the |Name| property of the block is set to |X|. % When you interconnect the block with numeric LTI models or other Control % Design Blocks, this analysis-point block is identified in the |Blocks| % property of the resulting |genss| model as |X|. The block name |X| is % automatically expanded to generate the channel names |X(1)| and |X(2)|. %% % It is sometimes convenient to change the channel names to match the names % of the signals they correspond to in a block diagram of your model. For % example, suppose the points of interest you want to mark in your model % are signals named |L| and |V|. Change the |Location| property of |AP| % to make the names match those signals. AP.Location = {'L';'V'} %% % Although the channel names have changed, the block name remains |X|. AP.Name %% % Therefore, the |Blocks| property of a |genss| model you build with this % block still identifies the block as |X|. Use |getPoints| to find the channel % names of available analysis points in a |genss| model.