C12 Embedded systems in MicroPython and C · Practice
Control loops in firmware: sampled feedback, fixed-point PI and windup
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
0 solved
0 in a row
0 of 9 kinds solid
Check
A plant with G = 1 and τ = 20 ms is sampled every 0.5 ms under proportional gain 10.
(a)
Where is the loop's pole?
(b)
What is the largest stable gain?
Check
A loop has proportional gain 5 and plant DC gain 0.4.
(a)
What is the steady-state error, as a share of the set point?
(b)
Where does the output settle?
Check
A loop sampled at 5 kHz crosses over at 20 Hz with a total delay of 2.5 samples.
(a)
How much phase margin does the delay cost?
(b)
How many times the crossover is the sample rate?
Check
A gain of 0.75 is stored in Q8 and multiplies an error of 250 codes.
(a)
What integer stores the gain?
(b)
What does the product, shifted right by 8, give?
Check
An integrator adds 0.002 × e every 10 ms; the output is saturated for 30 s with an error of 100 codes.
(a)
How much does the integrator wind up?
(b)
Over how many samples?
Check
A loop needs a crossover of 50 Hz and is sampled at 10 times that.
(a)
What sample rate?
Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.
(b)
With 1.5 samples of delay, what phase does it lose?
Check
Steady-state error with P gain 8 and plant gain 1?
Check
Phase lost to 1.5 samples of delay at 2 kHz, crossover 50 Hz?
Check
Q8 integer for a gain of 0.6?
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in C12