You are on page 1of 17

Direct Digital Synthesis Controlled Pure Sine Wave Inverter

Submitted by:
Nabil Mohammad, Ian Zieder, Krunal Bhargav, Damanpreet Anand

Team Project Number:


S15-033

Advisor:
Prof. Zoran Gajic
May 1, 2015
Submitted in partial fulfillment of the requirements for capstone senior design project

Electrical and Computer Engineering Department


Rutgers University, Piscataway, NJ 08854

Page |1

Project Number: S15-033

Table of Contents
1. INTRODUCTION ......................................................................................................... 2
1.1. Objective........................................................................................................... 2
2. METHODOLOGY ........................................................................................................ 3
2.1. Hardware .......................................................................................................... 3
2.2. Software ........................................................................................................... 4
2.3. Implementation ................................................................................................. 5
2.3.1. Pulse-Width-Modulation (PWM) .................................................................. 5
2.3.2. H-Bridge...................................................................................................... 5
2.3.3. Direct Digital Synthesis (DDS) .................................................................... 8
3. DESIGN AND MODELING .......................................................................................... 10
3.1. Schematic ....................................................................................................... 10
3.2. PSpice Simulation .......................................................................................... 11
4. RESULTS ............................................................................................................... 12
4.1. Oscilloscope Measurements........................................................................... 12
4.2. PCB Layout .................................................................................................... 13
5. RESEARCH CHALLENGES/FUTURE W ORK ................................................................. 14
6. COST ANALYSIS ..................................................................................................... 15
7. CONCLUSION .......................................................................................................... 15
8. REFERENCES..................................................................................................... 16

Page |2

Project Number: S15-033

1. Introduction:
1.1. Objective: Traditionally analog signal conditioning techniques are used to generate SPWM
control signals for power inverters. These generally require many passive and active
components considering we would have needed several operational amplifiers to generate the
triangle and sine wave generators. Our goal was to replace this method by implementing a
direct digital synthesis algorithm that serves the purpose of generating the SPWM control
signals. The system should be able to take in 12VDC, and convert it to a 120Vrms (170Vpp) 60
Hz signal. You can think of it as being a portable line voltage (assuming you have access to an
isolated 12VDC power supply such as a car battery). The system must also be built with as little
components as possible and still meet our desired performance requirements.

Electronics, SparkFun. Arduino Uno R3. Digital image. Wikipedia.org. 21


Jan. 2013. Web.

Project Number: S15-033

Page |3

2. Methodology:
2.1 Hardware: Four our inverter we used the novel H bridge topology, which consists of four
N-channel power MOSFETs from which two diagonal pairs will switch on and off in a manner
that ensures the output will be a SPWM AC signal with a 0VDC offset. A boost converter will be
used to generate the DC bus voltage to power the MOSFETs. The AC output will then be fed
into a transformer, which will allow us to step up the voltage to the desired 120Vrms.This signal
will then be filtered to give us a pure sine wave output. Since the voltage levels outputted from
the Arduino are too low to drive the gates of the MOSFETs, we used specialized gate drivers
with boot-strapping capability in order to step-up the gate-driving voltages. The reason we use a
boost converter is because the transformer doesnt have an ideal ratio of 1:10. Most
transformers have a frequency response where the gain varies across the frequencies. After
feeding the 31 kHz SPWM from the H Bridge to the transformers primary side, we can see
from the secondary side that there isnt 120Vrms on the output, so to compensate from the loss
in ratio, we step up the DC bus voltage from 12VDC to 21VDC to finally obtain 120Vrms.

Project Number: S15-033

Page |4

2.2 Software: We used an Arduino Uno unit to provide us with two control signals that are to
be fed into the inverter. The famous direct digital synthesis (DDS) algorithm was used to
generate these two SPWM signals, with one being 180 out of phase with the other. The
switching frequency we set the SPWM to was 31kHz with the PWM modulation frequency set to
60Hz. The FFT ideally would look like:

The switching frequency is adjustable through software, but we had to make sure that the
switching frequency was at least 30 times the SPWM frequency, but we made it much higher
from 1800 Hz to ensure that we get enough sampling to get a clean recovered signal after the
filter.

Project Number: S15-033

Page |5

2.3 Implementation:
2.3.1 PWM (Pulse-Width-Modulation)
To design the inverter we will needs several building blocks, each with their own circuitry, but
before going into that I want to discuss PWM and later go into how it will play into the design.

Depicted above we have our usual square wave, now when you drive a load with an alternating
signal that has a 50% duty cycle, the load sees the average of the peak-peak value over the
period range, which in this case is 6VDC. And as we lower or increase the duty cycle our
average will change as well.

The formula used to calculate the average is Va*(ton/period) = Vavg, in this case Va = 12VDC.

2.3.2 H-Bridge
One of the major building blocks to the inverter will be an H-bridge, it is what is typically used to
control DC/AC motors but the difference between controlling the two types comes with the
control signals. The way it works is if we apply a low voltage to the gate of Q1 and Q4 and a
high to Q2 and Q3, Va = 12V and Vb = 0V(GND), thus the voltage across the load
VL = Va - Vb = 12V. And if we apply a high voltage to the gate of Q1 and Q4 and a low to Q2
and Q3, Va = 0V and Vb = 12V(GND), thus the voltage across the load VL = Va - Vb = -12V.

Project Number: S15-033

Page |6

So we want our inverter to take in 12VDC and output a 120VAC. Our LOAD in this case will be
an ideal transformer that will step up a sinusoidal PWM signal of 12VAC to 120VAC, so VL
should equal 12VAC. So we know Va - Vb = VL. For simplicity sake I am going to simply tell you
the control signals that need to be applied on Q(1-4), and we will later go into how to generate
these signals. The frequency of the output signal will be that of the control signal.
The signal to be applied to the gates of the MOSFETs should be the sinusoidal PWM signal:
NOTE: (The blue real sinusoid just represents the way the PWM signal is behaving, we are
inputting the red PWM signal into the gate).

VC1(t) will be applied to Q1 and Q4, and VC2(t) will be applied to Q2 and Q3. The SPWM
signals must be 180 out of phase of one another.

Project Number: S15-033

Page |7

Now the voltages at point Va and Vb ideally would look like:

And across the terminals, (Va Vb), the output signal would like a SPWM AC signal with 0VDC
offset:

Now since this is the output across the primary winding of the transformer, the voltage on the
secondary winding will be the same PWM VAC signal but with an amplitude of +/-120VDC,
which acts as a 120VAC signal. Keep in mind that for our application we want a 170VAC output
because that is effectively 120Vrms (line voltage), so we will have to adjust the DC bus voltage
for the MOSFETs to compensate for the ratio in the transformer.

Project Number: S15-033

Page |8

2.3.3 Direct Digital Synthesis


SPWM signals can be generated with the use of either passive/active components or a
microcontroller. Creating a SPWM signal with passive and active components is a rather long
and tedious process because both sine and triangle waves have to be generated and then
passed through a comparator. Also, generating a sine and a triangle wave requires extra
external circuits, thus rendering this method effective but inefficient due to the large amount of
components that are necessary to bring it to fruition. Because of this, the best way to generate a
SPWM signal is through a microcontroller using Direct Digital Synthesis (DDS). The following
picture demonstrates the basic idea behind DDS:

Analog Device, Inc., A Flexible DDS System. Digital


image. Http://www.analog.com/media/en/trainingseminars/tutorials/MT-085.pdf. 2009. Web.

First, we are using an Arduino Uno as our microcontroller and this microcontroller has an
internal clock source running at 16 MHz. We are also using a phase-correct PWM mode where
the timer counts up to 255 and then back down. In total, there are 510 clock cycles in each timer
cycle and each cycle is running at 16 MHz. As a result, our reference clock source of 16MHz is

Project Number: S15-033

Page |9

divided by 510 to equal about 31000 Hz. Phase-To-Amplitude converter is basically a sine
wave lookup table and this is the heart of DDS; this determines our signals output frequency.
The phase accumulator gets updated every 31000Hz and a tuning word is added to the
previous value of the phase accumulator. Traditionally, the phase accumulator is between 24 to
48 bits, but we opted to use a 32 bit accumulator that required 2^32 data points in our sine wave
lookup table. This takes up a lot of memory, but we can truncate the bits by taking the most
significant bits (12-19 bits). Since our lookup table consisted of 2^8 data points, we truncated 24
bits and only considered the remaining 8 bits. Additionally, the tuning word is equal to (f o*2n)/fC ,
where fO is the desired output frequency, fC is the reference frequency and n is the number of
bits associated with the accumulator. The tuning word is added to the previous phase
accumulator, and we can use this to determine how fast our output frequency will change. If the
tuning word is equal to 2 as opposed to 1, we sweep through the sine look up table twice as
fast. This makes the desired output frequency twice as fast. When we coded this algorithm, we
basically assigned all the variables for registers (i.e. desired output frequency and frequency
clock) and disabled the interrupts in our void setup section. We subsequently found the tuning
word in the void loop and enabled the interrupt. After enabling the interrupt, we performed the
phase accumulator addition with the tuning word and truncated the bits. This number tells us the
amount by which our sine look up table is incremented.

Project Number: S15-033

P a g e | 10

3. Design and Modeling:


3.1 Schematic:

The Arduino will send two out-of-phase SPWM control signals into the IR2103 gate drivers.
There are several reasons why the gate drivers are used instead of feeding the control signals
into the gates of the MOSFETs. In order for the FETs to be on, it must have Vg value greater
than the DC bus value, so using the boot-strapping configuration we were able to get the gate
voltage for the high-side MOSFETs to be well above the 21V from the DC bus. The second
reason is because of shoot-through current protection. Although were sending inverted signals
to each pair of MOSFETs, there is a point in the switching process where both signals are high
and thus both FETs would conduct and cause a short from the DC bus to ground. This would
obviously destroy the MOSFETs and several other components. The gate drivers set an internal
dead-time to make sure a control signal is low before letting the other control signal go high.
The boost-converter we used is a built module with an adjustable feedback resistor to control
the output DC bus voltage. In our case, and taking into consideration the non-ideality of the
transformer, we set the DC bus voltage to 21V from the 12V input source. Now we have a
42Vpp SPWM signal across the H bridge. Now we step this voltage up to 170Vpp using the
transformer. The transformers frequency response dictates the gain at 31kHz and 60 Hz, but
instead of fiddling around with the analysis, we hooked up the transformer across the output,
filtered the signal, and adjusted the boost converter module until we got a pure sine wave at

Project Number: S15-033

P a g e | 11

170Vpp (120Vrms). One thing we had to be careful of was the polarity of the filter capacitors,
since we have an alternating signal, we cant just attach a capacitor across the transformer
terminals; we must put two of them back to back with their positive ends attached the output of
the transformer, and their negative ends tied to each other.

3.2 PSpice Simulation:


In order to reassure that the circuit behaves accordingly before being built we must first simulate
it on PSPICE. We had to first find the PSPICE model for the MOSFETs and gate drivers so that
our results are accurate as possible. Here is the PSPICE schematic for our simulation:

As you can see here we used analog signal conditioning to generate the SPWM signals; SPICE
comes with ideal sine wave and triangle wave generators, but in reality we would have to build
each of them to great precision using many op amps and other passive and active elements.
PSPICE simulation output plot:

Project Number: S15-033

P a g e | 12

4. Results:
The picture below you can see that we obtained a clean pure sine wave output. Note that the
probe used to measure the output was scaled in 10x since the oscilloscope cant observe
signals with very high amplitudes. So here you can see that we get a 12Vrms (x10 scaled down)
or 120Vrms output signal at 60 Hz. From this result, we can see that our DDS algorithm worked
effectively in generating the SPWM signals.
4.1 Oscilloscope Measurements:

Project Number: S15-033

P a g e | 13

4.2 PCB Layout:


Here is the PCB design of our project. This board contains all the components except the
Arduino and the boost converter unit. We added screw terminals to interface between the board
and other peripherals.

Project Number: S15-033

P a g e | 14

5. Research Challenges/Future work:


One of the challenges were choosing the proper microcontroller module (MSP430 or Arduino),
and weighing the tradeoffs between each of them in terms of generating the control signals
adequately. Another challenge was to find a way of compensating for shoot-through current
(which occurs when a pair of series FETs instantaneously conduct at the same time, thus
shorting the DC bus to ground). This problem was fixed through the use of gate drivers which
set the dead-time for the control signals internally. Lastly, modeling the circuit in PSPICE to
ensure proper functionality, and then prototyping it on a breadboard layout to confirm its
operation.
One thing we can do to improve the system is by including a feedback mechanism to steady
both the amplitude and frequency in order to further maintain the stability of our system. This
would be done by using the frequency to voltage converter to feed the sampled outputs
frequency back as a voltage level and then feed it to the ADC of the microcontroller, and use it
as a feedback variable in our control algorithm. This would be done for frequency stability. To
control the amplitude, we could take a reference signal from one side of the H - bridges output
through a voltage divider network and feed it into a peak detector, which will generate a voltage
in correspondence to the output amplitude; this voltage level will be sent into the ADC and will
be used in the control loop.

Project Number: S15-033

P a g e | 15

6. Cost Analysis:

2x IR2103 Gate Driver IC ---------------------------------------------------- $ 5.12


1x 6.3-0-6.3 3A Transformer (RadioShack) ------------------------------$ 10.00
2x 10uF Electrolytic Capacitor ------------------------------------------------ $ 0.20
2x 1uF Electrolytic Capacitor ------------------------------------------------- $ 0.20
1x 100uF Electrolytic Capacitor ---------------------------------------------- $ 0.10
4x IRFZ44 Power MOSFET --------------------------------------------------- $ 7.88
2x IN4007 General Purpose Diode ------------------------------------------- $ 0.20
3x Resistors ------------------------------------------------------------------------ $ 0.03
1x LED (Blue) ----------------------------------------------------------------------- $ 0.15
1x LM317 Adjustable Voltage Regulator ------------------------------------- $ 0.71
1x Output Adjustable Boost Converter Module ----------------------------- $ 6.66
1x Arduino Uno Unit --------------------------------------------------------------- $ 8.50
6x Wago Screw Terminals ------------------------------------------------------ $ 0.60
1x PCB Copper Clad -------------------------------------------------------------- $ 8.00
Total Cost: $ 48.35
We successfully designed and assembled a reliable power inverter with total parts for less
than $ 50.00.

7. Conclusion:
Our capstone design project proved to be a challenging and rewarding experience. Through
extensive research and testing, we gained a large range of knowledge of several new circuit design
techniques and theories; as well has how to properly integrate a software based system. We met several
of our original goals including designing with as few components as possible and successfully generating
a line voltage that still met our desired performance. Our design could still be improved with the use of
a feedback system, however the low cost benefits of our design seem to outweigh any possible features
that could be added. In conclusion, we have gained a vast insight and knowledge into the operations
behind an entire product development system and will use many of our newly acquired skills in our
future endeavors.

Project Number: S15-033

P a g e | 16

8. REFRENCES:
[1]

Gajic, Z., & Lelic, M. (1996). Transient and Steady State Responses. Modern Control
Systems Engineering (1st ed., pp. 261-287). Piscataway, NJ: Prentice Hall.

[2]

Wang, T. (2011). Signal Generator Based on Direct Digital Synthesis


Techniques. International Journal of Digital Content Technology and Its
Applications, Volume 5(Issue 8), 24-30.

[3]

Vinayaka, B., & Nagendra, P. (2014). Modeling and Design of Five Level Cascaded HBridge Multilevel Inverter with DC/DC Boost Converter. Int. Journal of Engineering
Research and Applications, Vol.4(Issue 6), 50-55.

[4]

Hirzel, T. (2015). Arduino - PWM. Retrieved from http://www.arduino.cc/en/Tutorial/PWM

[5]

Colak, I., & Kabalci, E. (2012). Developing a novel sinusoidal pulse width modulation
(SPWM) technique to eliminate side band harmonics. International Journal of Electrical
Power & Energy Systems, Vol.44(1), 861-871.

[6]

Jivet, I., & Dragoi, B. (2008). Performance Analysis of Direct Digital Synthesizer
Architecture with Amplitude Sequencing. WSEAS TRANSACTIONS on CIRCUITS AND
SYSTEMS, Vol.7(1), 2-5.

[7]

D.mohan, D., & B.kurub, S. (2013). A Comparative Analysis of Multi Carrier SPWM
Control Strategies using Fifteen Level Cascaded H bridge Multilevel Inverter.
International Journal of Computer Applications, Vol.2(1), 7-11.

[8]

IR2103(S)PBF Half-Bridge Driver Datasheet. (2013, April 18). Retrieved from


http://www.irf.com/product-info/datasheets/data/ir2103.pdf

[9]

Fundamentals of Direct Digital Synthesis (DDS). (2009). Retrieved from


http://www.analog.com/media/en/training-seminars/tutorials/MT-085.pdf

[10]

Sudheer, P., & Siva Prasad, K. (2014). H-Bridge Multi Level STATCOM under Different
Loads. International Journal of Scientific and Research Publications, Vol.4(5), 1-5.

[11]

Easily Applicable Graphical Layout Editor V7 Tutorial. (2014).Retrieved from


http://www.cadsoftusa.com/fileadmin/journalist/Documents/tutorial_7.1_en.pdf

You might also like