FOC Math Library

Set of Math Functions

FOC requires a number of mathematical functions to process vectors and to handle the raw signals coming from the motor power board.

The following list includes the main functions:

  • LPF: first- or second-order on-the-fly programmable low-pass filter. This is a simple IIR (infinite impulse response) digital filter.
  • Clarke transform: used to convert the measured three-phase currents and voltages into a two-phase system.
  • Park transform (and inverse): used to rotate vectors, mainly for converting quantities between the rotor and stator reference frames.
  • SIN/COS: sine and cosine functions.
  • ATAN2: arctangent function.
  • RecToPol: rectangular-to-polar coordinate conversion.