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.

HV Motor Control and PFC Developer's Kit - Position Control

Other Parts Discussed in Thread: CONTROLSUITE, TXB0106, DRV8301

Hi,

I am trying to run the "HVPM_Sensored_Servo" example that came with High Voltage Motor Control and PFC Developer's Kit ( TMDSHVMTRPFCKIT ).

When I run the project in build level 5, the motor "tries" to get to the positions listed in posArray, but is very unstable. After roughly pausing at 2-3 positions, it becomes very unstable and begins to vibrate and eventually stop. Then I need to reset the controller to make it work again.

Do I need to change any parameters or PI loop gains? If so, any recommended values to start with will be very helpful. I am using the motor that came with the kit (ESTUN EMJ-04APB22).

Thanks,
Tamil

  • Hi Tamil,

    We have not seen this behaviour. Did the speed loop work fine in build 4? The only additional loop in build 5 is the position loop. Are you testing the motor standalone or connected to some load?

    The PI values are all tuned up to get it working properly. If you want to tune them, try to use lower values of Kp and Ki.

    Best regards,

    Ramesh

  • Thanks for your reply Ramesh.

    Unfortunately, I am not able to recreate the condition in my previous post now.

    I started with the example project that came with controlSUITE. I change the motor parameter settings for the Estun motor and followed the instructions that came with the Application Note.

    I am stuck in build 4. Things go fine in the current loop. The response to speed commands is good. But when I try to close the speed loop, the motor comes to a stop after 1-2 seconds of erratic motion. The LD1 and LD2 on the motor controller board and LD3 on the control card start to blink. I then have to reset the controller and restart debugging, running into this same condition again.

    I am running the motor standalone without any load and with the default PI values that the project came with.

  • have you double checked all the HW / jumper settings?

    what power source are you using? what is your bus voltage?

  • Yes, I verified my HW setting once again.

    I am powering the setup from a 110V AC wall outlet. I measured the DC bus voltage to be 172.6V.

  • Hi Tamil,

    I have a suspicion that the sense of rotation of motor and that of the encoder are opposite. Can you swap any two phase connections to the motor and test?

    Best regards,

    ramesh

     

  • I tried swapping the phase connections, but now the speed measured (speed1.Speed in the Expressions windows) is negative. So I guess I had it right initially.

    -Tamil

  • I tried to run the motor in sensorless FOC mode, using the GUI "HVMTRPFCKIT-PM-ACI-GUI". The motor would run fine till 600RPM. But if the reference speed is increased further, the motor falls out of the control loop, spins extremely fast, faults and stops. I then tried to run the motor in Trapezoidal more using the GUI "HVMTRPFCKIT-BLDC-GUI". The motor behaved as expected and could operate properly in its entire speed range, up to the rated 3000RPM. This makes me wonder if there is any bug in the FOC code that ships with the kit or if there are any other limitations in the FOC mode.

    Going back to my original problem, when I try to run the "HVPM_Sensored_Servo" with all default values, I still cannot successfully switch to the speed loop. Here are the values from the watch window, which I think might help. I am particularly skeptical about the value of Kp in the pi_spd, since it seems to be at its maximum limit. I did have some success in closing the speed loop for very low values of Kp and Ki in pi_spd, but that worked only at certain low speed ranges.

    EnableFlag    unsigned int    1    0x00009345@Data    
    lsw    unsigned int    2    0x0000934A@Data    
    IsrTicker    unsigned long    961469    0x00009370@Data    
    SpeedRef    long    5033165    0x0000936C@Data    
    IdRef    long    0    0x00009356@Data    
    IqRef    long    2516582    0x0000936E@Data    
    speed1.Speed    long    -2552    0x0000946A@Data    
    pi_id    struct PI_CONTROLLER    {...}    0x00009496@Data    
        Ref    long    0    0x00009496@Data    
        Fbk    long    -38460    0x00009498@Data    
        Out    long    3527188    0x0000949A@Data    
        Kp    long    5033165    0x0000949C@Data    
        Ki    long    50331    0x0000949E@Data    
        Umax    long    5033165    0x000094A0@Data    
        Umin    long    -5033165    0x000094A2@Data    
        up    long    6044    0x000094A4@Data    
        ui    long    11775385    0x000094A6@Data    
        v1    long    3543766    0x000094A8@Data    
        i1    long    11779881    0x000094AA@Data    
        w1    long    16777216    0x000094AC@Data    
    pi_iq    struct PI_CONTROLLER    {...}    0x000094D8@Data    
        Ref    long    16777216    0x000094D8@Data    
        Fbk    long    -4102    0x000094DA@Data    
        Out    long    15938355    0x000094DC@Data    
        Kp    long    5033165    0x000094DE@Data    
        Ki    long    50331    0x000094E0@Data    
        Umax    long    15938355    0x000094E2@Data    
        Umin    long    -15938355    0x000094E4@Data    
        up    long    16790134    0x000094E6@Data    
        ui    long    36413943    0x000094E8@Data    
        v1    long    15950213    0x000094EA@Data    
        i1    long    36413943    0x000094EC@Data    
        w1    long    16777216    0x000094EE@Data    
    pi_spd    struct PI_CONTROLLER    {...}    0x000094C0@Data    
        Ref    long    5032839    0x000094C0@Data    
        Fbk    long    -2552    0x000094C2@Data    
        Out    long    16777216    0x000094C4@Data    
        Kp    long    16777216    0x000094C6@Data    
        Ki    long    83886    0x000094C8@Data    
        Umax    long    16777216    0x000094CA@Data    
        Umin    long    -16777216    0x000094CC@Data    
        up    long    5035391    0x000094CE@Data    
        ui    long    11746117    0x000094D0@Data    
        v1    long    16781508    0x000094D2@Data    
        i1    long    11746117    0x000094D4@Data    
        w1    long    16777216    0x000094D6@Data    
    rg1.Out    long    13767325    0x000093B6@Data    
    qep1    struct QEP    {...}    0x00009452@Data    
        ElecTheta    long    12990464    0x00009452@Data    
        MechTheta    long    15830528    0x00009454@Data    
        DirectionQep    unsigned int    0    0x00009456@Data    
        QepPeriod    unsigned int    0    0x00009457@Data    
        QepCountIndex    unsigned long    1    0x00009458@Data    
        RawTheta    long    9436    0x0000945A@Data    
        MechScaler    unsigned long    107374    0x0000945C@Data    
        LineEncoder    unsigned int    2500    0x0000945E@Data    
        PolePairs    unsigned int    4    0x0000945F@Data    
        CalibratedAngle    long    780    0x00009460@Data    
        IndexSyncFlag    unsigned int    240    0x00009462@Data    
    clarke1    struct CLARKE    {...}    0x0000939A@Data    
        As    long    21024    0x0000939A@Data    
        Bs    long    6598    0x0000939C@Data    
        Cs    long    0    0x0000939E@Data    
        Alpha    long    29216    0x000093A0@Data    
        Beta    long    5567    0x000093A2@Data    

  • Hi Tamil,

    Build level 4 is where you start using QEP outputs to compute speed. Did you you check QEP signals coming into the CPU. Pls check them on the A side of U4 (level translator TXB0106). My guess is that this device is not reproducing the signal right. Let me know what you see and we go from there.

    Best rgds,

    ramesh

  • Hi Ramesh,

    You are right. The signals are fine on the B side of TXB0106, but are erratic on the A side. I think that is causing all the trouble. I have ordered a new chip for replacement and hopefully that will fix the issue.

    Thanks,
    Tamil

  • Hi Tamizh,

    Happy that the problem is identified. Even after replacing the device if you still find same problem, then I recommend that you use a resistor divider to scale the QEP signals to 3.3V.

    Hope you can speed up your test now.

    Best regards,

    ramesh

  • Hi Ramesh,

    Replacing the device or using resistor divider did not fix the problem. There seemed to be something wrong with the grounding, which would induce a common mode voltage in the encoder signals. 

    I finally got a new replacement board for the kit. But unfortunately, the problem I first described still exists. 

    "I am stuck in build 4. Things go fine in the current loop. The response to speed commands is good. But when I try to close the speed loop, the motor comes to a stop after 1-2 seconds of erratic motion. The LD1 and LD2 on the motor controller board and LD3 on the control card start to blink. I then have to reset the controller and restart debugging, running into this same condition again."

    I did check my encoder signals and they seemed perfect on both sides of TXB0106. The speed is properly sensed by the QEP module, which is reflected in the "speed1.Speed" value. I am still doubtful about the PI values the project shipped with. Will it be possible for you to share the values here? Or do you recommend any other troubleshooting step?

    I would really appreciate your help.

    Thanks,
    Tamil

  • Hi Tamil,

    The PI values are tuned for Estun motor (200V). If you are using a different  motor, then you need different values of PI. If your speed feedback is reliable, then set Ki to zero and use lower Kp values and gradually increase. It should not collapse. Once you see the motor running fine, you can give small values of Ki and test.

    rgds,

    ramesh

  • HI Ramesh,

    I reduced the bus voltage to around 50V and everything works fine now, using the default values. I could also build level 5 and it worked perfectly. Thanks for your help.

    But I am still curious as to why the system was unstable at higher bus voltage, around 150V. If I would want the system to work properly at a different bus voltage, which tuning parameter do you think is the key?

    Thanks,
    Tamil

  • I am working with the HVKIT, and I want to use a 120V BLDC, .5HP motor.  How do I reduce the DC bus voltage from 170 to 120 when I'm using the on-board rectified AC?

    Thanks in Advance,

    -Mark

     

  • Mark,

    The board does not have any controlled rectifier action. You can feed in 120V dc from external source or use a variac to feed the board.

    rgds,

    ramesh

  • Hi Tamil,

    Looks like I missed your query. If you see instability at high bus voltage, it may be due to the current loop gains being high. Reduce them by a factor of 5 and see how it goes.

    rgds,

    ramesh

  • Thanks Ramesh!!

    Got the variac in the lab...

    -Mark

     

     

  • 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..
  • Check the QEP signals going into the MCU, may be you have some issue there.

    rgds,

    ramesh

  • Thanks Ramesh.. I checked the signal and now its fine.I'm getting electrical theta as a sawtooth wave.But still the motor halts at lsw = 2 and current shoots up.The period of electrical theta is 60 samples while rg1.out is 50 samples.How I will make both the period same? Motor halting is because my speed loop gains are not proper?
  • Did you enter the number of QEP pulses per rotation? You need to normalise the angle to _IQ(1.0) based on this, so that rg1.Out and qep1.ElecTheta will represent same angle.

     

    rgds,

    ramesh

  • Yes I entered QEP pulse per rotation of single channel.My electrical theta and rg1.out waveform have same amplitude.Only period varies.Whenever I changed the reference speed still both waveform's period  differs by constant offset.

  • Nikhil,

    May be it has something to do with the number of pole pairs of the motor.

    rgds,

    ramesh

  • Thanks Ramesh, No of poles that I gave was wrong. Now I'm able to get same period. All the waveforms are correct when lsw = 1.But still motor is halting when I switches from lsw = 1 to lsw =2.Sometimes motor starts to rotate in opposite direction and then stops.
  • If the given instructions are followed, it should work fine. For this behaviour, my understanding is that rg1.out and qep1.electheta are not aligned properly before changing lsw.

    rgds,

    ramesh

     

  • That was some mechanical issue.My encoder and motor was not properly aligned. After tuning the gains level 4 is fine. Thanks Ramesh..