1. Attachments are working again! Check out this thread for more details and to report any other bugs.

Prius inverter outputs square waves?

Discussion in 'Gen 3 Prius Technical Discussion' started by NiHaoMike, Aug 11, 2012.

  1. NiHaoMike

    NiHaoMike Member

    Joined:
    May 6, 2012
    98
    16
    0
    Location:
    San Diego, CA
    Vehicle:
    2011 Prius
    Model:
    Four
    I have always thought that motors run best with sine waves. Yet, the Prius inverter outputs square waves at high speed.
    VH boost
    Maybe "common" wisdom is wrong? I have always heard that motors and electronics work best with a sine wave inverter. I know that it's false for most electronics as rectifiers don't care (actually, they work better with square waves), maybe it's also false for motors?
     
  2. David Beale

    David Beale Senior Member

    Joined:
    Jul 24, 2006
    5,963
    1,981
    0
    Location:
    Edmonton Alberta
    Vehicle:
    2012 Prius
    The motor causes the square wave to be modified into a sine wave as it's acting as a very large filter. It's a matter of what frequencies are in there. A square wave is a combination of a base frequency and a lot of harmonics, all odd numbered. A fast switching inverter (producing a square wave) is very efficient. Any attempt to build a sine wave adds more circuitry and drops efficiency. All inverters must start with a square wave output. They can use that to build up a sine wave using several different methods, but all of them add inefficiency. The motor doesn't care that it's being fed a square wave. -Some- electronics does care, but most now use switching power supplies and they actually work best (most efficiently) on square wave input.
     
    PriusCamper and WE0H like this.
  3. kbeck

    kbeck Active Member

    Joined:
    Feb 10, 2010
    420
    275
    0
    Location:
    Metuchen, NJ
    Vehicle:
    2010 Prius
    Model:
    III
    Just to add a bit more to this. All electric motors are primarily inductors; as such, they resist changes in current. Anybody who's unplugged a running vacuum cleaner knows this: See that big spark as the cord leaves the wall? That the motor inductors trying to keep the current steady as the magnetic fields collapse.

    From a standing start, applying a step voltage to an inductor results in an initial current of 0, which then exponentially rises. Maximum current in such a case would be limited to the resistance of the inductor and/or voltage source, but that's not typically what's done: The voltage can be turned on and off rapidly. The result is a current of some value that ripples up and down but doesn't spike up or down much. (The voltage across the inductor can be strange when the drive's turned off, but that's another issue.)

    The magnetic fields around the inductor are directly proportional to that current, and its the magnetic field's interaction with the permanent magnets in the motor that gives torques the motor, makes it spin, and drives the car. So, effectively, doing fast switching on an inductor and varying the pulse width gives a variable torque. Which is what one wants when moving a car.

    Now, let's talk about commuting. And, no, this isn't driving back and forth to work. Suppose that the permanent magnet in the motor has a single pole, that is, North-South pair. (Don't know how many there are in the Prius, but bear with me). Now, suppose that there's some angle sensor that tells the car which angle the N-S pair is pointing. Now, further suppose that the permanent magnet in the rotor is surrounded by, say, three field coils in the stator, each of which can generate its own magnetic field. Suppose that the coils are wound that if you put current through a each coil in an arbitrarily defined positive direction, you'll get a North pole at 0 degrees, 120 degrees, and 240 degrees. A little thought will reveal that if you've got a North at 0 degrees, you'll have a South at 180; further, on that particular coil, if you flip the direction of the current you'll have a North at 180 and a South at 0!

    Now comes the fun part. So, start off with the rotor at 0 degrees, with its North at 0 degrees and its South at 180, and you want the rotor to rotate counterclockwise. So, you turn on transistors that makes the wired pole at 240 degrees North (in doing so, attracting the South rotor pole at 180), it's opposite end at 60 degrees made South, attracting the rotor North pole, and running the current "backwards" through the pole at 120 degrees, ending up with a South at 120 degrees (repelling the South rotor pole) and a North at 300 degrees, repelling the North rotor pole.

    If the rotor moves smartly, then you switch transistors that have battery on one side and inductors on the other, enabling transistors in pairs on each winding so the stator windings keep on pushing/pulling that rotor around. If it sticks (you're just starting the car from a dead stop or something), then you don't leave the voltage on continuously, but pulse away to limit the max current. And, of course, stopping the voltage pulse early limits the torque, cool when you don't want to accelerate like you're flooring it every time the motor gets turned on.

    That isn't the end of the design, of course. Every time you turn the transistors off the collapsing magnetic field causes the voltage across the coil to reverse and spike up in amplitude. Large switching FETs have built-in diodes to dump the current, but I wouldn't be surprised if Toyota has some fancy stuff that rectifies the spike and dumps it back into the battery. And, as I said before, I don't know that much about the Prius motor/switcher stuff, but I have worked with high-speed permanent magnet fan motors and their contributions to conducted electromagnetic emissions. It's fun looking at the real-time current ripple with a current probe and a 'scope.

    KBeck.
     
    hlunde likes this.
  4. Jonny Zero

    Jonny Zero Giggidy

    Joined:
    Jun 22, 2012
    1,388
    351
    0
    Location:
    Austin, TX
    Vehicle:
    2012 Prius
    Model:
    Five
    I wonder why Toyota chose to run AC synchronous motors at all, as opposed to brushless DC like the Honda IMA. Does the PSD require more precise speed control?

    According to this table, DC is better suited for EVs.

    Electric motor - Wikipedia, the free encyclopedia
     
  5. NiHaoMike

    NiHaoMike Member

    Joined:
    May 6, 2012
    98
    16
    0
    Location:
    San Diego, CA
    Vehicle:
    2011 Prius
    Model:
    Four
    Brushless DC motors are in fact synchronous (or less frequently, induction or switched reluctance) AC motors. Actually, no continuously rotating motor truly runs on DC. Even brushed DC motors mechanically convert DC to AC.
    There are a lot of claims that motors run better on sine waves and even some posts claiming a 20% improvement in efficiency going to sine wave, but not very much information from real engineers. I suspect many of these claims are actually based on upgrading to a better inverter and have little to do with sine wave vs. square wave.

    The most common way to generate sine waves is to use PWM, but it's suboptimal since it needs a relatively high frequency to work well. A better algorithm I have been studying is RL-PDM (Rebecca Liu Pulse Density Modulation). It basically starts with PWM at a low carrier frequency, then modifies it so that the lower frequency harmonics are cancelled, then quantizes it so allow implementation in a cheap microcontroller. The only harmonics that are left in any significant amount are easily filtered out. (I programmed a PIC so I can understand it by probing the signals with a scope.) I wouldn't be surprised if the low speed "PWM" is actually RL-PDM or something similar.
     
  6. Corwyn

    Corwyn Energy Curmudgeon

    Joined:
    Mar 6, 2011
    2,171
    659
    23
    Location:
    Maine
    Vehicle:
    2007 Prius
    Model:
    II
    I think there is likely a huge difference between random electric motors designed to run on 110AC, combined with some chosen inverter; and a Prius custom built motor with an inverter specifically engineered in conjunction with that motor. I am pretty sure that Toyota engineers actually thought about it.
     
  7. PriusCamper

    PriusCamper Senior Member

    Joined:
    Mar 3, 2012
    11,095
    4,515
    0
    Location:
    Pacific Northwest, USA
    Vehicle:
    2007 Prius
    Model:
    Two
    Yes... but engineers think primarily about keeping production costs low without sacrificing reliability/liability. Penny pinching is essential at every level... And in whatever way I can learn how to modify or improve component quality, or in this case inverter performance, in my stock Prius, that's the info I most want to know!
     
  8. macman408

    macman408 Electron Guidance Counselor

    Joined:
    Mar 21, 2010
    1,179
    366
    1
    Location:
    California
    Vehicle:
    2010 Prius
    Model:
    V
    I'm a real engineer (though not as much of a power electronics sort of guy as kbeck), and I could justify an expectation that a sine wave would be more efficient to myself. My guess is that the sine wave might have less reactive power and more real power, but I really have no math or education to back that up, just a SWAG. That means that there's more current flowing through the wires in the motor, but that current isn't actually doing any work - picture it just going back to the battery later. However, that extra current is wasting power, since the wires carrying it aren't perfect conductors; this would be seen as the windings in the motor heat up (which is the typical warning here, right? Use a sine wave, or your motor will burn itself out.). Thus, I could imagine that the rumors are true.

    I could also imagine that, as you reach the magical 30-40 mph EV that the author notes (close to the motor's top speed), perhaps the motor needs to create a magnetic field fast enough that a sine wave wouldn't do any more - I believe that a square wave will build up the magnetic field in the windings faster than a sine wave would, which is what drives the motor. It might also be possible that there are other inefficiencies in the inverter at these speeds that make it more efficient to use a square wave.

    But as I said, I'm pretty much just making all this up.

    Engineers think about lots of things. Production costs may be one of them, as is reliability. Liability probably isn't (that belongs squarely in Legal), though safety is. But we don't really know to what extent they value cost versus other metrics. That decision typically lands in management and marketing.

    If cost were the master of all things, then we'd be driving a Toyota Insight; substantially similar reliability at a lower cost.

    <ducks>

    I can tell you one thing that was VERY important in the design of the 3rd gen Prius was efficiency. Marketing needed to hit the magical 50 mpg number for the US market. I'd be willing to bet that they spent a fair amount of money to hit that magic number.
     
  9. jdcollins5

    jdcollins5 Senior Member

    Joined:
    Aug 30, 2009
    5,131
    1,338
    0
    Location:
    Wilmington, NC
    Vehicle:
    2010 Prius
    Model:
    III
    If I read the link correctly, it only uses the square wave when in voltage boost. I have monitored the HV battery voltage with SGII and the only time you go in to voltage boost is for quick acceleration or during moderate to heavy regen.

    So the motors would only see the square waves for short periods of time. The rest of time they are using the PWM waveform.
     
  10. austingreen

    austingreen Senior Member

    Joined:
    Nov 3, 2009
    13,574
    4,114
    0
    Location:
    Austin, TX, USA
    Vehicle:
    2018 Tesla Model 3
    Model:
    N/A
    AC motors are smaller and lighter for the same power, but require more complicated electronics to control them. From a system point of view AC is better when you are using higher power. Honda uses lower powered motors than Toyota. Stepper motors, which are a type of dc brushless motors are the most precise, but this type of precise control is not required in the hsd or IMA. There is a reason you should not use Wikipedia as a main source. I'm sure someone will update that entry.

    And yes the motor will run better with sine waves, but toyota is interested in the total system from battery/inverter/motor and this system may be most efficient with inverters giving square waves at high power levels.
     
  11. kbeck

    kbeck Active Member

    Joined:
    Feb 10, 2010
    420
    275
    0
    Location:
    Metuchen, NJ
    Vehicle:
    2010 Prius
    Model:
    III
    To tell the truth, I'm not truly a power guy; that's the people who hung out in the different section of the EE department, learned how to wind motors, string transmission line, and really learn about power factors.

    However, I've spent more time than I care to mention mucking about with switching power supplies. The trick is that square waves (or their very close relative, PWM waves, which are just square waves with duty cycles other than 50%!) can be very efficient.

    Your typical DC-DC converter can take in a low voltage and make it a high one or vice versa with 90% efficiency. Yep, there's an inductor or transformer in between; often, said transformer/inductor is paired with the right kind of capacitance to make a ringing kind of a circuit. The idea is to reduce losses by getting the power transistors to switch when the voltage across transistor, or even the current through the transistor, is near zero. If the current through a tranny or the voltage across the tranny is near zero when the switch occurs, very little power gets dissipated in the transistor, leaving more to pass through the assemblage. You even run into situations where diodes (which have a certain voltage drop around 0.5 - 0.7V or more when current is flowing through) are replaced with FET transistors which, when on, look more like a straight resistor with a resistance in the 10's of milliohms or less. And the reduction in power lost in the rectifying circuit justifies the dime a dead-stupid controller costs that makes that FET into a diode.

    I guess the point I'm making is that stuff that we all learned and loved in the olden days: AC transformers, bridge rectifiers, etc., are being attacked by idea that silicon, that is, smart silicon, is dead cheap. 5000 to 10000 transistors in a controller costs less than a big electrolytic - so, if you can halve or quarter the size of an electrolytic by putting in a controller that gets rid of the need for the thing, you put in the controller.

    As I said before, I don't work motors that much. But I do muck about with DC-powered cooling fans from time to time. The fans are permanent magnet, efficient and getting more so, and have controllers up the kazoo that can reduce conducted EMI, keep the fans from catching fire, handle hot and cold weather better, and all because of smarts.

    Under these circumstances, all bets are off between what's more efficient, AC or DC. Heck, I have inverters attached to my garage that take the DC voltages off the solar panels and converts same to 240 AC, 2-phase. There are power transistors doing PWM with a vengeance on this fairly monster transformer in there, converting DC to AC - with, at certain near-full-power conditions, over 98% efficiency. The transistors are running in PWM, but the PWM varies during each 16.66 ms period, with narrow pulses where the 240 AC passes through zero VDC and big wide pulses where one wants Vpeak. Fun.

    The controllers are cheap and versatile. Programming them is expensive, takes time, and is hard work.

    Think they don't do stuff like that in the Prius's motor? If not, you're dreaming!

    KBeck
     
  12. austingreen

    austingreen Senior Member

    Joined:
    Nov 3, 2009
    13,574
    4,114
    0
    Location:
    Austin, TX, USA
    Vehicle:
    2018 Tesla Model 3
    Model:
    N/A
    I think you have gone off on a tangent. Motors like sine waves:), meaning they are more efficient with them. The power supply is DC, and the frequency of the power needs to vary with speed. You can make the power vary clean, but that takes more energy. Running the inverter more efficiently may mean running the motor slightly less efficiently. PWM can efficiently create a modified sine wave, which will work with motors. This isn't a analog versus digital thing, it is an efficiency and cost trade off. The power can then be put through a band pass filter to clean it up and give it a sine wave shape. But a motor can be considered part of the filter:), and simply providing a low pass filter may be the most efficient. This LPF of modified sign waves may look pretty square. If this is done knowing the motor parameters, cost and efficiency may look a lot like a simple modified sine (square with time spent at 0 before transition), at high power low frequency times.

    Here is some information with parts from the gen 2


    Special Issue: Inside the Toyota Prius: Part 5 - Inverter/converter is Prius' power broker
     
  13. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,397
    15,518
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    One of the early Toyota SAE papers discussed the use modulated, PWM, at low rpm and ON/OFF pulses at higher speeds. Given the short power leads between the inverter and motor stators, the square wave losses are insignificant. The situation changes when feeding a square-wave or modified sine wave through an extension cord. The dV/t capacitive losses become measurable.

    The Toyota MG1 and MG2 have multiple, permanent magnets in the rotor. The three phase, stators connect to the inverter while a position encoder feeds the HV ECU. The HV ECU drives the inverter power electronics.

    These are not induction motors that typically operate from an AC source. Rather, they look more like a three-phase, stepper motor, and powerful ones at that. They are quite happy to work on inverter square-waves.

    Bob Wilson
     
    Matt H, austingreen and jdcollins5 like this.