Whether you model your control system in MATLAB® or Simulink®,
use analysis points to mark points of interest
in the model. Analysis points give you access to internal signals,
perform open-loop analysis, or specify requirements for controller
tuning. In the block diagram representation, an analysis point can
be thought of as an access port to a signal flowing from one block
to another. In Simulink, analysis points are attached to the
outports of Simulink blocks. For example, the reference signal,
and the control signal,
u, are analysis points
of the following simple feedback loop model,
Figure 1: Simple Feedback Loop
Analysis points serve three purposes:
Input: The software
injects an additive input signal at an analysis point, for example,
to model a disturbance at the plant input,
Output: The software
measures the signal value at a point, for example, to study the impact
of this disturbance on the plant output,
Loop Opening: The
software interprets a break in the signal flow at a point, for example,
to study the open-loop response at the plant input,
You can apply these purposes concurrently. For example, to compute
the open-loop response from
you can treat
u as both a loop opening and an input.
When you use an analysis point for more than one purpose, the software
always applies the purposes in a specific sequence: output (measurement),
then loop opening, then input, as shown in the following diagram.
Figure 2: Analysis Point as Input, Output, and Loop Opening
Analysis points enable you to extract open-loop and closed-loop
responses from a control system model. For example, suppose
the closed-loop system in the model
y are marked as analysis
T can be either a generalized state-space
model or an
to a Simulink model. You can plot the closed-loop response to
a step disturbance at the plant input with the following commands:
Tuy = getIOTransfer(T,'u','y'); stepplot(Tuy)
Analysis points are also useful to specify design requirements
when tuning control systems with the
For example, you can create a requirement that attenuates disturbances
at the plant input by a factor of 10 (20 dB) or more.
Req = TuningGoal.Rejection('u',10);
Consider an LTI model of the block diagram in Figure 1.
G = tf(10,[1 3 10]); C = pid(0.2,1.5); T = feedback(G*C,1);
With this model, you can obtain the closed-loop response from
However, you cannot analyze the open-loop response at the plant input
or simulate the rejection of a step disturbance at the plant input.
To enable such analysis, mark the signal
u as an
analysis point by inserting an
between the plant and controller.
AP = AnalysisPoint('u'); T = feedback(G*AP*C,1);
The plant input,
u, is now available for
analysis. For instance, you can plot the open-loop response at
Recall that the
AnalysisPoint block includes
an implied loop-opening switch that behaves as shown in Figure 2 for
analysis purposes. By default, this switch is closed when computing
closed-loop responses. For example, plot the closed-loop response
to a step disturbance at the plant input.
T.OutputName = 'y'; stepplot(getIOTransfer(T,'u','y'))
In creating the model
T, you manually created
the analysis point block
AP and explicitly included
it in the feedback loop. When you combine models using the
you can instruct the software to insert analysis points automatically
at the locations you specify. For more information, see the
connect reference page.
In Simulink, you can mark analysis points either explicitly
in the block diagram, or programmatically using the
addPoint command for
To mark an analysis point explicitly in the block diagram, right-click
on the signal and use the Linear Analysis Points menu.
Select one of the closed-loop analysis types, unless you also want
to add a permanent opening at this location. The closed-loop analysis
types are Input Perturbation, Output
Measurement, Sensitivity, and Complementary
Sensitivity. The selected type does not affect analysis
functions, such as
getIOTransfer, and tuning
goals, such as
Figure 3: Marking Analysis Points in a Simulink Model
To mark analysis points programmatically, use
addPoint for the
Specify the point of interest using the block path, port number, and
bus element, if applicable. For example, consider the
illustrated in the next two figures.
Figure 4: Simple Feedback Loop in Simulink
Figure 5: 2DOF Controller Subsystem
Feedfordward term signals
as analysis points.
open_system('ex_scd_analysis_pts2'); ST = slLinearizer('ex_scd_analysis_pts2'); addPoint(ST,'ex_scd_analysis_pts2/2DOF Controller',1) addPoint(ST,'ex_scd_analysis_pts2/2DOF Controller/Kff',1)
For convenience, you can also designate points of interest as analysis points using one of the abbreviations shown in the following examples:
Block name and port number:
Block name and outport name:
End of the full block name when unambiguous:
Finally, you can specify analysis points using linearization
I/O objects (see
ios = [... linio('ex_scd_analysis_pts2/Setpoint',1,'input'),... linio('ex_scd_analysis_pts2/Plant',1,'output')]; addPoint(ST,ios)
As when you use the Linear Analysis Points to
mark analysis points, analysis functions such as
tuning goals such as
the actual I/O type. However, an I/O type that implies a loop opening,
imposes a permanent loop opening at the point. This permanent opening
remains in force throughout analysis and tuning.
When you specify response I/Os in a tool such as Linear Analysis Tool or Control System Tuner, the software creates analysis points as needed.
Once you have marked analysis points, you can analyze the response
at any of these points using functions such as
You can also create tuning goals that constrain the system response
at these points. The tools to perform these operations operate in
a similar manner for models created at the command line and models
created in Simulink.
to get a list of all available analysis points.
getPoints(T) % Model created at the command line getPoints(ST) % Model created in Simulink
For closed-loop models created at the command line, you can
also use the model input and output names as inputs to functions such
Similarly, you can use these names to compute open-loop responses
or create tuning goals for
L = getLoopTransfer(T,'u',-1); R = TuningGoal.Margins('u',10,60);
Use the same method to refer to analysis points for models created
in Simulink. In Simulink models, for convenience, that you
can use any unambiguous abbreviation of the analysis point names returned
L = getLoopTransfer(ST,'u',-1); stepplot(getIOTransfer(ST,'r','Plant')) s = tf('s'); R = TuningGoal.Gain('Noise','Feedforw',1/(s+1));
Finally, if some analysis points are vector-valued signals or
multichannel locations, you can use indices to select particular entries
or channels. For example, suppose
u is a two-entry
vector in the model of Figure 2. You can compute the open-loop response
of the second channel and measure the impact of a disturbance on the
first channel, as shown here.
% Build closed-loop model of MIMO feedback loop G = ss([-1 0.2;0 -2],[1 0;0.3 1],eye(2),0); C = pid(0.2,0.5); AP = AnalysisPoint('u',2); T = feedback(G*AP*C,eye(2)); T.OutputName = 'y'; L = getLoopTransfer(T,'u(2)',-1); stepplot(getIOTransfer(T,'u(1)','y'))
When you create tuning goals in Control System Tuner, the software creates analysis points as needed.