Shop OBEX P1 Docs P2 Docs Learn Events
Propeller as 3-phase induction motor vector controller? — Parallax Forums

Propeller as 3-phase induction motor vector controller?

Mark_TMark_T Posts: 1,981
edited 2014-08-05 09:28 in Propeller 1
I've recently been thinking about experimenting with induction motor control using the
Prop. Normally a DSP-based uController is suggested for this purpose, but I don't see
that anything like that fire-power is needed for basic vector control.

Anyone else had thoughts / experience with this? I'm thinking something like a re-purposed
washing machine 3-phase induction motor with the tachogenerator replaced by an encoder...

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-16 08:25
    Well, the Propeller has a built-in binary Sine table and just starting 3 cogs looking up data 120 degrees apart should do fine. A fourth cog would control the output rate. Another cog might sense that proper speed control is maintained as many 3 phase motors have hall effect sensors that can me monitored.

    If you want to drive amps of power, you will need a 3-phase configured set of MOSfets. These exist in a single package.
  • kwinnkwinn Posts: 8,697
    edited 2014-06-16 09:32
    After looking at the waveforms from VFD's it appears the prop should be able to output the same control signals with ease.
  • Mark_TMark_T Posts: 1,981
    edited 2014-06-16 11:38
    The tricky issue with induction motor drive is getting the flux and torque components of the drive current
    estimated/controlled well. You then have 1ms or better control of motor torque and can implement proper
    servomotor action.

    Get the two components confused and the torque/slip ratio will be fluctuating out of control, destabilizing the servo
    position PID loop since the ratio sets the loop gain.

    This is the crux of the difference between a VFD and a full vector controller.
  • FredBlaisFredBlais Posts: 370
    edited 2014-06-16 14:25
    @Mark_T

    keep me up to date with your experimentation! My father asked me a couple months ago if I would be able to make 3phase VFD (about 1hp) that could run from his 240V line. I thought about making one with a scalar (V/f) control.
  • Mark_TMark_T Posts: 1,981
    edited 2014-06-28 07:49
    Milestone reached! Have a control loop working. :)

    Photos/video to follow soon.

    Very soon: The board setup:

    And the motor running a random positioning loop

    The motor is a C.S.SET 800W 3A 3-phase washing machine motor (used in
    several models of washing machine, £20 on eBay).

    There are 4 cogs, one does current sensing feedback to drive the bridge
    and keep the stator currents at their programmed value.

    One calculates the stator currents from the current rotor position and
    slip speed and flux/torque drive levels - sine table lookup and multiplies

    One reads the encoder AS5040 (SPI interface) and maintains a PI loop
    angular frequency and phase using a counter module in NCO mode, also
    generates the slip phase from slip velocity the same way, writes current
    values to hub regularly.

    One cog is top level simple positions PID loop in Spin - sets the flux, torque
    drive levels and slip frequency, detects position error.
  • Mark_TMark_T Posts: 1,981
    edited 2014-06-28 08:20
    And some info on the 3-phase MOSFET board. I found LFPAK devices with 100V and 13milliohm, PSMN016-100YS
    LFPAK is basically SOIC8 with 4pins combined into a drain tab, so good heat dissipation and easy to solder for an SMT.

    FAN7388 (my favorite 3-phase bridge driver, never blown one yet) provides the gate drive, and a couple of ASC711's
    sensing the current (+/-12.5A, 0.11V/A sensitivity) each feeding a ADCS7477 SPI ADC (1MSPS, 20MHz SPI).

    Schematic:
    Induction_Drive_sch.jpg

    layout:
    Induction_Drive_brd.png


    End connector strip supplies GND, 3.3V (although the ASC711's and ADSC7477's will also work at 5V),
    12V for the FAN7388.
    1024 x 718 - 74K
    802 x 952 - 54K
  • Mark_TMark_T Posts: 1,981
    edited 2014-06-28 14:36
    More docs, this time waveforms:
    adc_action.jpg
    complete_cycle.jpg
    phases1.jpg
    phases2.jpg


    First is detail of the ADC access in the microseconds before a commutation step, bottom
    trace is the MISO on the SPI bus, two accesses for U and W phases are seen (V is
    computed from them). The code then compares to the desired current values and
    decides which phases to invert (top trace is U I think).

    Second pic is longer timescale showing the 25.6us cycle (well about 2 cycles).

    Third and fourth are a couple of the phases at a more human timescale showing deceleration.

    I forgot a test point on the current sensor outputs or I would have imaged those too.
    912 x 684 - 405K
    912 x 684 - 411K
    912 x 684 - 387K
    912 x 684 - 396K
  • ManAtWorkManAtWork Posts: 2,176
    edited 2014-07-01 04:03
    Very impressive, Mark! I'm currently also working on a propeller based VFD/servo controller: http://forums.parallax.com/showthread.php/155731-measuring-voltage-with-RC-slope?p=1269144&viewfull=1#post1269144

    What is your control strategy? I think the vector control used in VFDs for induction motors don't work at zero speed you need for servo control. Do you drive the motor like a stepper with constant flux an adjust the field rotation frequency to compensate the slip? Or do you use a more advanced model trying to guess the rotor winding current?

    I only support synchronous (permanent magnet) motors for servo control or simple V/f speed control (non-vector) for induction motors.
  • prof_brainoprof_braino Posts: 4,313
    edited 2014-07-01 07:05
    Just found this. Where did you get your mosfet board? Would that 800 watt motor power a go cart? Any guestimate how many automobile starter batteries would be needed?
    Because I NEED another project that requires a helmet!
  • TappermanTapperman Posts: 319
    edited 2014-07-01 08:01
    Just found this. Where did you get your mosfet board? Would that 800 watt motor power a go cart? Any guestimate how many automobile starter batteries would be needed?
    Because I NEED another project that requires a helmet!

    I'll sell you mine:... lol ... it shares the same trait that ManAtWork mentioned
    I only support synchronous (permanent magnet) motors for servo control

    It uses an Automobile Alt. as a drive ... which is quite nice, since it already has the required 'button' diodes in it (matched to the windings.) In addition, the back EMF can be managed by adjusting the field current! Something you can not do in a DC brushless. This allows the motor to turn faster!

    It does appear to me ... that several of us "Prop'ers" are journeying down the same path!

    Hey, I may even have a helmet I can throw into the deal.

    Or, perhaps Parallax Corp could use it as a museum piece? I'm open to suggestions.

    ... Tim
  • Mark_TMark_T Posts: 1,981
    edited 2014-07-01 08:28
    Just found this. Where did you get your mosfet board? Would that 800 watt motor power a go cart? Any guestimate how many automobile starter batteries would be needed?
    Because I NEED another project that requires a helmet!

    I designed it, fabbed by ragworm.eu, soldered using my converter toaster oven!

    I've not ventured any higher than 30V yet, the current board would go to about 80 or 90V, but the motor's
    designed for 195V so getting to 800W would need either high voltage supply and a reworked bridge (probably
    something like this IGBT module would then be appropriate:
    http://uk.farnell.com/fairchild-semiconductor/fsbb20ch60f/ipm-igbt-20a-600v-spmca-027/dp/2322642


    A better bet for traction is re-wiring a motor for lower voltage, say 48V 20A and using bigger MOSFETs.
  • Mark_TMark_T Posts: 1,981
    edited 2014-07-01 08:34
    ManAtWork wrote: »
    Very impressive, Mark! I'm currently also working on a propeller based VFD/servo controller: http://forums.parallax.com/showthread.php/155731-measuring-voltage-with-RC-slope?p=1269144&viewfull=1#post1269144

    What is your control strategy? I think the vector control used in VFDs for induction motors don't work at zero speed you need for servo control.

    vector control isn't used in VFDs at all. The vector in vector control is actually the rotor flux phasor which is
    what you want to control to allow arbitrary rapid torque changes. My method can't adjust for the rotor
    resistance/inductance changing as it warms up, but just relies on keeping a fixed relationship between torque flux
    component and slip speed. The flux component is held constant currently, but you could change it
    to control power consumption on idle, for instance, or for short duration extra torque bursts.

    Standard VFD's just maintain a ratio between voltage and frequency, which works for steady-state only.
  • ManAtWorkManAtWork Posts: 2,176
    edited 2014-07-01 09:24
    Mark_T wrote: »
    A better bet for traction is re-wiring a motor for lower voltage, say 48V 20A and using bigger MOSFETs.

    Check out fork lift motors. They are usually run from 36 or 48V batteries.
  • Mark_TMark_T Posts: 1,981
    edited 2014-07-01 14:34
    ManAtWork wrote: »
    Check out fork lift motors. They are usually run from 36 or 48V batteries.

    Won't they be series-wound DC motors though?
  • ManAtWorkManAtWork Posts: 2,176
    edited 2014-07-01 23:37
    Those from the last century are mostly DC motors but the modern ones are induction motors. Same for washing machines. 10 years ago all used series wound brushed motors. The newer ones have brushless induction motors.
  • Mark_TMark_T Posts: 1,981
    edited 2014-07-02 06:17
    Interesting - searching for "induction traction" didn't seem to throw up many low-voltage systems, and alas
    I doubt modern fork lift motors are on the secondhand/junk market yet....

    There are some EV conversions firms doing induction motors for 72/96/144V DC bus operation, at barmy
    prices.
  • Mark_TMark_T Posts: 1,981
    edited 2014-08-03 12:46
    As a spin-off from working on this I've package up a 3-phase inverter PWM driver in the Obex:

    http://obex.parallax.com/object/755

    If anyone is interested:
    Inverter (ie 3-phase) PWM generator for driving AC motors.
    Options are 3 or 6 pin output (with two dead-time options in the latter case).
    Period is anything you want although >100kHz would be pushing it, realistically.
    3 cogs are needed to get switching accurate to one cycle (12.5ns) and allow
    fine-grained control at high PWM frequencies. At 16kHz there are over 2400
    levels per channel (which you supply as a signed value in range -1200 -- +1200)
  • jmgjmg Posts: 15,173
    edited 2014-08-03 23:19
    Mark_T wrote: »
    There are 4 cogs, one does current sensing feedback to drive the bridge
    and keep the stator currents at their programmed value.

    One calculates the stator currents from the current rotor position and
    slip speed and flux/torque drive levels - sine table lookup and multiplies

    One reads the encoder AS5040 (SPI interface) and maintains a PI loop
    angular frequency and phase using a counter module in NCO mode, also
    generates the slip phase from slip velocity the same way, writes current
    values to hub regularly.

    One cog is top level simple positions PID loop in Spin - sets the flux, torque
    drive levels and slip frequency, detects position error.

    What update rates do you get in the maths side, for the control loop.
    I can see a Prop can manage pulse generation easily, but the maths is likely to be slower...


    Some companies have quite small devices, with co-processors that target the vector space equations
    one example :
    http://www.fairchildsemi.com/pf/FC/FCM8531.html
  • Mark_TMark_T Posts: 1,981
    edited 2014-08-04 13:20
    jmg wrote: »
    What update rates do you get in the maths side, for the control loop.
    I can see a Prop can manage pulse generation easily, but the maths is likely to be slower...


    Some companies have quite small devices, with co-processors that target the vector space equations
    one example :
    http://www.fairchildsemi.com/pf/FC/FCM8531.html

    Indeed, but if you stick to add multiply and sine-table lookup its not too bad. There's no
    need to convert to quadrature space as 3-phase space is already linear and easy to work in,
    all you need is to work with U and V and compute W == -(U+V) when needed. Feedback
    loops works with vectors as well as scalars.

    You have say 30us or so between updates, 600 instructions...

    [ BTW most of my loops are running in 25.6us, PID loop somewhat slower IIRC ]
  • Mark_TMark_T Posts: 1,981
    edited 2014-08-05 09:28
    Mark_T wrote: »
    As a spin-off from working on this I've package up a 3-phase inverter PWM driver in the Obex:

    http://obex.parallax.com/object/755

    If anyone is interested:

    And now I've managed to do a version using only one cog rather than three, controlling
    6 pins with programmable deadtime, here:

    http://obex.parallax.com/object/756

    The technique might be of interest to others, BTW - there is a big list
    of instructions of the form
    xor     OUTA, 0
    
    and the first 64 longs in the cog are a table of pinmasks, and a pin-dependent bit is XOR'd into
    the main table of xor instructions at positions corresponsing to the duty-cycle for that pin, then
    repair later by XOR.
Sign In or Register to comment.