MCSDK 5.4.3/5.4.4. FOC ,Sometimes after encoder alignment ,motor run reverse。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-06-02 6: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.
- Labels:
-
STM32 Motor Control
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-19 8:38 AM
Hi
- Please try to google "initial rotor position alignment method", you could get much more ideas to do proper alignment for incremental encoder. Once you get some ideas, modify the enc_align_ctrl.c, the default ST MCSDK just does the alignment once. However, you could do the alignment again after 10~100ms delay to wait for rotor stable. If your problem still persists, consider to use BDLC with Hall-Effect Sensor, drive it by using 6-steps together with sinusoidal PWM. It would even be less cost concern compared with incremental encoder. The efficiency is not bad, pretty close to FOC but the torque ripple is not as good as the FOC.
- Also, you could utilize ST Motor Control Workbench, run the Monitor, try to plot and study some Motor runtime variables, for example, Iq and Id (you should modify the MCI_***)
- Use oscilloscope to monitor the Ia, Ib (measured by ADCs), dump these values via DAC or PWM (you have to use RC to do conversion), whether these values look like sinusoidal wave forms
- Make sure your 3.3V or 5V DC, pk-pk < 100mV or even lower when the motor is not running. LDO is a good choose but power dissipation is an issue if VBus voltage is higher than 12VDC. I recommend that use DC-DC step down. ST provides many switching IC for this kind of applications.
- Again, use RLC filter (band-pass filter) to screen 16KHz ripples from the VBus to your MCU and Encoder
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-09-14 12:35 AM
Dear CQi.1
Do you have still this problem to solve?
Best regards
Laurent Ca...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-09-25 2:45 AM
Hello Laurent Capella
I'm not CQi.1 but I'm having exactly the same problem. Very hard do debug because it happens so rarly. Any hints on where to start or how to resolve this Problem?
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-09-26 5:59 AM
Dear Laurent Ca...
The problem is still there,your team told me it's a bad encoder alignment, increase the alignment currents and time may solve the problem, actually it decrease the error rate, but not solved.
So i added a step to check the alignment, if motor runs reverse,I do encoder alignment again.
Best wishes!
Consen Qi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-09-28 12:07 AM
Dear @CQi.1 , dear @Pascal Klingelhöfer
I do not know if it will help, but according to our "STM32 Forum rules", could you detail your HW configuration (boards, and so on).
Best Regards
Laurent Ca...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-09-29 7:17 AM
Hello Laurent. @Laurent Ca...
I have the same issue and I contacted Japan local team already not yet have the answer
My hardware:
SPIN3201 board, a hub motor, 10 pairs, 340rpm max
start up config:
700ms, 90 degree, 1.95A as default,
use encoder solution, 1024 resolution.
it has about 3% chance that alignment failed in my case. when alignment failed, the speed is -456rpm.
what I can find is that:
when using encoder, the motor started with sensorless, so when I align it to 90 degree, the position the driver got is not that accurate. (maybe sometimes 700ms passed but it has not reach 90 degree, sometimes it just reached and 700ms passed and the rotor moved slight because of initia)
this struck me for about one month.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-14 8:38 AM
Dear @ypu
Did you received answer from ST japan local support team?
Best regards
Laurent Ca...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-14 8:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-14 8:42 PM
No...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-16 1:22 AM
Hi, there are possible solutions to fix your problem:
- The alignment current could be too small, try to increase the alignment current to motor nominal current. Increase even more close to maximum rated motor current if the motor is under heavy load. Besides, you could also fine tune the alignment duration, for example, 2000ms
- Depending on the quality of motor, some motor manufacturer could not align the motor properly in the factory, you could modify the FOC high frequency interrupt procedure
void ADC1_2_IRQHandler(void)
{
ADC1->SR &= ~(uint32_t) (ADC_FLAG_JEOC | ADC_FLAG_JSTRT);
qd_t Iqd, Vqd;
ab_t Iab;
SpeednPosFdbk_Handle_t *speedHandle = STC_GetSpeedSensor(pSTC[M1 ]);
int16_t hElAngle = SPD_GetElAngle(speedHandle) + m_eAngleAdjustment;
.
.
.
}
NOTE: the variable m_eAngleAdjustment is s16degree, you could try to fine tune the electrical angle between -30 to +30 degree which could adjust the encoder vs rotor magnet miss alignment angle.
Hope can you.
Best regards
