![]() |
miniFOC 1.0.3
This open-source project aims to accomplish a FOC(Field Oriented Control) scheme that is operatable with minimum costs in China.
|
this is the header file of fast_math.c, the macros of fast amplitude limiting algorithm and cosine function evaluation algorithm are defined. More...
Go to the source code of this file.
Macros | |
#define | fast_constrain(x, low, high) ((x)<(low)?(low):((x) >(high)?(high):(x))) |
fast clipping algorithm More... | |
#define | fast_cos(x) fast_sin(1.5707963f - x); |
fast calculation of cosine More... | |
Functions | |
float | fast_sin (float theta) |
fast calculation of sine More... | |
this is the header file of fast_math.c, the macros of fast amplitude limiting algorithm and cosine function evaluation algorithm are defined.
Definition in file fast_math.h.
#define fast_constrain | ( | x, | |
low, | |||
high | |||
) | ((x)<(low)?(low):((x) >(high)?(high):(x))) |
fast clipping algorithm
[in] | x | number of to be clipped |
[in] | low | minimum number |
[in] | high | maximum number |
input | value after clipping |
Definition at line 20 of file fast_math.h.
#define fast_cos | ( | x | ) | fast_sin(1.5707963f - x); |
fast calculation of cosine
[in] | x | angle to be calculated |
cosine | value of angle theta |
Definition at line 27 of file fast_math.h.
float fast_sin | ( | float | theta | ) |
fast calculation of sine
[in] | theta | angle to be calculated |
sine | value of angle theta |
Definition at line 72 of file fast_math.c.
References sin_tab.
Referenced by foc_calculate_dutycycle().