Experiment 9 Single Phase Inverters

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

1

Experiment 9
Single Phase Inverters
9.0 In-laboratory Experimentation
9.1 Developing a Unipolar and Bipolar PWM strategy for a Single phase H-bridge
a) Using SimPowerSystems toolbox of MATLAB/SIMULINK software, simulate the circuit of a
single phase H-Bridge inverter with Unipolar PWM. Connect the dc-side to a dc voltage source of
Vdc=15V and the ac-side to an RL load with R=10 and L= 3mH. The desired ac voltage has a
fundamental of 60 Hz. Select the triangle wave with a frequency of 2 kHz.
i)

Vary the modulation index from 0.2 to 1 (steps of 0.2) and record the voltage and current
waveforms. Confirm that the amplitude of the fundamental component of the load
voltage has a linear relationship with the modulation index (you can confirm by
measuring the amplitude of load current).

ii)

For a fixed modulation index, e.g., m=0.7, decrease the fundamental frequency from
60Hz to 40Hz and comment on the results.

iii)

For a fixed modulation index, e.g., m=0.7, decrease and increase the switching frequency
and comment on the results. Specifically pay attention to the current ripples.

iv)

In linear modulation region where the modulation index is below one, measure the
switching frequency of the MOSFETs. Increase the modulation index to m=1.2 and
measure the switching frequency of the MOSFETs and provide a comparison.

Fig.1 Circuit of a Single phase H-bridge inverter with Unipolar PWM strategy

Fig.2 Simulation results of Unipolar PWM strategy

b) Using SimPowerSystems toolbox of MATLAB/SIMULINK software, repeat part (a) with bipolar
PWM.

Fig.3 Circuit of a Single phase H-bridge inverter with Bipolar PWM strategy

Fig.4 Simulation results of Bipolar PWM strategy

9.2 MATLAB GUI Interface:


Develop a MATLAB GUI interface program to implement the bipolar and unipolar PWM techniques for
an H-Bridge inverter. In the developed programs, the control parameters would be modulation index,
fundamental/desired frequency, and switching frequency (triangle waveform frequency).
9.2.1 Implementing Unipolar and Bipolar PWMS using Real Time Workshop of MATLAB/Simulink
1. Simulink model
a) Overall Diagram

b) Under mask of PWM Control block

2. Configuration of the blocks, parameters and components


a) Fixed data point calculation setting (constant blocks)

b) Sampling time setting (Simulation---- >Configuration Parameters)

c) For all IQN x IQN block settings

d) For all IQNtrig blocks the function settings should be _IQsin

e) ePWM1 block settings

f) ePWM2 block setting

3) Developing the Control Interface


a) The GUI interface

b) Sample Matlab code for the above control interface


at line 64
global cc;
cc=ticcs;
configure(cc.rtdx,1024,4);
open(cc.rtdx,'sinefreq','w');
open(cc.rtdx,'module','w');
enable(cc.rtdx,'sinefreq');
enable(cc.rtdx,'module');
enable(cc.rtdx);
cc.rtdx;

10

At line 132 or where ever you have the executes on button press in xxxxx comment
% --- Executes on button press in menable.
function menable_Callback(hObject, eventdata, handles)
% hObject
handle to menable (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
global cc;
mtemp = str2num(get(handles.mindex,'string'));
writemsg(cc.rtdx,'module',int32(mtemp));
% --- Executes on button press in ffenable.
function ffenable_Callback(hObject, eventdata, handles)
% hObject
handle to ffenable (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
global cc;
ftemp = str2num(get(handles.frin,'string'));
writemsg(cc.rtdx,'sinefreq',int32(ftemp));

% --- Executes on button press in Run.


function Run_Callback(hObject, eventdata, handles)
% hObject
handle to Run (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)

11

global cc;
run(cc);
% --- Executes on button press in Halt.
function Halt_Callback(hObject, eventdata, handles)
% hObject
handle to Halt (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
global cc;
halt(cc);

12

9.3 Implementation
1. Turn on the TI C2000 micro-controller
You must turn on the TI C2000 micro-controller by selecting the USB side of toggle
switch.

2. Check the connection between the Matlab and TI C2000 micro-controller


Type ticcs in the Matlab command window to check the connection between the TI
C2000 micro-controller and Matlab. If the connection is established, you will get the
following message.

3. Build C code language from simulation model


Users can build the simulation model by clicking the build button in the simulation
toolbar.

13

And then, IDE link links to Code Composer Studio to generate C code. If build is
completed, Code Composer Studio must be linked like below.

4. Loading C code on the target board


Since the build action is selected as build, use must load the C code on the target
board manually by selecting load program command in the File option.

After that a window as shown in the below figure appears. Then select the .out file and press open.

14

5. Run the m-file


You can run the control interface by clicking RUN button of toolbar of m-file.

6. Connections on the DSP board


To see the outputs generated connect the oscilloscope probes to pins GPIO 00 and
01(ePWM1) for first sine function and GPIO 02 and 03(ePWM2) for second sine
function.

You might also like