• PSIM User’s Guide

  • FileName: PSIM User Manual.pdf [read-online]
    • Abstract: PSIM is a simulation package specifically designed for power electronics and motor ... The PSIM simulation package consists of three programs: circuit schematic program ...

Download the ebook

User’s Guide
Powersim Inc.
PSIM User’s Guide
Version 6.0
June 2003
Copyright © 2001-2003 Powersim Inc.
All rights reserved. No part of this manual may be photocopied or reproduced in any form or by any
means without the written permission of Powersim Inc.
Powersim Inc. (“Powersim”) makes no representation or warranty with respect to the adequacy or
accuracy of this documentation or the software which it describes. In no event will Powersim or its
direct or indirect suppliers be liable for any damages whatsoever including, but not limited to, direct,
indirect, incidental, or consequential damages of any character including, without limitation, loss of
business profits, data, business information, or any and all other commercial damages or losses, or for
any damages in excess of the list price for the licence to the software and documentation.
Powersim Inc.
email: [email protected]
1 General Information
1.1 Introduction 1
1.2 Circuit Structure 2
1.3 Software/Hardware Requirement 2
1.4 Installing the Program 2
1.5 Simulating a Circuit 3
1.6 Component Parameter Specification and Format 3
2 Power Circuit Components
2.1 Resistor-Inductor-Capacitor Branches 7
2.1.1 Resistors, Inductors, and Capacitors 7
2.1.2 Rheostat 8
2.1.3 Saturable Inductor 8
2.1.4 Nonlinear Elements 9
2.2 Switches 11
2.2.1 Diode, DIAC, and Zener Diode 12
2.2.2 Thyristor and TRIAC 14
2.2.3 GTO, Transistors, and Bi-Directional Switch 15
2.2.4 Linear Switches 18
2.2.5 Switch Gating Block 19
2.2.6 Single-Phase Switch Modules 21
2.2.7 Three-Phase Switch Modules 22
2.3 Coupled Inductors 24
2.4 Transformers 26
2.4.1 Ideal Transformer 26
i -5
2.4.2 Single-Phase Transformers 26
2.4.3 Three-Phase Transformers 29
2.5 Other Elements 31
2.5.1 Operational Amplifier 31
2.5.2 dv/dt Block 32
2.6 Motor Drive Module 33
2.6.1 Electric Machines 33 DC Machine 33 Induction Machine 37 Induction Machine with Saturation 41 Brushless DC Machine 42 Synchronous Machine with External Excitation 48 Permanent Magnet Synchronous Machine 50 Switched Reluctance Machine 54
2.6.2 Mechanical Loads 56 Constant-Torque Load 56 Constant-Power Load 57 Constant-Speed Load 58 General-Type Load 59
2.6.3 Gear Box 59
2.6.4 Mechanical-Electrical Interface Block 60
2.6.5 Speed/Torque Sensors 62
3 Control Circuit Components
3.1 Transfer Function Blocks 65
3.1.1 Proportional Controller 66
3.1.2 Integrator 67
3.1.3 Differentiator 68
3.1.4 Proportional-Integral Controller 69
3.1.5 Built-in Filter Blocks 69
3.2 Computational Function Blocks 70
3.2.1 Summer 70
3.2.2 Multiplier and Divider 71
3.2.3 Square-Root Block 72
3.2.4 Exponential/Power/Logarithmic Function Blocks 72
3.2.5 Root-Mean-Square Block 73
3.2.6 Absolute and Sign Function Blocks 73
3.2.7 Trigonometric Functions 73
3.2.8 Fast Fourier Transform Block 74
3.3 Other Function Blocks 75
3.3.1 Comparator 75
3.3.2 Limiter 76
3.3.3 Gradient (dv/dt) Limiter 76
3.3.4 Look-up Table 76
3.3.5 Trapezoidal and Square Blocks 78
3.3.6 Sampling/Hold Block 79
3.3.7 Round-Off Block 80
3.3.8 Time Delay Block 81
3.3.9 Multiplexer 82
3.3.10 THD Block 83
3.4 Logic Components 85
3.4.1 Logic Gates 85
3.4.2 Set-Reset Flip-Flop 85
3.4.3 J-K Flip-Flop 86
3.4.4 D Flip-Flop 87
3.4.5 Monostable Multivibrator 87
3.4.6 Pulse Width Counter 88
3.4.7 A/D and D/A Converters 88
3.5 Digital Control Module 89
3.5.1 Zero-Order Hold 89
3.5.2 z-Domain Transfer Function Block 90 Integrator 91 Differentiator 93 Digital Filters 93
3.5.3 Unit Delay 97
3.5.4 Quantization Block 97
3.5.5 Circular Buffer 98
3.5.6 Convolution Block 99
3.5.7 Memory Read Block 100
3.5.8 Data Array 100
3.5.9 Stack 101
3.5.10 Multi-Rate Sampling System 102
3.6 SimCoupler Module 103
3.6.1 Set-up in PSIM and Simulink 103
3.6.2 Solver Type and Time Step Selection in Simulink 106
4 Other Components
4.1 Parameter File 109
4.2 Sources 110
4.2.1 Time 110
4.2.2 DC Source 110
4.2.3 Sinusoidal Source 111
4.2.4 Square-Wave Source 112
4.2.5 Triangular Source 1
4.2.6 Step Sources 114
4.2.7 Piecewise Linear Source 115
4.2.8 Random Source 117
4.2.9 Math Function Source 1
4.2.10 Voltage/Current-Controlled Sources 118
4.2.11 Nonlinear Voltage-Controlled Sources 120
4.3 Voltage/Current Sensors 121
4.4 Probes and Meters 122
4.5 Switch Controllers 124
4.5.1 On-Off Switch Controller 124
4.5.2 Alpha Controller 125
4.5.3 PWM Lookup Table Controller 126
4.6 Function Blocks 128
4.6.1 Control-Power Interface Block 128
4.6.2 ABC-DQO Transformation Block 130
4.6.3 Math Function Blocks 131
4.6.4 External DLL Blocks 132
5 Analysis Specification
5.1 Transient Analysis 135
5.2 AC Analysis 136
5.3 Parameter Sweep 140
6 Circuit Schematic Design
6.1 Creating a Circuit 144
6.2 Editing a Circuit 144
6.3 Subcircuit 145
6.3.1 Creating Subcircuit - In the Main Circuit 146
6.3.2 Creating Subcircuit - Inside the Subcircuit 147
6.3.3 Connecting Subcircuit - In the Main Circuit 148
6.3.4 Other Features of the Subcircuit 149 Passing Variables from the Main Circuit to Subcircuit 149 Customizing the Subcircuit Image 150 Including Subcircuits in the PSIM Element List 151
6.4 Other Options 152
6.4.1 Running the Simulation 152
6.4.2 Generate and View the Netlist File 152
6.4.3 Define Runtime Display 152
6.4.4 Settings 152
6.4.5 Printing the Circuit Schematic 153
v -1
6.5 Editing PSIM Library 153
7 Waveform Processing
7.1 File Menu 156
7.2 Edit Menu 156
7.3 Axis Menu 157
7.4 Screen Menu 158
7.5 View Menu 159
7.6 Option Menu 161
7.7 Label Menu 162
7.8 Exporting Data 162
8 Error/Warning Messages and Other Simulation Issues
8.1 Simulation Issues 165
8.1.1 Time Step Selection 165
8.1.2 Propagation Delays in Logic Circuits 165
8.1.3 Interface Between Power and Control Circuits 166
8.1.4 FFT Analysis 166
8.2 Error/Warning Messages 167
8.3 Debugging 168
General Information
1.1 Introduction
PSIM is a simulation package specifically designed for power electronics and motor
control. With fast simulation and friendly user interface, PSIM provides a powerful
simulation environment for power electronics, analog and digital control, and motor
drive system studies.
This manual covers both PSIM1 and its three add-on Modules: Motor Drive Module,
Digital Control Module, and SimCoupler Module. The Motor Drive Module has built-in
machine models and mechanical load models for drive system studies. The Digital
Control Module provides discrete elements such as zero-order hold, z-domain transfer
function blocks, quantization blocks, digital filters, for digital control analysis. The
SimCoupler Module provides interface between PSIM and Matlab/Simulink2 for co-
The PSIM simulation package consists of three programs: circuit schematic program
PSIM, PSIM simulator, and waveform processing program SIMVIEW 1. The simulation
environment is illustrated as follows.
PSIM Schematic Circuit Schematic Editor (input: *.sch)
PSIM Simulator PSIM Simulator (input: *.cct; output: *.txt)
SIMVIEW Waveform Processor (input: *.txt)
Chapter 1 of this manual describes the circuit structure, software/hardware requirement,
and parameter specification format. Chapter 2 through 4 describe the power and control
1. PSIM and SIMVIEW are copyright by Powersim Inc., 2001-2003
2. Matlab and Simulink are registered trademarks of the MathWorks, Inc.
Introduction 1
circuit components. Chapter 5 describes the specifications of the transient analysis and
ac analysis. The use of the PSIM schematic program and SIMVIEW is discussed in
Chapter 6 and 7. Finally, error/warning messages are discussed in Chapter 8.
1.2 Circuit Structure
A circuit is represented in PSIM in four blocks: power circuit, control circuit, sensors,
and switch controllers. The figure below shows the relationship between these blocks.
Power Circuit
Control Circuit
The power circuit consists of switching devices, RLC branches, transformers, and
coupled inductors. The control circuit is represented in block diagram. Components in s
domain and z domain, logic components (such as logic gates and flip flops), and
nonlinear components (such as multipliers and dividers) are 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.
1.3 Software/Hardware Requiremen
PSIM runs in Microsoft Windows environment 98/NT/2000/XP on personal computers.
The minimum RAM memory requirement is 32 MB.
1.4 Installing the Program
A quick installation guide is provided in the flier “PSIM - Quick Guide” and on the CD-
Some of the files in the PSIM directory are shown in the table below.
2 General Information
Files Description
psim.dll PSIM simulator
psim.exe PSIM circuit schematic editor
simview.exe Waveform processor SIMVIEW
psim.lib, psimimage.lib PSIM libraries
*.hlp Help files
*.sch Schematic files
File extensions used in PSIM are:
*.sch PSIM schematic file (binary
*.cct PSIM netlist file (text)
*.txt PSIM simulation output file (text)
*.fra PSIM ac analysis output file (text)
*.smv SIMVIEW waveform file (binary)
1.5 Simulating a Circuit
To simulate the sample one-quadrant chopper circuit “chop.sch”:
- Start PSIM. Choose Open from the File menu to load the file “chop.sch”.
- From the Simulate menu, choose Run PSIM to start the simulation. The
simulation results will be saved to File “chop.txt”. Any warning messages
occurred in the simulation will be saved to File “message.doc”.
- If the option Auto-run SIMVIEW is not selected in the Options menu, from
the Simulate menu, choose Run SIMVIEW to start SIMVIEW. If the option
Auto-run SIMVIEW is selected, SIMVIEW will be launched automatically.
In SIMVIEW, select curves for display.
1.6 Component Parameter Specification and Format
The parameter dialog window of each component in PSIM has three tabs: Parameters,
Other Info, and Color, as shown below.
Simulating a Circuit 3
The parameters in the Parameters tab are used in the simulation. The information in the
Other Info tab, on the other hand, is not used in the simulation. It is for reporting
purposes only and will appear in the parts list in View | Element List in PSIM.
Information such as device rating, manufacturer, and part number can be stored under
the Other Info tab.
The component color can be set in the Color tab.
Parameters under the Parameters tab can be a numerical value or a mathematical
expression. A resistance, for example, can be specified in one of the following ways:
where R1, R2, Vo, and Io are symbols defined either in a parameter file (see Section
4.1), or in a main circuit if this resistor is in a subcircuit (see Section
Power-of-ten suffix letters are allowed in PSIM. The following suffix letters are
G 109
M 106
k or K 103
m 10-3
u 10-6
n 10-9
p 10-12
4 General Information
A mathematical expression can contain brackets and is not case sensitive. The following
mathematical functions are allowed:
+ addition
- subtraction
* multiplication
/ division
^ to the power of [Example: 2^3 = 2*2*2]
SQRT square-root function
SIN sine function
COS cosine function
TAN tangent function
ATAN inverse tangent function
EXP exponential (base e) [Example: EXP(x) = e x]
LOG logarithmic function (base e) [Example: LOG(x) = ln (x)]
LOG10 logarithmic function (base 10)
ABS absolute function
SIGN sign function [Example: SIGN(1.2) = 1; SIGN(-1.2)=-1]
Component Parameter Specification and Format 5
6 General Information
Power Circuit Components
2.1 Resistor-Inductor-Capacitor Branches
2.1.1 Resistors, Inductors, and Capacitors
Both individual resistor, inductor, capacitor branches and lumped RLC branches are
provided in PSIM. Initial conditions of inductor currents and capacitor voltages can be
To facilitate the setup of three-phase circuits, symmetrical three-phase RLC branches,
“R3”, “RL3”, “RC3”, “RLC3”, are provided. Initial inductor currents and capacitor
voltages of the three-phase branches are all zero.
The names above the element images are the netlist names of the elements. For
example, a resistor appears as “Resistor” in the library menu, and the netlist name is
For three-phase branches, the phase with a dot is Phase A.
Parameters Description
Resistance Resistance, in Ohm
Inductance Inductance, in H
Capacitance Capacitance, in F
Resistor-Inductor-Capacitor Branches 7
Parameters Description
Initial Current Initial inductor current, in A
Initial Cap.Voltage Initial capacitor voltage, in
Current Flag Flag for branch current output. If the flag is zero, there is
no current output. If the flag is 1, the current will be saved
to the output file for display in SIMVIEW. The current is
positive when it flows into the dotted terminal of the
Current Flag_A; Flags for Phase A, B, and C of three-phase branches,
Current Flag_B; respectively.
Current Flag_C
The resistance, inductance, or capacitance of a branch can not be all zero. At least one of
the parameters has to be a non-zero value.
2.1.2 Rheostat
A rheostat is a resistor with a tap.
k m
Parameters Description
Total Resistance Total resistance of the rheostat R (between Node k and m),
in Ohm
Tap Position (0 to 1) The tap position Tap. The resistance between Node k and t
is: R*Tap.
Current Flag Flag for the current that flows into Node k.
2.1.3 Saturable Inductor
A saturable inductor takes into account the saturation effect of the inductor magnetic
8 Power Circuit Components
Parameters Description
Current v.s. Inductance Characteristics of the current versus the inductance (i1,
L1), (i2, L2), etc.
Current Flag Flag for the current display
The nonlinear B-H curve is represented by piecewise linear approximation. Since the
flux density B is proportional to the flux linkage λ and the magnetizing force H is
proportional to the current i, the B-H curve can be represented by the λ-i curve instead,
as shown below.
λ (B)
λ2 Inductance L = λ / i
i1 i2 i3 i (H)
The inductance is defined as: L = λ / i, which is the slope of the λ-i curve at different
points. The saturation characteristics can then be expressed by pairs of data points as:
(i1, L1), (i2, L2), (i3, L3), etc.
2.1.4 Nonlinear Elements
Four elements with nonlinear voltage-current relationship are provided:
- Resistance-type (NONV) [v = f(i)]
- Resistance-type with additional input x (NONV_1) [v = f(i,x)]
- Conductance-type (NONI i = f(v)]
Resistor-Inductor-Capacitor Branches 9
- Conductance-type with additional input x (NONI_1) [i = f(v,x)]
The additional input x must be a voltage signal.
Input x
For resistance-type elements:
Parameters Description
Expression f(i) or f(i,x) Expression v = f(i) for NONV and v = f(i,x) for NONV_1
Expression df/di The derivative of the voltage v versus current i, i.e. df(i)/di
Initial Value io The initial value of the current i
Lower Limit of i The lower limit of the current i
Upper Limit of i The upper limit of the current i
For conductance-type elements:
Parameters Description
Expression f(v) or Expression i = f(v) for NONI and i = f(v,x) for NONI_1
Expression df/dv The derivative of the current i versus voltage v, i.e. df(v)/dv
Initial Value vo The initial value of the voltage v
Lower Limit of v The lower limit of the voltage v
Upper Limit of v The upper limit of the voltage v
A good initial value and lower/upper limits will help the convergence of the solution.
10 Power Circuit Components
Example: Nonlinear Diode
The nonlinear element (NONI) in the circuit above models a nonlinear diode. The diode
current is expressed as a function of the voltage as: i = 10-14 * (e 40*v-1). In PSIM, the
specifications of the nonlinear element will be:
Expression f(v) 1e-14*(EXP(40*v)-1)
Expression df/dv 40e-14*EXP(40*v)
Initial Value vo 0
Lower Limit of v -1e3
Upper Limit of v 1
2.2 Switches
There are two basic types of switches in PSIM. One is switchmode. It operates either in
the cut-off region (off state) or saturation region (on state). The other is linear. It can
operates in either cut-off, linear, or saturation region.
Switches in switchmode include the following:
- Diode (DIODE) and DIAC (DIAC)
- Thyristor (THY) and TRIAC (TRIAC)
- Self-commutated switches, specifically:
- Gate-Turn-Off switch (GTO)
- npn bipolar junction transistor (NPN
- pnp bipolar junction transistor (PNP)
- Insulated-Gate Bipolar Transistor (IGBT
- n-channel Metal-Oxide-Semiconductor Field-Effect Transistor
(MOSFET) and p-channel MOSFET (MOSFET_P)
Switches 11
- Bi-directional switch (SSWI)
The names inside the bracket are the netlist names used in PSIM.
Switch models in PSIM are ideal. That is, both turn-on and turn-off transients are
neglected. A switch has an on-resistance of 10 µΩ and an off-resistance of 1M Ω.
Snubber circuits are not required for switches.
Linear switches include the following:
- npn bipolar junction transistor (NPN_1)
- pnp bipolar junction transistor (PNP_1)
2.2.1 Diode, DIAC, and Zener Diode
The conduction of a diode is determined by circuit operating conditions. A diode is
turned on when it is positively biased, and is turned off when the current drops to zero.
Parameters Description
Diode Voltage Drop Diode conduction voltage drop, in V
Initial Position Flag for the initial diode position. If the flag is 0, the diode
is open. If it is 1, the diode is closed.
Current Flag Flag for the diode current output. If the flag is 0, there is
no current output. If the flag is 1, the diode current will be
saved to the output file for display in SIMVIEW.
A DIAC is a bi-directional diode. A DIAC does not conduct until the breakover voltage
is reached. After that, the DIAC goes into avalanche conduction, and the conduction
voltage drop is the breakback voltage.
12 Power Circuit Components
Parameters Description
Breakover Voltage Voltage at which breakover occurs and the DIAC begins to
conduct, in V
Breakback Voltage Conduction voltage drop, in V
Current Flag Current flag
A zener diode is modelled by a circuit as shown below.
K Circuit Model
Parameters Description
Breakdown Voltage Breakdown voltage VB of the zener diode, in V
Forward Voltage Drop Voltage drop of the forward conduction (diode voltage
drop from anode to cathode)
Current Flag Flag for zener current output (from anode to cathode)
If the zener diode is positively biased, it behaviors as a regular diode. When it is reverse
biased, it will block the conduction as long as the cathode-anode voltage VKA is less than
the breakdown voltage VB. When VKA exceeds VB, the voltage VKA will be clamped to
VB. [Note: when the zener is clamped, since the diode is modelled with an on-resistance
of 10µΩ, the cathode-anode voltage will in fact be equal to: VKA = VB + 10µΩ * IKA.
Therefore, depending on the value of IKA, VKA will be slightly higher than VB. If IKA is
very large, VKA can be substantially higher than VB].
Switches 13
2.2.2 Thyristor and TRIAC
A thyristor is controlled at turn-on. The turn-off is determined by circuit conditions.
A TRIAC is a device that can conduct current in both directions. It behaviors in the
same way as two thyristors in the opposite direction connected in parallel.
Parameters Description
Voltage Drop Thyristor conduction voltage drop, in
Holding Current Minimum conduction current below which the device stops
conducting and returns to the OFF state (for THY only)
Latching Current Minimum ON state current required to keep the device in the
ON state after the triggering pulse is removed (for THY only)
Initial Position Flag for the initial switch position (for THY only)
Current Flag Flag for switch current output
TRIAC holding current and latching current are set to zero.
There are two ways to control a thyristor or TRIAC. One is to use a gating block
(GATING), and the other is to use a switch controller. The gate node of a thyristor or
TRIAC, therefore, must be connected to either a gating block or a switch controller.
The following examples illustrate the control of a thyristor switch.
14 Power Circuit Components
Examples: Control of a Thyristor Switch
Gating Block
This circuit on the left uses a switching gating block (see Section 2.2.5). The switching
gating pattern and the frequency are pre-defined, and will remain unchanged throughout
the simulation. The circuit on the right uses an alpha controller (see Section 4.5.2). The
delay angle alpha, in deg., is specified through the dc source in the circuit.
2.2.3 GTO, Transistors, and Bi-Directional Switch
Self-commutated switches in the switchmode, except pnp bipolar junction transistor
(BJT) and p-channel MOSFET, are turned on when the gating is high (when a voltage of
1V or higher is applied to the gate node) and the switch is positively biased (collector-
emitter or drain-source voltage is positive). It is turned off whenever the gating is low or
the current drops to zero. For pnp BJT and p-channel MOSFET, switches are turned on
when the gating is low and switches are negatively biased (collector-emitter or drain-
source voltage is negative).
A GTO switch is a symmetrical device with both forward-blocking and reverse-
blocking capabilities. An IGBT or MOSFET switch consist of an active switch with an
anti-parallel diode.
A bi-directional switch (SSWI) conducts currents in both directions. It is on when the
gating is high and is off when the gating is low, regardless of the voltage bias conditions.
Note that a limitation of the BJT switch model in PSIM, in contrary to the device
behavior in the real life, is that a BJT switch in PSIM can block reverse voltage (in this
sense, it behaviors like a GTO). Also, it is controlled by a voltage signal at the gate
node, not a current.
Switches 15
Parameters Description
Initial Position Initial switch position flag. For MOSFET and IGBT, this
flag is for the active switch, not for the anti-parallel diode.
Current Flag Switch current flag. For MOSFET and IGBT, the current
through the whole module (the active switch plus the diode)
will be displayed.
A switch can be controlled by either a gating block (GATING) or a switch controller.
They must be connected to the gate (base) node of the switch. The following examples
illustrate the control of a MOSFET switch.
Examples: Control of a MOSFET Switch
On-off Controller
The circuit on the left uses a gating block, and the one on the right uses an on-off switch
controller (see Section 4.5.1). The gating signal is determined by the comparator output.
Example: Control of a npn Bipolar Junction Transistor
The circuit on the left uses a gating block, and the one on the right uses an on-off switch
16 Power Circuit Components
The following shows another example of controlling the BJT switch. The circuit on the
left shows how a BJT switch is controlled in the real life. In this case, the gating voltage
VB is applied to the transistor base drive circuit through a transformer, and the base
current determines the conduction state of the transistor.
This circuit can be modelled and implemented in PSIM as shown on the right. A diode,
Dbe, with a conduction voltage drop of 0.7V, is used to model the pn junction between
the base and the emitter. When the base current exceeds 0 (or a certain threshold value,
in which case the base current will be compared to a dc source), the comparator output
will be 1, applying the turn-on pulse to the transistor through the on-off switch
Switches 17
2.2.4 Linear Switches
Linear switches include npn bipolar junction transistor (NPN_1) and pnp bipolar
junction transistor (PNP_1). They can operate in either cut-off, linear, or saturation
Parameters Description
Current Gain beta Transistor current gain β, defined as: β=Ic/Ib
Bias Voltage r Forward bias voltage between base and emitter for
NPN_1, or between emitter and base for PNP_1
Vce,sat [or Vec,sat for Saturation voltage between collector and emitter for
PNP_1] NPN_1, and between emitter and collector for PNP_1
A linear BJT switch is controlled by the base current I b. It can operate in either one of
the three regions: cut-off (off state), linear, and saturation region (on state). The
properties of these regions for NPN_1 are:
- Cut-off region: be < Vr; Ib = 0; Ic = 0
- Linear region: be = Vr; Ic = β∗Ib; Vce > Vce,sat
- Saturation region: Vbe = Vr; Ic < β∗Ib; Vce = Vce,sat
where Vbe is the base-emitter voltage, ce is the collector-emitter voltage, and c is the
collector current.
Note that for NPN_1 and PNP_1, the gate node (base node) is a power node, and must
be connected to a power circuit component (such as a resistor or a source). It can not be
connected to a gating block or a switch controller.
WARNING: It has been found that the linear model for NPN_1 and PNP_1 works
well in simple circuits, but may not work when circuits are complex. Please use
this model with caution.
18 Power Circuit Components
Examples: Circuits Using the Linear BJT Switch
Examples below illustrate the use of the linear switch. The circuit on the left is a linear
voltage regulator circuit, and the transistor operates in the linear mode. The circuit on
the right is a simple test circuit.
2.2.5 Switch Gating Block
A switch gating block defines the gating pattern of a switch or a switch module. The
gating pattern can be specified either directly (with the gating block GATING) or in a
text file (with the gating block GATING_1).
Note that a switch gating block can be connected to the gate node of a switch ONLY. It
can not be connected to any other elements.
Parameters Description
Frequency Operating frequency of the switch or switch module
connected to the gating block, in Hz
No. of Points Number of switching points (for GATING only)
Switching Points Switching points, in deg. If the frequency is zero, the
switching points is in second. (for GATING only)
File for Gating Table Name of the file that stores the gating table (for
GATING_1 only)
Switches 19
The number of switching points is defined as the total number of switching actions in
one period. Each turn-on or turn-off action is counted as one switching point. For
example, if a switch is turned on and off once in one cycle, the number of switching
points will be 2.
For GATING_1, the file for the gating table must be in the same directory as the
schematic file. The gating table file has the following format:
... ...
where G1, G2, ..., Gn are the switching points.
Assume that a switch operates at 2000 Hz and has the following gating pattern in one
35 92 175 187 345 357
0 180 360 (deg.)
The specification of the gating block GATING for this switch will be:
Frequency 2000.
No. of Points 6
Switching Points 35. 92. 175. 187. 345. 357.
The gating pattern has 6 switching points (3 pulses). The corresponding switching
angles are 35o, 92o, 175o, 187o, 345o, and 357o, respectively.
If the gating block GATING_1 is used instead, the specification will be:
Frequency 2000.
File for Gating Table test.tbl
The file “test.tbl” will contain the following:
20 Power Circuit Components
2.2.6 Single-Phase Switch Modules
Built-in single-phase diode bridge module (BDIODE1) and thyristor bridge module
(BTHY1) are provided in PSIM. The images and internal connections of the modules
are shown below.

Use: 0.042