Expand description
Bit-exact Q8.24 controllers. Coefficients are held stable until reset. Products accumulate in i128; division floors negative fractional values. These kernels do not establish physical timing or controller stability. The library uses only core arithmetic and requires neither an allocator nor an OS.
Structs§
- Coefficients
- C-layout signed Q8.24 coefficients and output/integral bounds.
- Command
- C-layout cycle-tagged command plus the observable PID state and clipping decisions.
- Invalid
Coefficients - Refused coefficient range; kernels return before changing any state.
- PidState
- C-layout PID memory, with reset marking the next measurement as the derivative origin.
Functions§
- lqr_
step - Apply full-state discrete LQR and a reference prefilter, then saturate output.