- Error e
- 0.00 m
- Altitude z
- 0.00 m
- Thrust applied
- 0.0 N
- Integral term
- 0.0 N
Expected steady state appears here.
Plant: m z = T − m g − c z, with m = 1.0 kg (1.4 kg with payload), c = 0.15 N·s/m, 0 ≤ T ≤ Tmax. Controller: Tcmd = FF + Kpe + Ki∫e dt − Kdzmeas, FF = mnomg with mnom = 1.0 kg; zmeas is a finite difference of the measured altitude at the controller rate.
Try this
- Press P only. The drone hangs below the dashed target and keeps bouncing. Is the gap close to m g/Kp? What does adding Kd change, and what does it leave alone?
- Press PD + feed-forward, then add the payload (P). Why does a sag come back, and which term removes it?
- Press Windup demo. The target is 3 m, so why does the drone climb to about 4.5 m? Turn anti-windup on and run the demo again.
- Turn on sensor noise. Which term turns 2 cm of altitude noise into newtons of thrust noise? Compare 20 Hz with 1000 Hz: why does the update rate matter?
- Tilt θ
- 0.0°
- Desired θdes
- 0.0°
- Rotor F1 (left)
- 0.00 N
- Rotor F2 (right)
- 0.00 N
- Distance to target
- 0.00 m
x = −(u1/m) sin θ, z = (u1/m) cos θ − g, θ = u2/I, with u1 = F1 + F2, u2 = (F2 − F1)L; m = 1 kg, L = 0.25 m, I = 0.01 kg·m², 0 ≤ Fi ≤ m g (z is the slides’ y). Outer loop: a = ωo²(ptarget − p) − 2ωop, θdes = atan2(−ax, g + az), u1 = m(g + az)/cos θ. Inner loop: u2 = I(ωi²(θdes − θ) − 2ωiθ). Both loops critically damped (ζ = 1).
Try this
- Click a target on the far side of the scene. Why does θdes move before the drone starts to travel sideways?
- Lower ωi until the badge reads Too close, then push the ratio below 2×. What happens to x?
- Turn on 3 N of wind. Why does the drone lean about 17°, and why does it settle 0.75 m downwind of the target? (offset = Fw/(m ωo²))
- Switch to Fully actuated and repeat. What changes in θ, and at the start of the x response?
Achieved [T; τx; τy; τz] (N, N·m) = B × motor thrusts (N), with d = l/√2 = 0.177 m and κ = 0.016 m
| Axis | Commanded | Achieved | Error |
|---|---|---|---|
| T (N) | |||
| τx roll (N·m) | |||
| τy pitch (N·m) | |||
| τz yaw (N·m) |
All four motors are inside 0 to 8 N, so the command is met exactly.
PX4 quad-X in the FRD body frame (x forward, y right, z down; thrust along −zB): M1 front-right CCW, M2 rear-left CCW, M3 front-left CW, M4 rear-right CW. l = 0.25 m, fmax = 8 N per motor, m = 1.5 kg (hover 14.7 N). Inverse: f1 = T/4 − τx/4d + τy/4d + τz/4κ, and similarly for the others.
Try this
- Press Roll right. Which motors speed up, and why does the total thrust stay at 14.7 N?
- Press Yaw right. Why do the diagonal pairs change together? At hover, how much τz saturates a motor? (Check: 4κ(fmax − m g/4) ≈ 0.28 N·m.)
- Press Aggressive roll + yaw. Which axes does naive clipping get wrong? Switch strategy: what does the prioritised mixer give up instead?
- Set τx to 1 N·m and raise T towards 32 N. Why does roll authority run out near full throttle, and how does each strategy respond?