The angle observer always refer to a motor electrical angle,
while the speed observer can be applied to a motor electrical speed or a motor mechanical speed.
They can be used completely independently, so they should'n be coupled.
For example, a sensored motor controller in speed control mode doesn't need an angle estimator.
The libdsp uses M_PI_F and M_PI_2_F which are defined only in the NuttX
math library. Fix an compile error when CONFIG_LIBM is disabled and the
other math library is used.
since the user may use math library from toolchain directly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I67ccc4830403e3c15a84a8f9b1420d9a10894ddf
Improvements for STM32 PWM
arch/arm/src/stm32/stm32_pwm: fix polarity and IDLE state configuration for advanced timer PWM
include/dsp.h: raise error if math.h not present
Approved-by: GregoryN <gnutt@nuttx.org>
Master
* libdsp: initial commit
* libdsp: cosmetics
* stm32f334-disco/buckboost: use a PID controller from libdsp
* stm32_adc.h: fix typo
* stm32_dac.c: set OUTEN bit for DAC1CH2 and DAC2CH1
* stm32_hrtim: cosmetic changes
* power/motor: direction parameter is now int8 + add overload fault
* libdsp: all floats with f-sufix
libdsp: add precision option for library
libdsp: add debug option for library and assertions in functions
libdsp: add current samples correction for SVM3
libds: add some motor control specific functions
libdsp: add basic speed observer
libdsp: fix phase shift in SMO observer
libdsp: add more logic to FOC
config/sim/dsptest: add dsptest configuration
* libdsp/lib_motor.c: remove unused comparation
* libdsp/lib_observer.c: update some comments
Approved-by: GregoryN <gnutt@nuttx.org>