Lab 1 Introduction to PSIM

advertisement
School of Electrical System Engineering
DET 309: Power Electronics
LABORATORY MODULE
DET 309
POWER ELECTRONICS
Semester 1 (2008/2009)
EXPERIMENT 1
INTRODUCTION TO PSIM SIMULATION
MARKS
Graph 1
Graph 2
Graph 3
Graph 4
Graph 5
Graph 6
10
10
10
10
10
10
Table 1
Table 2
Table 3
Problems
Total
%
5
5
5
25
100
100
NAME
:
DATE
:
MATRIX NO
:
PROGRAMME :
GROUP
:
SIGNATURE
:
1
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
EXPERIMENT 1
TITLE: INTRODUCTION TO PSIM SIMULATION SOFTWARE
OBJECTIVE
 To familiarize with the PSIM Simulation and its functions
 To construct a circuit using SIMCAD
 To view and analyze the circuit using SIMVIEW
A) FAMILIARIZE WITH PSIM SIMULATION
1.1 Introduction
PSIM is a simulation package specifically designed for power electronics and motor control.
With fast simulation, friendly user interface and waveform processing, PSIM provides a
powerful simulation environment for power converter analysis, control loop design, and motor
drive system studies.
The PSIM simulation package consists of three programs: circuit schematic editor SIMCAD*,
PSIM simulator, and waveform processing program SIMVIEW*. The simulation environment
is illustrated as follows.
SIMCAD
PSIM
SIMVIEW
Circuit Schematic Editor (output: *.sch)
PSIM Simulator (input: *.cct; output: *.txt)
Waveform Processor (input: *.txt)
Figure 1: PSIM Simulation Environment
2
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
1.2 Circuit Structure
A circuit is represented in PSIM in four blocks which are power circuit, control circuit,
sensors, and switch controllers. Figure 2 shows the relationship between each block.
Power Circuit
Switch
Controller
Sensors
Control Circuit
Figure 2: PSIM Block Diagram




The power circuit consists of switching devices, RLC branches, transformers, and other
discrete components.
The control circuit is represented in block diagram. Components in s-domain and zdomain, logic components (such as logic gates and flip flops), and nonlinear
components (such as multipliers and dividers) can be used in the control circuit.
Sensors measure power circuit voltages and currents and pass the values to the control
circuit.
Gating signals are then generated from the control circuit and sent back to the power
circuit through switch controllers to control switches.
3
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
B) CIRCUIT CONSTRUCTION IN SIMCAD
2. SIMCAD Environment
SIMCAD provides interactive and user-friendly interface for the circuit schematic design.
Figure 3 shows a rectifier circuit in the SIMCAD environment.
Figure 3: SIMCAD Environment
2.1 SIMCAD Menus
There are nine (9) menus in SIMCAD Simulation software which are
a. File menu
b. Edit Menu
c. View Menu
d. Sub-circuit Menu
e. Elements Menu
f. Simulate Menu
g. Options Menu
h. Window Menu
i. Help Menu
4
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
Figure 4 shows all the menus in SIMCAD environment. Each Menu consists of its sub-menu
to perform specified function. The functions of each menu can be found in the “Help Menu”.
Figure 4: PSIM Menus
Figure 5: PSIM Sub-Menus
In SIMCAD, all the PSIM components are stored under the Elements menu. The structure of
the PSIM component library is as follows:
Library Elements
Description
Power
Power circuit elements
- RLC Branches
- Switches
- Transformers
- Motor Drive
R, L, C, lumped RLC branches, and coupled inductors
Switches/switch modules and the gating element
1-phase and 3-phase transformers
Electric machines and mechanical loads
5
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
Control circuit elements
Control
- Filters
- Function Blocks
- Logic Elements
- Discrete Elements
Built-in filter blocks
Function blocks
Logic gates and other digital elements
Discrete elements
Elements shared by power and control circuits
Other
- Switch Controllers
- Sensors
- Probes
Switch controllers
Voltage/current and speed/torque sensors
Voltage/current probes and meters, and power meters
Sources
Voltage sources
Current sources
- Voltage
- Current
2.2 Creating a Circuit
The following functions are provided in the SIMCAD for circuit creation.
Get
Place
Rotate
Wire
Assign
To get an element from the component library, click on the
Elements menu. Choose the submenu and highlight the element to
be selected.
For example, to get a dc voltage source, click on Elements,
Sources, and Voltage, then highlight “Vdc”.
Once an element is selected from the menu, the image of the element
will appear on the screen and move with the mouse.
Click the left button of the mouse to place the element.
Once an element is selected, click on
rotate the element.
To connect a wire between two nodes, click on
. An image of a
pen will appear on the screen. To draw a wire, keep the left button of
the mouse pressed and drag the mouse. A wire always starts from
and ends at a grid intersection. For easy inspection, a floating node is
displayed as a circle, and a junction node is displayed as a solid dot.
To assign the parameters of an element, double click on the element.
A dialog box will appear. Specify the values and hit the <Return>
key or click on OK.
6
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
2.3 Editing a Circuit
The following functions are provided in the Edit menu and View menu for circuit editing:
Select
Copy
Delete
Move
Text
Zoom
Esc
To select an element, click on the element. A rectangle will appear
around the element.
To select a block of a circuit, keep the left button of a mouse pressed
and drag the mouse until the rectangle covers the selected area.
To copy an element or a block of the circuit, select the element or
the region, and choose Copy. Then choose Paste place the element
or circuit.
To delete an element, a block of a circuit, or a wire, select the item,
and choose Cut, or hit the <Delete> key. Note that if Cut is used,
the last deleted item can be pasted back. This is equivalent to un-do.
To move an element or a circuit block, select the element/circuit
block and drag the mouse while keeping the left button pressed.
To place text on the screen, choose Text. Enter the text in the dialog
box, and click the left button of the mouse to place it.
Select Zoom In to zoom in the circuit, or Zoom In Selected to
zoom in to a selected region. Choose Zoom Out to zoom out, or Fit
to Page to zoom out to fit the entire circuit to the screen.
Quit from any of the above editing modes by choosing Escape.
2.4 Simulation Control
Before a circuit can be simulated, simulation control parameters must be specified. By
choosing Simulation control in the Simulate menu, an image of a clock
will appear on
the screen. After double clicking on the clock, simulation control parameters can be specified
as shown in Figure 6
Figure 6: Simulation Control Dialog Box
7
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
2.5 Running the Simulation
To run the simulation, choose Run PSIM from the Simulate menu. This will create the netlist
file with the “.cct” extension, and start the PSIM simulator.
To view the simulation results, choose Run SIMVIEW from the Simulate menu.
C) WAVEFORM PROCESSING USING SIMVIEW
3. SIMVIEW Environment
SIMVIEW is a waveform display and post-processing program. Figure 7 shows simulation
waveforms in the SIMVIEW environment.
Figure 7: SIMVIEW Environment
8
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
3.1 SIMVIEW Menus
There are nine (9) menus in SIMVIEW environment which are
a. File menu
b. Edit Menu
c. Axis Menu
d. Screen Menu
e. Measure Menu
f. View Menu
g. Options Menu
h. Label Menu
i. Help Menu
Figure 8 shows all the menus in SIMVIEW environment. Each Menu consists of its sub-menu
to perform specified function. The functions of each menu can be found in the “Help Menu”.
Figure 8: SIMVIEW Menus
a) File Menu
Function
Open
Open Binary
Merge
Re-Load Data
Save
Save As
Print
Print Setup
Print Page Setup
Print Preview
Exit
Description
Load text data file
Load SIMVIEW binary file
Merge another data file with the existing data file for display
Re-load data from the same text file
In the time display, save waveforms to a SIMVIEW binary file
with the .smv extension. In the FFT display, save the FFT
results to a text file with the .fft extension. The data range
saved will be the same as shown on the screen.
In the time display, save waveforms to a SIMVIEW binary file
specified by the user. In the FFT display, save the FFT results
to a text file specified by the user.
Print the waveforms
Set up the printer
Set up the hardcopy printout size
Preview the printout
Quit SIMVIEW
9
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
When the data of a text file are currently being displayed, after new data of the same file have
become available, by selecting Re-Load Data, waveforms will be re-drawn based on the new
data.
By using the Merge function, data from multiple files can be merged together for display.
For example, if one file contains the curves “I1” and “I2”, and another file contains the curves
“V1” and “V2”, all four curves can be merged and displayed on one screen. Note that if the
second file also contains a curve with the same name “I1”, it will be modified to “I1_1”
automatically.
3.2 Edit Menu
Function
Copy to Clipboard
Edit Title
6.3 Axis Menu
Function
X Axis
Y Axis
Axis Label Setting
Default X-Axis: Time
Description
Copy the waveforms to the clipboard
Edit the title of the printout. By default, the title shows the file
name and path.
Description
Change the settings of the X axis
Change the settings of the Y axis
Change the settings of the X/Y axis labels
If the item is checked, the first column, which is usually Time,
will be used as the X axis.
The dialog box of the X/Y axis settings are shown below (Figure 9)
.
Figure 9: X/Y Axis Setting Dialog Box
10
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
If the Auto-Scale box is checked and the Grid Division is chosen as default, the maximum data
range will be selected and the number of axis divisions will be automatically determined. Both
the data range and grid division, however, can be manually set.
In the Axis Label Setting, the label font size can be changed, and the display of the label can
be disabled.
By default, the option Default X-Axis: Time is selected. That is, the first column of the data,
which is usually Time, is used as the X axis. If this option is not selected, any other column of
the data can be used as the X axis.
3.4 Screen Menu
Function
Add/Delete Curves
Add Screen
Delete Screen
Description
Add or delete curves from the selected screen
Add a new screen
Delete the selected screen
A screen is selected by clicking the left mouse on top of the screen.
The dialog box of the Add/Delete Curves function is shown in Figure 10.
Figure 10: Add/Delete Curves Dialog Box
All the data variables available for display are in the Variables Available box, and the variables
currently being displayed are in the Variables for Display box. After a variable is highlighted
in the Variables Available box, it can be added to the Variables for Display box by clicking on
11
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
“Add ->”. Similarly, a variable can be removed from display by highlighting the variable and
clicking on “<- Remove”.
In the Edit Box, an expression consisting of + (addition), - (subtraction), * (multiplication), and
/ (division), of variables can be specified. For example, to display “I (IL1a) +20.” type this
expression in the Edit Box, and click on “Add ->”. Note that only
+, -, *, and / are allowed. Also, mathematical functions and expressions with brackets, such as
“I (RL1a)*(I (RL1a)+2.)”, are not permitted.
3.5 View Menu
Function
Zoom
Re-Draw
Measure
Escape
Max
Min
Next Max
Next Min
Toolbar
Status Bar
Description
To zoom into a selected region
To re-draw the waveform using the auto-scale
To measure the values of the waveforms
To escape from the Zoom or Measure mode
To find the global maximum of a selected curve
To find the global minimum of a selected curve
To find the next local maximum of a selected curve
To find the next local minimum of a selected curve
To enable/disable toolbar
To enable/disable status bar
A region is selected by pressing the left button of the mouse and, at the same time, drags the
mouse.
3.6 Option Menu
Function
FFT
Time
Set Text Fonts
Set Curves
Set Background
Grid
Color
Description
Perform the Fast Fourier Transform analysis
Switch from the frequency spectrum display to time domain
display
Change the text font type and size
Change the display of curves
Set the screen background to be either Black (default) or White
Enable or disable the grid display
Set the curves to be either Color (default) or Black and White
By selecting FFT, the harmonic amplitudes of time domain waveforms can be calculated and
displayed. Note that, in order to obtain correct FFT results, the simulation should reach the
steady state, and the simulation data should be restricted (using the manual range setting in the
X Axis function) to have the integer number of the fundamental period.
12
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
The display of a curve can be changed through Set Curves. The data points of a curve can
have either no symbol, or one of the following symbols: Circle, Rectangle, Triangle, Plus, and
Star. Also, data points can be either connected or discrete.
To change the settings of a curve, first select the curve using the left mouse, then choose the
proper settings, and click on Apply. After all the settings are selected, Click on OK.
The dialog box of the Set Curves function is shown in Figure 11.
Figure 11: Set Curves Dialog Box
Once “Color” is de-selected, the display becomes black-and-white. If the waveform screen is
copied to the clipboard, the bitmap image will be in monochrome. This will result a much
smaller memory size as compared to the image in color display.
3.7 Label Menu
Function
Text
Line
Dotted Line
Arrow
Description
Place text on the screen
Draw a line
Draw a dotted line
Draw a line with arrow
To draw a line, first select Line from the Label menu. Then click the left mouse at the position
where the line begins, and drag the mouse while keeping the left button pressed.
Dotted lines and lines with arrows are drawn in the same way.
If one is in the Zoom or Measure mode, and wishes to edit a text or a label, one should first
escape from the Zoom/Measure mode by selecting “Escape” in the “View” menu.
13
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
3.8 Exporting Data
As stated in Section 3.1, FFT results can be saved to a text file. Therefore, both simulation
results (*.txt) and FFT results (*.fft) are in text format and can be edited using a text editor, or
exported to other software, such as Microsoft Excel. For example, in Excel, simple open the
data file. The data will be automatically converted to the table format.
14
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
D) EXERCISE
Switching converter
Power input
Load
L
d
D
vg
C
Load
vo
ONCTRL
COMP
+
Vref
Carrier wave
Figure 12: DC/DC Converter Circuit
i)
Set up the circuit as shown in Figure 12 in SIMCAD.
ii)
Set the parameters as follows:
TABLE I: CIRCUIT PARAMETERS
Parameter name
Symbol
Value
Input voltage
𝑉𝑔
100 V
Output Capacitor
C
100 μF
Inductor
L
1 mH
5Ω
Load resistance
R
2Ω
10 Ω
Power MOSFET
M
-
Power diode
D
-
15
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
iii)
Set the frequency of Carrier wave, 𝑓𝐶 = 5 kHz and duty cycle, 𝑑 = 0.5.
iv)
Set the amplitude of 𝑉𝑟𝑒𝑓 = 0.5 V.
v)
Place the voltage and current probes at appropriate position to measure/display the
carrier frequency, reference voltage, PWM output, output voltage, 𝑉𝑜 , output current,
𝐼𝑜 , inductor voltage, 𝑉𝐿 and inductor current, 𝐼𝐿 .
vi)
Set the Time step to 5 × 10−6 and Total time to 5 ms in the Simulation Control
dialog box. (Refer Section 2.4)
vii)
Run the simulation by choosing Run PSIM from the Simulate menu.
viii)
Choose Run SIMVIEW from the Simulate menu to view the simulation results.
ix)
Select the available variables to be display in the Data Display Selection dialog box.
(Refer Section 3.4)
x)
Change the setting of the X/Y-axis for the best view of the selected output display.
xi)
Sketch the waveform of carrier frequency and reference voltage, PWM output, Output
Voltage, 𝑉𝑜 , output current, 𝐼𝑜 , inductor current, 𝐼𝐿 and inductor voltage, 𝑉𝐿 .
xii)
Label the overshoot voltage, 𝑉𝑜𝑣𝑒𝑟𝑠ℎ𝑜𝑜𝑡 , rising time, 𝑡𝑟 , steady state time, 𝑡𝑠𝑠 and
period, T.
xiii)
Vary the input voltage, 𝑉𝑔 from 80 V to 120 V and see the effect on the output voltage.
Complete Table 1.
xiv)
Change the value of resistor as shown in Table I and see their effect ( Set 𝑉𝑔 =
100𝑉, 𝑑 = 0.5). Complete Table 2.
xv)
Vary the duty cycle, d from 0.1 to 1.0 by changing the reference voltage, 𝑉𝑟𝑒𝑓 . See the
effect of varying the duty cycle to the output waveform (Set 𝑉𝑔 = 100𝑉, 𝑅 = 5Ω).
Complete Table 3.
16
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
Vref, Vc
Time (ms)
1.00
Vpwm
Time (ms)
1.00
17
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
IL
10.00
Time (ms)
11.00
Time (ms)
50.00
VL
18
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
Io
Time (ms)
10.00
Time (ms)
10.00
Vo
19
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
Table 1: Variation in input voltage, 𝑉𝑔
Input voltage, 𝑽𝒈
Output voltage, 𝑽𝒐
Table 2: Variation in Loading Condition
Resistor, R (Ω)
Output voltage, 𝑽𝒐
Table 3: Variation in duty cycle, d
Duty cycle, d
Output voltage, 𝑽𝒐
20
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
E) PROBLEMS
1. Based on your observation, what happen to the waveforms when the resistor value is
changed?
2. What is the effect of varying the duty cycle, d to the output voltage waveform, 𝑉𝑜 .
3. From your observation, what is the relationship between the input voltage and the output
voltage for this type of converter?
21
Universiti Malaysia Perlis (UniMAP)
School of Electrical System Engineering
DET 309: Power Electronics
4. Using the following equation, prove that your simulation results are acceptable.
𝑉𝑜 = 𝑉𝑔 𝑑
5. Why there is a discrepancy between the calculation and the simulation results?
22
Universiti Malaysia Perlis (UniMAP)
Download