Shop OBEX P1 Docs P2 Docs Learn Events
3 Phase Motor Control - Page 2 — Parallax Forums

3 Phase Motor Control

2

Comments

  • PhilldapillPhilldapill Posts: 1,283
    edited 2010-03-10 06:46
    Tapperman, are you using any kind of power filtering? I'm working on a VERY similiar project atm - a single phase inverter - but it's eventually going to be a 3-phase Variable Freq Drive since the system is so similiar. Currently, I'm doing this at a low voltage(12V), but I should be able to control AC motors at low frequency. I'm doing this mainly for testing purposes, and to get some code working, but I'll move to ~200V parts soon. Currently, my 12V version seems to work great with very minimal power loss with ~98% efficiency in the power electronics stage - not sure about electrical to mechanical conversion. I'm pushing about 30A through a load, and the output waveform is a pretty sinewave after my filtering(inductor/capacitor combo).

    Anyway, I'm curious as to what power electronics you are using. Do you have any schematics yet? If you want me to make you some boards, send some stuff over and maybe we can collaborate. It's late. I'm getting delirious. Excuse my ranting...
  • TappermanTapperman Posts: 319
    edited 2010-03-10 16:52
    Philldapill said...
    what power electronics you are using.

    Do you have any schematics yet?

    If you want me to make you some boards, send some stuff over and maybe we can collaborate. It's late. I'm getting delirious. Excuse my ranting...
    I think I have a link in one of my earlier post's to my IGBT's .. but here it is again:

    http://www.mouser.com/ProductDetail/STMicroelectronics/STGE200NB60S/?qs=BJlw7L4Cy7%252bM2r%2fNHVO%252bEA%3d%3d

    There spendy little guys (I paid 32.05 each x 7)

    I'm working on the schematic ... but not yet up to speed on ExpressSCH (always something new to hurdle)

    I think I'll just knock one out by hand, and scan it.· Watch for followup drawing.
  • TappermanTapperman Posts: 319
    edited 2010-03-11 20:36
    Philldapill said...

    Anyway, I'm curious as to what power electronics you are using. Do you have any schematics yet? If you want me to make you some boards, send some stuff over and maybe we can collaborate. It's late. I'm getting delirious. Excuse my ranting...
    @Philldapill, Ok ... first, I'm sorry it took so long to get back to you, I got the flu·.. second, I have a bunch of sketched notes and a focus sheet to keep me on track.· It's a bit early for a schematic (just yet), as I'm changing to version 4 of my motor driver, and I'm proto-typing the feedback for the control.

    Mainly, Current!· Current controls torque, and torque equates to acceleration.· So it's important I get that part correct.· And I'm going to have to wait for the parts to arrive.· I've ordered some Hall effect current sensors to tell me the current in the motor.· And, I've ordered the 2 bit grey code shaft encoder (128 / rev) for the 3 phase motor.· So I don't have to rely on a crude adaption from an old Hard Drive.

    In the attachments, I have a sketch of the current 3 phase driver I'm using (darlingtons), and the proposed motor driver I'll be using in my final application.· There's also a photo of the IGBT's (600V @ 200A) I got for this project.



    Post Edited (Tapperman) : 3/28/2010 10:04:26 PM GMT
    1024 x 768 - 176K
    3227 x 2548 - 235K
  • TappermanTapperman Posts: 319
    edited 2010-03-11 20:50
    Philldapill said...
    Tapperman, are you using any kind of power filtering?
    I'm using a wave form that reduces the harmonic distortion.· In this way, EMI is reduced through software .. reducing the amount of hardware needed later on.

    Post Edited (Tapperman) : 3/11/2010 8:57:15 PM GMT
    455 x 341 - 35K
  • PhilldapillPhilldapill Posts: 1,283
    edited 2010-03-12 04:05
    You probably know more about EMI than I do, but I don't get how your waveform reduces THD since it looks like it's a sum of two sinusoids, instead of just a fundamental frequency.(?) I ask because we are actually just now getting into THD and other realted stuff in my DSP class.
  • TappermanTapperman Posts: 319
    edited 2010-03-12 08:53
    Philldapill said...
    You probably know more about EMI than I do
    No I don't ... We are just standing on the shoulders of other great peoples work ... the propeller is a classic example, what an amazing chip!
    Philldapill said...
    it looks like it's a sum of two sinusoids, instead of just a fundamental frequency.(?)
    It is ...·Sin(i) + Sin(3*i)/6·; where i varies from 0 to 2 * pi· ... in increments of pi/64

    ·
  • ManAtWorkManAtWork Posts: 2,178
    edited 2010-03-13 11:07
    Hello Tapperman,

    if you want to drive your IGBTs with photocouplers, please take a look at the VO3120 from Vishay. It is a combined optocoupler and a high power driver. The older version is called HCPL3120 from Avago (former Agilent, former HP). There are some app notes for them on the net about how to drive IGBTs.

    Here's an update to my project: I've managed to implement a way to sense the rotor position of a permanent magnet AC motor at (almost) standstill. So no more hall sensor signals or absolute encoders/resolvers are required. Video here: http://benezan-electronics.de/forum/videos/RotorPosTest.avi

    The usual method of sensing rotor position via back EMF as done in model brushless drives doesn't work for servos. They have to deliver torque from zero speed when there's no measureable back EMF. However, for induction motors this problem can be ignored since there are no magnets and the rotor position at startup doesn't matter.

    Cheers
  • TappermanTapperman Posts: 319
    edited 2010-03-13 17:47
    ManAtWork said...

    I've managed to implement a way to sense the rotor position of a permanent magnet AC motor at (almost) standstill. So no more hall sensor signals or absolute encoders/resolvers are required.

    That's incredible!· It appears the control moves the shaft ever so slightly to make the measurement, is that accurate?· I am amazed at your progress.
  • WurlitzerWurlitzer Posts: 237
    edited 2010-03-13 19:46
    Tapperman said...

    And also, I was unaware that you could control a motor that way either!!! I thought as you do, that you need capictor, inductor network of some sort to smooth out the square wave into a perfect sine wave. Appearantly there are energy losses if you don't have a perfect sine wave. Something the engineers refer to as power factor. I'm learning, but at this point I'm not sure about this last parameter.



    I was a sales engineer for VFDs and current industrial motors run just fine on a PWM square wave. In fact most of the installations I sold to did NOT add any sine wave filtering. I sold $2.3+ million per year in drives and at most only sold 1 or 2 sign wave filters per year.

    The VFDs are very efficient (the ones I sold were 97.5%) because they use PWM and of course the output devices are either full on or full off. Obviously an analog output device would be very inefficient.

    We used sine wave filters only if:
    1) Long wire runs from the VFD to the motor. The longer the run the higher the standing wave voltages at the motor.
    2) Older motors with lower voltage insulation ratings (compounded by item #1)
    3) Some VFDs were used as power sources for non-motor applications which required sign waves.

    Yes, there is some additional motor heating using VFDs and usually we would never recommend running the motor into its full service factor rating because of this. Lowering the modulation frequency reduces the heating but can increase system noise and motor instability at low speed & high torque.

    As someone posted, bearing failure can occur, usually in high HP pump/fan applications. Good grounding procedures are the first line of defense (best if all grounding is brought back to the drive). Shaft and bearing grounding devices next.
  • TappermanTapperman Posts: 319
    edited 2010-03-13 23:11
    Wulitzer said...
    I was a sales engineer for VFDs and current industrial motors run just fine on a PWM square wave. In fact most of the installations I sold to did NOT add any sine wave filtering. I sold $2.3+ million per year in drives and at most only sold 1 or 2 sign wave filters per year.
    1st, thanks for the comment.· I'm stunned by how many people are either working along simular lines, or have done so in the past, or would like to for there own project.

    2nd, your obviously very up on the subject.· I'm not!· I just use reasoning, if your heating the motor (not due to work load), then your wasting battery juice.· And that means your not going as far as you might be able to.
    Wurlitzer said...
    Yes, there is some additional motor heating using VFDs and usually we would never recommend running the motor into its full service factor rating because of this.
    Like all engineering, its a trade off ... the advantages of having a VFD, make the draw backs tollerable.· And also, you have lots of power available in·a mill.· Just use a bigger motor and not load it as much.

    Thanks again.
  • James NewmanJames Newman Posts: 133
    edited 2010-03-14 07:09
    Just wanted to say that I'm also interested in all of this. Don't have a whole lot to add to the conversation at the moment, but I'll chime in soon.
  • gladiator65327gladiator65327 Posts: 3
    edited 2010-03-14 11:39
    Awesome blog guys, I'm attempting to hack out a Holeset turbo that uses a 3ph stepper motor actuator to control the exhaust vanes. I am new to the prop world, and learning a realm of info from this site. Nice job on the EV concept, and I would love to see some more EV/petrol vehicle butt kickin.
  • WurlitzerWurlitzer Posts: 237
    edited 2010-03-14 15:29
    Tapperman said...



    2nd, your obviously very up on the subject. I'm not! I just use reasoning, if your heating the motor (not due to work load), then your wasting battery juice. And that means your not going as far as you might be able to.


    Yes the motor heating is wasted energy. The 97.5% efficiency I posted was for the DRIVE only. If you attempted to create a sine wave via the output devices in the drive the efficiency of the drive would drop like a rock with only a very modest gain in motor efficiency. If you added a sine wave filter then you would just add the loss of the filter.

    I think you will find that a straight PWM square wave applied to the motor will have the greatest overall system efficiency.

    Heating in the motor can be reduced by a lower carrier frequency in the PWM. In any event, do not push the motor into its service factor. Use 1.0 and nothing more.
  • TappermanTapperman Posts: 319
    edited 2010-03-14 17:54
    gladiator65327 said...
    Nice job on the EV concept, and I would love to see some more EV/petrol vehicle butt kickin.
    Well then watch this guy!

    ······· http://www.opb.org/programs/ofg/videos/view/56-Electric-Drag-Racing

    And welcome to the forum!
  • gladiator65327gladiator65327 Posts: 3
    edited 2010-03-15 01:18
    Dude that's progress the system I'm working on uses an ICE and extract as much of the wasted exhaust energy as possible at this point.
    jumpin.gif
  • gladiator65327gladiator65327 Posts: 3
    edited 2010-03-20 16:21
    Can you use this as a driver chip
    http://www.fairchildsemi.com/ds/FS/FSBB30CH60F.pdf
  • TappermanTapperman Posts: 319
    edited 2010-03-21 18:15
    gladiator65327 said...
    Can you use this as a driver chip
    http://www.fairchildsemi.com/ds/FS/FSBB30CH60F.pdf
    It's for small motors

    provide very compact and high performance ac motor drives mainly targeting lowpower inverter-driven application like air conditioner and washing machine.
    

    Not enough current.
  • WurlitzerWurlitzer Posts: 237
    edited 2010-09-03 07:32
    I know this is an moldy old thread but as I am looking to build a 3 phase converter for my pipe organ blower motor I thought I could add some info and correct some misstatements.

    I was a sales engineer for a VFD manufacturer before I went into consulting.

    Modern VFDs do not generate sign waves although external sign wave filters are used in some applications. They use PWM comprised of a constantly changing duty cycle applied to each winding of a 3 phase motor.

    The duty cycle sweeps from a very low value to higher value then back for each half of every AC cycle presented to the motor. The period is dependent upon the PWM modulation frequency used. Typical could be 6-18 KHz. Higher modulation frequencies can make a motor run smoother, but also generate more heat in the motor mainly due to core losses.

    As far as the motor is concerned it behaves as if it is getting an ugly 3 phase sign wave. What does it care it is getting current each 1/2 cycle, current = torque.

    Most VFDs, for simple operations, use a Volts/Hz calculation such that at low speeds the duty cycle of the PWM signal never sweeps very high. IE: a 440 VAC 60 Hz motor running at 10 Hz would see an effective AC voltage of approx 73+ volts. (440 * (10hz/60hz))

    Note the ACTUAL PEAK voltage of the variable duty square wave in a 440 VAC VFD system would be the rectified AC input voltage which would create approx. 616 VDC (440 * ~~1.4). minus diode drop and other system losses. Therefore at the motor windings this variable duty cycle square wave would have a P-P swing of over 1200 volts.

    This higher than expected voltage can be a problem with older motors not wound for VFDs (like my 1928 blower motor).

    Note of caution: As the physical distance between the VFD and the motor increases, a standing wave develops which can be up to 3x the DC buss voltage. Older motors did not usually have insulation which could withstand those high P-P voltages between windings.

    As there are 2 prop chips running my organ console and pipe chamber it is only fitting that I play with a prop to generate 3 phase. I could easily buy one but where is the fun in that?

    As I have yet to play with any of the PWM objects let along synchronize them 120 degrees apart this may take awhile.
  • TappermanTapperman Posts: 319
    edited 2010-09-08 11:11
    Wurlitzer wrote: »
    Modern VFDs do not generate sign waves although external sign wave filters are used in some applications. They use PWM comprised of a constantly changing duty cycle applied to each winding of a 3 phase motor.

    The duty cycle sweeps from a very low value to higher value then back for each half of every AC cycle presented to the motor. The period is dependent upon the PWM modulation frequency used. Typical could be 6-18 KHz. Higher modulation frequencies can make a motor run smoother, but also generate more heat in the motor mainly due to core losses.

    Thankyou for the post! I haven't been ignoring the forum ... just ran into a problem with the email software that split a line to activate my account when the new software went up on this site! But thanks to 'Mike Green' (and others) the problem is gone. So now I can post!

    Yes, that's exactly what my object does, I precompute a wave shape 'near sine' in a table and advance through the table, 'seperate cog', using a modified PWM object (borrowed from the object forum, Mr. Beau Schwabe's PWM driver).

    My IGBT's won't switch above '5Khz' ... so I use a little slower freq, best between 500 - 1khz. I have a copy of my object attached (older one, but added some comments) which should clear up some of the mystery of my propeller technique used.

    ... Tim
  • WurlitzerWurlitzer Posts: 237
    edited 2010-09-08 13:11

    My IGBT's won't switch above '5Khz' ... so I use a little slower freq, best between 500 - 1khz. I have a copy of my object attached (older one, but added some comments) which should clear up some of the mystery of my propeller technique used.

    ... Tim

    The lower carrier frequency will not hurt much. At slow speed you might see some cogging. We only played with the carrier frequency if mechanical harmonics caused a VFD driven motor/system to starting resonating.


    I'll check out your object tonight.
  • TappermanTapperman Posts: 319
    edited 2010-09-10 09:10
    Tapperman,

    I haven't visited my PWM code in awhile, but I think it should be doable.


    After a 4 month 'distraction' ... I'm back trying to finalize my drive and I have a question about the assembly portion of the object you wrote. But first, some background:

    I'm driving the IGBT's using http://www.vishay.com/docs/81314/vo3120.pdf which is LED optically coupled. I have wired it w/inverter to a pair of IGBT's .. such that thier LED's are reversed (see attachment).

    I have since wired it up in series with a light bulb (head light off my van) and driven the pair of IGBT's with a 2 khz square wave. And since the LED arrangement prevents both IGBT's from being on tegether, the light should not glow! But it does!, not too bright, but it passes current.

    Now ... here's my question: "Since I could stop both LED's from passing current by changing the direction of the pin to input", is it possible to do so from assembly for a brief (definable) period of time, each time the output pin changes state? And then go back to output again.

    I took a snippet of code (used chnl 14, random choice) and included the data block at the end for this question:

    [code]
    DAT
    '
    [in the code section]
    sub t1 + 13, #1 wc
    Ch14 if_c xor Ch + 13, Mask + 13 wz
    if_c_and_z mov t1 + 13, T_Off_Ch + 13
    if_c_and_nz mov t1 + 13, T_On__Ch + 13

    DAT '
    [variable section]
    ''
    Defined PWM specific variables
    Mask long |<0,|<1,|<2,|<3,|<4,|<5,|<6,|<7
    long |<8,|<9,|<10,|<11,|<12,|<13
    long |<14,|<15,|<16,|<17,|<18,|<19
    long |<20,|<21,|<22,|<23,|<24,|<25
    long |<26,|<27,|<28,|<29,|<30,|<31

    t1 long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

    ''
    This Block of memory needs to stay intact
    T_Off_Ch long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

    T_On__Ch long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    ''

    Ch long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    [\CODE]

    If a guy 'jumped with no carry' after the SUB command and bypassed the rest of the tests, this would keep the speed up (processing) and free up the carry flag for testing the direction of the pin, correct? Or, is it not feasable?
    800 x 600 - 44K
    800 x 600 - 58K
  • ErNaErNa Posts: 1,753
    edited 2010-09-10 11:20
    As I understand, you are driving both IGBT's inversely from one signal. As an IGBT has different switch on / off times, and as there are possibly different delays, it may happen that both are open for a few nanoseconds, what indeed is a short circuit, or called "shoot through".
    As you said, there has to be a dead time to make sure both IGBT's are off during transition. But, as you are driving an inductance, you are never allowed to break current flow, therefor there always must be a freewheeling diode.
    All together: a PWM power stage with IGBT's has to be designed very carefully, especially at higher voltages.

    Driving IGBT's is a science on her own and I see, there are diodes, but I fear, they are of wrong type. There are special high speed soft recovery diodes available for this purpose
  • WurlitzerWurlitzer Posts: 237
    edited 2010-09-10 11:31
    Yes, high speed recovery diodes should be used to sink any inductive energy generated by the motor when: 1, current stops flowing from the drive AND 2: when the motor is running faster than the commanded speed such as during deceleration.

    In a commercial drive, this deceleration energy is fed back into the capacitor bank via diodes across each IGBT and must be carefully monitored.

    If the drive commands a deceleration faster than the motor and driven elements can decelerate the DC bus level on the capacitor bank starts to rise very quickly.

    On the industrial drives this energy is usually diverted into a resistor load via a 7th IGBT or in more elaborate systems a common DC bus would feed multiple drives such that the excess energy could be used by another drive in the system that still might be under load.

    A commercial drive will immediately shut down gating signals to the IGBT if the bus voltage starts to rise above a preset maximum. This is done in microseconds.
  • TappermanTapperman Posts: 319
    edited 2010-09-10 12:29
    ErNa wrote: »
    Driving IGBT's is a science on her own and I see, there are diodes, but I fear, they are of wrong type. There are special high speed soft recovery diodes available for this purpose

    Thanks ... looks like a hold on going forward!
  • TappermanTapperman Posts: 319
    edited 2010-09-10 17:20
    Thanks to @Wurlitzer and @ErNa for the comments. They mean a great deal to me. But would the following code achieve what I originally ask? (See attach)

    ... Tim

    PS - I'm still learning assembly.
  • WurlitzerWurlitzer Posts: 237
    edited 2010-09-11 06:24
    Tim, the way I am looking to do this is to use the counters in assembly. The base frequency of the counter would be my carrier frequency (approx 8khz) and I would constantly change the duty cycle via a loop in assembly which is determined by both the running motor frequency and the desired duty cycle for each iteration.

    That same loop would also direct the counter's output to the appropriate IGBT depending were in the cycle it happened to be.

    This wastes a cog (2 phases in one cog and the 3rd phase in a 2nd cog) but allows the counters to do most of the heavy lifting.

    Spin would feed the variables needed for motor frequency (rpm) and now many steps per 1/4 cycle to increment/decrement the duty cycle.
  • TappermanTapperman Posts: 319
    edited 2010-09-11 11:02
    Wurlitzer wrote: »
    Tim, the way I am looking to do this is to use the counters in assembly. The base frequency of the counter would be my carrier frequency (approx 8khz) and I would constantly change the duty cycle via a loop in assembly which is determined by both the running motor frequency and the desired duty cycle for each iteration.

    Are you refering to the 2 timers in each cog?

    Hey, that sounds reasonable! Not knowing assembler is quite a 'handicap'. I guess it's time to face it, if you want to handle events in microseconds, your going to have to program in assembly.

    Are you thinking of seperating the drive pins from 3 to 6? I considered that (very strongly at one point), but concluded that without assembly ... that wouldn't be practical. So I went with the led scheme you saw in an ealier msg.

    Any possiblity you could perhaps 'coach' me on my assembly? You have far more 'field' experience than I do, and I appreciate ALL the input this forum provides.

    I'm very currious if my code:
    if_z SUB 0,1 wc
    is correct? will it move the 'zero' flag to the 'carry' flag?

    ... Tim
  • WurlitzerWurlitzer Posts: 237
    edited 2010-09-11 11:10
    Yes one cog I will use both timer/counters for phase A,B and a 2nd cog will just use one time/counter for phase C.

    Take the time to learn PASM. It is so easy as there are only a few instructions to learn but by understanding the C and Z flags you can make your program sing. To have the ability to set or not set the flags give you a lot of flexibility.

    Once you get the basic instructions set in your mind, look at examples of self modifying code which I use all the time and then look at the counters. Of all things I found the counters the least intuitive and difficult to find good examples for each mode. Again it is well worth the effort.

    SPIN is good but not for speed. PropBasic would seem to be the best of both worlds as it compiles to Assembly but I have not worked with it enough to know if I hit a bug or if I am just stupid.
  • TappermanTapperman Posts: 319
    edited 2010-09-11 14:20
    Wurlitzer wrote: »
    Take the time to learn PASM.

    Where would you suggest a guy start?
  • WurlitzerWurlitzer Posts: 237
    edited 2010-09-11 15:42
    Obviously the manual is the starting point but it does not have enough examples IMO for those with no assembly experience.

    I came to the propeller with only VB6 (a ton of that) and Motorola 68705 assembly experience and that was only for 2 programs I had written many many years ago. If it were any older it would have been programmed in Roman numerals.

    I looked at various objects in the OBEX and many have assembly cogs with pretty good documentation. I believe there is also a Wiki page but maybe others here could point you in a good direction.

    No matter were you start, don't let it overwhelm you as again there are not that many instructions to learn and each one only does a little bit.

    Start with simple LED type stuff just like you would with SPIN or Basic. IMO PASM is head and shoulders in ease of learning over a language like C.
Sign In or Register to comment.