Professional Documents
Culture Documents
DSP TMS320F28335
by
Fernando Jesus Garca Diaz
Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Certified by. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Juan Daz Gonzlez
Associate Professor
Thesis Supervisor
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
2
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
by
Fernando Jesus Garca Diaz
Abstract
In this thesis the design of a three phase inverter in open loop was
done, intended to be used as a variable speed drive for an induction
motor. First the motor parameters were obtained through the no load
and blocked rotor tests, with this parameters a simulation is carried
out using Psim. Then a driver for the IGBTs was designed and
assembled together with the IGBTs, heatsink, diode bridge, and
busbar. The control was made with the DSP TMS320F28335 using
sine PWM modulation. The system was finally tried with a real
motor, analyzing currents and voltages.
3
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
Acknowledgments
Studying a Master Course whilst working full time is not an easy task. This thesis
and the complete course would not have been possible without my familys
encouragement, understanding, and support.
To my professors for their patience and for all time spent with me in the tuition
hours, enabling me to obtain a new and greater knowledge, very important in my
life and work.
To my work colleagues and bosses for giving me the flexibility to attend the
practical classes and laboratories.
To my English teacher, for giving me the basis to talk and understand an essential
language in Engineering.
4
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
Contents
5
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
List of figures
6
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
7
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
List of Tables
8
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
CHAPTER 1
Introduction
Electric motors are widely used, in the industry they consume about 70% of the electrical energy
[2]. They provide a way to transform electrical energy into mechanical energy, adding motion or
torque to the mechanical parts of machinery, like saws or lathes, with having not only the ability to
start and stop when is needed, it also add variable speed to an industrial process. The use a
variable speed drives (VSD) is very common due to its advantages in energy savings and
controllability. A machine operating at variable speed, inside a production process, can regulate its
speed of operation according to the productivity required in every moment. Pumps or fans are the
most common applications used with induction motors, if the liquid or air flow needs to be
regulated, using mechanical ways it will suppose more power consumption and difficulty of use.
Ventilation systems, for example, used in tunnels or car parking, use variable speed to evacuate
the carbon monoxide produced by the internal combustion engine of the vehicles, the control
system can regulate the fan speed according to the gases accumulation. Another important
advantage of the use of VSD is the soft start function, which reduce the current stress in the motor
windings, having a direct impact in the maintenance cost of the facility.
The most common motor type is the induction motor, due to its good features as low cost, easy
maintenance wide power range etc. It gets its name because the way it takes the rotor currents,
that is by induction, no external current is injected directly to it. The fundamentals of speed
regulation came from the fact that rotation speed is proportional to the electric system frequency,
in the stator windings a rotating magnetic field is created by the circulation of a three phase
sinusoidal current. This machine type is also called asynchronous machine because rotor speed is
slightly less than the synchronous speed. The stator magnetomotive force rotates at 2/P
revolutions per period, being P the number of poles.
With the improvement of control electronics, complicated algorithms can be implemented using a
DSC or ARM, the electric machines control leans in this new electronics, having the possibility to
implement high performance controllers and measure some parameters which need a real time
machine. The induction machine reference frames theory is the base for those control algorithms,
providing complex variables easier to work with and relating them with the output parameters we
need to control.
The interest for companies to design and improve VSDs is clear due to the numbers and statistics
obtained from the market analysis, the growing expected is quantified in the report "Variable
Frequency/Speed Drives (VFD/VSD) Market, By AC And DC Drive, Low, Medium And High Voltage
Range Type, And Application (Pump, Fan, Compressor) - Global Market Trends and Forecast To
2017 " [10], there states a grow of 6440 million $ from 2012 to 2017. The technical justification for
this growth can be found in the potential of this technology in energy savings, as many
publications coincide[2][3][5]. The market distribution in Europe is leaded by Germany with the
42% of the total units sold, followed by U.K. with the 10% and Portugal and Spain with the 7%[3].
9
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
Units Sold
1600000
1400000
1400000
1200000
1000000
800000
600000
400000 227000
200000 115000
42000 15000 9000
0
0.75;4 4;10 10;30 30;70 70;130 130;500
Power Range
The load types identified as having the more potential in energy savings are the ones related with
fluid control, specifically pumps, fans and compressors [3], other technologies with less potential
like machine tools, conveyors and lifts can also take some advantages of the use of VSDs in energy
savings.
Figure 2 Comparison of the power consumed for a pump with an AC drive and with throttle control, 123KW
motor and a pump with a flow rate of 1100 m3/h. PumpSave 5.3, worksheet, ABB
For the case of centrifugal pumps without lift, the consumed power is proportional to the cube of
speed, (cube power law) as can be observed in figure 2. Throttle control is an old technique used
to regulate the flow of a liquid on a pipe by the use of a mechanical valve, obstructing the liquid on
its way, still used nowadays but step by step been replaced by a VSD technology, in figure 2 can be
seen the inefficiency of this method in comparison with an AC drive.
10
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
In case of fans occurs something similar, they obey cube power law and the speed reduction lead
to less power consumption, if the motor is spinning with no speed regulation and the air flow is
regulated with an outlet damper, the system is not efficient, as can be seen in figure 3.
Figure 3 Comparison of the power consumed for a fan with an AC drive and with Outlet damper, 36KW
motor and a fan with air flow of 10m3/s. FanSave5.3, worksheet ABB.
For compressors the energy savings are not as high as pump or fans because, rotary screw and
pistons compressors are constant toque loads [3], but some sources talk about a 20% of energy
savings for compressors with integral speed control [3]. In the case of the compressors used in
refrigeration, with the use of a VSD the typical on/off cycles can be avoided, leading to a 25% of
energy savings [3].
For machine tools, especially those which accumulate high amounts of kinetic energy, it's
interesting to add to the VSD some mechanism of energy recovering to send back to the grid a
part of this kinetic energy, similar case occurs with lifts when the motor needs to brake for lifting
low loads or descending heavy loads.
The commercial VSD offers the option to adjust some parameters to increase the functionality of
the system and better adaptation of the drive with the industrial process involved. Here are
summarized the most important features [4].
- Logic inputs: For controlling some basic functions of the system from a push button or
relay, like start, stop, reset or turning direction.
- Analog input: For speed regulation from a potentiometer, the typical range is from 0 to
10V.
- Speed: It's possible to vary the speed with the logic inputs in small steps, this is a more
precise way to adjust speed in comparison to the potentiometer use, but slower.
- Communication busses: the most typical are Ethernet, TCP/IP, Modbus, Profibus, CAN,
those communication systems are used to connect the VSD with a PLC or microcontroller
to adjust all the parameters or passing information to databases to make a register of all
11
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
statistics, when the motor start, the estimated energy consumption, if there was some
fault, at what time it occurs, etc.
- Controllable acceleration or deceleration ramps: Defined by the user to assure always the
same acceleration for some machine, it's a way to avoid sudden jolting when attached to
the motor is some sensitive mechanical part (i.e. mechanical stairs, elevators etc.)
- Automatic adaptation of acceleration or deceleration ramps: It's an improvement of the
last feature, this time considering the load to adjust the acceleration.
- Preset Speeds: Inside the memory of the VSD can be stored up to 7 speeds (Altivar 21),
making the motor spinning at this exact value, when switching a button, or when
requested via communication bus. It's possible also to make speed steps using the 7
memory positions.
- Auto tuning: For speed regulation, the motor parameters affects the PID or PI control
actions but the electrical facility operator usually doesn't know that parameters, typically
obtained from the no load test and blocked rotor test, to solve this problems many VSD's
incorporate an auto tuning function.
- Drive thermal protection: A PTC sensor is located on the heatsink of the IGBT's power
inverter, the internal microcontroller monitors all time this temperature and in case of an
abnormal increase, to prevent major damages it can take some actions like system shut
down or alarm deploy.
- Automatic restart: Function for restarting the system after a failure when the condition
which trigger that failure disappear.
- External Fault: function for locking the system by an external signal related to an external
failure.
- IGBT Testing: Every time the system is started, this function is run for detecting a short
circuit on the IGBT's
- Current Limit: The drive can measure the current consumption and comparing it with the
nominal current in order to detect an over current event.
- DC Injection Stop: When the machine operates loads with important inertia and need to
be stopped, DC injection is used as a brake system.
12
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
CHAPTER II
Induction motors datasheets normally shows a few parameters needed for the basic calculations
of the motor application like torque, speed or currents. If the motor is needed for pump or fan
applications with these data it will be enough, but if the task the engineers have ahead is the
design of a VSD, one of the first things needed are the complete list of the equivalent parameters,
not accessible in the catalogs or datasheets.
For this project a 3ph IE2 induction motor is used, the model selected is the M3AA225SMA from
the manufacturer ABB. The plate specifications are:
More parameters are found on the October 2013 Catalog "Low voltage Process performance
motors according to EU MEPS".
M3AA225SMA
Output 37 Kw
Motor type M3AA 225 SMA
3GAA 222 031-
Product code G
Speed 1479 r/min
Efficiency IEC 60034-2-1; 2007
Load 100% 93,4
Load 75% 93,9
Load 50% 93,4
Power factor 0,84 cos
Current
In 68 A
Is 71 In
Torque
Tn 238 Nm
Ti 2,6 Tn
tb 2,9 Tn
Moment of J=1/4 GD^2
0,356
inertia kgm^2
Weight 240 Kg
Table 1 Motor Datasheet
13
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
To find the equivalent parameters three tests are normally made, the DC test, the no load test and
the blocked rotor test, for the case of the selected motor, a complete test report is found in the
manufacturer website.
No Load Test
Unl 401 V
Inl 25.9 A
Pnl 840 W
Nnl 1500 RPM
cos_phi 0.05
DC Test
R1t 0.10820
Table 2 Motor Test
The per phase equivalent circuit is shown in figure 4. In this circuit R1 and X1 represents the stator
resistance and leakage reactance, R2 and X2 represent the rotor resistance and leakage reactance,
all of them referred to the stator. The term Rc represent the core losses Xm the magnetizing
reactance and s is the slip. The motor output power is function of the slip s.
14
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
R1 and R2 Calculation
In the DC test the resistance between phases is measured with an ohmmeter, with the windings
connected in delta:
Now with the blocked rotor voltage and current the blocked rotor impedance is obtained
Using the cos phi in blocked rotor the blocked rotor resistance is obtained:
During the blocked rotor test the magnetizing branch disappears and only R1m, X1, X2 and Rlr
remains:
With the Active power and cos phi, the apparent power during test is obtained:
15
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
With blocked rotor reactance, stator and rotor reactances are obtained:
Now with the no load parameters, first the no load reactance is obtained:
In the no load test, only R1, and X1 and Xm are present in the equivalent circuit.
The rotating speed is calculated from the grid frequency and the pole pairs:
16
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
With all the parameters obtained in the last section, it's possible to build a motor model similar to
the real one, using one of the multiples software available for that purpose. In this case, the
software Psim was chosen, due to its simplicity to use, aspect taken into account for the project
execution time. The schematic is shown in figure 6, where the block IM represents the motor, in
this motor block, the 3 phases are connected in wye. Attached to the motor shaft are 2 sensors
one for measure the speed and the other for measuring the torque. The final element connected
to the shaft is a mechanical load, which value corresponds with the motor nominal torque.
The simulation output is shown in the next figure, where we can observe the speed curve, very
close to the nominal speed and the phase current. The phase current measured is around 60A but
this is the peak value, calculating the RMS value, is 42A. In the motor plate the phase current for a
wye connection is 39A, so the motor model is considered correct.
One important issue to consider is the start up current, in this case is 1200A peak to peak value,
and the duration is 0.15 seconds, care must be taken when defining the IGBT peak values, but
precisely one of the benefits to use a VSD is the reduction in the startup current peak.
17
500
0
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
-500
Speed Ia
2000 800
600
1500
400
1000
200
0
500
-200
0
-400
-500 -600
800
Figure 7 Motor Speed and Current
600
400
200
Ia
0
-200 50
-400
-600
-50
18
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
CHAPTER III
Inverter development
3.1 Inverter Power Scheme
In this chapter, the inverter hardware is described; the starting point of it is the electric grid. The
inverter is fed from the 3ph AC Electrical facility, due to the advantages in contrast with the single
phase AC system, like more power density, less voltage ripple, and less power fluctuation. To
connect a motor to the grid, a protection against short circuits and overloads is needed; also those
protections must have a detection of voltage lack in one of the phases, as is stated on the ITC BT
47[11]. The proposed scheme is shown in figure 9, the inverter is connected to the grid through a
magnetic breaker and a thermal relay. In this project is especially important this protection
because the inverter doesn't have thermal and overload protections as the commercial VSDs
models.
The inverter is composed by several blocks, apart from the electric protections, the first blocks the
rectifier, used to transform the 3ph AC voltages into DC voltages and then a filter is attached to
minimize the voltage ripple and also serve as energy storage device for the voltage spike
minimization when the motor start and stop. The rectifier used is the model DDB6U205 N12 from
the manufacturer EUPEC, with a current rating of 200A and a repetitive reverse voltage of 1200V.
The internal diode bridge connections for this rectifier are shown in figure 10. The terminals
marked as 1,2,3 are the input from the AC grid and the ones marked as 4,5,6 are the DC output,
being 4 the positive terminal and 5, 6 the negative terminal. The output terminals are connected
to the IGBTs modules through a busbar.
19
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
The inverter itself is composed by three legs, each of them composed by 2 IGBTs, needed for
conform the three AC waveforms. For every leg the model 2MBI200HH-120-50 from the
manufacturer Fuji Electric is used. Their main features are, high speed switching, low inductance of
the modules structure and the voltage current ratings i.e. [1200V / 200A]. The terminal C1
(collector of the first IGBT) is connected though the busbar to the terminal 4 (positive) of the
rectifier bridge, and the IGBT terminal E2 (emitter of the second IGBT) is connected to the terminal
6 of the rectifier bridge (negative)
The six IGBTs and the rectifier were included in the simulation together with the motor model to
evaluate the current and voltage stress in the IGBTs, and also test a basic PWM modulation. An
ammeter is connected to the 3 motor branches and also the ammeter I8 and voltmeter VP10 are
used to see the IGBT collector current and Vce voltage. The mechanical load attached to the
mechanical shaft has a value similar to the nominal motor torque 200Nm. To filter the voltage
ripple from the rectifier, three 1000uF capacitors in series were used, with the initial voltage set to
zero in order to see the transient at the beginning because in the real circuit, the capacitors will
start to work discharged. The logic for implement the PWM modulation is shown in figure 13.
Basically it's composed but one triangular signal (VTRI1) acting as the carrier signal, and one 3ph
signal (VSIN32) acting as the modulating signal. The carrier has a frequency of 18250Hz,
corresponding to the microcontroller PWM triangular frequency (Chapter IV). The AC signal is
20
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
composed by 3 signals with a phase shift of 120 degrees between each other and the frequency of
this signal is 50Hz.
The simulation output shows the motor speed at a high load, the time needed to reach the steady
state speed is a bit higher than the simulation on the section IIc. The IGBT current peak is 73A and
the Vce 932V.
Speed
2000
1500
1000
500
-500
0 0.5 1 1.5
Time (s)
Figure 14 Speed Curve
21
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
I8
100
50
-50
-100
VP10
1000
800
600
400
200
0
-200
Vdc
980
960
940
920
900
880
860
840
One of the key aspects in the design of power electronics is the assurance of not to overcome the
semiconductors maximum ratings, in this section the junction temperature and the device losses
are going to be analyzed. To do that the web application IPOSIM is used. This application is
available at Infineon website to calculate the mentioned parameters for an specific semiconductor
model considering a given topology. The input parameters are shown in table 3, the DC bus
voltage had been decreased down in comparison with Psim simulation because for 930 V the
22
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
junction temperature values for the IGBTs are greater than 150C, the maximum value for IGBT
and diode according to the datasheet. The IGBT used in this simulation is the model FF200R12KS4,
instead of 2MBI200HH-120-50 due to the fact that they are exactly equivalent and the software
only have available the Infineon model not the Fuji model. In table 3 are the heatsink parameters,
in this project is used the model RG42120N20/300HAFR from the manufacturer Guasch.
Tamb 40.00 C
Cooling Method Forced Air
Rth 0.05 K/W
T 60 s
Table 4 Input Parameters
Junction Temperature
IGBT 71 C
FWD 64 C
Switching Losses
IGBT 85.20 W
Diode 48.74 W
Conduction Losses
IGBT 33.16 W
Diode 6.03 W
Total Losses
IGBT 118 W
Diode 54.76 W
Table 5 Output Values
In figure 17 are plotted, first the average losses with the current, second the temperature values
with the current and finally the temperature ripple. From this simulation it can be concluded that
the power stage is going to work under the semiconductor limits, with maximum total losses of
1032 W and a junction temperature of 71C for the IGBT and 64C for the diode, conditioned to
use a DC bus voltage at 700V as maximum.
23
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
701
221
201
Temperature Tj [C]
181
161
141
121 IGBT
101
Diode
81
61
41
0 50 100 150 200 250
Current Irms [A]
72
70
Temperature [C]
68
66
IGBT
64 Diode
62
60
0 0,005 0,01 0,015 0,02
Time [s]
24
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
3.2 Busbar
Busbars are widely used for reducing losses in the electrical systems and help in the electrical
connections. In the case of DC buses its use becomes more interesting. Considering the IGBTs
current ratings, and the DC bus voltage value, any minimal resistance present on the bus could
lead on an unacceptable voltage drop, same occurs with the inductances, which can cause high
current spikes under on and off transitions, endangering the IGBTs life. Classical connections with
wires and O-ring connector must be avoided, in order to minimize the effect of parasitic
components.
Another important aspect on the design of this component is the electrical safety standards, like
UNE- EN 60664-1, where clearance and creepage distances were defined. Considering two points,
one at live potential, and another in the accessible metallic parts, like enclosures, this standard
define the minimal distance between them, clearance is the distance between the points following
the closest path through the air, creepage is the distance between the points following the closest
path but through a surface between the points.
Given a working voltage value, those distances were defined in the standards considering the air
dielectric strength, but also the contamination in the environment, contamination like water vapor
or dust from the motor brushes which can increase the probability for an electric arc appearance,
that is to say, the unintended connection between parts, through the air, with the potential risk of
electric shock for the user or equipment. The busbar is composed by two poles, C1 and E2,
corresponding with the positive and negative of the DC voltage. Also C1 corresponds with the joint
of the three collectors of the IGBTS and E2 corresponds with the joint of the three emitters of the
IGBTs. Every pole is conformed by three pieces of cooper sheet like the one in figure 20. This is the
pole C1, in that drawing are placed the 4 holes for the IGBTs connection and for the rectifier
connection too. The other four semicircles are made for the compliance with the creepage and
clearance distances for the pole C1 with respect to the pole E2. The connection of the two poles
with the IGBTs is shown separately on figures 21 and 22.
25
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
The section cut of the busbar is shown in figure 19, the three pieces of cooper of one pole are
interleaved with the three pieces of cooper of the other pole and also with an isolator of fiber
glass. The screws used are made of brass because they have less resistance, they connect the
upper part of every pole to the IGBT, the rest of the busbar pieces were connected between them
using flexible copper foil. The different layers of glass fiber were united with Kapton tape.
Figure 20 Busbar C1
26
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
Figure 21 E2 Mount
27
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
Figure 22 C1 Mount
28
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
In the last part of the busbar section it's the losses are calculated. Considering a busbar width of
42.2mm x and a thickness of 70u, and the copper resistivity, the resistance per length unit is
obtained:
With this resistance the maximum voltage drop in the busbar for a current of 70A is:
To limit the IGBT turn-off dv/dt the snubber capacitors are used, they are also useful for reducing
the overlap between voltage and current waveforms, making less the turn-off loss. The model
MP80 is used.
29
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
Switching the IGBT from the microcontroller needs an intermediate circuit, the driver. To turn on
the IGBT, the gate capacitance needs to be charged, but the microcontroller output pins are not
capable to deliver the needed current, moreover the threshold voltage is 6.2V and the
microcontroller works at 3.3V. Another consideration is the voltage levels at the output, isolation
is needed to keep the electrical safety and the correct operation of the system. The main
component of the driver is the optocoupler, it provide the needed isolation between control
circuit and IGBTS and also trigger the IGBT gate with adequate signals to minimize the losses. The
model used is the HPCL3120, its main features are:
The output stage of this IC have a half bridge circuit, which brings the capability to operate with
output currents up to 2A. Due to the isolation, the half bridge needs to be supplied with a voltage
source, its value is selected in such a way to make the IGBT fully turned on, in our case 15V.
This power supply can be symmetrical, i.e. 15V, the use of the negative voltage is called negative
gate driving, and it's used for fast turn off, it reverses the Vge voltage and make the gate
capacitance discharge faster. At the optocoupler output is connected an additional half bridge
made with bipolar transistors, the models MJD44H11 and MJD45H11, they are NPN and PNP
respectively, now the driver is capable to supply 8A to the IGBT gate. The driver scircuit is shown
in the next page. The input connector P1 provide the driver input voltage (9-36V) and the
switching signals of the upper and lower IGBT.
30
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
Figure 25 Driver
31
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
CHAPTER IV
Control Circuit
4.1 Flexible Development Platform
When a new project starts, many meetings take place, with costumers to define the system
requirements, the expectations about performance and cost, meetings with the suppliers to
define the components of the system according to the customer requirements etc, the truth is,
despite all these meetings, many requirements are going to change during the project execution,
we always have a component which doesnt meet the specifications or with a change in the last
minute of the a delivery time to a new one too long etc. At the measure the project goes ahead
the amount of changes assumable by time and cost are reduced. For those reasons is highly
recommendable to start the project with a commercial prototyping board, this is why many
microcontroller manufacturers bring to their costumers the possibility to buy that kind of flexible
systems. In this case, the project has educative purposes but in such a way the flexibility of the
prototyping board TMS320F28335 Experimenter Kit, is welcome, to design the control system of
the project, like it will be, on the first stages of a real commercial project. This board is based on
the TMS320F28335 DSP, mounted in the F28335 Delfino Control card and connected to the
experimental board by a DIMM connector. It also has a connection with the PC via USB to
implement code debugging. The board has accessible most of the microcontroller pins, and of
course the ones related with the microcontroller ADC and PWM modules.
4.1 Modulation
The Sine PWM modulation is going to be implemented for this project, due to its simplicity, this is
the same modulation done with logic gates in the chapter III. The waveforms generated are shown
32
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
in the figure 26. In the upper picture the blue line is the sine wave at 50Hz but with a big zoom in
the time axe and the red waveform is the triangular carrier. In the lower image is the PWM signal
for a determined instant of time, this is the input signal for one IGBT gate, every time the sine and
the triangular signals cross each other, the logic state of the output signal is going to change..
In figure 27, all the switching states are shown, they are composed by active states, which
produces voltage output, and zero states, which produces no voltage output. Zero states are
needed to implement the zero crossing of the inverter output signal. Notice the fact that none of
the branches have the two switches closed at the same time.
PWM module is one of the most popular peripherals of the microcontroller because it can be used
to control most of the electronic power circuits, like DC/DC converters, UPS, Inverters etc. It can
be used as a DAC, usually referred in the literature as Power DAC [12], because with the right filter
this module is capable to generate an analog output, with changing the duty cycle value. This
module can be configured once, and it doesn't need for the CPU intervention again, except for the
sine PWM modulation or the Power DAC, in that cases is needed to make some changes in the
module and some math operations periodically. In this project the modules 1,2,3 are used, every
module has associated two output pins, they are going to be called PWM1A and PWM1B for the
33
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
module 1, PWM2A and PWM2B for the module 2, etc. The pin marked as A is going to be the main
pin and the other one marked as B is going to be the complementary.
The PWM is composed by a counter, TBCTR (time-base counter), it can be configured as counter
up, starting from zero and when it reaches the maximum value make a reset, which means we are
generating a sawtooth waveform, it can be configured as a counter down starting from the
maximum value and when it reaches the zero, it starts again from the maximum value, which
means we are generating a sawtooth waveform but in the opposite direction, the other possibility
is to generate a triangular waveform, with the counter going up and when it reaches the maximum
value make the counter going down, and when in reaches the zero starts again to count up, this is
the case of this project, this counter is making the function of triangular carrier, as well as the
simulation of chapter III with logic gates, now the components to generate the modulation are
virtual components inside the microcontroller firmware.
The maximum value of the timer base counter is stored in the register TBPRD (timer base period
register) and it will serve to define the carrier frequency. To configure the PWM timing options
first is needed to go to the TBCTL (time base control register) and adjust the Time base Clock
prescale bits (CLKDIV) and the high speed Time Base Clock Prescale Bits, in this case both are set to
2 for simplicity in the calculations. With these two values and the period of the System Clock Out
(6.6ns) the period of the PWM module can be calculated with the expression:
Where TPWM is the desired period, and TBPRD is the maximum value for the time base counter.
In the code the instructions for configure de PWM options are:
EPwm1Regs.TBCTL.bit.CLKDIV = 1; // CLKDIV = 2
EPwm1Regs.TBCTL.bit.HSPCLKDIV = 1; // HSPCLKDIV = 2
To define the period, the variable TBPRD_Val is used, its value determine the period
EPwm1Regs.TBPRD = TBPRD_Val;
The next step is to define the actions for the PWM output pins, with the writing on the register
AQCTLA (action Qualifier) we can define the action to do when the TBCTR reaches the values of
the register CMPA (this register defines the duty value). In this case, the pin for PWM A needs to
be set on the count up and Reset on the countdown, the same occurs with the pins for the other
modules.
34
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
EPwm1Regs.AQCTLA.all = 0x0060;
The complementary signals (lower IGBTS in the inverter) need to have the logic NOT value of the
main signals, to avoid the short circuit of the two IGBTs of the same branch, this is done with the
following instruction for PWM1B:
Once the PWM complementary signal has the opposite state than the main signals, the dead time
must be considered, due to the parasitic capacitances, the IGBTs need time to change from ON to
OFF state and vice versa, the transitions are not immediate after receiving the PWM signal, this is
why a dead time is necessary, this is a very short time period on the PWM ON and OFF transitions
in which the main PWM signals and the complementary both are at logic zero, it is made with the
instruction:
The same must be done for the rest of the complementary channels.
Finally the value of the duty cycle is configured in the register CMPA by the instruction:
EPwm1Regs.CMPA.half.CMPA = EPwm1Regs.TBPRD / 2;
It take as reference the value of the PWM period, if in this register we write this value, with the
actual configuration, the duty cycle will be 1%, if we write the half of this value (like in the
instruction) duty cycle will be 50% and if we write 1 the duty cycle will be 99%.
Now the PWM module is configured for generating a signal of 18250Hz with 50% duty, the next
step is to configure the interrupt routine synchronized with this module. To make the PWM
module to trigger an interrupt first is needed to configure the ETSEL register (Event Trigger
Selection) and tell to enable the ADC conversion with the EPWM1SOCA pulse:
35
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
The EPWM1SOCA pulse is going to be generated when timer base counter is equal to the value of
the TBPRD register:
EPwm1Regs.ETSEL.bit.SOCASEL = 2; // CTR=PRD
To enable the ADC to start at SOCA pulse it must be configured in the main() of the program below
the InitAdc() instruction:
4.3 Interrupts
To activate the ADC interrupt we have to configure the peripheral interrupt enable register
(PieCtrlRegs), in the PIE Interrupt Assignment table the ADC is the intx6:
IER |=0x01;
PieVectTable.ADCINT = &ADInterrupt;
ADInterrupt is the function which is going to be called when jump the interrupt vector, there are
located all the functions and the main calculations of this project.
The ADInterrupt function is used to make all the calculations needed for the sinewave
conformation. At this point the PWM module was described but using a fixed duty value, to
generate an AC ouput voltage using the sine triangle modulation, the duty value must be changed
continuously, following the sinusoidal signal amplitude values.
The sinusoidal signal changes its amplitude from 0 to 1, from 1 to 0, from 0 to -1 and from -1 to 0
in the intervals 0-90 degrees, 90-180 degrees, 180-270 degrees and 270 360 degrees. This signal
needs to be added to the microcontroller code, i.e. there are going to be a variable changing
periodically and following a sinusoidal shape, or more precise, there are going to be three
variables simulating a virtual three phase AC system with unitary amplitude.
The values of the variables which represent the sine signals are calculated with the sine of the
angle, this angle is another variable which counts from 0 to 360, this count must be done in the
time period of a 50Hz signal. Like the angle needs to be increased in the adc interrupt and and this
interrupt is triggered with the triangular carrier, the frequency of the triangular signal is:
and the value of the PWM time base period register is:
36
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
The relation between the duty value and the sine value is:
for sin(angle)=1 ............duty= 90%
for sin(angle)=-1...........duty= 10%
to obtain the duty value with a known sine amplitude the straigh line equation is used:
The value that must loaded in the CMPA1 register is between two values:
duty= 10%.......................CMPA1= 931
duty =90%.......................CMPA1= 103
Now in the C code, frist the counter for the angle is converted to radians, with the use of iq math:
Then the sine values for the given angle, with respective phase shift were calculated:
dut_a=_IQdiv((_IQmpy(Va_con, _IQ(80.0))+_IQ(100.0)),_IQ(2.0));
dut_b=_IQdiv((_IQmpy(Vb_con, _IQ(80.0))+_IQ(100.0)),_IQ(2.0));
dut_c=_IQdiv((_IQmpy(Vc_con, _IQ(80.0))+_IQ(100.0)),_IQ(2.0));
dut_a_Int=_IQint(dut_a);
dut_b_Int=_IQint(dut_b);
dut_c_Int=_IQint(dut_c);
37
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
count_deg=count_deg+1;
the code described previously give the PWM signals output for PWM1A, PWM1B and PWM1C of
the figure 29.
To test if the modulation and the math operations are producing a sinusoidal signal an RC filter is
connected at the 3 PWM output pins(R=10K, C= 100nF). The filter give the waveforms of the figure
30. Finally before the testing with the real motor and three phase grid voltage the dead time must
be checked to avoid IGBT destruction. fig 31.
38
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
To change the frequency value of the output signal some of the calculations of the section 4.3
must be repeated. For a sinusoidal signal of 20Hz the period is 0.05 s, so the triangular frequency
is:
For a sinusoidal signal of 40Hz, the triangular frequency is 14 600Hz and TPBRD is 1297, then the
firmware is tested with both values.
39
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
40
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
CHAPTER V
System testing
The inverter final assembly is shown in figure 34, and the inverter and rectifier are in figure 35. The
first test to do in order to check if the signals connections, busbar and modulation, is connect the
DC bus to a laboratory power supply and check the current consumption. With the control board
switched off and the power supply set to 60V, the current drawn is negligible; this fact discards a
short circuit on busbar. When the control circuit starts to work the motor begins to turn very
slowly and the current is less than 800mA. After a few seconds the motor was increase its speed
but very far from its nominal speed, because with the power supply the power given is very
limited.
41
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
The next test to do is connect the system to the three phase AC grid, but in this case for caution,
an autotransformer is used, starting from a very low three phase voltages and increasing it very
slow. The DC bus voltage is increased up to 400V. The phase currents are shown in figure 37 and
the collector emitter voltage is in figure 38.
42
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
5.1 Conclusions
In this project was developed a power stage of a VSD with a simple modulation method. Sine
Triangle PWM is easy to implement with a DSP, and the IQ math library of the software Code
Composer plays an important role on the calculations. The speed of the microcontroller is an
important aspect to consider due to the high number of interrupts needed for conforming a
sinusoidal signal with good shape, communication busses like RS-232 or virtual COM, which uses
the microcontroller UART are not feasible to implement due to communications speed, it will
interfere with the interrupts for updating the duty value.
43
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
Laminated busbar is an excellent solution for the DC connections bringing flexibility to the
connections between rectifier and IGBTs and minimizing the losses and improving the high
frequency behavior, the IGBTs collector emitter voltage have negligible voltage spikes, thanks to
the busbar and to the snubber capacitors. To make the system testing is a good starting point the
use of a laboratory power supply with current limitation, if all the connections are correct, even
with low voltages the motor will start to turn, but if someting goes wrong with the current
limitation major damages are avoided. To try the system with the AC grid for the first time, an
autotransformer is a good solution if the system will start at nominal frequency, specially with big
size motors with an unknown vibrations pattern.
The project presented here can be considered a powerful development platform with educative
purposes for trying diverse control algorithms, like v/f, vector control, and different motor sizes,
but even for commercial environments, any company should have a "power bank" with the
enough flexibility like the one developed here, for making the very first testing of a new VSD
project.
44
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
Bibliography
[1] Joachim Bcker, Member, IEEE, Shashidhar Mathapati, University Paderborn, "State of the Art
of Induction Motor Control".
[2] Fernando J. T. E. Ferreira, Joo A. C. Fong, and Anibal T. de Almeida, "Ecoanalysis of Variable-
Speed Drives for Flow Regulation in Pumping Systems", JUN 2011
[3] Anbal T. de Almeida , Fernando J. T. E. Ferreira , Dick Both, "Technical and Economical
Considerations in the Application of Variable Speed Drives with Electric Motor Systems"
[5] Anbal T. De Almeida, Fernando J. T. E. Ferreira, Paula Fonseca, ISR University of Coimbra,
"VSDs for Electric, Motor Systems".
[6] Texas Instruments, Application Report SPRABQ8July 2013, "Scalar (V/f) Control of 3-Phase
Induction Motors"
[7] Ioan Iov Incze, Maria Imecs, Csaba Szabo, Technical university of Cluj-Napoca, "Enhanced
Voltage-Frequency Control Method for Induction Motor"
[8] Godpromesse Kenn, Rostand Sorel Simo, Franoise Lamnabhi-Lagarrigue, Amir Arzand, Jean
Claude Vannier, IEEE Transactions On Control Systems Technology, Vol 18, "An online Simplified
Rotor Resistance Estimator for Induction Motors"
[10]www.bloomberg.com/article/2013-02 04/avttKR.7uoX4.html
http://www.f2i2.net/legislacionseguridadindustrial/LegislacionNacionalGrupo.aspx?idregl=76
[12] TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Reference Guide
45
Development of Induction Motor PWM IGBT Inverter with DSP TMS320F28335
APPENDIX I
Cost Engineering
/h h
30 450
Total 13500
Table 6 Budget
46