Real-Value Examples Using Your Rotorflight Math Chart

To bring these equations to life, let's plug in realistic numbers based on a dynamic cyclic movement (like a quick elevator stick jab on your Tron 5.5) using your tuning constants from Profile #3 (Pitch P = 70, Derivative = 80).

1. Error Calculation

  • Equation: Error = Setpoint - Gyro (Measured Value)
  • Scenario: You command a sharp pitch rotation. Your target (Setpoint) is +100 deg/s, but the helicopter's gyro reports it is currently moving at +80 deg/s.
  • Calculation: Error = 100 - 80 = +20 deg/s

2. Proportional (P) Term

  • Equation: P = kP * Error
  • Scenario: Using your Pitch Proportional gain ($k_P$) of 70, and an Error of 20.
  • Calculation: P = 70 * 20 = 1,400 units of corrective muscle applied instantly to fix the gap.

3. Derivative (D) Term

  • Equation: D = kD * (dError / dt)
  • Scenario: Your Pitch Derivative gain ($k_D$) is set to 80. The error is shrinking rapidly as the heli catches up, meaning the rate of change of error ($dError / dt$) is negative—say, -5 deg/s per tick.
  • Calculation: D = 80 * (-5) = -400 units.
  • What it means: This negative D value acts as a digital shock absorber, pulling against the P-term to prevent the helicopter from overshooting past your target angle.

4. Feed Forward (FF)

  • Equation: FF = kFF * Setpoint
  • Scenario: Your Pitch Feed-Forward ($k_{FF}$) is 100, and your stick command (Setpoint) is 100 deg/s.
  • Calculation: FF = 100 * 100 = 10,000 units of predictive force thrown straight to the servos the millisecond you move your stick, bypassing the need to wait for error to develop.

5. Control Output

  • Equation: Output = PID Sum + FF
  • Scenario: If your I-term contribution at that exact microsecond is +50, then your total PID Sum = P (1,400) + I (50) + D (-400) = 1,050. Add your Feed Forward (10,000).
  • Calculation: Output = 1,050 + 10,000 = 11,050 total command units sent directly to the swashplate servos to execute that ultra-crisp pitch movement.