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.

How to tune qep.ElecTheta period

Other Parts Discussed in Thread: CONTROLSUITE, DRV8301

 Hi,

    I used HVMotorCtrl+Pfc Kit and  HVPM_Sensored sample code .  The qep1.ElecTheta period wasn't the same as rg1.out .

   How can I tune eQEP to make qep1.ElecTheta period the same as rg1.out ???

Regards,

Jimmy 

 Yellow : rg1.out  red:qep1.ElecTheta

  • 8311.Sensored FOC of PMSM.pdfHi Jimmy,

    Referring to the documentation that comes with the Sensored PMSM FOC (C:\TI\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v1.6\HVPM_Sensored\~Docs\ Sensored FOC of PMSM.pdf), see page 29 for the section "Level 3B - QEP/SPEED_FR test":

    Qep1.ElecTheta should be slightly lagging rg1.out, if the calibration angle needs to be adjusted due to the angle offset between index and locked rotor position.

    Bring the system to a safe stop as described at the end of build 1 by reducing the bus voltage, taking the controller out of realtime mode and reset.

    Next, the following steps are to verify and or perform calibration angle of the encoder. The steps are as follows:

    • Make sure EQep1Regs.QPOSCNT, EQep1Regs.QPOSILAT, Init_IFlag, qep1.CalibratedAngle, and lsw are displayed in watch window.
    • Set SpeedRef to 0.3 pu (or another suitable value if the base speed is different).
    • Compile/load/run program with real time mode and then increase voltage at variac / dc power supply to get the appropriate DC-bus voltage.
    • Now the rotor should be locked. Set lsw to 1 to spin the motor. When the first index signal is detected by QEP, the EQep1Regs.QPOSILAT register latches the angle offset in between initial rotor position and encoder index in the code. Later, EQep1Regs.QPOSILAT is set to maximum of EQep1Regs.QPOSCNT as it latches the counter value for each index signal. In the code qep1.CalibratedAngle keeps the initial offset value. This value can be recorded to initialize qep1.CalibratedAngle at the initialization section in HVPM_Sensored.c or it can be detected in the code each time the motor is restarted. The calibration angle might be different for different start-ups and can be formulated as follows:

    Calibration Angle = Offset Angle ± n . Line Encoder

    • In the next section fine tune the detected calibration angle until minimum power is drawn under certain speed-load conditions for precise field orientation.

    Jeff

  •  

    adjust it ,then the qep.ElecTheta period are the same as rg1.out .

     

    Regards,

    Jimmy  

  • Hi,

    Whats the best method of changing calibration angle.

    thx

  • hi, Iam using HVPM_Sensored_Servo code with DRV8301 HC EVM REV d kit.I got stuck in level 4 that Iam not getting qep1.Electheta as sawtooth.But rg1.out is perfect sawtooth.So when I switch from lsw=1 to lsw =2 motor just stalls and current shootsup.Any idea why this is happening?Pls help me..