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.

Having problem with motor control DSP code

Other Parts Discussed in Thread: CONTROLSUITE

Hi ,

I am using F28335 along with code composer studio 5. I am using the example code which are in the control suit. Now i am working with three phase PM motor control software. I have couple of question regarding the DSP code for the motor control.

I saw something in speed control block that is "SpeedLoopPrescaler=10". What is it the meaning of SpeedLoopPrescaler?

The reason i am asking that, when i increase the speed reference upto 1800 rpm, the speed control block does not works. It gives some error like the output of the Speed PI controller stops giving output. Also the error message shows that "GEL expression error". Does anyone have any idea why the Speed PI controller stops working during high speed? Also what is the meaning of  SpeedLoopPrescaler?

Thanks

Arafat

  • Hello Arafat,

    As I know, SpeedLoopPrescaler is used to decreased/increased the time to call the speed control in speed loop.

    Did you already tune your motor? Did you follow the incremental build level step by step? In which level this error occurs?

    In level 6, when you try lsw=0,  lsw=1, and lsw=2, is there any difference?

    Best regards,

    Maria

  • Hello Maria,

    Thanks for your replying. I am running the machine at level 4. I followed the incremental build level. When close the speed loop after some time the program stops working. It hanged my computer giving error "regarding the emulator". when i change lsw=1 to lsw=2, the line current reduces most. In level 4 i am running the machine as sensored FOC of PM machine.

    Arafat

  • Hello Arafat,

    1. What ControlSuite project that you use?

    Is it this one C:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.1\HVPM_Sensored ?

    Or this one C:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.1\HVPM_Sensorless_2833x? or else?

    2. Back to Build level 3, when lsw=0, is it OK? Make sure the graphs are in good shapes (just like in the documentation).

    3. And then still in Build level 3, when lsw=1, is it still OK? You should follow the documentation carefully to pass the level 3 before continuing to level 4.

    4. And also are you using custom board or board from TI?

    Best regards,

    Maria

  • Hello Maria,

    I am using "C:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.1\HVPM_Sensorless_2833x" but i have modified it to sensored operation(as per the document)

    I am using customized interface board not from TI. The processor is from TI.

    Rest of the answer i will give you after i check.

    Thank you.

    Arafat

  • Dear Maria,

    Now I can run the machine. Previous problem has been solved. Now i face other problem. When i put Lsw=1 and run the machine at rated speed(1800 rpm) i do not see any problem. But when i put Lsw=2 and get encoder information, i could run the machine at 1260 rpm without any problem. But, if i increase the speed more than that, the machine started make some noise and also vibrating. I do not understand why at higher speed the machine is behaving like that. please give me suggestion.

    Thanks

  • Also i see that, at higher speed the motor currents are not sinosoidal. It is distorted.

  • Hello Arafat,

    Sorry for late reply. I am not sure what is going on.

    Did you check the speed feedback from your encoder on debugger for this higher speed? Is it giving the correct speed (or approximately correct)?

    Best regards,

    Maria

  • Hi Maria, I checked the speed feedback. It seems ok.

    Arafat

  • In which build level you observe?

    Did you pass Build level 4?

    Can you check the shape of your smo1.Theta on Build level 4? It should be like sawtooth shape, just like mentioned in the document "If  smo1.Theta  does  not  give  the  sawtooth  waveform,  the  Kslide  and  Kslf  inside  the  sliding  mode
    observer are required to be re-tuned."

    So make sure that you get this shape (if possible, please give the screenshot of your graph).

    Best regards,

    Maria

  • Hi Maria,

    I am running at build level 4 of the sensored version. I am using encoder. I can give you the qep.electricaltheta output. As i said, i can run the machine smoothly when lsw=1. But when i put lsw=2, the machine runs fine up to 1260 rpm. After that, it started vibration and also it does not run smoothly. I shall give you the encoder results.

    Thanks.

    Arafat

     

  • Hello Maria, I have checked the encoder output. It is giving sawtooth. Do you have any suggestion?

    Arafat

  • A K M Arafat said:
    I am using "C:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.1\HVPM_Sensorless_2833x" but i have modified it to sensored operation(as per the document)

    Hello Arafat,

    How did actually you modify the sensorless code to become sensored?

    And which build level that you use?

    My suggestion now is to re-tune you PID setting.

    Also to make sure, did you do this?

    Run the system with default VdTesting, VqTesting and SpeedRef and gradually increase VdTesting and
    VqTesting values. Meanwhile, watch the current waveforms in the graph window. Keep increasing until
    you notice distorted current waveforms and write down the maximum allowed VdTesting and VqTesting
    values.  Make sure that these values  are consistent  with  expected d-q current component maximums
    while  running  the  motor.  After  this  build  level,  PI  outputs  will  automatically  generate  the  voltage
    reference  and  determine  the  PWM  duty  cycle  depending  on  the  d-q  current  demand,  therefore  set
    pi_id.Umax/min   and   pi_iq.Umax/min   according   to   recorded   VdTesting   and   VqTesting   values
    respectively.


    Now I am referring to sensored code: controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.1\HVPM_Sensored

    that I think it is the one that you should refer to.

    Previously I referred to Sensorless code (missed that you have changed it into Sensored).

    Best regards,

    Maria