Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/CONTROLLERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(ω₀)
```

Expand Down
2 changes: 1 addition & 1 deletion src/active_pto.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 · ω
// =============================================================================
Expand Down
4 changes: 3 additions & 1 deletion src/impedance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/impedance.h
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down