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.

PMSM Electrical Alignment

Hi,

I’m experimenting with using RsRecalc to electrically align the motor when using an incremental encoder and QEP module.    During RsRecalc the motor is biased with positive current into phase U and ½ negative current out of phases V & W.   This causes the motor to align with the U coil.   This works fine.

I would like the ability to align with the V & W coils.    This means during alignment being able to force current in the V, or force current in W.

What determines that RSRecalc biases the coils with U positive, V and W negative?   Is this fixed?

Writing my own alignment routines, within the FOC and space vector control what’s needed to force different alignments?

Thanks for the help.

  • No special consideration, just for easily to implement the offset calibration to use the encoder. Often, the transformation from the 3-phase 120 degree reference frame to the two axis orthogonal reference frame is used the U-phase as stationary d-axis.
    You can align to any position, but you need to set the related initial angle for the rotor if you use U-phase as stationary d-axis.
  • Hi Yanming,

    Does Instaspin use the U-phase as the stationary d-axis?   Where can this be seen in the control code?

    If aligning to a different position, how would you set the related initial angle?

    After RsReCalibration U-phase alignment the electrical angle when U-phase is aligned is zero.   But skipping RsReCalibration and manually feeding angles to the FOC, an electrical angle of 0 aligns the V-phase, 0.33 aligns the W-phase, and 0.66 aligns the U-phase.   The angle is forced (for testing) by setting “angle_pu” in FOC call:

            // compute the sin/cos phasor

            CTRL_computePhasor(angle_pu,&phasor);

    Why after RsRecalibration alignment is U-phase electrical zero, but skipping RsRecalibration and setting the angle directly is the U-phase alignment electrical 0.66?

  • I'm still struggling with this and hoping for some help.

    Let me refine my problem/question.

    After a RsReCalibration an electrical angle of 0 degrees is U-phase alignment.  

    But if I skip InstaSpin's RsRecalibration for alignment and force angles in the FOC (using angle_pu as mentioned above) the U-phase aligns when the electrical angle is ~75 degrees.  

    How in user code can I force U-phase alignment and have it be electrically 0 degrees?   Because if I don't run RsReCalibration, I need to set an angle of 75 degrees for U-phase alignment, and I don't understand where this angle comes from.

    Thanks 

  • The method is simply for InstaSPIN-motion to use RsRecalibration to implement alignment, don't need to add more other codes, but you can use other mode to align the rotor and need to set a initialized angle based on the alignment. The rotor position will be randomly if you didn't do the alignment, but the rotor will be forced to correct position if you set the initial angle to incorrect value and used sensorless InstaSPIN-FOC. You have to do alignment for encoder offset calibration if you used incremental encoder sensored InstaSPIN-motion.
  • I was asking because I do need to do my own alignment and do need to align to different phases.   RsReCalibration always aligns to the U-phase.

    I was able to solve the problem as follows:

    After RsReCalibration using the debugger I was able to see that in the Park and iPark transforms that cosine theta is initialized to 1, and sine theta is initialized to 0.   When forcing Id current at electrical angle zero this aligns the U-phase.   So RsReCalibration (somewhere) initializes these cosine theta and sine theta values.

    As I need to do aligning without RsRecalibration, the theta angles must be initialized (cosine 1, sine 0).    Then U-phase alignment is always at electrical 0, V-phase alignment electrical 0.33, and W-Phase alignment electrical 0.66.

    Thanks.