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.

FOC for PMSM at high speeds (~30,000rpm)

Other Parts Discussed in Thread: DRV8312, INSTASPIN-BLDC, CONTROLSUITE

E2E forum information, per the guidelines:

Host OS: Windows 7 Home Premium, Service Pack 1
CCS Version: 5.2.1.00018
DRV8312EVM 6517813 Rev D
CC2803x ISO DIMM REV 1.3
Texas Instruments XDS100V1 USB Emulator

Awhile back I posted regarding the use of the DRV8312 kit w/ InstaSPIN-BLDC on my motor.  After making the recommended changes from the link below, it has run ok up to about 24,000 rpm.  I've learned that this motor produces a sinusoidal BEMF, which makes me think the motor would run more efficiently with FOC (using the PMSM Sensorless project).  I'm having some of the same problems I encountered before.  I have a few questions:

1) Should I expect that the PMSM Sensorless project (from controlSUITE) can be used with the DRV8312 kit to drive my motor at 30,000 RPM?  I don't want to spend a lot of time fighting this if this is beyond the hardware limits of the equipment.  I'm using an 18V bench power supply to power the board, and my motor only draws about 500mA (fully loaded) at 22,000 RPM using the InstaSPIN project.

2) The advice from the previous post was to change out the caps on the current sensing circuitry to smaller values (10nF).  I've tried using DRV8312 kits both with the original caps and new caps, but the new caps don't seem to help.  However, I'll keep trying if there's no reason to expect the original caps to work at 30,000 rpm.

Any assistance is appreciated.  Thanks.

Previous post:

http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/194307/704494.aspx#704494

  • Jared,

    for high speed you start running into some control sampling theory problems, namely how often are you sampling then updating a control signal to the system.

    The projects you have tried have  I believe and 20 or 10 KHz sample/current control, and 20 KHz PWM update.

    Look at the sample/current control first: I'm going to assume you have a 4 pole motor. 30K RPM = 10KHz electrical frequency.

    that means if you have a 10KHz sample/current loop you are only updating that once per rotation. That's really not enough, especially if you have a dynamic load.  You probably don't at this speed, so maybe you can get away with less, but at the very least you want to go to 2 or 3 updates per Hz, and better to try to get to 6x+

    Can you simply multiply the sampling and current control by 6x?  Well, probably not on a 60 MHz Piccolo device. You are going to run out of MIPS in your interrupt.  This is why many high speed applications use the 150 MHz Delfino class of devices, specifically because you need to run the current loop faster.

    But, if we go back to InstaSPIN-BLDC, if you are just doing commutation control, not current control, you should be able to do this AND run it at least 40KHz update rates.   (you may not be controlling the current, but you still need to sample the Bemf and integrate). With your filter change on the Bemf hardware you should be able to make this work.  I know I've seen InstaSPIN-BLDC working on a 100 KHz 2pole motor before.

  • Chris,

    Thank you for the quick response.

    I know that the PWM is set to 20kHz, but I don't recall the frequency of the main ISR, in which all the PID's are updated.  However, the electrical frequency is calculated as RPM=120*basefrequency/poles.  You're correct that the motor is 4 pole, so the base electrical frequency is 1kHz, not 10kHz.  Assuming the ISR is at 10kHz, I should be able to sample around 10x per revolution.  I know this still isn't ideal, but shouldn't it be adequate?  Before the end of my work day a few hours ago, I was able to get the motor running at 24,000 rpm, at least as calculated by the speed estimator module.

    You brought up using the 150MHz Delfino instead of the Piccolo.  For the motor speed I'm interested in, would you recommend I switch to a beefier MCU (Delifno, Concerto, etc)?  Current control is fairly important in my application, and I am at a point in my design project in which I still have the option of making this type of change.

    Thanks again.

    -Jared

  • RPM=120*basefrequency/poles

    30k = 120 * freq / 4

    freq = 30k/30 = 10k Hz

    if you are trying to control the current well it's probably better that you look at least at the 90 MHz F2806x series (there at least is an InstaSPIN-BLDC project and ISO controlCARD that works with DRV83xx kits) and may want to consider a 28335 running 150 MHz from RAM.

    Ideally you could update your current control at about 60 KHz, but you may be able to get away with 30 KHz

     

     

  • Thank you for your assistance.  I may try the F2806x control card since it will be a quick substitution.  However, I want to make sure I'm not completely misunderstanding something.  I've got the electrical frequency set at 1kHz in code, and the code for base rpm is as follows:

    #define BASE_FREQ       1000 // Base electrical frequency (Hz)

    speed3.BaseRpm = 120*(BASE_FREQ/POLES);

    This results in a 30,000 rpm base rpm on the watch window when I look at "speed3.EstimatedSpeedRpm".  I just want to make sure I don't have something wrong in here, because when I put in 10,000 for a base frequency, it says my base rpm is 300,000.  This discrepancy is important if it determines whether this processor is fast enough to possibly be used for FOC with my motor.

    Thanks again for all your assistance.

  • Jared, what you are looking at are interface conversion/scaling variables. Inside all of the modules you are doing everything in per unit. Per unit means a ratio of what is measured/calculated to some base unit.

    It isn't well documented in this code IMO, but I think what you should do is set your BASE_FREQ to a value larger than your expected max speed you want to measure/control. In this case maybe that's 1200 // Hz

    BTW - wow, really bad math on my part last night.  30k RPM * 4 poles / 120 = 1 KHz

     

  • Yes, I understand the per unit scaling.  I'll take from this that I should (in theory) be able to use FOC at 30,000 rpm since the ISR frequency is 10x that of the motor's electrical frequency.  Thank you for your assistance.

  • Hi,

    I am having the same issue here, I am using the Piccolo 2835 delivered with the drv8312 kit and I cannot push my motor above 30.000 rpm. Above 30.000rpm, at constant speed, I can start hearing the speed oscillating sometimes, and if I continue the motor simply stalls. Below 30.000 rpm, my motor is perfectly stable in transition or steady state.

    BTW, I am at level 6A/B of PM_sensorless. I have modified the project to use hall encoder instead of QEP. The speed output from the estimator and the one computed by the all sensor is identical. 

    The motor can go up 80.000 rpm. Ideally I would like to implement current loop and speed loop. Do you recommend to switch to 2869 ?

    80.000rpm, 4 poles, I deduce I need at least a 27KHz ISR loop frequency, is it OK for the 2835 (btw, how can I have an idea of the free resource I have on the mcu?) Should my PWM be at least twice this frequency ?

    Thanks for your help.

    *Update*

    I am running with level6A lsw=1 for testing. I can go up 0.7 (50.000rpm) without any trouble but as soon as I switch to lsw=2. my motor stalls as described above. With lsw=1, I have noticed that at the 30.000 rpm range, I have a 1000rpm shift between my encoder and the estimated speed therefore my theta estimation is this because of this shifting that my motor stall ?