ENG2029-无代写
时间:2023-05-07
ENG2029: Simulink task
Page 1 of 7
Three Phase PWM, Inverter and RL Load
Simulink® simulation
Simulink is a time based software package that is included in Matlab and its main task is to solve
Ordinary Differential Equations (ODE) numerically. The need for the numerical solution comes from
the fact that there is not an analytical solution for all DE, especially for those that are nonlinear.
The whole idea is to break the ODE into small time segments and to calculate the solution
numerically for only a small segment. The length of each segment is called “step size”.
1. Open Matlab:
a. either on a university desktop
b. or your own PC (Newcastle students can download for free here)
c. or Matlab online logging in with your university credentails
2. On the home bar click Simulink
3. Create a blank model
4. Model components can be found in the library browser:
ENG2029: Simulink task
Page 2 of 7
Task 1: Create a three phase PWM signal
Referring back to lecture * you will create from first principles, then simulate a three phase PWM
generator.
You will then use your 3-phase PWM generator to control the IGBTs of a three-phase inverter.
You will then connect the 3-phase inverter to a 3-phase star connected R-L load.
During the process you will investigate the various inputs and outputs using the scope.
Begin by finding the following blocks within the library browser: Sine wave, Sawtooth Generator,
Relational Operator, Scope, Goto, powerGUI, IGBT/Diode, Three-Phase VI Measurement, DeMUX,
Three-phase series RLC branch, ground. If you are having difficulty finding any, there is a supplied
model with the individual blocks supplied here.
Step 1: A single Phase PWM generator
You will begin by creating a single phase PWM control signal.
1. In the Matlab command window define the variables:
a. FM=100 (this is the modulation, or desired electrical frequency, set to 100Hz)
b. FC=10000 (this is the sawtooth carrier frequency set to 10kHz)
2. Place a sine wave block in the model.
a. Set the parameters to amplitude=1 and frequency=FM (double click on the block to
edit the parameters)
b. Sinewaves are in radians per second by default, so you will need to convert FM from
Hz to radians per second (Frequency=FM*2*pi)
3. Place a sawtooth generator in the model.
a. Frequency in the sawtooth generator is in Hz, so just set Frequency=FC
4. Place the relational operators in your model and are set to <=
a. With the sinewave output connected to the operators upper input, and the
sawtooth output to the operators lower input, the >= operator will output a 1 if the
sinewave magnitude is greater than or equal the saw tooth and 0 if it is less than.
5. Place a scope in your model
a. Set to 3 channel input (double click, settings, number of input ports = 3)
b. Connect the sine wave, sawtooth wave and relational operator outputs to the scope
6. Run the simulation
a. Set the model run time to 0.02 seconds (2 cycles at 100Hz)
b. Double click on the scope
7. Investigate the waveform; zoom in and out, does it look like a single phase PWM signal?
8. Save your waveform
ENG2029: Simulink task
Page 3 of 7
Step 2: Expand to create a three-phase PWM generator
1. Now place and additional two sine waves in your model
a. Define their frequency and amplitude as in step 1
2. Remembering that three-phase sinewaves are displaced by 120° you need to define the
phase angles of the three sine waves to be 0°,120° and 240°- remember to convert to radians
per second (0, 2*pi*(1/3), 2*pi*(2/3))
3. Copy two additional relational operators into your model (holding Ctrl, click on the one you
have and drag down to copy, then repeat)
4. Connect the remaining sinewaves and the sawtooth waveforms to the remaining relational
operators.
5. Add an additional two 3 input scopes (as in step 1) then connect the following outputs:
a. Scope 2: Connect the three sinewaves. Run the simulation again. Do you see three
100Hz sinewaves displaced by 120°? Save this trace,
b. Scope 3: connect to the three relational operator outputs. Do you see a three phase
PWM signal? Save this trace.
ENG2029: Simulink task
Page 4 of 7
Task 2 Create the three phase DC-Variable frequency AC inverter
Referring back to lectures, you will now create a model of the three-phase DC-AC inverter. The
inverter will have a 200V DC input and will generate a sinusoidal current output when connected to
an electrical load with resistance and inductance (RL load)
Step 1: The three-phase inverter
1. The electrical model requires the powerGUI simulation capability to be added. Insert the
powerGUI block in your model.
2. Insert a DC voltage source and set the voltage to 200V
3. Insert an “IGBT/Diode” block.
a. Rotate and flip the IGBT so g C inputs are at the top and E at the bottom:
4. The g input is the gate (switching control input), C is the collector (connected to the high
voltage side), E is the emitter (connected to the low voltage side.
5. Copy your IGBT five times and arrange to form a three phase inverter
a. Connect the Upper device collectors to the + terminal of the DC voltage
b. Connect the Lower device Emmiters to the – terminal of the DC voltage
c. Connect upper device E to lower Device C to form the three phase inverter:
ENG2029: Simulink task
Page 5 of 7
Step 2: Three-phase measurement and load
6. Place a “Three-Phase V-I Measurement” block
7. Place two “deMUX” blocks
8. Connect Vabc to deMUX1 and Iabc to deMUX2
a. The deMUX is a de-multiplexor and will split the Vabc and Iabc outputs from the
measurement block into the individual phase voltages and currents
9. Add two three-input scopes, connecting one for the voltages and the other for the currents
10. Add a “Three-phase series RLC branch”
a. Connect ABC (left side) to the abc outputs from the measurement block
b. Star connect the abc (right side)
c. Connect the star-point to ground (you wouldn’t do this practically without significant
heating, but Simulink cannot cope with a reference point)
Step 3: Create three complimentary pairs of PWM signals
The three PWM outputs and now turned into six. Remembering that the IGBTs in a single leg require
complimentary gate signals (to ensure no two devices are on at the same time, this avoiding
catastrophic shoot through faults) we use NOT logic gates to produce the complimentary pairs
1. Place a Not gate in your model and copy twice.
2. Connect one not gate to each relational operator output – you should now have six outputs:
ENG2029: Simulink task
Page 6 of 7
Step 4: Connect the PWM outputs to the inverter and the inverter to the load
You will now connect the three phase PWM control signals to the inverter. It is easier to do this using
Goto and From Tags.
1. Place six “goto” blocks in the model. Label these S1,S3,S5 for the true outputs and S2,S4,S6
for the inverted (NOT) outputs
2. Drag from each goto block a from block and arrange these near the gate inputs for the IGBTs.
3. Connect each from output to its correct IGBT gate input:
4. Now connect the centre point of each IGBT leg to the ABC measurement input
5. Your inverter and load are now ready for simulation
ENG2029: Simulink task
Page 7 of 7
Step 5: Simulation
In the load set R=1 Ohm and L = 1e-3H
Run your simulation for two electrical cycles (0.02s @ 100Hz)
Look at Vabc and Iabc outputs in their respective scope. Does this look correct? Save these two
traces.
Zoom in, can you see the PWM voltage waveform, can you see the current sine wave made up from
triangular ripples?
Experiment with different values for R, L, FM and FC: what do you find?

essay、essay代写