joint time-domain and frequency-domain analysis
this example shows how to compare multiple types of responses side by side, including both time-domain and frequency-domain responses, using the interactive linear system analyzer app.
obtain models whose responses you want to compare.
for example, compare a third-order plant g
,
and the closed-loop responses of g
with two different
controllers, c1
and c2
.
g = zpk([],[-5 -5 -10],100); c1 = pid(0,4.4); t1 = feedback(g*c1,1); c2 = pid(2.9,7.1); t2 = feedback(g*c2,1);
open the linear system analyzer tool to examine the responses of the plant and the closed-loop systems.
linearsystemanalyzer(g,t1,t2)
by default, the linear system analyzer launches with a plot of the step response of the three systems. click to add a legend to the plot.
add plots of the impulse responses to the linear system analyzer display.
in the linear system analyzer, select edit > plot configurations to open the plot configurations dialog box.
select the two-plot configuration. in the response type
area, select bode magnitude
for the second
plot type.
click ok to add the bode plots to the linear system analyzer display.
display the peak values of the bode responses on the plot.
right-click anywhere in the bode magnitude plot and select characteristics > peak response from the menu.
markers appear on the plot indicating the peak response values. horizontal and vertical dotted lines indicate the frequency and amplitude of those responses. click on a marker to view the value of the peak response in a datatip.
you can use a similar procedure to select other characteristics such as settling time and rise time from the characteristics menu and view the values.
you can also change the type of plot displayed in the linear system analyzer. for example, to change the first plot type to a plot of the impulse response, right-click anywhere in the plot. select plot types > impulse
the displayed plot changes to show the impulse of the three systems.
see also
| | | | | |