diff --git a/docs/CONTROLLERS.md b/docs/CONTROLLERS.md index 20f5bc1..8236423 100644 --- a/docs/CONTROLLERS.md +++ b/docs/CONTROLLERS.md @@ -65,7 +65,7 @@ Frequency-domain coefficients A(ω₀), B(ω₀) are computed from the stored RI ### Gain derivation (from impedance.cpp) ``` -K_r = −ω₀² · (I_flap + A₅₅(ω₀)) + K_hs,55 +K_r = ω₀² · (I_flap + A₅₅(ω₀)) − K_hs,55 (intrinsic pitch reactance to be cancelled) B_r = B_rad,55(ω₀) ``` diff --git a/src/active_pto.h b/src/active_pto.h index 2950f31..84c4d2e 100644 --- a/src/active_pto.h +++ b/src/active_pto.h @@ -53,7 +53,7 @@ class OptimalPassive : public seastack::pto::IPTOModel { // ============================================================================= // (C) ComplexConjugateControl — reactive CC control at ω₀ // Gains pre-computed by caller via impedance.h::ComputeCCGains(): -// K_r = −ω₀²·(I_flap + A₅₅(ω₀)) + K_hs,55 +// K_r = ω₀²·(I_flap + A₅₅(ω₀)) − K_hs,55 (intrinsic pitch reactance to be cancelled) // B_r = B_rad,55(ω₀) // τ = −K_r · θ − B_r · ω // ============================================================================= diff --git a/src/impedance.cpp b/src/impedance.cpp index d53f0ff..06b952f 100644 --- a/src/impedance.cpp +++ b/src/impedance.cpp @@ -94,7 +94,9 @@ CCGains ComputeCCGains(const seastack::hydro::HydroData& data, const double K_hs55 = data.GetHydrostaticStiffnessVal(flap_body_idx, kPitchDOF, kPitchDOF); CCGains gains; - gains.K_r = -omega0 * omega0 * (I_flap_kgm2 + A55) + K_hs55; + // K_r is the intrinsic pitch reactance X·ω = ω²(I+A) − K_hs to be cancelled; + // the control law applies the conjugate sign: τ_react = −K_r·θ. + gains.K_r = omega0 * omega0 * (I_flap_kgm2 + A55) - K_hs55; gains.B_r = B55; return gains; } diff --git a/src/impedance.h b/src/impedance.h index bc5c240..aa30a69 100644 --- a/src/impedance.h +++ b/src/impedance.h @@ -35,7 +35,7 @@ double PitchImpedanceMagnitude(const seastack::hydro::HydroData& data, double I_flap_kgm2); /// Complex-conjugate reactive control gains at ω₀. -/// K_r = −ω₀² · (I_flap + A₅₅(ω₀)) + K_hs,55 +/// K_r = ω₀² · (I_flap + A₅₅(ω₀)) − K_hs,55 (intrinsic pitch reactance to be cancelled) /// B_r = B_rad,55(ω₀) struct CCGains { double K_r; ///< Reactive stiffness [N·m/rad]