
Variable Frequency Drive
Description
A Variable Frequency Drive (VFD) is similar to
three phases Brushless Direct Current (BLDC) motor
control. VFD is often used with Induction Machines
(IM) while BLDC is normally used with Synchronous
Machines (SM), although that is just an observation.
A control method found with both is Field Oriented,
which Drives (FOD) a rotating stator field with an
offset angle from the rotor. It is the offset angle
who develops motor/generator Tourque and results in
real (rather than reactive) power flow.
Table of References
Proc0002
PWM gnuplot source
IFOC Diagram Libre Office drawing
ds-qs Vector Diagram Libre Office drawing
FlowChart Diagram Libre Office drawing
Application Libre Office drawing
Table Of Contents:
SECTION: Discussion
SECTION: Why -48 VDC is used
SECTION: Three phase AC machine vector control
SECTION: Hardware and Software
SECTION: Application
SECTION: State of Charge vs. Voltage for lead acid
SECTION: Notes
CHANGE LOG: History
Discussion
Have a look at Wikipedia [*] to get basics. I am
interested in VFD for energy harvesting. Let's start
simple, VFD are inverters that control AC frequency,
voltage, and current with higher-frequency PWM [**].
* http://en.wikipedia.org/wiki/Variable-frequency_drive
** http://en.wikipedia.org/wiki/Pulse-width_modulation

When a PWM signal drives an inductive load, like a
motor, the resulting current is an average of the PWM
and its history. Mathematically, the state-space
average technique may be used to examine behavior, but
let's classify the control methods first. A simple
V/Hz or scaler drive maintains the three phase shifted
sine waves regardless of the current signal. On the
other hand, field-oriented or vector control [*] are
computationally intensive but reduce motor size and
power waste, both due to less motor heat. Vector
control is more efficient than scaler control. It
measures the motor reaction to the drive signal, thus
energy use can be minimized. Synchronous machines [**]
operate in phase, and thus lack rotor slip. Induction
machines [***] slip and need this accounted in the
control loop.
* http://en.wikipedia.org/wiki/Field-Oriented_Control
** http://en.wikipedia.org/wiki/Synchronous_machine
*** http://en.wikipedia.org/wiki/Induction_motor
# also see project http://sourceforge.net/projects/tumanako/
Most VFD users are interested in motion control,
but this discussion is about power flow control.
Motion and power are intimately connected; for
example, constant torque is also constant power.
However, when the aim is to maintain a constant DC bus
voltage under transient loading condition's motion
energy is sacrificed. Examples include flywheel,
overhauled wind/hydro turbine, and overhauled gear
pump.

I need to control the rotor stator angle. First
let me define some things. V_S is the vector sum of
V_A + V_B + V_C. I_S is the vector sum of I_A + I_B +
I_C and lags behind V_S as an Inductor. Power Factor
is Real / Apparent, and is equal to the cosine of the
angle between V_A and I_A (PF_angle). In an SM, a
magnetic field follows/leads the stator field I_S by
the rotor stator angle. The flux path of I_S and
rotor are identical, so whatever the winding count is
for rotor its Amp-turns must match I_S Amp-turns and
can thus be ignored (including PM type). The SM rotor
field induces a EMF at the rotor stator angle from
I_S. If I calculate the state space average of V_A
and measure the actual V_a the difference is due to
the rotor induced EMF. I can now subtract the
PF_angle to find the rotor stator angle. I'm avoiding
the term back EMF because that makes sense with
Lenz's Law, which says the induced EMF always opposes
the change producing it, but the rotor EMF may change
with the wind. In an IM machine, the rotor runs
slower/faster than the controlled I_S field, and this
can be ignored for power flow control. Note I am
trying not to use the term slip with IM, because it
means something different with SM, which is the
change in rotor stator angle during load changes.
* http://educypedia.karadimov.info/library/eet_ch6.pdf
* http://hrcak.srce.hr/file/10298
When a guest of wind occurs, it produces a
negative power error. This reduces the integration
(PI) value output over time. However, Feed forward of
negative values is needed to produce high torque, and
thus slow the turbine down. Once slowed the power
error signal turns positive and feed forward stops.
Many VFD can share a common DC bus, which acts as
a power hub and allows flows to mix and be routed.
VFD can operate in Four-quadrant or modes. In the
first quadrant speed and torque are positive or
forward, direction. In the third quadrant, both speed
and torque are in negative or reverse direction. The
first and third operating quadrants consist of the
motor driving a load taking power from the power hub.
The second and fourth quadrant operates with speed
and torque in opposed directions, where the torque of
the motor is opposing its rotation. This Overhauling
Load condition converts kinetic energy from the load
into electrical energy. The motor behaves as a
generator and the VFD delivers power into the hub.
The 48VDC bus is in common use, but is less than
what is needed to drive a 120VAC motor. However, a
common automotive alternator has three phases and low
voltage needs. Some have heavy-gauge windings, and
carry over 40 amps. These alternators offer a huge
selection of low cost three phase machines that can
be driven with a VFD/BLDC from a 48VDC buss. It is
important to stick with a 48VDC bus, because
batteries can both store power and bypass some noise.
Furthermore, 48VDC is sized for small scale isolated
power use. An alternator is an SM.
Each VFD/BLDC can act as a two or four quadrant
branch circuit from the power hub. At least, one
branch needs to source power, as others draw. For
example, a two quadrant sine-wave inverter branch to
power AC loads, and a two quadrant wind turbine for
power source, and a four quadrant flywheel for
buffer. The flywheel can allow the inverter to
operate for a time without the wind blowing.
Although lead-acid batteries are the lowest cost,
they are poor bulk power storage, with their life
short and cost high. Four 12V deep cycle batteries
typically cost USA$500 and will provide 25 amps for
over 3hr, which is 300W each. Proper operation for a
lead-acid battery is to draw it down, and then
promptly fully recharge it to minimize sulfation [*].
If the recharge is delayed sulfation will cause the
storage capacity to deteriorate. VFD connected to a
lead-acid DC bus must use it wisely, thus keep the
batteries charged without cooking them.
* http://en.wikipedia.org/wiki/Lead-acid_battery#Sulfation
In the previous example, a flywheel was suggested
for storage, but water storage is better. "Pumped
storage is the largest-capacity form of grid energy
storage now available" [*]. A good example is the
Taum Sauk Hydroelectric Power Station [** and ***],
which also shows a failure condition. It is very
important to understand what can or will happen when
energy containment methods fail. The small reservoirs
I will be working with can also casue damage.
* http://en.wikipedia.org/wiki/Hydroelectric_energy_storage
** http://en.wikipedia.org/wiki/Taum_Sauk_Hydroelectric_Power_Station
*** http://maps.google.com/maps?sll=37.520559,-90.835261
There are small Hydro-Turbines [*], but gear
pumps [*] work in both directions. A gear pump can
lift water to an upper reservoir and then control the
rate it is let down. A gear pump can operate over
four quadrants in terms of torque and shaft rotation.
Connecting one port of the gear pump to the upper
reservoir forces it to operate in two quadrants, one
loading the other generating. The VFD/BLDC controlled
motor needs to apply enough torque to lift as well as
lower the water. The speed at which the torque is
applied determines the power loaded or generated. In
other words, the rate at which power can be stored or
recovered is variable. A DC bus regulating VFD/BLDC
should maintain battery float voltage at 55.2 to 56.4
VDC (at RT) and needs the ability to perform charge
equalizing voltage at 57.6 to 58.8 VDC.
* http://www.powerspout.com/
** http://en.wikipedia.org/wiki/Gear_pump
The column of water in the pipe that separates
upper and lower elevation storage acts like a freight
train with an inertia that requires power when its
speed changes. This freight train works with our
desire when lifting water, but against our desire
while lowering water. If we want to increase the rate
at which we store water the pump must speed up and
the velocity in the column of water must speed up.
The change in velocity of the column requires work,
and thus power is used in proportion to the work
done. If we decrease the rate of water storage, the
column speed will slow, and return its energy of
inertia. This returned work reduces the pump work,
therefor it is conserved in a favorable way.
Unfortunately, when we look at pumping water down
hill inertia is not benign. Water line inertia will
add its work when a decreased water flow is desired
from the pump. Additionally, when an increase of
production is attempted speed increases, and inertia
takes work.
Inertia of water flow in a pipe is like electric
current flow [*] in an inductor. Placing a vessel
half full of air near the gear pump allows the water
flow to compress and expand the air. The resulting
water flow from the half-empty water tank is similar
to amperage flow in an electrical capacitor. This
adds some ideas/tools to help conserve work and
simplify system control.
* http://en.wikipedia.org/wiki/Lenz's_law
Let us examine a wind turbine with our VFD
controlled alternator. It will be a long way from the
gear pump, so is it better to run DC or three-phase
AC with raw PWM or filtered. These are bad options,
but thinking about them points out that the VFD needs
remote sense voltage, because it is critical to get
the right voltage at the batteries divorced from any
length of current carrying wires. I also need to
filter the DC, and that is what will run the long
distance. Next I have a lightning issue, so I need a
hard ground at the Wind Turbine. The ground needs to
tie the positive DC line to a deep low resistance
earth (see: Why -48 VDC is used bellow). I can put
soft grounds in other places, but they need to be
higher resistance like 1k Ohm. The idea is to get it
out of our wires at the place it is most likely to
enter, thus reducing the chance of nuking everything.
It may nuke the wind-turbine VFD, so we need to be
ready to replace that when it happens. Of corse, I
will try to shield the alternator, wind tower, VFD
and tie that shielding to the hard ground as well.
This is an interesting paper on variable-speed
wind [*].
* www.nrel.gov/docs/fy04osti/36265.pdf
Simple torque or power control will allow the
turbine speed to change as wind speed changes. A
guest will cause execces power and speed, and if the
DC bus voltage is high I need to load dump the power,
and slow down the turbine to make it less efficient.
A low voltage allows the Power value to increase
within the power and speed limits, however a high bus
voltage requires integrating up the load dump. If
speed is increasing the power command increases, and
vise verse. The actual power is used to calibrate the
power command, and adjust any needed load dump. A
power rate of change (PwrRate) insures the hydro
control loop has time to adjust to inputs, and may
require a PWM Load Dump. Once within the speed window
power can ramp up until speed decreases or the bus
voltage window requires a load dump. If load dump
becomes excessive or battery voltage is wrong, a
locked rotor condition is initiated in which I PWM
the low side fets at a safe current flow but bascily
shorted.
Why -48 VDC is used
There are several aspects for using -48V in this
type of equipment, including: Positive voltage cause
comparatively more corrosion in metal. Electro Static
Discharge (ESD) [*] is an electron flow, and seeks
positive voltages. In that situation, negative
voltages tend to repeal ESD. Noise and interference
due to ESD from charged particles and ilk is minimum
with negative supply voltage. If the earth is
considered to be positive, and we supply negative to
our equipment lines, then when lightning occurs it is
attracted to the positive line and to the earth
rather than the negative line feeding our sensitive
equipment. Electrical regulations in many countries
consider low voltage DC circuits (less than 50V) to
be safe. Positive Lightning [**] rarely occurs, but is
still electron flow from the ground to cloud top. I
think (hope) it is unlikely to originate from a
regulated negative circuit as long as that is not the
highest point.
* http://en.wikipedia.org/wiki/Electrostatic_discharge
** http://en.wikipedia.org/wiki/Lightning
Three phase AC machine vector control
In the stator, which is stationary, a multiple of
three equally displaced coils are driven with
alternating current, each 120 degree out of phase.
The stator magnetic flux is routed within the rotor
using a low reluctance path. For an Induction
machine, this path includes rotor windings that
conduct induced current and create another field. For
a Synchronous machine, the path has a fixed field,
for example, from a permanent magnet. It is the
combined rotor and stator field that create torque.
Vector control is analogous to the separately
excited armature current control over a DC motor. The
armature flux produced by the armature current is
perpendicular to the field flux produced by the field
current. As the armature rotates the brush contacts
and excites windings in the armature perpendicular to
the field flux, so this condition is forced by
design. The magnetic flux in the field and armature
are decoupled and stationary with respect to each
other. When the armature current is controlled it is
proportional to torque, however, the field flux
remains unaffected, enabling a fast response.

It is physically impossible to separate the
armature and the field of an AC machine.
Mathematically, it is possible to separate them,
which allows the stator currents to be optimized, and
make the best use of this torque producing magnetic
field. The stator currents are derived from the
interaction between the stator flux and the resulting
induced rotor flux. Because the rotor and stator flux
is not perpendicular by design, they acquire an angle
controlled by loading. Thus, an AC machine lacks the
conditions for optimal torque production, unless the
angle is controlled. It is challenging to maintain a
constant armature and stator angle during load
transients, but that is the goal.
The following image shows a three-phase machine
represented with its perpendicular equivalent, two
phases. The axis labels are quadrature (q) and direct
(d). The rotor is shown offset with angel Thata
relative to the stator. The "A" phase current is
coincident with the direct axis.

Vector was made with this Libre Office drawing file.
i_{%alpha} = i_{A}
i_{%beta} = (i_{C} - i_{C}) / sqrt{3}
In a balanced 3 phase system
i_{A} + i_{B} + i_{C} = 0
i_{A} + i_{B} = - i_{C}
thus
i_{%beta} = (i_{A} + 2 i_{B}) / sqrt{3}
Only the "U" and "V" phase currents need measured
to calculate the direct and quadrature orthogonal
vector representation, which is the Clarke
transformation.
i_{d} = i_{%beta} sin(Thata_{r})
Hardware and Software
One option is an AT90PWM3B, which can clock the
PWM hardware at 64MHz while clocking the MCU at
16MHz. A 12 bit PWM resolution takes 4096 PWM clocks,
during which the CPU runs 1024 instruction cycles. At
these rates, the PWM switching frequency tops out at
15.625 kHz. If the PWM resolution is reduced a bit
the top frequency doubles, but the number of
instruction cycles is cut in half. The PWM clock
multiplier can be decreased to gain back the number
of instruction cycles, but then switching frequency
drops in half, and we gain nil. The MCU should be
able to implement the real time Space Vector PWM, but
additionally doing FOC and Modbus is unlikely.
Another option from Atmal is the AT32UC3B line.
Its PWM controller is even more flexable and has
seven channels. The MCU core can run at 60MHz, and
PWM may be clocked separately, but I have yet to find
a reference to PWM clock upper limit. I can also slow
the PWM clock and reduce its resolution to better
trade off switching frequency speed for the MCU time
I will need to compute FOC and service Modbus.
The AT32UC3B has four interrupt priorities, which
will be made use of in the following order: SVPWM
updates, ADC round robin six channels, RS485 port0,
and RS485 port1. I am defining the prototype [*].
* http://epccs.org/indexes/System/FODproto/
I also looked at Fairchild FCM8201, which can
clock the PWM hardware at 1920 kHz, and has an SPI
interface for MCU. The 6 bit PWM resolution takes 64
PWM clocks, thus allowing 30 kHz switching frequency
without loading the MCU. This would have allowed an 8
bit MCU to take on more complex Modbus and logic
functions. It also would have saved a lot of
development work. But alas the angle control between
the stator field, and the rotor allows one side of
control. This chip works in two quadrants, and thus
lacks the ability to generate power. When a motor
consumes power, the rotor field is lagging behind the
stator field, it is being pulled by the controlled
stator field. The back EMF caused by the rotor field
should be able to show its location. When it
generates power, the rotor field is leading the
stator field. Thus, the back EMF vector is relatively
closer to the excitation vector.
Application
This is an example of wind energy harvesting with
hydro energy storage. An embedded controller (SCADA)
runs as the Modbus master, all the VFD and PLC are
Modbus slaves. The goal of the system is to provide
AC power from the Inverter. To accomplish this Wind
power is harvested and immediately used, or stored
when a gear pump lifts the water up hill. If wind is
not available hydro energy is recovered as the gear
pump lowers the water down hill. Finally, a Diesel
engine starts up when wind and hydro are played out.

VFD/BLDC and PLC will fail intermittently but may
also last 20+ years. On the other hand, batteries
will need replaced every three to five years and are
the primary maintenance cost. The good news is
batteries are a buffer rather than primary storage;
they may be kept at or near a full charge, thus last
their maximum expected life.
Calling this a VFD would add confusion, sort of
how slip, load angle, and back EMF does. When doing
something different it may be best to name it
something else. Slip is used to describe a change in
SM rotor and stator angle, as well as a slower
rotational speed in an IM when loaded. Load angle is
used to describe the real verse apparent power in an
L-R circuit, and the physical angle between stator
and rotor field in SM. Back EMF is not even what we
see in a motor, we see the EMF induced from the rotor
field... Lenz's law is back EMF. In each case, the
concepts are different, yet a lot of confusion is
present. Anyway, I am calling this a Field-Oriented
Drive (FOD); it is just a type of VFD/BLDC or vector
drive.
System, Power, Batterys, cost/years
FOD48V40, 2 kW, 4 x 12V, 500 $/ 4 yr
FOD96V40, 4 kW, 8 x 12V, 1000 $/ 4 yr
FOD182V40, 8 kW, 16 x 12V, 2000 $/ 4 yr
State of Charge vs. Voltage for 12V lead acid

from wikipedia
Notes
The 48V DC bus needs ramped up (20 Ohm) to the
operating voltage be for making a low Ohm contact to
prevent high currents in board components.
If we add air capacitors on both sides of the
gear pump, each will negate the water column inertia
to its reservoir. The buffers should allow quick
power flow changes in the gear pump.
CHANGE LOG:
Release New
Initial release
Copyright Notice
Copyright (C) 2012 Ronald Steven Sutherland
Report errors or omissions to rsutherland at epccs dot com
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation. A
copy of the license is included in the section entitled "GNU Free
Documentation License".
GFDL taken form http://www.gnu.org/copyleft/fdl.html