Week 13 · Comparing Steady-State Error with P and PI
English translation
Before practice
01 Persistent error
It stops approaching the reference at a slightly lower value. Could this persistent difference be used to adjust the input?
Description
Error accumulated over time
PI uses the current and accumulated error. Closed-loop stability is a prerequisite for evaluating its effect.
02 Tracking a moving target
Are maintaining a fixed velocity and tracking a continuously increasing target velocity the same problem? What changes when comparing control methods?
Description
Step and ramp are different tracking problems
Assess steady-state error using both the reference signal and system type
Practice
1. Calculate steady-state error
Use and in the “3. Step tracking with P and PI” code in the practice Live Script.
Before execution, write by hand the characteristic polynomials obtained from and .
Check stability using the criterion that if all three coefficients of a 2nd-order polynomial are positive, both poles have negative real parts.
Here, is the position error constant. Distinguish it from the proportional gain labeled in the controller equation below.
Determine the system type from the number of poles at the origin in L, and calculate and .
After checking stability, calculate the unit-step error and unit-ramp error , and compare with the execution results.
Use this calculation as the baseline record for =5.
2. Compare pole locations
The models in the “2. Compare pole locations” code in the practice Live Script are T1=tf(10,[1 2 10]) and T2=tf(100,[1 10 100]).
Match each denominator to to find , and record the results in two rows.
Keep of T1, and create a model by changing only to the value in T2. Set the numerator to to preserve DC gain.
On the same time axis, overlay the step responses of T1 and the new model, and tabulate the stepinfo rise time, settling time, and overshoot. Unlike the original T1 and T2 comparison, state which coefficient you held fixed this time.
3. Step tracking with P and PI
Keep the baseline plant G=1/(0.5*s+1) and create the closed loop with P gain . Record the theoretical unit step error beside 1-dcgain(Tp).
Keep the PI controller's and apply each . Plot the three unit-step curves on the same time axis and label in the legend.
For each , record 1-dcgain(Tpi) and the settling time and overshoot returned by stepinfo(Tpi). Compare the final error separately from the transient response metrics.
4. Ramp tracking
Build the loop in the “4. Ramp tracking” code in the practice Live Script and determine the system type from the number of denominator poles at the origin. is the same as in the preceding activity.
Find and calculate the unit ramp error .
Keep the same time vector and ramp input. Change the code’s integral gain from 5 to the value 10 given in this activity, and rebuild the PI model using the same time axis and ramp input, and use lsim to find output . Write the last sample's beside the calculated and record their absolute difference.
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_Week13.mlx.
Restart the runtime, run all code from the top, then save.
Optional practice
Example: using a constant for the integral term in a PI controller
In a copy of the “3. Step tracking with P and PI” code in the practice Live Script, replace PI=10+5/s with PI=10+5, then rebuild feedback(PI*G,1).
Record 1-dcgain(Tpi) before and after the change, and compare whether there is a pole at the origin. Change only the controller definition line to 10+5/s.