This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Magnetic encoder Control for Instaspin



Hi there,

I got an iPower PMSM motor with a magnetic encoder. The encoder offers 1KHz PWM output for angle indication with a resolution of 0.09 degree(360/2^12).

Currently, I have turned the angle from encoder into electrical angle. But when I tried to use the converted electrical angle as an FOC input in CTRL_runOnLine_User() function, the motor did not move. 

I am not sure if it is possible to implement Instaspin FOC control with a 1KHz angle input. Now for my board, the minimum frequency of ctrl and estimator is aroud 5KHz limited by USER_VOLTAGE_FILTER_POLE_Hz. 

According to SPRUHJ1F file, USER_VOLTAGE_FILTER_POLE_Hz is decided by hardware. Should I change the related resistor to reduce Ctrl and Estimator frequency to 1KHz?

In other words, is it possible to use 1KHz magnetic encoder angle input to drive motor rotate in Instaspin FOC? 

If yes, Would you like to give me a general list of what I should do in steps? 

I will continue my debug. I will be appreciate if anyone can give me any clues, or point out my problem. 

BTW, my final goal is to use the 1KHz magnetic encoder to substitute QEP module in InstaspinMotion. Now I'm trying the encoder in InstaspinFOC(proj_lab05b) for a first-step test.

Best Regards

angelforest

  • you are only getting an electrical angle update every 1 KHz? this certainly limits the current controller rate, which will limit the maximum frequency of the motor you can control and reduce the effectiveness of your FOC control.

    with the encoder you aren't using the estimator, so you shouldn't care about the limitations of the sample rate. you also shouldn't care about any effects of the voltage filter (which are just for the estimator).

    I would move to the sensored MOTION labs proj_lab12 and start from there, replacing the QEP electrical angle generation with your own.
  • Hi Chris,

    Thank you very much for your reply. I will try on proj_lab12. Thanks.

    Best Regards

    angelforest