2020-06-09 09:16 AM
Dear,
I know that ST Motor control library does not support Absolute encoder, so I am trying with some difficulties to do it, I connected my motor with HALL sensor and also connected my absolute encoder with SPI, I can read the abs position without any problem, so my goal now is to replace the HALL reading sensor functions by my absolute encoder value functions.
If I understood well there are position in s16degree and speed in DDP units, and the angle used in FOC calculation is an electrical angle which is Nbr of pole paires x Mechanical angle.
so the Mechanical angle in s16degree can go from -32767 to 32767 however inside the library in FOC function :
inline uint16_t FOC_CurrControllerM1(void)
{
qd_t Iqd, Vqd;
ab_t Iab;
alphabeta_t Ialphabeta, Valphabeta;
int16_t hElAngle;
uint16_t hCodeError;
SpeednPosFdbk_Handle_t *speedHandle;
speedHandle = STC_GetSpeedSensor(pSTC[M1]);
hElAngle = SPD_GetElAngle(speedHandle);
PWMC_GetPhaseCurrents(pwmcHandle[M1], &Iab);
Ialphabeta = MCM_Clarke(Iab);
hEIAngle is defined as int16_t also how this is possible since ElAngle is at least 2 times Mechanical angle ?
Regards
2020-09-22 07:22 AM
@JEsca.1 I am also trying to integrate an absolute encoder as you have described , were you able to get the any answer for this question?
2020-10-09 05:43 AM
Hi I never got answer about that question
2021-06-28 02:59 AM
The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK).
Best regards