Control Engineering I · Week 11 · Step Response Performance Metrics

English translation

Edit the code and response fields in your own copy. Name: ⟦enter here⟧ / Student ID: ⟦enter here⟧

How to run

In Live Editor, click inside the code and run the current section with Run Section (Windows/Linux Ctrl+Enter, Mac ⌘+Enter). Run executes the entire document. Edit the explanations and response fields directly.
Initially run from the top, and rerun any section whose values you change. If an undefined-variable error occurs, run the preceding sections first. Outputs appear below or to the right of the code.
Environment: MATLAB Online and Control System Toolbox.

1. Measure the response numerically

Compare the same response using the plot, rise time, settling time, and overshoot.
Prediction before running: ⟦enter here⟧
s=tf('s');T=4/(s^2+2*s+4);
info=stepinfo(T,'SettlingTimeThreshold',.02);disp(info);
figure;step(T,0:.01:10);grid on;
Do it yourself:
State the units of rise time, settling time, and overshoot, and indicate which part of the plot each measures.
% ✍ Your code: add your own code below.
Changed condition: ⟦enter here⟧
Observed result: ⟦enter here⟧
Differences from the prediction and their causes: ⟦enter here⟧

2. Correct a measurement using the wrong final value

This model's final response value is not 1.
Prediction before running: ⟦enter here⟧
T=tf(2,[1 2 4]);t=(0:.01:10)';[y,~]=step(T,t);
correct=stepinfo(y,t,dcgain(T),'SettlingTimeThreshold',.02);
wrong=stepinfo(y,t,1,'SettlingTimeThreshold',.02);
disp(correct);disp(wrong);
Do it yourself:
  1. Record the rise time, settling time, and overshoot from correct and wrong in the “2. Correct a measurement using the wrong final value” code in the practice Live Script side by side. Explain that only the final-value argument differs between the two calls.
  2. Keep denominator [1 2 4] and change the numerator to 1 so that the DC gain of T becomes 0.25. Recalculate y on the same time vector.
  3. For the same y,t, call stepinfo with final values 1 and dcgain(T) separately, and record both results in the same format.
  4. Instead of changing the model to hide the error, correct only the final-value argument of stepinfo to the actual DC gain. State which reference value caused the metrics to differ.
% ✍ Your code: add your own code below.
Changed condition: ⟦enter here⟧
Observed result: ⟦enter here⟧
Differences from the prediction and their causes: ⟦enter here⟧

3. Change pole and zero conditions

A zero can change the response even with the same denominator.
Prediction before running: ⟦enter here⟧
s=tf('s');base=4/(s^2+2*s+4);withZero=(s+5)/5*base;slowPole=1/(s+1)*base;
figure;step(base,withZero,slowPole,0:.01:15);legend('base','zero -5','pole -1');grid on;
disp([dcgain(base),dcgain(withZero),dcgain(slowPole)]);
Do it yourself:
  1. Find dcgain and stepinfo for each of base, withZero, and slowPole.
  2. Use one row per model to record DC gain, rise time, settling time, and overshoot. Use the same stepinfo settings.
  3. Use (s+2)/2*base when changing the additional zero to −2-2, and 10/(s+10)*base when changing the additional pole to −10-10. Keep the baseline model base unchanged.
  4. Append the results for the two modified models to the same table. First check that their DC gains equal base. Then compare the changed zero with the original withZero and the changed pole with the original slowPole.
  5. For each change, state whether rise time, settling time, and overshoot increase or decrease. Use these results to explain whether the transient response changes even with the same final value.
% ✍ Your code: add your own code below.
Changed condition: ⟦enter here⟧
Observed result: ⟦enter here⟧
Differences from the prediction and their causes: ⟦enter here⟧

Practice through repetition and check before submission

Summarize the three conditions compared in the preceding hands-on activities below. You do not need to repeat experiments already completed. Predictions may state increasing or decreasing trends instead of exact values.
Repetition 1 — Condition: ⟦enter here⟧ / Prediction: ⟦enter here⟧ / Actual result: ⟦enter here⟧
Trial 2 — Condition: ⟦enter here⟧ / Prediction: ⟦enter here⟧ / Observation: ⟦enter here⟧
Trial 3 — Condition: ⟦enter here⟧ / Prediction: ⟦enter here⟧ / Observation: ⟦enter here⟧
Optional:
Example: specifying 20% when calculating the 2% settling time
  1. Using the same T in the “1. Measure the response numerically” code in the practice Live Script, calculate stepinfo(T,'SettlingTimeThreshold',.02) and stepinfo(T,'SettlingTimeThreshold',.2).
  2. Record the two settling times and the tolerance percentages used side by side. Change only the second call's argument to .02 for the 2% criterion, keeping the model unchanged.
Include code, actual outputs and plots, and your own interpretation. Submit through KLAS; check the semester schedule and latest announcements for the deadline.
Filename: Name_StudentID_Week11.mlx.