You are on page 1of 17

Texas A&M University at Qatar

Electrical and Computer Engineering Program

ECEN-403 Senior Design Lab

Mini Project Report


Designing and Simulating a Control Circuit

Fatima Ali
Fatima ElMubarak
Heba tullah Elboursaly
Huda Al-Mulla
Shaymaa Khalifa

Submission Date: November 29th, 2011

On my honor, as an Aggie, I have neither given nor received


unauthorized aid on this academic work
Abstract

The aim of this project was to simulate and test the control circuit of an inverter using both

software and hardware tools. The circuit was simulated using MATLAB Simulink; then, it was

built on a breadboard in order to be tested. Using MATLAB Simulink, the Pulse Width

Modulation technique was used in order to generate six signals to control the six switches of the

inverter. The same was done on breadboard; however, the control signal for one switch only was

generated instead of all switches. The signals generated using MATLAB Simulink and on

breadboard were in agreement.


Introduction

A typical solar energy system consists of photovoltaic cells and an inverter that were connected

to a grid. Whereas our senior design project is mainly focused on designing an inverter, the aim

of this mini project was to design and test the control circuit of an inverter. This control circuit

can be used to control the switching circuit in an inverter by generating control signals. The

switching circuit of a Z Source Inverter (ZSI) or Quasi Z Source Inverter (qZSI) consists of six

different switches that can have different on/off combinations. Each two switches in one column

make a leg. The on/off combinations of these switches can result in either shoot through or non-

shoot through states which are controlled by the control circuit. The shoot through state is

achieved when two switches in the same leg are on. Otherwise, the non-shoot through state is

achieved. However, for the purpose of simulation the shoot through state was achieved by having

all switches on, i.e. all legs were on. The technique by which the control circuit generates signals

to achieve either shoot through or non-shoot through states is essentially Pulse Width

Modulation (PWM). Therefore, the control circuit controls parameters such as; duty ratio,

modulation index, and switching frequency of the inverter. When these parameters are modified

the switching function of the inverter is controlled.


Results and Analysis

MATLAB Simulink Circuit

Circuit behavior

In Figure 1, the upper block of the circuit that is labeled the shoot-through block compared a
high frequency (20 kHz) saw-tooth signal to a two threshold DC voltages: Vp and Vn such that
. This can be seen in Figure 2. The resulting pulse was generated when the amplitude of
the saw-tooth signal was greater than Vp or lower than Vn. Therefore, changing the value of Vp or
Vn controls the pulse width of the resulting signal, and accordingly, controls the inverters duty
ratio. The resulting Select signal will later be used as the select input for the six multiplexers.

Figure 1: The designed control circuit


Figure 2: Saw-tooth signal with two threshold DC voltages (Vp and Vn)

The lower block of the circuit labeled as the non-shoot through block compared the same saw-
tooth signal to a low frequency sine wave (50 Hz). The saw-tooth signal and the sine wave were
plotted in Figure 3. The pulses were generated when the amplitude of the saw-tooth signal was
greater than the amplitude of the sine wave. This signal will control the ON-OFF behavior of the
switches in the non-shoot through state. The signal was then inverted using a NOT logical gate to
control the other switch connected to the same leg in the inverter circuit. This happens because
only one switch can be ON at a time when the inverter was operating in a non-shoot through
state. The final signal that controlled Switch (1) of the inverter in the non-shoot through state is
shown in Figure 3.

Finally, a 2-to-1 multiplexer circuit was used to choose whether the switch will be operated
under the shoot through state or the non-shoot through state. The Select signal was used as the
select input of the multiplexer such that: if the signal was HIGH, the multiplexer will pass the
generated non-shoot through signal to control the switch and if the signal was LOW, the
multiplexer will pass HIGH signal which keeps the switch ON and operates under the shoot
through state. An assumption was made such that in the shoot through state, all switches are
turned on

For a three-phase inverter, the same strategy was implemented with 120 and 240 phase-shifted
sine waves to control the other four switches. The control circuit shown in Figure 1 was designed
using MATLAB Simulink. Figures 3 to 5 illustrate the obtained simulation results.
Figure 3: Sine wave, saw-tooth signal and the non-shoot through control signal of Switch (1)

The dashed line in Figure 4 shows that when the Select signal was zero, the control signal of
Switch (1) was asserted which means that Switch (1) was turned on. When the Select signal
was asserted, the non-shoot through control signal of Switch (1) was used to generate the final
control signal of Switch (1). In other words, the final control signal of Switch (1) accounts for
both the shoot through state and the non-shoot through state.
Figure 4: Control signals generated using MATLAB Simulink

Figure 5 shows the signals that controlled the six switches of the three-phase inverter circuit.

Figure 5: Control signals of the inverters six switches


Breadboard Circuit

The control circuit in Figure 1 was built on a breadboard using simple circuit elements and
logical gates. However, the output of only one switch was obtained for the purpose of testing the
circuit and comparing it with the simulations. To properly connect the pins of the components,
their data sheets were found and each component was tested individually to check whether or not
it operates properly. Table 1 shows the components that were used to build the control circuit.

Table 1: Components of the control circuit

Component Name
Comparator LM319
AND Gate DM7408
OR Gate SN7432
NOT Gate SN7404

A picture of the built circuit was taken and is shown on Figure 6 below.

Figure 6: The control circuit on the breadboard


Figure 7 below shows the block diagram of the control circuit with the exact pin allocations
of each component. 1

Figure 7: Block diagram of the control circui

1
This block diagram was designed by the team and not copied of the internet.
Design notes

A 10k resistor was inserted between the V+ and the output of the comparators to ensure
that that inputs to the comparator settles at expected logic levels so that other logic
components can distinguish between low and high voltages.
The positive voltage supply for all the components was 5V and the negative voltage
supply was 0V.
The saw-tooth signal and the sine wave signal were generated from an Agilent Waveform
Generator.
The DC supply was provided using Agilent Power Supply.
The output signals were displayed on an oscilloscope using channels.

Figures 8 to 11 represent the screenshots of the results that were obtained from the oscilloscope
after building the control circuit on the breadboard. The results in this section were found to be
consistent with the simulation results explained above.

Figure 8: The saw-tooth signal and the sine wave compared to each other to identify the mode of operation
Figure 9: The non-shoot through signal is asserted (HIGH) when the amplitude of the saw-tooth wave is higher
than that of the sine wave and it has a value of 0 when the opposite is true.

Figure 10: The non-shoot through signal, the shoot through signal, the final output signal that controls the switches
and the select signal, respectively.
Figure 11: Inverted signal that results from comparing the saw-tooth signal with the reference voltages Vp and Vn
Conclusion

In this project, the control circuit was simulated using MATLAB Simulink and built on a

breadboard. This control circuit generates signals that controls switches on/off mode. To

obtain these signals, a select signal must determine whether it is in the shoot through or non-

shoot through state. In MATLAB Simulink, the saw-tooth signal was compared to the

threshold voltages and the sine wave, the shoot through and non-shoot through were

determined for two switches. Finally, the select signal of the multiplexer was generated in

order to select between the shoot through or non-shoot through and turn the switch on or off

accordingly. The same analysis was done using the equipment in lab in which the circuit was

built on breadboard and simulated. However, the output of only one switch was obtained for

the purpose of testing the circuit and comparing it with the simulations. The figures obtained

were in consistency with the MATLAB results.


Appendix A

Table 1: Information about Quad 2-Input AND Gates


Component Name DM7408 Quad 2-Input AND Gates
Manufacturer Fairchild Semiconductor
Package Number N14A
Description The device contains four independent gates each of which performs the
logic AND function.
Specifications Number of Gates: 4
Number of Lines (Input/Output) = 2/1
High Level Output Current: - 0.8 mA
Low Level Output Current: 16 mA
Supply Voltage (Max): 5.25 V
Supply Voltage (Min): 4.75 V
Table 2: Information about Hex Inverters

Component Name SN7404N Hex Inverters


Manufacturer Texas Instruments
Packaging Tube
Description The device contains four independent 2-input OR gates.
Specifications Number of Gates: 6
High Level Output Current: - 0.4 mA
Low Level Output Current: 16 mA
Supply Voltage (Max): 5.25 V
Supply Voltage (Min): 4.75 V

Physical Dimensions
Table 3: Information about Quadruple 2-Input OR Gates
Component Name SN74LS32N Quadruple 2-Input Positive-OR Gates
Manufacturer Texas Instruments
Packaging Tube
Description The device contains six independent inverters.
Specifications Number of Gates: 4
Number of Lines (Input/Output) = 2/1
High Level Output Current: - 0.4 mA
Low Level Output Current: 8 mA
Supply Voltage (Max): 5.25 V
Supply Voltage (Min): 4.75 V

Physical Dimensions
Table 4: Information about Comparator ICs
Component Name LM319N Comparator ICs
Manufacturer National Semiconductor (TI)
Package Number N14A
Description The device contains high speed dual comparator.
Specifications Number of Channels: 2
Number of Lines (Input/Output) = 2/1
Offset Voltage (Max): 8 mV at +/- 15 V
Supply Current (Max): 4.3 mA at 5 V (Typ)
Maximum Power Dissipation: 500 mW
Features Two independent comparators
Operates from a single 5V supply
Typically 80 ns response time at 15V
Minimum fan-out of 2 each side
Maximum input current of 1 A over temperature

Physical Dimensions

You might also like