2021-07-16 12:29 PM
In the FOC motor code the average mechanical motor speed is returned by procedure SPD_GetAvrgMecSpeedUnit which simply returns a value pointed at. I'd like to know the details of how the average is done and over what period of time and what sample rate. I believe it may be using a define STO_FIFO_DEPTH_UNIT from drive_parameters.h but am not sure of this.
Any documentation or discussion of this would be helpful to my project.
Thanks,
Brian
2021-08-02 09:48 PM
Dear @BTrem.1
According to the source code of the function STO_PLL_CalcAvrgMecSpeedUnit this is a very classic averaging (ie: sum of measures / number of measures).
I think that yes indeed this function uses STO_FIFO_DEPTH_UNIT, which seems to be equal to STO_FIFO_DEPTH_01HZ, which is set to 64 (see docs/data_set_reference.txt).
Please check "Best answer" if this answers to your question.
Best regards