◀ Back to Note

Tony's Intertwingled Memex • Reference Manual

Autonomous Drone Thrust State Estimation (Robotics & Computer Engineering) Solution

Formulas & Definitions

An autonomous quadcopter drone's flight guidance computer must continuously calculate its required propulsion thrust percentage (TTT) based on forward pitch angle (xxx in radians) and vertical climb velocity (yyy in meters per second, m/s\text{m/s}m/s).

Aerodynamic flight dynamics establish the non-linear thrust response function:

T(x,y)=ln⁡(x2+ey)T(x, y) = \ln(x^2 + e^y)T(x,y)=ln(x2+ey)

During steady-state hovering, the drone operates at a clean nominal base state (x0,y0)=(0,1)(x_0, y_0) = (0, 1)(x0​,y0​)=(0,1), yielding an exact baseline thrust of T(0,1)=ln⁡(02+e1)=ln⁡(e)=1.0T(0, 1) = \ln(0^2 + e^1) = \ln(e) = 1.0T(0,1)=ln(02+e1)=ln(e)=1.0 (100%100\%100% nominal thrust). Suddenly, a crosswind gust perturbs the drone into a dynamic state of (x,y)=(0.10,1.05)(x, y) = (0.10, 1.05)(x,y)=(0.10,1.05).

Because evaluating non-linear logarithmic functions on an embedded 32-bit microcontroller consumes excessive clock cycles and battery power, the flight controller executes a local linear approximation L(x,y)L(x, y)L(x,y) centered at (0,1)(0, 1)(0,1) to update thrust commands in real time.

  1. State the multivariable linear approximation formula L(x,y)L(x, y)L(x,y) referencing Linear Approximations.
  2. Compute the analytical partial derivatives Tx(x,y)T_x(x, y)Tx​(x,y) and Ty(x,y)T_y(x, y)Ty​(x,y), and evaluate them at the hovering base state (0,1)(0, 1)(0,1).
  3. Construct the explicit linearization formula L(x,y)L(x, y)L(x,y) for the quadcopter's thrust controller.
  4. Estimate the required thrust T(0.10,1.05)T(0.10, 1.05)T(0.10,1.05) using L(x,y)L(x, y)L(x,y), and compute the absolute percentage error relative to the true numerical value Ttrue=ln⁡(0.01+e1.05)≈1.0535T_{\text{true}} = \ln(0.01 + e^{1.05}) \approx 1.0535Ttrue​=ln(0.01+e1.05)≈1.0535.

Step-by-Step Solution:

  1. State the Linearization Formula:

    • As defined in Linear Approximations, the local linear approximation of a two-variable function at base point (x0,y0)(x_0, y_0)(x0​,y0​) is:
      L(x,y)=T(x0,y0)+Tx(x0,y0)(x−x0)+Ty(x0,y0)(y−y0)L(x, y) = T(x_0, y_0) + T_x(x_0, y_0)(x - x_0) + T_y(x_0, y_0)(y - y_0)L(x,y)=T(x0​,y0​)+Tx​(x0​,y0​)(x−x0​)+Ty​(x0​,y0​)(y−y0​)
  2. Compute Analytical Partial Derivatives:

    • Differentiating T(x,y)=ln⁡(x2+ey)T(x, y) = \ln(x^2 + e^y)T(x,y)=ln(x2+ey) via the Logarithmic Chain Rule:
      Tx(x,y)=1x2+ey⋅∂∂x(x2+ey)=2xx2+eyT_x(x, y) = \frac{1}{x^2 + e^y} \cdot \frac{\partial}{\partial x}(x^2 + e^y) = \frac{2x}{x^2 + e^y}Tx​(x,y)=x2+ey1​⋅∂x∂​(x2+ey)=x2+ey2x​
      Ty(x,y)=1x2+ey⋅∂∂y(x2+ey)=eyx2+eyT_y(x, y) = \frac{1}{x^2 + e^y} \cdot \frac{\partial}{\partial y}(x^2 + e^y) = \frac{e^y}{x^2 + e^y}Ty​(x,y)=x2+ey1​⋅∂y∂​(x2+ey)=x2+eyey​
    • Evaluate at nominal base state (x0,y0)=(0,1)(x_0, y_0) = (0, 1)(x0​,y0​)=(0,1):
      x02+ey0=02+e1=ex_0^2 + e^{y_0} = 0^2 + e^1 = ex02​+ey0​=02+e1=e
      Tx(0,1)=2(0)e=0T_x(0, 1) = \frac{2(0)}{e} = 0Tx​(0,1)=e2(0)​=0
      Ty(0,1)=e1e=1T_y(0, 1) = \frac{e^1}{e} = 1Ty​(0,1)=ee1​=1
    • Baseline thrust value: T(0,1)=ln⁡(e)=1.0T(0, 1) = \ln(e) = 1.0T(0,1)=ln(e)=1.0.
  3. Construct the Linearization Formula:

    • Substitute parameters into the formula:
      L(x,y)=1.0+0(x−0)+1.0(y−1)L(x, y) = 1.0 + 0(x - 0) + 1.0(y - 1)L(x,y)=1.0+0(x−0)+1.0(y−1)
      L(x,y)=1.0+(y−1)=yL(x, y) = 1.0 + (y - 1) = yL(x,y)=1.0+(y−1)=y
    • Physical Insight: Because Tx(0,1)=0T_x(0, 1) = 0Tx​(0,1)=0, first-order variations in pitch angle xxx around hover have zero linear sensitivity. In the immediate vicinity of hover, thrust commands depend almost exclusively on vertical climb rate yyy.
  4. Estimate Perturbed Thrust and Compute Error:

    • Perturbed state: (x,y)=(0.10,1.05)(x, y) = (0.10, 1.05)(x,y)=(0.10,1.05).
    • Evaluate linearization:
      L(0.10,1.05)=1.05(105% thrust)L(0.10, 1.05) = 1.05 \quad (105\% \text{ thrust})L(0.10,1.05)=1.05(105% thrust)
    • Compare with true value Ttrue=ln⁡(0.01+e1.05)=ln⁡(0.01+2.85765)=ln⁡(2.86765)≈1.05349T_{\text{true}} = \ln(0.01 + e^{1.05}) = \ln(0.01 + 2.85765) = \ln(2.86765) \approx 1.05349Ttrue​=ln(0.01+e1.05)=ln(0.01+2.85765)=ln(2.86765)≈1.05349:
      Absolute Error=∣1.05349−1.05000∣=0.00349\text{Absolute Error} = |1.05349 - 1.05000| = 0.00349Absolute Error=∣1.05349−1.05000∣=0.00349
      Percentage Error=0.003491.05349×100%≈0.33%\text{Percentage Error} = \frac{0.00349}{1.05349} \times 100\% \approx 0.33\%Percentage Error=1.053490.00349​×100%≈0.33%
    • The microcontroller achieves a computation speedup of orders of magnitude while introducing less than 0.35%0.35\%0.35% error, well within actuator tolerance bands.