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.

TMS320F28069F: Current waveform becoming signficantly distorted and higher RPMs

Part Number: TMS320F28069F
Other Parts Discussed in Thread: DRV8301, DRV8305-Q1EVM, DRV8305, DRV8301-69M-KIT, MOTORWARE

Hi,

I am running a 42 pole (21 pairs) relatively low inductance motor on some custom hardware.  My PWM frequency is currently 30KHz.  Shown below are a couple of current plots.  The top trace in each plot window is the current in one of the phases, as measured with a current meter.  The lower trace is the output of one of my positively phased current sensor (it is not on the same as the current meter).  As you can see at 1800RPM things look quite good, but at 2300RPM the current waveform degrades seriously.  At the higher voltages and RPM it is so bad the motor does not work.  What would you suggest.  I tried to bump my PWM frequency up to 45KHz but the system would not run for some reason - there did not seem to be any error listed.  In any case I need to know what you think the issue is and how best to proceed.  If it I do need to increase the PWM frequency above 30KHz, do you have some written instructions that tell me what else I need to change besides just the PWM frequency #define?  I am running on a 90MHz TMS320F28069F.  Thanks.

1800RPM

2300RPM

  • It seems the ISR is time overflow, so you can set the "#defineUSER_PWM_FREQ_kHz (45.0)" and "#define USER_NUM_PWM_TICKS_PER_ISR_TICK (2) or (3)" in user.h for high pwm frequency.
    Btw, please check the phase voltage filter pole is reasonable for the high frequency motor, and current/voltage sampling signal is good without disturbing noise.
  • Changing the tick count to 2 allowed me to run at 45KHz.  However the motor still does not behave well at the high rpms.  Here is what I have

    42 Pole (21 pairs)  motor at 4000RPM => 1400Hz.

    Voltage filter pole is at 1520Hz.   USER_IQ_FULL_SCALE_FREQ_Hz  is set to 1600.0.

    I am running the code from lab 3 with overmodulation set to 0.666666

    I changed the PWM frequency to 45KHz and decimated it by 2.  As you can see from the 2300RPM plot below the current waveform seems much better at that speed.  The second plot shows the voltage waveform, which seems to be as expected as well.  Despite the improvement, at higher RPMs the motor starts slowing down and drawing a very large amount of current.  I increased my PWM to 60 and my decimation to 3, but it didn't work.  Do I need to change the control decimation as well?  What would you suggest I do next?

    Current waveforms at 2300RPM/45KHz (notice how much better than previously).  Top trace = current in motor phase wire, bottom trace signal going in to ADC (different phases).

    Voltage into ADC, 2300RPM

  • 1. Increase the voltage sampling filter capacitor for setting the voltage filter pole to 300~600Hz.
    2. Decrease the Kp and Ki for speed.
    3. Add a RC filter for both current and voltage ADC input (R=30~100-Ohm, C=1nF~3.3nF) if it's possible, and place them near the ADC input pin.
  • Hi Yanming,

    1) My maximum RPM is 4000 which, with 21 pole pairs, gives me a frequency of about 1400Hz.  The documentation says my voltage filter pole should be set higher than that so I set it to 1520Hz.  Is it safe to bring it down that low?

    2) I have already done this

    3) I will see what I can do in this regard.

    If you could tell me your thoughts regarding #1 that would be helpful.  Also, does the fact that 45KHz worked better than 30KHz indicate the issue is firmware, or could it still be hardware?

    Regards,

    Tim

  • Yanming,

    I moved my voltage pole from 1520Hz to 471Hz and changed my user.h file to  read:

    #define USER_VOLTAGE_FILTER_POLE_Hz  (471)

    My capacitors for the voltage filter are right at the uP pins as outlined in your docs.  My current sense does not have any caps at the pins, but appears clean. Everything ran fine but at the higher speeds the system lost sync and went nuts and blew one of my pre drivers.

    I am at a loss as to what to do.  Could you please tell me how to proceed?  I am ready to throw in the towel and look for another solution for my motor.

    Regards,

    Tim

  • Hi Tim,

    Typical values for USER_VOLTAGE_FILTER_POLE_Hz and IQ_FULLSCALE_FREQUENCY_Hz are that 1. USER_VOLTAGE_FILTER_POLE_Hz between 300 Hz and 600 Hz, and IQ_FULLSCALE_FREQUENCY_Hz is less than 4.0*USER_VOLTAGE_FILTER_POLE_Hz. So the (471) is ok for your motor.

    1. What's the rated voltage and current of motor? Can you try to run it on LunchPad_F28069F+DRV8301 using 45KHz pwm frequency, and set USER_NUM_PWM_TICKS_PER_ISR_TICK to 3.
    2. Change the USER_SPEED_POLE_rps from (100.0) to (300.0) since the motor need to run high speed with close loop.
    3. Set more smaller Ki for high speed, and disable the OVM.

    What's your application? What's speed response for high speed?
  • Hi Yanming,

    Thanks for the quick reply. We are driving the motor off of lithium batteries at 12S so the absolute max voltage is about 50V and the nominal voltage is more like 44V. Motor drive current should be 15A or so at top speed ~3700RPM (42 poles). Obviously current will spike if we accelerate fast but for testing I don't need to accelerate quickly.

    I have a DRV8305-Q1EVM. It doesn't have the same processor, but if I can at least prove the FOC stuff that would be a great start. It is rated for 45V. Do you think it can handle the 50Max volts? At this point I am willing to risk things if you think it has potential of working. Should I give that a try? If so could you let me know how to set the parameters to optimize performance on that hardware?

    Thanks,
    Tim

  • If necessary I can run at 11S (46.2V max) for proof of concept, and if that is still to high I could go to 10S(42Vmax) but that is a bit low to prove it can work at top speed.
  • 11S or 12s is too high for DRV8305 which the maximum voltage is 45V. Did you have DRV8301-69M-KIT which can support your requirements? If yes, you can try something first for your motor, and then to optimize the hardware. The instaSPIN-FOC with a good hardware board could run the motor to 1400Hz, it had such success applications on drone before.
  • I dug through my stuff and I do have a 69M-KIT!! Any advice before I try and use it? Can I just step through the labs? Do I need to change any parameters for my particular motor and speed (target speed is around 1400Hz).
  • Yanming,

    I set up the DRV8301 REVD EVM, created a new workspace and loaded the projects.  I then ran through the procedure for lab2d.  When I went to characterize the motor it started drawing very large currents.  I stopped things and went back and adjusted the user.h for my higher voltages (I set the voltage from 24 to 60) and I increased my PWM frequency 30KHz.  I ran that test again during RoverL it hummed loudly drawing about 800mA @ 30V, and then when it went to estimate Rs it draw very large currents, even though my estimation current was to be 3A.  My supply is set to limit at 19A and it is limiting during estimation of Rs.  I have attached my user.h for reference.  Thank you for your help... I seem to really need it.

    Tim

    71302.user.h

  • Hi Tim,

    Please use lab2b or lab2c for F28069F/M controlCard Plus DRV8301 EVM Kit to identify the motor parameters first, the lab2d will use fpu32. And you can use the same parameters as you used before.

  • Hi Yanming,

    I am running the code found in the following location in motorware

    C:\ti\motorware\motorware_1_01_00_17\sw\solutions\instaspin_foc\boards\drv8301kit_revD\f28x\f2806xF\projects\ccs5\proj_lab02b

    Is this correct? I hope it is not because all of the 2x labs draw excessive current.
  • Hi Yanming,

    It is clear that the DRV8031KIT it is not sensing motor current properly. When I went to test the motor I created a project in a new workspace thinking that would give me a pristine code base. Could it still be using code from a project I modified or does creating a new workspace create all new code? I would greatly appreciate any help!
  • Hi Yanming,

    This is my second request, and I am stuck until I get an answer from you. I am running the following code (motorware location shown below) on the DRV8301-HC-EVM but it is drawing excessive current when it tries to characterize the motor, indicating the IO mapping is wrong. Can you please let me know if this is the right code and if it is what I should do to fix this problem? I am dead in the water right now so a prompt response would be greatly appreciated.

    C:\ti\motorware\motorware_1_01_00_17\sw\solutions\instaspin_foc\boards\drv8301kit_revD\f28x\f2806xF\projects\ccs5\proj_lab02b
  • Hi Tim,

    Very sorry for the delay, I just tested and confirm the lab02b can work well to identify motor parameters as you listed in the post. Maybe, it's better to use lab02 since your motor is low inductance, and set the USER_MOTOR_RES_EST_CURRENT, USER_MOTOR_IND_EST_CURRENT, USER_MOTOR_MAX_CURRENT and USER_MOTOR_FLUX_EST_FREQ_Hz in user.h based on the rated current and frequency of your motor. The motor parameters identify well if it run smoothly during the process. You need to change these 4 parameters if the motor vibrate or stop.

    You need to tune the PI parameters for high speed, it's better to decrease the Ki of speed and current for high speed, especially using very small Ki for speed regulator.

  • Yanming,

    As I mentioned above in a previous note, all of the 2x labs fail, and they fail immediately, the moment characterization starts. There appears to be no current feedback and/or control. As soon as the motor is turned on to be measured there is current run away. This has nothing to do with my motor, it does this on ALL motors that I test. There is something wrong with either the software setup or the hardware setup. I can't even start the characterization process because of run away current in the winding.

    Please answer the following:

    1) Is the software location that I list above the correct software to use with this board?
    2) Are there switches, jumpers, or settings on the board that might cause the current feedback to be ignored or misinterpreted?

    Regards,
    Tim
  • 1) Is the software location that I list above the correct software to use with this board?
    A: DRV8301-HC-EVM Rev.D + F28069M ISO Control Card, use below lab project is ok.
    C:\ti\motorware\motorware_1_01_00_17\sw\solutions\instaspin_foc\boards\drv8301kit_revD\f28x\f2806xF\projects\ccs5\proj_lab02b

    2) Are there switches, jumpers, or settings on the board that might cause the current feedback to be ignored or misinterpreted?
    A: In default mode, all switch are on top for SW1 and SW3, all switch are bottom for sw2.