Week 9 · Closed-loop Gain and Sensitivity

English translation

Before practice

01 Why measure results?

The same action can produce different results when surroundings or the device change. How could measuring actual results help compensate for this?

Description
  • Measure the output and adjust the action according to its difference from the target
  • Reduce the effect of model gain changes on the overall response through appropriate design

02 How much to adjust the control action

Would a large control action for even a small error give more accurate control? What problems might arise when increasing the response?

Description
  • Stability, measurement noise, and actuation limits
  • Improved sensitivity alone does not establish the suitability of the full design

Practice

1. Calculate closed-loop gain and sensitivity

  • Before running the “3. Verify relative changes” code in the practice Live Script, calculate by hand using Ka=5000,β=0.05,δ=0.1K_a=5000,\quad\beta=0.05,\quad\delta=0.1.
  • Differentiate T(Ka)=Ka1+βKaT(K_a)=\frac{K_a}{1+\beta K_a} and substitute into S=KaTdTdKaS=\frac{K_a}{T}\frac{dT}{dK_a} to obtain the baseline sensitivity S0S_0.
  • Approximate calculation: Multiply S0S_0 by the relative increase of KaK_a, 0.1.
  • Exact calculation: find T0=T(5000)T_0=T(5000) and T1=T(5500)T_1=T(5500) separately, then calculate T1−T0T0\frac{T_1-T_0}{T_0}.
  • You may leave both answers as fractions.
  • Save both handwritten calculations, then run the “3. Verify relative changes” code in the practice Live Script and compare them with approx·exact.
  • If they differ, check whether the denominator uses the pre-change T0T_0.
  • Then repeat for the 1% and 20% conditions.
  • You have already completed the 10% condition, so you do not need to repeat it.

2. Baseline gain and sensitivity

Keep β=0.05\beta=0.05 and apply Ka∈{1000,5000,10000}K_a\in\{1000,5000,10000\}. Substitute each KaK_a into the open-loop gain KaK_a, closed-loop gain Ka1+βKa\frac{K_a}{1+\beta K_a}, and sensitivity 11+βKa\frac1{1+\beta K_a}, and tabulate the three gain conditions as rows.

3. Verify relative changes

  1. Calculate exact and approx in the relative-change calculation code for δ∈{0.01,0.1,0.2}\delta\in\{0.01,0.1,0.2\}. Keep Ka=5000K_a=5000 and β=0.05\beta=0.05 unchanged.
  2. Tabulate δ\delta, the exact relative change, the approximate relative change, and their absolute difference.
  3. Use the last table column to determine whether approximation error increases as δ\delta increases. Also compare the relative gain change without feedback δ\delta with the closed-loop value exact, and explain how much the change is reduced.

4. Repeat the checks

  1. Add 0.010.01 and 0.10.1 alongside β=0.05\beta=0.05 in the sensitivity-plotting code. Plot three sensitivity curves using the same Ka vector and label β\beta in the legend.
  2. At the same KaK_a, record the closed-loop gain and sensitivity for each β\beta side by side. For example, compare the three cases at the baseline Ka=5000K_a=5000.
  3. Explain closed-loop gain in terms of output magnitude, and sensitivity in terms of the relative gain change caused by changes in KaK_a. Distinguish a small gain from insensitivity to change.

Submission and saving

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_Week9.mlx.

Restart the runtime, run all code from the top, then save.

Optional practice

Example: using matrix division instead of element-wise division

  1. In a copy of the “4. Repeat the checks” code in the practice Live Script, replace S=1./(1+Ka*beta) with S=1/(1+Ka*beta). Record whether a vector Ka causes an error or yields dimensions different from those expected.
  2. Change only this line to ./ and write size(Ka) and size(S). Check whether the two vectors' elements correspond one to one.