2020-06-02 06:27 PM
Hi!
I have an I-PMSM motor and interfaces an incremental encoder with A B ,without Z.
Sometimes after doing encoder alignment,the motor runs reverse to the max speed,and it will never recover until i do encoder alignment again。
I set the speed 30RPM,but when start ,the motor goes to -200+RPM.
Most time the motor runs well but sometimes the problem will happen.
(STM32 F303VCT6 ;PWM16000KHZ ;Main Sensor :Incremental Encoder2048 no Z-index)
I hope someone could help me figure out the problem.
Best wishes.
Solved! Go to Solution.
2020-10-16 01:59 AM
Hello
We increased the motor current and duration during alignment. This seems to help, although we couldn't completly eliminate the problem. But the problem seems to come from a misalignment during start-up.
Best regards
2020-10-18 05:40 AM
I did below and the issue does not happen till now.
1. change the duration from 700ms to 2000ms as ST recommended
2. change the current from 1.95A to 7.5A (half of rated current) as ST recommended
3. directly give a 2V on U-V, and record the position
4. adjust alignment electrical angle, make the rotor the same position as 3, the electrical angle is 60 degrees, then I use " alignment electrical angle = 60 degrees"
With only 1 and 2, the occurrence is lower but the issue still happens sometimes, with 3 and 4, the issue does not happen
Our supplier suggest us to use encoder for speed sensing and Hall sense for commutation, to permanently avoid this risk.
which is not supported originally in MotorControl Workbench, we would like the explore this option but we would like to know if there is any constraint on the STSPIN3201 hardware side?
regarding your reply 2, high frequency interrupt, I guess you mean high frequency injection?
high frequency injection is not supported in SPIN3201 board (or maybe does not supported in Workbench 5.4.4).
2020-10-19 02:20 AM
OK,
Regarding my suggestion 2, you could modify the mc_tasks.c,
/**
* @brief It executes the core of FOC drive that is the controllers for Iqd
* currents regulation. Reference frame transformations are carried out
* accordingly to the active speed sensor. It must be called periodically
* when new motor currents have been converted
* @param this related object of class CFOC.
* @retval int16_t It returns MC_NO_FAULTS if the FOC has been ended before
* next PWM Update event, MC_FOC_DURATION otherwise
*/
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) + m_eAngleAdjustment;
PWMC_GetPhaseCurrents(pwmcHandle[M1], &Iab);
.
.
}
Another suggestion to you, try to modify the enc_align_ctrl.c, make the alignment twice. The angle must be 90 degree applied to Iq (ST default setting)
Your case is pretty weird, have you checked very carefully about the 3.3VDC power source to MCU and the 5VDC power supply to the motor encoder?
The SVPWM produces (MOSFET switching on and off) noises causing the encoder output signals badly. Make sure you have band-pass filters (LCR networks) to screen 16KHz ripples when SVPWM is working. Also, check the encoder output signals whether are differential or TTL.
Finally, when kind of current sensing techniques you are using ICS or 3 R-SHUNT or 1-SHUNT, the power source 3.3VDC to the Op-Amp is crucial. The FOC algorithm runs "crazy" because of bad current sensing feedback.
Honestly speaking, the ST FOC, so far is pretty stable but you have to do some customizations in order suite your working conditions.
Cheers
2020-10-19 02:43 AM
try to modify the enc_align_ctrl.c, make the alignment twice. The angle must be 90 degree applied to Iq (ST default setting)
have you checked very carefully about the 3.3VDC power source to MCU and the 5VDC power supply to the motor encoder?
The FOC algorithm runs "crazy" because of bad current sensing feedback.
could explain a little bit more how your suggestion solve the problem when "some motor manufacturer could not align the motor properly"?
2020-10-19 08:38 AM
Hi
Cheers
2021-03-22 07:21 PM
we have finally solved this, we summarized two ways:
we finally used 2nd way and it is working fine now.
2021-03-30 04:16 AM
Hi @ypu ,
I want to try second way, please explain configuration and Connection (like main & auxiliary) of the sensors.
2023-04-12 05:57 AM
I am trying to work around this issue by removing the alignment process ,calculating the initial angle required by FOC from the hall sensors. It is working for few angles only. Has anyone tried this yet? Or succeeded to bypass the alignment error issue??
2024-06-24 11:30 PM
why 16kHz ripple?
2024-08-01 04:59 AM
Hey,
I am trying to do this exact thing. Have you found any algorithm/solution to this? I need to avoid startup motor running to find index, instead i want to estimate some initial angle and then correct it while i receive index, that will be in one electrical cycle but i want motor to be ready on startup and foc should be working.