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.

300V, 75Acont Motor Controller Design Questions

Hey everyone,

My name is Phil and I'm a just-graduated student from Yale University's Formula SAE Electric team - Bulldogs Racing. I'm looking to develop a motor controller for a small PMSM motor (~10-15kW continuous) using InstaSPIN FOC and the TMS320F29027F. I'm most of the way through a design based around a Littelfuse IGBT module, but I have a few questions:

  1. One of the design criterion of Formula SAE Electric is that the low voltage (LV) system (microcontroller, dashboard, etc) needs to be galvanically isolated from the high voltage (HV) system (lithium batteries, motor, etc). This presents a problem when using InstaSPIN because the design reference directly connect the microcontroller ADC to the HV current shunts and voltage dividers. I see two potential solutions. Either isolate everything that leaves the motor controller (USB, CAN bus, etc) or isolate the HV current/voltage signals from the microcontroller. I figured that the latter would be easiest, so I looked into analog isolators in order to still hopefully use the C2000's internal ADC. Unfortunately these solutions were fairly expensive per unit accuracy, so I opted for buying a second ADC and isolating its SPI lines through a digital isolator. I figure that a 1MSPS ADC can complete 7 conversions (three current shunts and four voltage dividers) in 7us. Using a PWM frequency of 20kHz results in this measurement taking 14% of the total control loop time. Would this be an acceptable solution? Could I go with an even slower external ADC that takes 28% of the loop time? How difficult would it be to modify the InstaSPIN code to run from an external ADC through SPI? Or am I approaching this in the wrong manner and maybe I should take the monetary hit and use the analog isolators?
  2. From what I can tell the current shunts are measured once per control cycle. So if I use a PWM frequency of 20kHz then the current shunts are being measured at 20kHz. I saw that the voltage dividers require a low pass filter to filter out the PWM voltage oscillations while still staying above the maximum motor frequency. Is this necessary for the current shunts as well? I'm assuming not, because it seems like FOC requires the PWM-related current to control the PID loop. If this is true, then I should use a low pass anti-aliasing filter at 20-30kHz just before the ADC, right?
  3. I plan on running three current shunts in order to use a lower slew rate zero-drift op amp. However I think I may be able to get away with 2 current shunts instead. I plan on using the MAX44241AUA+ which has a slew rate of 3.8V/us. What do you think?

I'm excited to join the TI InstaSPIN community and look forward to hearing back from you guys!

Best,

Phil

  • congrats on the degree

    what current range for the 15 kw continuous "small" inverter? most applications of this size would use LEM in phase current sensors for the current measurement, or in some cases isolated sigma delta.

    1. the easiest approach is to keep the F28027F on the hot side and isolate a single comms channel back to the cold side. the motor controller will be getting commands from a central processor anyways.

    2. most inverters of this power actually use much slower PWM frequencies, more in the 28 KHz range. It also depends on how high speed the motor is and how fast you need to run the current controllers.

    do not add a filter to the currents...although if you are talking about currents >50A using something like LEMs becomes a better solution.

    3. I'd first have the discussion about LEMs before I discussed 2 vs. 3 shunts.
  • Hey Chris,

    First of all thanks! Looking forward to engineering out in the real world. The current range is up to 75A continuous and ~100-125A peak for a few seconds (limited by the IGBT cooling).

    1. Makes sense. I'll look into JTAG/USB and serial digital isolators.

    2. Do you mean higher frequencies of 28kHz as I suggested 20kHz originally? An example of the type of motor we would be running is the Emrax 207 medium, which has a peak speed of 6000RPM (7000RPM with field weakening) and 10 pole pairs. Obviously the motor we would use would be scaled down as the Emrax 207 is rated for 40kW nominal and 80kW peak whereas we are looking in the range of 10-15kW nominal. Could you explain why I shouldn't add a low pass filter to the ADC input of >20-50kHz? Most ADC technical references seem to suggest them to prevent anti-aliasing.

    3. LEMs are a lot more expensive than a current shunt, difference amplifier combo. Since we are only running at 75A nominal, this current shunt should work well with the Maxim chip I referenced earlier costing less than ~$3 per channel including passives. The power loss should be about 5-6W at 75A which is less than 0.03% of inefficiency when running at 300V. The LEMs I found on Digikey on the other hand cost about $7-10 per channel and have approximately the same performance.

    4. What are your thoughts on low-side vs. phase placement for the current sensor? I was thinking low side to simplify the design, although if its with LEMs it could really be anywhere.

    Thanks for the help!

    Best,

    Phil

  • Ahhh, ok. These isn't a traditional traction motor. You are using essentially a hobby type of motor with very low inductance. and 1 KHz frequencies.
    Low inductance means you will need to run the current control as fast as possible (about 15 KHz for F28027F) and usually means you need to run the PWM as fast as possible (45 KHz is normal). However, you are going to have more switching loses using this sort of motor.

    I have seen some similar designs, even higher current (300A+). It is a tough hardware challenge but can be done.

    You can add a filter to the ADC pin as we've done in all of our designs.

    Ok, if you are comfortable with the shunts go for it. It certainly makes the current sampling at higher speeds more challenging, especially with a high frequency motor with very low inductance.
  • Could you explain how you came up with ~45kHz for an acceptable PWM frequency? What ripple current is typically considered acceptable? For instance if I ran 45kHz PWM and a 300V bus with a motor that has 54uH inductance (like the Emrax 207 medium) I would get Ipk-pk = 0.25*Vbus/(2*pi*Fpwm*Lmot) = 30Apk-pk  assuming a 0.5 duty cycle which seems a little high. This is from equation 18 of this white paper.

    What issues do you see with running shunts at high speeds?

    Phil

  • Hi Phil,

    It looks like Chris read your post a little quickly because you are indeed using a high pole-count low inductance (54uH) low phase-phase resistance (5.7milliohm) traction motor.  I do believe your calculation of 30A of ripple current at 45kHz is correct (took a look at the paper you linked).  You will need to pay careful attention to the design of your DC bank capacitors to be able to safely handle that ripple current without overheating and failing.  I suggest the following Article as a good reference for understanding ripple current and it's implications on your DC-link bus.  I believe the reason Chris suggested 45kHz is that many motor controllers use 20kHz switching to prevent audible noise from the motor windings and since you're using a low inductance motor a double in the switching frequency is a convenient place to start in reducing the ripple current.  You'll have to make a trade-off between switching losses at high frequencies vs. larger ripple currents at lower frequencies when deciding on the appropriate switching frequency.  A second trade-off with higher switching rates in reduced PWM resolution.

    I have serious concerns about your choice of shunts and current measurement scheme.  The reason(s) why low side current sense is probably a bad idea in your application is that the current can only be measured when the low-side FET/IGBT is conducting.  This means that at 45kHz you only get 22us for a completely settled current measurement at best case (low output duty cycle) and about 1.3us worst case (high output duty cycle) - this is based on SVPWM (Space Vector PWM) modulation.  Getting a completely settled current measurement in 1.3us is tough, especially when you will require 20x to 50x gain from your current sense amp, you'll need op-amps with 50MHz or greater gain-bandwidth and a high slew rate of 20V/us or more.  With this added bandwidth and gain, noise and transients susceptibility will be increased.  Here is something else to consider, the phase-to-phase resistance of your motor is 5.7milliohms, at 300V that's a lot of stall current which leads into why either using a LEM or an isolated shunt with delta-sigma modulation on the motor phases is a better idea than the low-side current sense.  If you measure current on the motor phases you can detect motor phase shorts to GND and POWER which are extremely dangerous at the voltages and potential fault currents you are dealing with.  In addition, the current on the motor phases is continuous and mostly sinusoidal at a low frequency so the bandwidth of your current measuring circuit can be very low which will result in a cleaner current measurement and a lot less headaches.


    -Jesse

  • Phil,
    I can't disagree with your thought process. I was coming at from the angle of you want as high of PWM as possible...and with InstaSPIN-FOC the highest hardware based decimation is a PWM 3x the control system rate. Due to the 60 MHz CPU we are limited to the ~15 KHz controller rate, which puts the PWM at 45 KHz. On the 90 MHz devices it's easier to run 20 KHz and 60 KHz. You can add in some SW decimation but we haven't done it much ourselves. There are also PWM limitations with the driver chips we have used on our EVMs.

    When using shunts at high speed the sampling windows get small. Once you add in using low inductance high short circuit current motors you make it that much tougher.
  • Hey Jesse and Chris,

    I looked into DC link capacitors and found a pretty good solution with AVX Corporation's FB series. This 30uF capacitor can handle 16Arms. By putting anywhere from 3-5 in parallel I can limit the bus ripple voltage to between 5V and 3V respectively at 20kHz when using that Emrax motor. At 20kHz there would be 70Apk-pk of ripple current which is 25Arms, so they handle that as well. Going over 20kHz does make a lot of sense in terms of audible noise. I'll look into the IGBT power loss and driver circuitry associated with increasing PWM frequency and see if it is feasible (currently all specced for 20kHz).

    The reason I decided upon shunts was that chapter 17 of the InstaSPIN user guide made them sound very feasible for control at ~20kHz. My current setup is a 3 shunt low side configuration using a MCP6V71UT as the op amp in a difference amplifier configuration. This meets the suggested 1V/us slew rate and since I have a 0.001 ohm shunt, I was going to use a gain of 11 with an offset of 1.65V. In this manner I could measure my continuous current of 75A with Vmin = 1.65 - 0.001*75*11 = 0.825V to Vmax = 1.65 + 0.001+75*11 = 2.475V. All of this comes at a power loss of ~6W when running at 75A which corresponds to <0.03% power loss with a bus voltage of 300Vdc. I've attached the relevant schematic for one of the phases. I propogated the error through to the ADC and its less than 1.25% (most error from the 1% shunt resistor). I hadn't really thought in terms of measuring motor shorts to ground and power. I see how an LEM on the motor phases would make much more sense in terms of safety!

    One big question I have is how current is measured when it has such a high peak to peak ripple. How can I be sure that I'm measuring the mean current, rather than low or high current peaks? Does InstaSPIN measure current in the middle of the PWM wave form so that it captures the current as it reaches its mean (assuming approximately linear current vs. time due to the short time scale).

    Additionally what is considered a nominal amount of ripple current? For instance running that Emrax motor at a PWM frequency of 20kHz gives 70Apk-pk which seems like a lot, even though its not enough to upset the DC link capacitors. How much torque ripple and magnetic losses would that much current manifest itself as?

    Thanks again for all of the help. Trying to understand all of this is quite the learning curve!

    Phil