Simcad Help Contents
PSIM Help Contents

This Help file covers both PSIM and its add-on Modules: Motor Drive Module, Digital Control Module, and SimCoupler Module. Subjects are organized based on the function menu as follows.

Element Menu

File Menu

Edit Menu

View Menu

Subcircuit Menu

Simulate Menu

Option Menu

Window Menu

In addition, the following help information is available:

Helpful Tips

Power/Control Circuit Representation and Interface in PSIM

Error/Warning Messages

FFT Analysis


File Menu

The File menu includes the following functions:

New	Create a new circuit
Open	Open an existing circuit
Close	Close the current circuit window
Close All	Close all the circuit windows
Save	Save the current circuit
Save As	Save the current circuit to a different file
Save All	Save all the circuits
Save with Password	Save the circuit with the password protection. Once the circuit is password protected, one must enter the correct password in order to view the circuit schematic. However, without entering the password, one can still simulate the circuit and view the simulation waveforms. The password protection can be disabled by selecting Disable Password in the Options menu.
Print	Print the circuit
Print Preview	Preview the printout
Print Selected	Print a portion of the circuit selected
Print Selected Preview	Preview the circuit portion selected for printing
Print Page Setup	Set up the print page legend
Printer Setup	Set up the printer
Exit	Exit PSIM’s schematic program SIMCAD

The password protection feature is useful if you let others to simulate the circuit you created, but do not wish to reveal the circuit schematic. For example, you create a model of a device and save it as a subcircuit. You can password protect this subcircuit file, and share the model with others without releasing the details of the model.

Warning: You must write down the password and keep it in a safe place. If you forget the password, you will no longer be able to view the schematic. It is strongly recommended that you make a backup copy of the file before protecting it.


Edit Menu

The Edit menu includes the following functions:

Undo Delete	Undo the last delete action
Cut	Remove the selected circuit block and save it to the buffer
Copy	Copy a selected circuit block
Paste	Paste the selected circuit block
Select All	Select the whole circuit
Copy to Clipboard  - Color - Black & White	Copy the selected circuit schematic, in color, to the clipboard Copy the selected circuit schematic, in black and white, to the clipboard. The image in black and white is smaller than that in color in memory size.
Text	Place text
Wire	Draw a wire
Label	Place a label. Labels provide another way of connecting two or more nodes together. If nodes are connected to labels having the same name, these nodes are connected.
Attributes	Edit the attribute of an element
Disable	Disable an element or part of a circuit
Enable	Enable the element or circuit that was disabled previously
Rotate	Rotate the selected element or block
Flip L/R	Flip left/right of the selected element
Flip T/B	Flip top/bottom of the selected element
Find	Find an element based on its type and name
Find Next	Find the next element of the same type
Edit Library	Edit the PSIM library
Escape	Escape from any of the above editing modes

The text of a label can be moved. To select the text, left click on the label, and press the Tab key. Then drag the mouse while keeping the left mouse pressed.


Edit library menu
Edit Library

The PSIM library consists of two parts: the netlist library (psim.lib) and the image library (psimimage.lib). The netlist library defines the netlist format of each element, and the netlist is used by PSIM simulator for simulation. The netlist library can not be modified by users.

On the other hand, the image library contains the image information of an element. Users can either modify the default PSIM image library, or create an image library from scratch. It is possible to have multiple image libraries. Any image libraries that are placed in the PSIM directory will be loaded into the Elements menu.


View Menu

The View menu includes the following functions:

Status Bar	Enable or disable the status display
Toolbar	Enable or disable the toolbar display
Element Toolbar	Enable or disable the element toolbar. The element toolbar stores commonly used PSIM elements.
Recently Used Element List	Drop-down list box that shows the most recently used elements
Zoom In	Zoom in
Zoom Out	Zoom out
Fit to Page	Fit the whole circuit to the screen
Zoom in Selected	Zoom in to a selected region
List Element	List the elements of the circuit


Subcircuit Menu

The Subcircuit menu includes the following functions:

New Subcircuit	Create a new subcircuit
Load Subcircuit	Load an existing circuit as a subcircuit
Edit Subcircuit	Edit the subcircuit file name and other attributes
Set Size	Set the size of the subcircuit
Place Port	Place the interface port between the main circuit and the subcircuit
Display Port	Display the connection ports of the subcircuit block
Edit Default Variable List	Edit the default list of the subcircuit variables.  Note that the default variable list can be overwritten in the main circuit, and the default list of the subcircuit is not saved to the netlist and is not used for simulation.
Edit Image	Edit the subcircuit image. One can create and customize the image of the subcircuit. By default, the image is a rectangle.
Display Subcircuit Name	Display the name of the subcircuit block
Show Subcircuit Port	Show the names of the subcircuit ports in the main circuit. Once displayed, each port name can be moved to a different location. Click on the “Delete” key to disable the display of this port name.
Hide Subcircuit Port	Disable the display of all the subcircuit ports in the main circuit
Subcircuit List	List the names of the subcircuits
One Page Up	Go from a subcircuit to a higher level
Top Page	Go to the top level of the circuit

Note: The subcircuit menu is disabled in the PSIM demo version.

Functions “Set Size”, “Place Port”, “Display Port”, “Edit Variable List”, and “Edit Image” are only enabled when the subcircuit schematic window is active (currently being edited).

Creating a Subcircuit:

The creation of a subcircuit includes two steps: creating the subcircuit block in the main circuit; and creating the actual subcircuit.

In the main circuit:

  - In the main circuit, go to the “Subcircuit” menu. Choose “New Subcircuit” if the subcircuit does

    not exist, or “Load Subcircuit” if the subcircuit already exists.

  - A subcircuit block (rectangle) will appear on the screen. Place the subcircuit block.

In the subcircuit:

  - Double click on the subcircuit block to enter the subcircuit. Once inside the subcircuit window,

    create/edit the subcircuit in exactly the same way as in the main circuit.

  - Set the size of the subcircuit block. Choose “Set Size” in the “Subcircuit” menu to specify the

    subcircuit block size. Note that size of the subcircuit should be chosen such that it gives the

    proper appearance and allows easy wire connection in the main circuit.

  - Once the subcircuit is complete, define ports to connect the subcircuit nodes with the

    corresponding nodes in the main circuit. Choose “Place Port” in the “Subcircuit” menu,

    and a port image will appear. After the port is placed in the circuit, a pop-up window will

    appear.

    The diamonds on the four sides represent the connection nodes and the positions of the

    subcircuit. They correspond to the connection nodes of the subcircuit block in the main

    circuit. There are no diamonds at the four corners since connections to the corners are

    not permitted.

    When a diamond is selected, it is colored red. By default, the diamond at the top of

    the left side is selected and marked with red color. Click on the desired diamond to

    select and specify the port name. Repeat the same procedure to place all the ports.

    Note that the subcircuit size should be set before the ports are placed. If the subcircuit size

    is changed after ports are placed, port locations will be messed up and need to be restored.

  - Select “Save As” in the “File” menu to save the subcircuit to the desired name and location.

    Note that the subcircuit does not have to be in the same directory as the main circuit.

Go back to the main circuit. Connection ports (hollow circles) will appear on the border of the subcircuit block. Connect the main circuit to the subcircuit ports. Note that these ports are the only connection points for the subcircuit block.

Passing Values from the Main Circuit to the Subcircuit:

Parameter values in the subcircuit do not have to be specified in the circuit. It can be specified in the main circuit instead. For example, the resistance of a resistor can be specified as R1, and R1 can be defined in the main circuit.

- In the subcircuit, specify the parameter values as a variable.

- In the main circuit, highlight the subcircuit block, and choose “Edit Subcircuit” in the “Subcircuit”

  menu. Click on the “Subcircuit Variables”, and click on “Add” to add the variable name and

  value. The variable name must be the same as the corresponding variable name in the

  subcircuit.

  Click on the check box next to the variable name to display the variable name and value.

Changing the Location of an Existing Port:

To change the location of an existing port, double click on the port. A pop-up window with diamonds will appear. Delete the port name, click on the desired location, and type the port name again.

Customizing the Subcircuit Image:

The default image of the subcircuit block is a rectangle. To customize the image, follow these steps:

- Inside the subcircuit, go to the “Subcircuit” menu and select “Edit Image”. A window will appear

  with diamonds on four sides. The ports are highlighted with red color. Click on the “Zoom In” or

  “Zoom Out” icons of the toolbar to enlarge or reduce the image if necessary.

- Use to drawing toolbar to create the image. The toolbar includes: line, rectangle, oval, arc, text,

  and “Select” function (with the arrow icon). To create square, press and hold the “ctrl” key, and

  click on the “rectangle” icon. To create circle, press and hold the “ctrl” key, and click on the

  “circle” icon.

  Select an image by click on the arrow icon, and then on the image. After the image is selected, it

  can be moved or deleted.

- Go back to the subcircuit window, and save the subcircuit. Go back to the main circuit, and the

  subcircuit block image will be changed.

Adding Subcircuits to the Element List:

To have a subcircuit appear in the PSIM Elements menu as an element item, create a directory called “User Defined” under the PSIM directory, and place the subcircuit file into this directory. The subcircuit will appear under “Elements” | “User Defiled”. You can also create subdirectories under “User Defined” and place subcircuits inside the subdirectories. For example, the “Elements” menu may look like this:

      - Power

      - Control

      - Other

      - Sources

      - Symbols

      - User Defined

             Subcircuit 1

                    Project A

             Subcircuit 2

             Subcircuit 3

                    Project B

             Subcircuit 4

With this feature, common-used subcircuits can be grouped together and easily managed and accessed.


Element menu

PSIM elements are stored in the following libraries:

Power	Power library that stores power circuit elements
Control	Control library that stores control circuit elements
Other	Other library that stores switch controllers, voltage/current sensors, voltage/current probes, and other elements common to power/control circuits
Sources	Source library that stores voltage/current sources
Symbols	It stores symbols for drawing purposes. These symbols are not for simulation use.
User Defined	Any schematic files in the “PSIM\User Defined” directory will appear as items in this menu. For example, if the directory contains a file called “sub.sch”, there will be an item called “sub” in the menu. One may, therefore, stores common-used subcircuits in the “PSIM\User Defined” directory and these subcircuits will appear as if they are one of the built-in elements in PSIM.
Click on Motor Drive Module, Digital Control Module, and SimCoupler Module to see the list of elements in each module.

The parameter value of an element can be specified directly in the parameter specification dialog window, or defined in the main circuit (if the element is in the subcircuit), or defined in a separate parameter file. For example, for the capacitance value of a capacitor, it can be defined as one of the following:

0.00015

1.5E-4               [or 1.5e-4]

1.5D-4               [or 1.5d-4]

150u

150uF

150uFarad

30uF/2.              [a mathematical expression]

C1

C1+C2               [a mathematical expression]

In the case of C1 and C2, the capacitors are either in a subcircuit and the values of C1 and C2 are defined in the main circuit (and passed into the circuit), or C1 and C2 are defined in a user-defined external parameter file specified by the .FILE element (refer to .FILE for the use of the external parameter file).

The power-of-ten suffix letters are allowed in PSIM. The following suffix letters are supported:

G	1.e+9

M	1.e+6

k or K	1.e+3

m	1.e-3

u	1.e-6

n	1.e-9

p	1.e-12

A mathematical expression can contain brackets (such as SQRT(Vs)/(R1+R2)) and is not case sensitive. The following math functions are supported:

+	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]


Motor Drive Module

The following is a list of elements in the Motor Drive Module.

Name	Description
DC Machine	DC machine
Squirrel-Cage Ind. Machine	3-phase squirrel-cage induction machine (symmetrical)
Squirrel-Cage Ind. Machine (neutral)	3-phase squirrel-cage induction machine (symmetrical, with neutral)
Squirrel-Cage Ind. Machine (linear)	3-phase squirrel-cage induction machine (general model)
Squirrel-Cage Ind. Machine (nonlinear)	3-phase squirrel-cage induction machine with saturation
Wound-Rotor Ind. Machine	3-phase wound-rotor induction machine (symmetrical)
Wound-Rotor Ind. Machine (linear)	3-phase wound-rotor induction machine (general model)
Wound-Rotor Ind. Machine (nonlinear)	3-phase wound-rotor induction machine with saturation
Brushless DC Machine	3-phase brushless dc machine (trapezoidal back emf)
Permanent Magnet Sync. Machine	3-phase permanent-magnet synchronous machine (sinusoidal back emf, current-type interface)
Permanent Magnet Sync. Machine (V)	3-phase permanent-magnet synchronous machine (sinusoidal back emf, voltage-type interface)
Synchronous Machine	3-phase conventional synchronous machine with external excitation (voltage-type interface)
Synchronous Machine (I)	3-phase conventional synchronous machine with external excitation (current-type interface)
SRM3	3-phase switched reluctance machine (6 stator teeth and 4 rotor teeth)
Mechanical Load (general)	General mechanical load
Mechanical Load (constant-torque)	Constant-torque mechanical load
Mechanical Load (constant-power)	Constant-power mechanical load
Mechanical Load (constant-speed)	Constant-speed mechanical load
Mechanical-Electrical Interface	Mechanical-electrical interface block
Gear Box	Gear box
Torque Sensor	Torque sensor
Speed Sensor	speed sensor
Additional information, such as “Voltage Rating”, “Current Rating”, “Power Rating”, “Speed Rating”, “Manufacturer”, and “Part No.” can be stored for motors by clicking on the “Other Info” tab of the parameter specification window.


Digital Control Module

The following is a list of elements in the Digital Control Module.

Name	Description
Array	Vector array
Array (1)	Vector array (with data from a file)
Circular Buffer	Circular buffer
Convolution	Convolution block
Differentiator	Discrete differentiator
Quantization Block	Quantization block
Digital Filter	Digital filter
Digital Filter (1)	Digital filter (with coefficients from a file)
FIR Filter	FIR digital filter
FIR Filter (1)	FIR digital filter (with coefficients from a file)
Integrator	Discrete integrator
Resetable Integrator	Resetable discrete integrator
Memory Read	Memory read block
z-domain Transfer Function	z-domain transfer function block
Unit Delay	Unit delay
Zero-Order-Hold	Zero-order hold
Stack	Stack
Note: For a multi-rate system (where there are more than one sampling frequency),

         a zero-order-hold must be used between two blocks that have different sampling rates.


SimCoupler Module

The following are the elements in the SimCoupler Module.

Name	Description
In Link Node	In link node
Out Link Node	Out link node
The SimCoupler Module, as an add-on option to the PSIM software, provides interface between PSIM and Matlab/Simulink for co-simulation. With the SimCoupler Module, part of a system can be implemented and simulated in PSIM, and the rest of the system in Simulink. One can therefore make full use of PSIM’s capability in power simulation and Matlab/Simulink’s capability in control simulation in a complementary way.

The SimCoupler Module supports Matlab/Simulink Release 11, 12.0, 12.1, and 13.

Certain restriction is imposed on the selection of the solver type and the time step in Simulink when performing the PSIM-Matlab/Simulink co-simulation. Simulink must be set up to have the Solver Type as Fixed-step with the time step the same or close to the PSIM time step, or if the Solver Type is Variable-step, a zero-order-hold must be used with the sample time the same or close to PSIM time step.

The SimCoupler consists of two parts: the link nodes in PSIM, and the SimCoupler model block in Simulink.

The use of the SimCoupler Module is easy and straightforward. An example of an one-quadrant chopper with current mode control is provided with the power circuit implemented in PSIM, and the control in Simulink. The file is “chop1q_ifb_simulink_R11.mdl” (the file was created in Matlab/Simulink Release 11) and “chop1q_ifb_psim.sch”.

The following are the steps to set up SimCoupler for PSIM-Matlab/Simulink co-simulation for the one-quadrant example.

In PSIM:

-	After the rest of the power circuit is created, connect one OUT SLINK node to the current sensor output and rename it as “iL”.

-	Connect one IN SLINK node to the positive input of the comparators, and rename it as “Vm”.

-	If there are more than one IN and OUT SLINK node, you need to arrange the order of the link nodes. Go to the Simulate menu, and select Arrange SLINK Nodes. A dialog window will appear. Arrange the order of the SLINK_IN nodes and SLINK_OUT nodes to be the same as how the input/output ports would appear in the SimCoupler model block in Simulink (the order of the ports is from the top to the bottom).

-	Go to the Simulate menu, and select Generate Netlist File. A netlist file with the .cct extension will be generated and saved under the same directory as the schematic file. In this example, we assume that the netlist is located in the directory  “C:\PSIM6.0”. The netlist file name and path will be “C:\PSIM6.0\chop1q_ifb_psim.cct”.

0	In Simulink:

-	Start Matlab. Change the working directory to the PSIM directory. If PSIM is installed in the directory “C:\PSIM6.0”, change the directory to “C:\PSIM6.0”. Then launch Simulink and open the existing file or create a new file.

-	After the rest of the system is created, open the Simulink file “SimCoupler_Block_R11.mdl” (created in Matlab/Simulink Release 11) that stores the SimCoupler model block. Copy and paste the SimCoupler model block into the chopper example file.

-	In the chopper example file, double click on the SimCoupler block, and enter the name and the location of the PSIM netlist name, and click on Apply. In this example, it will be “C:\PSIM6.0\chop1q_ifb_psim.cct”. The number of input and output ports for the SimCoupler model block will automatically match those defined in the PSIM netlist. In this case, there will be 1 input port and 1 output port. If the number of link nodes in the netlist is changed later, go to the Edit menu and choose Update Diagram. This will update the model block ports.

-	Go to the Simulation menu and select Simulation Parameters. Under Solver Options, set the Type to “Fixed-step”. Set the step size to be the same as or close to PSIM’s time step. In this case, the time step is set to 2us.

-	The setup of the co-simulation is now complete. Go to Simulink and start the simulation.

Please note that the SimCoupler file “SimCoupler.dll” is created in Matlab/Simulink Release 11. It is found that this file also works with higher releases of Matlab/Simulink. However, the speed is slightly slower. For this reason, we also compiled and provided this file for different Matlab/Simulink releases. They are stored in “SimCoupler_Rxx.dll” where xx is the release version number. For example, to use “SimCoupler.dll” compiled for Release 13, first delete “SimCoupler.dll”, then copy “SimCoupler_R13.dll” to another file, and rename that file to “SimCoupler.dll”.

Also, when the SimCoupler model block is used in a feedback system in Simulink, the SimCoupler model block may be part of an algebraic loop. Some versions of Matlab/Simulink can not solve a system containing algebraic loops, while other can solve the system but with degraded performance. To break an algebraic loop, place a memory block at each output of the SimCoupler model block. The memory block introduces one integration time step delay.


Simulate menu

The Simulate menu includes the following functions:

Simulation control	Specify simulation parameters
Run PSIM	Run PSIM simulator to simulate the circuit
Run SIMVIEW	Run the waveform display program SIMVIEW
Generate Netlist File	Generate the netlist file
View Netlist File	View the netlist file
Arrange SLINK Nodes	Arrange the order of the SLINK_IN and SLINK_OUT nodes for SimCoupler Module
Define Runtime Display	Define the waveforms to be viewed while simulation runs


Simulation Control

Simulation control parameters are:

Time Step	Simulation time step, in sec.
Total Time	Total simulation time, in sec.
Print Time	Time from which simulation results are saved to the output file (default = 0). No output is saved before this time.
Print Step	Print step (default = 1). If the print step is set to 1, every data point will be saved to the output file. If it is 10, only one out of 10 data points will be saved. This helps to reduce the size of the output file.
Load Flag	Flag for the LOAD function (default = 0). If the flag is 1, the previous simulation values will be loaded from a file (with the .ssf extension) as the initial conditions.
Save Flag	Flag for the SAVE function (default = 0). If the flag is 1, values at the end of the current simulation will be saved to a file with the .ssf extension.
With the SAVE and LOAD functions, the circuit voltages/currents and other quantities can be saved at the end of a simulation session, and loaded back as the initial conditions for the next simulation session. This provides the flexibility of running a long simulation in several shorter stages. Component values and simulation parameters, such as time step, can be changed from one simulation session to the other. The circuit topology, however, should remain the same.

In PSIM, the simulation time step is fixed throughout the simulation. In order to ensure accurate simulation results, the time step must be chosen properly. Factors that limit the time step include the switching period, widths of the pulses/waveforms, and intervals of transients. It is recommended that the time step be at least one magnitude smaller than the smallest of the above.

In Version 6.0, an interpolation technique is implemented which will calculate the exact switching instants. With this technique, the error due to the misalignment of the switching instants and the discrete simulation points is significantly reduced. It is possible to simulate with a large time step which still maintaining very accurate results.

The allowable maximum time step is automatically calculated in PSIM. It is compared with the time step set by the user, and the smaller of the two will be used in the simulation. If the selected time step is different from that set by the user, it will be saved to the file “message.doc”.


Option menu

The Option menu includes the following functions:

Settings...	Set the options for: - Grid display - Color - Rubber band feature. When the rubber band is enabled (checked), an element or circuit remains connected with the rest of the circuit. - Print page border. When enabled, the border of the printout is displayed. - Print page legend. When enabled, the page legend appears at the printout. Go to File/Print Page Setup to set up the print page legend. - Disable simulation warning messages: When checked, the warning messages generated in the simulation are suppressed.
Auto-run SIMVIEW	If selected, when the simulation is successfully completed, PSIM will automatically launch SIMVIEW and open the simulation results for display. If the previous simulation results of the same circuit are already in display in SIMVIEW, this will automatically update the waveforms. If the simulation is not completed due to errors or if there are warning messages, SIMVIEW will not be launched (or the display updated) automatically. One would need to click on “Run SIMVIEW” to launch SIMVIEW.
Enter Password	Enter the password to view the schematic of a password protected circuit
Disable Password	Disable the password protection of the circuit


Window Menu

The Window menu includes the following functions:

New Window	Create a new window which can display a different section of the same circuit. Whatever changes made in one window is updated in all the windows.
Cascade	Arrange the windows in cascade form
Tile	Split the window equally
Arrange Icons	Auto-arrange icons


Web Simulation Menu

The Web Simulation menu is only applicable to the PSIM web version. It includes the following functions:

Sign Up	Sign up for the use of the PSIM web version. A user will submit user ID, email address, company information. After an account is successfully created by Powersim, a password will be emailed to the user and the user can start using the PSIM web version.
User Info	Information on the user web simulation, including the user ID, sign-up date, and number of simulations.


HELPFUL_TIPS
Helpful Tips

The following are some helpful tips regarding simulation and other general issues:

* Copy & Paste in PSIM

  In PSIM, for better image quality, zoom in to the circuit first before “copy to clipboard”.

  Then reduce the image size accordingly in a word processor.

* Changing Circuit Size for Printing in PSIM

  To change the circuit size for printing, use the “Zoom In” or “Zoom Out” functions to

  change the display size. The printing size will be changed accordingly.

* Current Measurement

  To measure the current of a R-L-C branch or a switch, instead of using an ammeter,

  set the branch current flag to 1.

* Discrete versus Lumped Branches

  For example, instead of using one resistor and one inductor in series, use one R-L branch.

  This will not only save the space, but also reduce the component count from the simulation

  point of view.

* Multiple Windows in PSIM

  When a circuit schematic is too big to see clearly in one page, choose “New Window” in

  the “Window” menu to open another window of the same document. One window can

  display part of the circuit and the other window can display another part.

* Multi-rate Systems

  For a multi-rate system where there are more than one sampling frequency, a

  zero-order-hold must be used between two blocks that have different sampling rates.


P_C_INTERFACE
Power/Control Circuit Representation and Interface in PSIM

A system is represented in PSIM in the following way:

Based on this representation, a sensor must be used to bring a power circuit quantity (it could be voltage, current, torque, or speed) into the control circuit. Similarly, a switch controller or an interface block must be used to bring a control circuit quantity into the power circuit. Circuits should be built based on this convention.

The power circuit and the control circuit are solved separately, and there is one time step delay between these two solutions.

The following are the power circuit elements:

- All the elements under the “Elements”/”Power” menu;

- All the elements under the “Elements”/”Other”/”Probes” menu;

- All the elements under the “Elements”/”Sources” menu

The following are the control circuit elements:

- All the elements under the “Elements”/”Control” menu;

- Independent voltage sources under the “Elements”/”Sources”/”Voltage” menu,

  including VDC, VDC_GND, VSIN, VSIN3, VTRI, VSQU, VSTEP, VGNL, and

  VRAND.

The following elements are common to both power and control circuits:

- ABC-DQ0 transformation blocks;

- External DLL blocks;

- Voltage probe “VP” in “Elements”/”Other”/”Probes”;

- Time element “Time” under the “Elements”/”Sources” menu;

The following are the sensor elements:

- All the elements under the “Elements”/”Other”/”Sensors” menu.

The following are the switch controllers and interface block:

- All the elements under the “Elements”/”Other”/”Switch Controllers” menu.

- Control-power interface block “CTOP” under the “Elements”/”Other” menu.

Based on this definition:

- All the RLC branches, switches, transformers, electric machines, and mechanical loads

  are power elements.

- All the current sources, controlled voltage/current sources, and nonlinear sources (such

  as VNONM) are power elements.

- Switch gating blocks (GATING) is a power element. Note that the gating block can be

  connected to the gate node of a switch ONLY. It can not be connected to any other elements.

- All the function blocks (such as MULT, SIN, etc.), s-domain and z-domain transfer function

  blocks and elements, and logic elements are control elements.

- Op. amp. is an exception. Op. amp. is a subcircuit which is modeled using voltage-

  controlled voltage source, resistor, diodes, and dc voltage sources. Based on above definition,

  it is a power element. However, op. amp. is a control element in the conventional sense.

  That is why op. amp. is placed under the “Elements”/”Control” menu rather than under

  “Elements”/”Power”.

- The gate node of a controlled switch (such as MOSFET, IGBT) can be connected to a

  switch gating block GATING or the output of a switch controller ONLY. It can not be

  connected to any other elements.

In order to make the power-control interface easier and more transparent to users, PSIM does allow a power circuit node to be connected DIRECTLY to the input node of a control element. In this case, a voltage sensor is inserted automatically by the program.

However, PSIM does NOT allow the output node of a control element to be connected directly to a power element. The user would have to connect a CTOP (control-power interface block) from the control node to the power node. (Exception: DIRECT connection of the control element output to a RLC branch is allowed. In this case, a CTOP is inserted automatically by the program.)

We do not automatically insert CTOP for all other elements because doing so might result in indiscriminate use of the power and control elements in mixture (such as the case where an op. amp. is followed by a comparator or a control element, which is followed by another op. amp., and another comparator). In this case, the delay in the solution is more than one time step, and this could cause problems in certain situations.


ERROR_WARNING
Error/Warning Messages

Error/warning messages are listed as below:

* Error Message: The node of an element is floating

--------------------------------------------------------------------

  Reason: This can be caused by a poor connection or a floating input node of an element in

                PSIM. When drawing a wire between two nodes, make sure that the wire is

                connected to the terminal of the element.

  Solution: Search for the element, and re-do the connection. For example, if the error message

                 is:

                              “Error: The RLC branch R1 is floating!”

                 Go to “Edit” menu in PSIM and select “Find”. Specify “Type of Element” as “R”,

                 and “Name including wide card” as “R1”, then click on the “Find” button to find the

                 element.

* Error Message: No. of an element exceeds the limit.

----------------------------------------------------------------------

  Reason: The total no. of elements exceeds the limit specified by the program.

  Solution: This problem can only be solved by upgrading to an more advanced version or

                 by re-compiling the PSIM simulator (by Powersim). Please contact Powersim for

                 assistance.

* Warning!!! The program failed to converge after 10 iterations when determining switch

   positions.

-------------------------------------------------------------------------------------------------------------------

  Reason: This warning occurs when, in rare occasions, the program failed to converge

                when determining switch positions. Since the computation continues based on the

                switch positions at the end of the 10th iterations, results could be inaccurate. One

                should be cautious when analyzing the results.

  Solution: The following measures can be taken to isolate and solve the problem:

                 - Check the circuit and make sure the circuit is correct.

- Check the switch gating signals.

- Connect R-C snubber branches across active switches and diodes.

- Connect small resistors/inductors in series with switches.

- Vary simulation time step.


FFT_ANALYSIS
FFT Analysis

When using FFT for the harmonic analysis, one should make sure that the following requirements are satisfied:

       - The waveforms have reached the steady state.

       - The length of the data selected for FFT should be the multiple integer of the fundamental period.

For a 60-Hz waveform, for example, the data length should be restricted to 16.67 ms (or multiples of 16.67 ms). This can be done by clicking on “X Axis” in SIMVIEW, de-selecting “Auto-scale” in “Range”, and specifying the starting time and the final time. The FFT analysis is only performed on the data that are displayed on the screen.

Note that the FFT results are discrete. The FFT results are determined by the time interval between two consecutive data points, Ät, and the data length Tlength. The data point interval Ät is equal to the simulation time step multiplied by the print step. In the FFT results, the frequency incremental step will be 1/ Tlength, and the maximum frequency will be 1/(2*Ät).

For example, if you take the FFT of a 1-kHz square waveform with a data length of 1ms and a data point interval of 10ìs, that is, Tlength = 1 ms, and Ät = 10 ìs, the frequency incremental step will be: Äf = 1 / Tlength = 1 kHz. The maximum frequency will be: fmax = 1/(2*Ät) = 50 kHz.


Power Library

The power library contains:

RLC Branches	Resistors, inductors, capacitors, and coupled inductors.
Switches	Diode, thyristors, transistors, and switch modules.
Transformers	Single-phase and 3-phase transformers
Other	Other power elements
Motor Drive Module	Motor Drive Module. It includes various machine and mechanical load models.


RLC Branches

Resistor	Resistor
Inductor	Inductor
Capacitor	Capacitor
RL	Resistor-inductor branch
RC	Resistor-capacitor branch
LC	Inductor-capacitor branch
RLC	Resistor-inductor-capacitor branch
R3	3-phase resistor branch
RL3	3-phase resistor-inductor branch
RC3	3-phase resistor-capacitor branch
RLC3	3-phase resistor-inductor-capacitor branch
Rheostat	Rheostat
Saturable Inductor	Saturable inductor
Coupled Inductor (2)	Coupled inductor branch (2 inductors)
Coupled Inductor (3)	Coupled inductor branch (3 inductors)
Coupled Inductor (4)	Coupled inductor branch (4 inductors)
Nonlinear Element v=f(i)	Resistance-type nonlinear element [v=f(i)]
Nonlinear Element v=f(i,x)	Resistance-type nonlinear element with additional input [v=f(i,x)]
Nonlinear Element i=f(v)	Conductance-type nonlinear element [i=f(v)]
Nonlinear Element i=f(v,x)	Conductance-type nonlinear element with additional input [i=f(v,x)]
Additional information can be stored for the RLC elements by clicking on the “Other Info” tab of the parameter specification window. For example, “Power Rating” can be specified for resistors, “Voltage Rating” for capacitors, “Core Type” and “Wire Type” for inductors. For all these elements, “Manufacturer” and “Part No.” information can be specified.


Other Power Elements

The other elements that belong to the power library are:

OP_AMP	Operational amplifier
OP_AMP_1	Operational amplifier with floating reference
OP_AMP_2	Operational amplifier with floating reference
dv/dt	dv/dt block


Resistor

Description:

Resistor	Resistor
Parameters:

Resistance	Resistance, in Ohm
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. The current is positive when it flows into the dotted terminal of the branch.


Inductor

Description:

Inductor	Inductor
Parameters:

Inductance	Inductance, in H
Initial Current	Initial inductor current, in A
Current Flag	Flag for branch current output (1: current output;  0: no current output)


Saturable Inductor

Description:

Saturable Inductor	Saturable Inductor
Parameters:

Current v.s. Inductance	Characteristics of the current versus the inductance (i1, L1), (i2, L2), etc.
Current Flag	Flag for branch current output (1: current output;  0: no current output)

A saturable inductor takes into account the saturation effect of the inductor magnetic core.

A 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 curve of flux linkage v.s. current instead.

The inductance is defined as: L = flux_linkage / current, which is the slope of the flux linkage v.s. current curve at different points. The saturation characteristics can then be expressed by pairs of data points as: (i1, L1), (i2, L2), (i3, L3), etc.


Capacitor

Description:

Capacitor	Capacitor
Parameters:

Capacitance	Capacitance, in F
Initial Cap. Voltage	Initial capacitor voltage, in V
Current Flag	Flag for branch current output (1: current output;  0: no current output)


Resistor-Inductor

Description:

RL	Resistor-inductor branch
Parameters:

Resistance	Resistance, in Ohm
Inductance	Inductance, in H
Initial Current	Initial inductor current, in A
Current Flag	Flag for branch current output (1: current output;  0: no current output)


Resistor-Capacitor

Description:

RC	Resistor-capacitor branch
Parameters:

Resistance	Resistance, in Ohm
Capacitance	Capacitance, in F
Initial Cap. Voltage	Initial capacitor voltage, in V
Current Flag	Flag for branch current output (1: current output;  0: no current output)


Inductor-Capacitor

Description:

LC	Inductor-capacitor branch
Parameters:

Inductance	Inductance, in H
Capacitance	Capacitance, in F
Initial Current	Initial inductor current, in A
Initial Cap. Voltage	Initial capacitor voltage, in V
Current Flag	Flag for branch current output (1: current output;  0: no current output)


Resistor-Inductor-Capacitor

Description:

RLC	Resistor-inductor-capacitor branch
Parameters:

Resistance	Resistance, in Ohm
Inductance	Inductance, in H
Capacitance	Capacitance, in F
Initial Current	Initial inductor current, in A
Initial Cap. Voltage	Initial capacitor voltage, in V
Current Flag	Flag for branch current output (1: current output;  0: no current output)


Resistor

Description:

R3	3-phase resistor branch
Parameters:

Resistance	Resistance per phase, in Ohm
Current Flag_A	Current flag for Phase A branch (1: current output; 0: no current output)
Current Flag_B	Current flag for Phase B branch
Current Flag_C	Current flag for Phase C branch

The phase with a dot is Phase A.

The resistances of the three-phase branches are equal.


Resistor-Inductor

Description:

RL3	3-phase resistor-inductor branch
Parameters:

Resistance	Resistance per phase, in Ohm
Inductance	Inductance per phase, in H
Current Flag_A	Current flag for Phase A branch (1: current output; 0: no current output)
Current Flag_B	Current flag for Phase B branch
Current Flag_C	Current flag for Phase C branch

The phase with a dot is Phase A.

The resistances and inductances of the three-phase branches are equal.

The initial currents are zero.


Resistor-Capacitor

Description:

RC3	3-phase resistor-capacitor branch
Parameters:

Resistance	Resistance per phase, in Ohm
Capacitance	Capacitance per phase, in F
Current Flag_A	Current flag for Phase A branch (1: current output; 0: no current output)
Current Flag_B	Current flag for Phase B branch
Current Flag_C	Current flag for Phase C branch

The phase with a dot is Phase A.

The resistances and Capacitances of the three-phase branches are equal.

The initial capacitor voltages are zero.


Resistor-Inductor-Capacitor

Description:

RLC3	3-phase resistor-inductor-capacitor branch
Parameters:

Resistance	Resistance per phase, in Ohm
Inductance	Inductance per phase, in H
Capacitance	Capacitance per phase, in F
Current Flag_A	Current flag for Phase A branch (1: current output; 0: no current output)
Current Flag_B	Current flag for Phase B branch
Current Flag_C	Current flag for Phase C branch
The phase with a dot is Phase A.

The resistances and capacitances of the three-phase branches are equal. The initial inductor currents and capacitor voltages are zero.


RHEOSTAT

Description:

Rheostat	Rheostat
Image:

Parameters:

Total Resistance	Total resistance R from Node k to m, in Ohm
Tap Position (0 to 1)	The tap position Tap. The resistance from Node k to t is R*Tap.
Current Flag	Flag for the current that flows into Node k


Coupled Inductors

Description:

Coupled Inductor (2)	Coupled inductors with 2 branches
Image:

Parameters:

L11 (self)	Self inductance of Branch 1, in H
L12 (mutual)	Mutual inductance between Branch 1 and 2, in H
L22 (self)	Self inductance of Branch 2, in H
i1initial	Initial current of Branch 1, in A
i2initial	Initial current of Branch 2, in A
Iflag1	Current flag of Branch 1
Iflag2	Current flag of Branch 2

The branch labeled with circle is Branch 1, and the other branch labeled with square is Branch 2.

Let V1 and V2 be the voltages across Branch 1 and 2, and i1 and i2 are the currents flowing into Branch 1 and 2, respectively, the voltage and current equations of the coupled inductors are:


Coupled Inductors

Description:

Coupled Inductor (3)	Coupled inductors with 3 branches
Image:

Parameters:

L11 (self)	Self inductance of Branch 1, in H
L12 (mutual)	Mutual inductance between Branch 1 and 2, in H
L22 (self)	Self inductance of Branch 2, in H
L13 (mutual)	Mutual inductance between Branch 1 and 3, in H
L23 (mutual)	Mutual inductance between Branch 2 and 3, in H
L33 (self)	Self inductance of Branch 3, in H
i1initial	Initial current of Branch 1, in A
I2initial	Initial current of Branch 2, in A
I3initial	Initial current of Branch 3, in A
Iflag1	Current flag of Branch 1
Iflag2	Current flag of Branch 2
Iflag3	Current flag of Branch 3
The branch labeled with circle is Branch 1, the one with square is Branch 2, and the one with triangle is Branch 3.

Let V1, V2, and V3 be the voltages across Branch 1, 2, and 3, and i1, i2, and i3 are the currents flowing into Branch 1, 2, and 3, respectively, the voltage and current equations of the coupled inductors are:


Coupled Inductors

Description:

Coupled Inductor (4)	Coupled inductors with 4 branches
Image:

Parameters:

L11 (self)	Self inductance of Branch 1, in H
L12 (mutual)	Mutual inductance between Branch 1 and 2, in H
L22 (self)	Self inductance of Branch 2, in H
L13 (mutual)	Mutual inductance between Branch 1 and 3, in H
L23 (mutual)	Mutual inductance between Branch 2 and 3, in H
L33 (self)	Self inductance of Branch 3, in H
L14 (mutual)	Mutual inductance between Branch 1 and 4, in H
L24 (mutual)	Mutual inductance between Branch 2 and 4, in H
L34 (mutual)	Mutual inductance between Branch 3 and 4, in H
L44 (self)	Self inductance of Branch 4, in H
The branch labeled with circle is Branch 1, the one with square is Branch 2, the one with triangle is Branch 3, and the one with plus is Branch 4.

Let V1, V2, V3, and V4 be the voltages across Branch 1, 2, 3, and 4, and i1, i2, i3, and i4 are the currents flowing into Branch 1, 2, 3, and 4, respectively, the voltage and current equations of the coupled inductors are:


NONV

Description:

Nonlinear Element v=f(i)	Resistance-type nonlinear element [v=f(i)]
Nonlinear Element v=f(i,x)	Resistance-type nonlinear element with additional input [v=f(i,x)]
Parameters:

Expression f(i) or f(i,x)	Expression v = f(i) for Nonlinear Element v=f(i) and v = f(i,x) for Nonlinear Element v=f(i,x)
Expression df/di	The derivative of the voltage v versus the 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
Unlike linear resistors, inductors, or capacitors, the voltage-current relationship of these elements are nonlinear.

The additional input x must be a voltage signal.

The correct initial value and lower/upper limits will help the convergence of the solution.


NONI

Description:

Nonlinear Element i=f(v)	Resistance-type nonlinear element [i=f(v)]
Nonlinear Element i=f(v,x)	Resistance-type nonlinear element with additional input [i=f(v,x)]
Parameters:

Expression f(v) or f(v,x)	Expression i = f(v) for Nonlinear Element i=f(v) and i = f(v,x) for Nonlinear Element i=f(v,x)
Expression df/dv	The derivative of the current versus the voltage, i.e.   df(v)/dv
Initial Value vo	The initial value of the current v
Lower Limit of v	The lower limit of the current v
Upper Limit of v	The upper limit of the current v
Unlike linear resistors, inductors, or capacitors, the voltage-current relationship of these elements are nonlinear.

The additional input x must be a voltage signal.

The correct initial value and lower/upper limits will help the convergence of the solution.

Examples: Nonlinear Diode

The nonlinear element above can be used to model a nonlinear diode. The diode current can be 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


Switches

The following switches and switch modules are provided in PSIM.

Switches

Diode	Diode
DIAC	DIAC
Zener	Zener diode
Thyristor	Thyristor
TRIAC	TRIAC
MOSFET	Metal-Oxide-Semiconductor Field Effect Transistor (n channel)
MOSFET (p channel)	p-channel MOSFET
IGBT	Insulated Gate Bipolar Transistor
npn Transistor	npn bipolar junction transistor
pnp Transistor	pnp bipolar junction transistor
npn Transistor (1)	npn bipolar junction transistor (linear model)
pnp Transistor (1)	pnp bipolar junction transistor (linear model)
GTO	Gate-Turn-Off thyristor
Bi-directional Switch	Simple switch
Switch Modules

1-ph Diode Bridge	Single-phase diode bridge
1-ph Thyristor Bridge	Single-phase thyristor bridge
3-ph Diode Bridge	3-phase diode bridge
3-ph Thyristor Bridge	3-phase thyristor bridge
VSI3 (MOSFET)	3-phase PWM voltage source inverter (with MOSFET)
VSI3 (IGBT)	3-phase PWM voltage source inverter (with IGBT)
CSI3	3-phase PWM current source inverter
3-ph Thyristor Half-bridge	3-pulse thyristor  half-wave bridge
6-ph Thyristor Half-bridge	6-phase thyristor  half-wave bridge

Switch Gating Block

Gating Block	Switch gating block. It is used for switch gating specification
Gating Block (1)	Switch gating block. Gating data are read from a file.

Additional information, such as “Voltage Rating”, “Current Rating”, “Manufacturer”, and “Part No.” can be stored for switches by clicking on the “Other Info” tab of the parameter specification window.

Modeling of a Switch

Switch models are ideal, that is, both turn-on and turn-off transients are neglected. A switch has an on-resistance of 10 uOhm and an off-resistance of 10 MOhm. Switch snubber circuits are optional.

Control of a Switch/Switch Module

There are two ways to specify the gating of a switch/switch module. One is to use a switch gating block (GATING). Another is to use a switch controller (ONCTRL or ACTRL or PATTCTRL). Both the switch gating block and the controller should be connected to the gate (base) node of the switch, or the control node of a switch module.

Note: The gate node of a controlled switch (such as MOSFET, IGBT) must be connected to a

          switch gating block GATING or the output of a switch controller ONLY. It can not be

          connected to any other elements.

For switch modules, only the gatings of the first switch in the module need to be specified. The gatings of all other switches will be automatically derived. The upper left switch of the module is defined as the first switch.


Diode

Description:

Diode	Diode
Parameters:

Diode Voltage Drop	Diode conduction voltage drop, in V
Initial Position	Flag for initial diode position (0: open; 1: closed)
Current Flag	Flag for current output (0: no output; 1: with output)
The diode conduction voltage drop is usually around 0.6 to 0.7 V. It may be higher for high power diodes.


DIAC

Description:

DIAC	DIAC
Parameters:

Breakover Voltage	Blocking voltage beyond which the device starts to conduct, in V
Breakback Voltage	Conduction voltage drop, in V
Current Flag	Flag for current output (0: no output; 1: with output)
A DIAC is a bi-directional diode. It does not conduct until the breakover voltage is reached. At that point, the device goes into avalanche conduction.


Zener Diode

Description:

Zener	Zener diode
Parameters:

Breakdown Voltage	Breakdown voltage of the zener diode, in V
The zener model is ideal. When the zener is positively biased, it behaviors as a regular diode. When it is reverse biased, if the cathode-anode voltage VKA is less than the breakdown voltage VB, it will block the conduction. Otherwise, the voltage VKA will be clamped to VB.


Thyristor

Description:

Thyristor	Thyristor
Parameters:

Voltage Drop	Thyristor conduction voltage drop, in V
Holding Current	Minimum conduction current, in A, below which the device stops conducting and return to the OFF state.
Latching Current	Minimum ON state current, in A, required to keep the device in the ON state after the triggering pulse is removed.
Initial Position	Flag for initial diode position (0: open; 1: closed)
Current Flag	Flag for current output (0: no output; 1: with output)
A thyristor is controlled at turn-on. The turn-off is determined by the circuit conditions.

Note: The gate node of the thyristor can be connected to a switch gating block

          or the output of a switch controller ONLY. It can not be connected to any other elements.


TRIAC

Description:

TRIAC	TRIAC
Parameters:

Voltage Drop	Conduction voltage drop, in V
Current Flag	Flag for current output (0: no output; 1: with output)
A TRIAC is a device that conducts current in both directions. It behaviors in the same way as two thyristors in parallel in the opposite direction.

Note: The gate node of the TRIAC can be connected to a switch gating block

          or the output of a switch controller ONLY. It can not be connected to any other elements.


IGBT

Description:

IGBT	IGBT switch
Parameters:

Saturation Voltage	Conduction voltage drop when the switch is on, in V
Diode Voltage Drop	Conduction voltage drop of the anti-parallel diode, in V
Initial Position	Flag for initial transistor position (0: open; 1: closed)
Current Flag	Flag for current output of the whole switch module (0: no output; 1: with output)
An IGBT consists of a transistor in anti-parallel with a diode. It is turned on when the gating is high and the switch is positively biased. It is turned off when the gating is low or the current drops to zero.

The current that is displayed is the current through the whole switch module (the transistor plus the diode).

Note: The gate node of the IGBT can be connected to a switch gating block

          or the output of a switch controller ONLY. It can not be connected to any other elements.


MOSFET

Description:

MOSFET	n-channel MOSFET switch
Parameters:

On Resistance	Resistance of the MOSFET transistor during the on state, in Ohm
Diode Voltage Drop	Conduction voltage drop of the anti-parallel diode, in V
Initial Position	Flag for initial transistor position (0: open; 1: closed)
Current Flag	Flag for current output of the whole switch module (0: no output; 1: with output)
An n-channel MOSFET consists of a transistor in anti-parallel with a diode. It is turned on when the gating is high and the drain-to-source is positively biased. It is turned off when the gating is low or the current drops to zero.

The current that is displayed is the current through the whole switch module (the transistor plus the diode).

Note: The gate node of the MOSFET can be connected to a switch gating block

          or the output of a switch controller ONLY. It can not be connected to any other elements.


MOSFET_P

Description:

MOSFET (p channel)	p-channel MOSFET switch
Parameters:

On Resistance	Resistance of the MOSFET transistor during the on state, in Ohm
Diode Voltage Drop	Conduction voltage drop of the anti-parallel diode, in V
Initial Position	Flag for initial transistor position (0: open; 1: closed)
Current Flag	Flag for current output of the whole switch module (0: no output; 1: with output)
A p-channel MOSFET consists of a transistor in anti-parallel with a diode. It is turned on when the gating is low and the drain-to-source is negatively biased. It is turned off when the gating is high or the current drops to zero.

The current that is displayed is the current through the whole switch module (the transistor plus the diode).

Note: The gate node of the MOSFET can be connected to a switch gating block

          or the output of a switch controller ONLY. It can not be connected to any other elements.


GTO

Description:

GTO	Gate-Turn-Off (GTO) switch
Parameters:

Voltage Drop	Conduction voltage drop, in V
Initial Position	Flag for initial switch position (0: open; 1: closed)
Current Flag	Flag for current output (0: no output; 1: with output)
GTO switches are symmetrical devices with both forward-blocking and reverse-blocking capabilities. It is turned on when the gating is high and the switch is positively biased. It is turned off when the gating is low or the current drops to zero.

Note: The gate node of the GTO can be connected to a switch gating block

          or the output of a switch controller ONLY. It can not be connected to any other elements.


NPN

Description:

npn Transistor	npn bipolar junction transistor
Parameters:

Saturation Voltage	Saturation voltage between the collector and emitter, in V
Initial Position	Flag for initial switch position (0: open; 1: closed)
Current Flag	Flag for current output (0: no output; 1: with output)
An npn transistor is turned on when the gating is high (voltage at the base node is logic 1) and the switch is positively biased (collector-emitter voltage is positive). It is turned off when the gating is low (logic 0) or the current drops to zero. This is different from the real npn device which is controlled by the base current. Also, contrary to the real device behavior, the npn model in PSIM can block reverse voltage.

Note: The gate node of the npn switch can be connected to a switch gating block

          or a switch controller ONLY. It can not be connected to any other elements.


PNP

Description:

pnp Transistor	pnp bipolar junction transistor
Parameters:

Saturation Voltage	Saturation voltage between emitter and collector, in V
Initial Position	Flag for initial switch position (0: open; 1: closed)
Current Flag	Flag for current output (0: no output; 1: with output)
A pnp transistor is turned on when the gating is low (voltage at the base node is logic 0) and the switch is negatively biased (collector-emitter voltage is negative). It is turned on when the gating is high (logic 1) or the current drops to zero. This is different from the real pnp device which is controlled by the base current. Also, contrary to the real device behavior, the pnp model in PSIM can block reverse voltage.

Note: The gate node of the pnp switch can be connected to a switch gating block

          or a switch controller ONLY. It can not be connected to any other elements.


Simple Switch

Description:

Bi-directional Switch	Simple bi-directional switch
Parameters:

Initial Position	Flag for initial switch position (0: open; 1: closed)
Current Flag	Flag for current output (0: no output; 1: with output)
A simple switch conducts current 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 of the switch.

Note: The gate node of the switch can be connected to a switch gating block

          or the output of a switch controller ONLY. It can not be connected to any other elements.


NPN_1

Description:

npn Transistor (1)	npn bipolar junction transistor (linear model)
Parameters:

Current Gain beta	Current gain of the transistor
Bias Voltage Vr	Base-emitter forward bias voltage (default = 0.7 V)
Vce,sat	Collector-emitter saturation voltage (default = 0.2 V)
The current gain beta is defined as the ratio of the collector current Ic versus the base current Ib, that is:

Unlike the ideal switch model which will operate in either the off state (cut-off state) or the on state (saturation state), the npn BJT linear model can operate in all three states: cut-off, linear, and saturation.

The properties of these three states are:

- Cut-off state:

- Linear state:

- Saturation state:

where Vbe is the base-emitter voltage, and Vce is the collector-emitter voltage.

Note: For other switches (such as thyristor, IGBT, MOSFET, etc.), the gate node

         must be connected to either a gating block or a switch controller. But for npn or pnp

         transistors, the base node is a power node and it must be connected to

         a power element (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 models of the npn and pnp transistors works well in simple circuits, but may not work when circuits are complex. Please use this model with caution.


PNP_1

Description:

pnp Transistor (1)	pnp bipolar junction transistor (linear model)
Parameters:

Current Gain beta	Current gain of the transistor
Bias Voltage Vr	Emitter-base forward bias voltage (default = 0.7 V)
Vec,sat	Emitter-collector saturation voltage (default = 0.2 V)
The current gain beta is defined as the ratio of the collector current Ic versus the base current Ib, that is:

Unlike the ideal switch model which will operate in either the off state (cut-off state) or the on state (saturation state), the npn BJT linear model can operate in all three states: cut-off, linear, and saturation.

The properties of these three states are:

- Cut-off state:

- Linear state:

- Saturation state:

where Veb is the emitter-base voltage, and Vec is the emitter-collector voltage.

Note: For other switches (such as thyristor, IGBT, MOSFET, etc.), the gate node

         must be connected to either a gating block or a switch controller. But for npn or pnp

         transistors, the base node is a power node and it must be connected to

         a power element (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 switch model for npn and pnp transistors works well in simple circuits, but may not work when circuits are complex. Please use this model with caution.


Diode Bridge

Description:

1-ph Diode Bridge	Single-phase diode bridge
Parameters:

Diode Voltage Drop	Diode conduction voltage drop, in V
Initial Position_1	Initial position flag for Switch 1 (0: open; 1: closed)
Initial Position_2	Initial position flag for Switch 2
Initial Position_3	Initial position flag for Switch 3
Initial Position_4	Initial position flag for Switch 4
Current Flag_1	Current flag for Switch 1 (0: no current output; 1: current output)
Current Flag_2	Current flag for Switch 2
Current Flag_3	Current flag for Switch 3
Current Flag_4	Current flag for Switch 4

The sequence of the switches is: clockwise from the upper left, Switch 1, 3, 2, and 4.


Thyristor Bridge

Description:

1-ph Thyristor Bridge	Single-phase thyristor bridge
Parameters:

Voltage Drop	Thyristor conduction voltage drop, in V
Initial Position_1	Initial position flag for Switch 1 (0: open; 1: closed)
Initial Position_2	Initial position flag for Switch 2
Initial Position_3	Initial position flag for Switch 3
Initial Position_4	Initial position flag for Switch 4
Current Flag_1	Current flag for Switch 1 (0: no current output; 1: current output)
Current Flag_2	Current flag for Switch 2
Current Flag_3	Current flag for Switch 3
Current Flag_4	Current flag for Switch 4
The sequence of the switches is: clockwise from the upper left, Switch 1, 3, 2, and 4.

The node at the bottom of the module is the control node. It is the gate (base) node of Switch 1.

Only the gating of Switch 1 needs to be specified. The gating of all other switches will be automatically derived.


Diode Bridge

Description:

3-ph Diode Bridge	3-phase diode bridge
Parameters:

Diode Voltage Drop	Diode conduction voltage drop, in V
Initial Position_1	Initial position flag for Switch 1 (0: open; 1: closed)
Initial Position_2	Initial position flag for Switch 2
Initial Position_3	Initial position flag for Switch 3
Initial Position_4	Initial position flag for Switch 4
Initial Position_5	Initial position flag for Switch 5
Initial Position_6	Initial position flag for Switch 6
Current Flag_1	Current flag for Switch 1 (0: no current output; 1: current output)
Current Flag_2	Current flag for Switch 2
Current Flag_3	Current flag for Switch 3
Current Flag_4	Current flag for Switch 4
Current Flag_5	Current flag for Switch 5
Current Flag_6	Current flag for Switch 6
The sequence of the switches is: clockwise from the upper left, Switch 1, 3, 5, 2, 6, and 4.

The node with a dot is Phase A.


Thyristor Bridge

Description:

3-ph Thyristor Bridge	3-phase thyristor bridge
Parameters:

Voltage Drop	Thyristor conduction voltage drop, in V
Initial Position_1	Initial position flag for Switch 1 (0: open; 1: closed)
Initial Position_2	Initial position flag for Switch 2
Initial Position_3	Initial position flag for Switch 3
Initial Position_4	Initial position flag for Switch 4
Initial Position_5	Initial position flag for Switch 5
Initial Position_6	Initial position flag for Switch 6
Current Flag_1	Current flag for Switch 1 (0: no current output; 1: current output)
Current Flag_2	Current flag for Switch 2
Current Flag_3	Current flag for Switch 3
Current Flag_4	Current flag for Switch 4
Current Flag_5	Current flag for Switch 5
Current Flag_6	Current flag for Switch 6
The sequence of the switches is: clockwise from the upper left, Switch 1, 3, 5, 2, 6, and 4.

The node at the bottom of the module is the control node. It is the gate (base) node of Switch 1.

The node with a dot is Phase A.

Only the gating of Switch 1 needs to be specified. The gating of all other switches will be automatically derived.


Voltage Source Inverter

Description:

VSI3 (MOSFET)	3-phase PWM voltage source inverter (with MOSFET-type switches)
VSI3 (IGBT)	3-phase PWM voltage source inverter (with IGBT-type switches)
Parameters:

On Resistance	Resistance of the MOSFET transistor during the on state, in Ohm (for VSI3 (MOSFET) only)
Saturation Voltage	Conduction voltage drop of the IGBT switch, in V (for VSI3 (IGBT) only)
Diode Voltage Drop	Conduction voltage drop of the anti-parallel diode, in V
Initial Position_1	Initial position flag for Switch 1 (0: open; 1: closed)
Initial Position_2	Initial position flag for Switch 2
Initial Position_3	Initial position flag for Switch 3
Initial Position_4	Initial position flag for Switch 4
Initial Position_5	Initial position flag for Switch 5
Initial Position_6	Initial position flag for Switch 6
Current Flag_1	Current flag for Switch 1 (0: no current output; 1: current output)
Current Flag_2	Current flag for Switch 2
Current Flag_3	Current flag for Switch 3
Current Flag_4	Current flag for Switch 4
Current Flag_5	Current flag for Switch 5
Current Flag_6	Current flag for Switch 6
The sequence of the switches is: clockwise from the upper left, Switch 1, 3, 5, 2, 6, and 4. Each switch consists of a MOSFET (or IGBT) switch with one transistor and one anti-parallel diode.

The node at the bottom of the module is the control node. It is the gate (base) node of Switch 1.

The node with a dot is Phase A.

Only the gating of Switch 1 needs to be specified. The gating of all other switches will be automatically derived.


Current Source Inverter

Description:

CSI3	3-phase PWM current source inverter
Parameters:

Voltage Drop	Conduction voltage drop of the switch, in V
Initial Position_1	Initial position flag for Switch 1 (0: open; 1: closed)
Initial Position_2	Initial position flag for Switch 2
Initial Position_3	Initial position flag for Switch 3
Initial Position_4	Initial position flag for Switch 4
Initial Position_5	Initial position flag for Switch 5
Initial Position_6	Initial position flag for Switch 6
Current Flag_1	Current flag for Switch 1 (0: no current output; 1: current output)
Current Flag_2	Current flag for Switch 2
Current Flag_3	Current flag for Switch 3
Current Flag_4	Current flag for Switch 4
Current Flag_5	Current flag for Switch 5
Current Flag_6	Current flag for Switch 6

The sequence of the switches is: clockwise from the upper left, Switch 1, 3, 5, 2, 6, and 4. Each switch consists of a MOSFET (or IGBT) switch in series with a reverse-blocking diode.

The node at the bottom of the module is the control node. It is the gate (base) node of Switch 1.

The node with a dot is Phase A.

Only the gating of Switch 1 needs to be specified. The gating of all other switches will be automatically derived.


Half-Wave Thyristor Bridge

Description:

3-ph Thyristor Half-Bridge	3-pulse half-wave thyristor bridge
Parameters:

Voltage Drop	Thyristor conduction voltage drop, in V
Initial Position_1	Initial position flag for Switch 1 (0: open; 1: closed)
Initial Position_2	Initial position flag for Switch 2
Initial Position_3	Initial position flag for Switch 3
Current Flag_1	Current flag for Switch 1 (0: no current output; 1: current output)
Current Flag_2	Current flag for Switch 2
Current Flag_3	Current flag for Switch 3
The sequence of the switches is: from the top to the bottom, Switch 1, 2, and 3.

The node at the bottom of the module is the control node. It is the gate (base) node of Switch 1.

The node with a dot is Phase A.

Only the gating of Switch 1 needs to be specified. The gating of all other switches will be automatically derived.


Half-Wave Thyristor Bridge

Description:

6-ph Thyristor Half-Bridge	6-pulse half-wave thyristor bridge
Parameters:

Voltage Drop	Thyristor conduction voltage drop, in V
Initial Position_1	Initial position flag for Switch 1 (0: open; 1: closed)
Initial Position_2	Initial position flag for Switch 2
Initial Position_3	Initial position flag for Switch 3
Initial Position_4	Initial position flag for Switch 4
Initial Position_5	Initial position flag for Switch 5
Initial Position_6	Initial position flag for Switch 6
Current Flag_1	Current flag for Switch 1 (0: no current output; 1: current output)
Current Flag_2	Current flag for Switch 2
Current Flag_3	Current flag for Switch 3
Current Flag_4	Current flag for Switch 4
Current Flag_5	Current flag for Switch 5
Current Flag_6	Current flag for Switch 6
The sequence of the switches is: from the top to the bottom, Switch 1 to 6.

The node at the bottom of the module is the control node. It is the gate (base) node of Switch 1.

Only the gating of Switch 1 needs to be specified. The gating of all other switches will be automatically derived.


Gating Block

Description:

Gating Block	Switch gating block
Gating Block (1)	Switch gating block with the file input
Parameters:

Frequency	Operating frequency, in Hz, of the switch or switch module connected to the gating block
No. of Points	No. of switching points in one period (for Gating Block  only)
Switching Points	Switching points, in degree (for Gating Block only). If the frequency is zero, the switching points are in second.
File for Gating Table	The name of the file where the gating table is stored (for Gating Block (1) only).
The switch gating block defines the gating pattern of a switch or a switch module. Each turn-on or turn-off action is counted as one switching point.

For example, for the following gating pattern, there are 6 switching points, and the switching points are: 35, 92, 175, 187, 345, and 357.

For Gating Block (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:

n

G1

G2

... ... ...

Gn

where G1, ..., Gn are the switching points.

NOTE: The gating block can be connected to the gate node of a switch only. It can not be connected to any other elements.

Example:

A switch operates at 2000 Hz, and has on-time pulses from 0 to 90. deg., and from 180. to 240. deg.

Using the gating block GATING, the specification will be:

Frequency	2000.

No. of Points	4

Switching Points	0.  90.  180.  240.

Using the gating block GATING_1, assuming the gating table is stored in the file “test.tbl”, the specification will be:

Frequency	2000.

File for gating table	test.tbl

The file “test.tbl” will contain the following:

4

0.

90.

180.

240.


Transformers

The following transformer modules are provided in PSIM.

Single-Phase Transformers

Ideal Transformer	Single-phase ideal transformer.
Ideal Transformer (1)	Single-phase ideal transformer with reversed polarity on the secondary.
1-ph Transformer	Single-phase transformer.
1-ph Transformer (1)	Single-phase transformer with reversed polarity on the secondary.
1-ph 3-w Transformer	Single-phase 3-winding transformer.
1-ph 4-w Transformer	Single-phase 4-winding transformer.
1-ph 5-w Transformer	Single-phase 5-winding transformer.
1-ph 5-w Transformer (1)	Single-phase 5-winding transformer with different image.
1-ph 7-w Transformer	Single-phase 7-winding transformer
1-ph 8-w Transforme	Single-phase 8-winding transformer
3-Phase Transformers

3-ph Y/Y Transformer	3-phase Y/Y transformer
3-ph Y/D Transformer	3-phase Y/D transformer
3-ph D/D Transformer	3-phase D/D transformer
3-ph Transformer	3-phase transformer (unconnected)
3-ph 3-w Transformer	3-phase 3-winding transformer (unconnected)
3-ph 4-w Transformer	3-phase 4-winding transformer (unconnected)
3-ph Y/Y/D Transformer	3-phase Y/Y/D transformer
3-ph Y/D/D Transformer	3-phase Y/D/D transformer

Additional information, such as “Core Type”, “Wire Type”, “Manufacturer”, and “Part No.” can be stored for transformers by clicking on the “Other Info” tab of the parameter specification window.


Ideal Transformer

Description:

Ideal Transformer	Single-phase ideal transformer
Ideal Transformer  (1)	Single-phase ideal transformer (with reversed polarity)
Parameters:

Np (primary)	No. of turns of the primary winding
Ns (secondary)	No. of turns of the secondary winding
The winding with the larger dot is the primary winding. Ideal transformers have no losses and no leakage flux.


Single-Phase Transformer

Description:

1-ph Transformer	Single-phase transformer
1-ph Transformer (1)	Single-phase transformer (with reversed polarity)
Parameters:

Rp (primary)	Resistance of the primary winding
Rs (secondary)	Resistance of the secondary winding
Lp (pri. leakage)	Leakage inductance of the primary winding
Ls (sec. leakage)	Leakage inductance of the secondary winding
Lm (magnetizing)	Magnetizing inductance seen from the primary winding
Np (primary)	No. of turns of the primary winding
Ns (secondary)	No. of turns of the secondary winding

The resistance is in Ohm and the inductance is in H.  All the resistance and inductance values are referred to the primary.

The winding with the larger dot is the primary winding.


Single-Phase Transformer

Description:

1-ph 3-w Transformer	Single-phase transformer (1 primary and 2 secondary windings)

Image:

Parameters:

Rp (primary)	Resistance of the primary winding
Rs (secondary)	Resistance of the secondary winding
Rt (tertiary)	Resistance of the tertiary winding
Lp (pri. leakage)	Leakage inductance of the primary winding
Ls (sec. leakage)	Leakage inductance of the secondary winding
Lt (tertiary leakage)	Leakage inductance of the tertiary winding
Lm (magnetizing)	Magnetizing inductance seen from the primary winding
Np (primary)	No. of turns of the primary winding
Ns (secondary)	No. of turns of the secondary winding
Nt (tertiary)	No. of turns of the tertiary winding

The resistance is in Ohm and the inductance is in H.  All the resistance and inductance values are referred to the primary.


Single-Phase Transformer

Description:

1-ph 4-w Transformer	Single-phase transformer (2 primary and 2 secondary windings)

Image:

Parameters:

Rp_1 (primary 1)	Resistance of the 1st primary winding
Rp_2 (primary 2)	Resistance of the 2nd primary winding
Rs_1 (secondary 1)	Resistance of the 1st secondary winding
Rs_2 (secondary 2)	Resistance of the 2nd secondary winding
Lp_1 (pri. 1 leakage)	Leakage inductance of the 1st primary winding
Lp_2 (pri. 2 leakage)	Leakage inductance of the 2nd primary winding
Ls_1 (sec. 1 leakage)	Leakage inductance of the 1st secondary winding
Ls_2 (sec. 2 leakage)	Leakage inductance of the 2nd secondary winding
Lm (magnetizing)	Magnetizing inductance seen from the 1st primary winding
Np_1 (primary 1)	No. of turns of the 1st primary winding
Np_2 (primary 2)	No. of turns of the 2nd primary winding
Ns_1 (secondary 1)	No. of turns of the 1st secondary winding
Ns_2 (secondary 2)	No. of turns of the 2nd secondary winding

The resistance is in Ohm and the inductance is in H. All the resistance and inductance values are referred to the 1st primary winding.


Single-Phase Transformer

Description:

1-ph 5-w Transformer	Single-phase transformer (1 primary and 4 secondary windings)
Image:

Parameters:

Rp (primary)	Resistance of the primary winding
Rs_1 (secondary 1)	Resistance of the 1st secondary winding
Rs_2 (secondary 2)	Resistance of the 2nd secondary winding
Rs_3 (secondary 3)	Resistance of the 3rd secondary winding
Rs_4 (secondary 4)	Resistance of the 4th secondary winding
Lp (pri. leakage)	Leakage inductance of the primary winding
Ls_1 (sec. 1 leakage)	Leakage inductance of the 1st secondary winding
Ls_2 (sec. 2 leakage)	Leakage inductance of the 2nd secondary winding
Ls_3 (sec. 3 leakage)	Leakage inductance of the 3rd secondary winding
Ls_4 (sec. 4 leakage)	Leakage inductance of the 4th secondary winding
Lm (magnetizing)	Magnetizing inductance seen from the primary winding
Np (primary)	No. of turns of the primary winding
Ns_1 (secondary 1)	No. of turns of the 1st secondary winding
Ns_2 (secondary 2)	No. of turns of the 2nd secondary winding
Ns_3 (secondary 3)	No. of turns of the 3rd secondary winding
Ns_4 (secondary 4)	No. of turns of the 4th secondary winding
The resistance is in Ohm and the inductance is in H. All the resistance and inductance values are referred to the primary winding.


Single-Phase Transformer

Description:

1-ph 5-w Transformer (1)	Single-phase transformer (2 primary and 3 secondary windings)
Image:

Parameters:

Rp_1 (primary 1)	Resistance of the 1st primary winding
Rp_2 (primary 2)	Resistance of the 2nd primary winding
Rs_1 (secondary 1)	Resistance of the 1st secondary winding
Rs_2 (secondary 2)	Resistance of the 2nd secondary winding
Rs_3 (secondary 3)	Resistance of the 3rd secondary winding
Lp_1 (pri. 1 leakage)	Leakage inductance of the 1st primary winding
Lp_2 (pri. 2 leakage)	Leakage inductance of the 2nd primary winding
Ls_1 (sec. 1 leakage)	Leakage inductance of the 1st secondary winding
Ls_2 (sec. 2 leakage)	Leakage inductance of the 2nd secondary winding
Ls_3 (sec. 3 leakage)	Leakage inductance of the 3rd secondary winding
Lm (magnetizing)	Magnetizing inductance seen from the primary winding
Np_1 (primary 1)	No. of turns of the 1st primary winding
Np_2 (primary 2)	No. of turns of the 2nd primary winding
Ns_1 (secondary 1)	No. of turns of the 1st secondary winding
Ns_2 (secondary 2)	No. of turns of the 2nd secondary winding
Ns_3 (secondary 3)	No. of turns of the 3rd secondary winding
The resistance is in Ohm and the inductance is in H. All the resistance and inductance values are referred to the 1st primary winding.

This transformer is identical to the 1-ph 5-w Transformer, except the winding arrangement is different.


Single-Phase Transformer

Description:

1-ph 7-w Transformer	Single-phase transformer (1 primary and 6 secondary windings)

Image:

Parameters:

Rp (primary)	Resistance of the primary winding
Rs_1 (secondary 1)	Resistance of the 1st secondary winding
Rs_2 (secondary 2)	Resistance of the 2nd secondary winding
Rs_3 (secondary 3)	Resistance of the 3rd secondary winding
Rs_4 (secondary 4)	Resistance of the 4th secondary winding
Rs_5 (secondary 5)	Resistance of the 5th secondary winding
Rs_6 (secondary 6)	Resistance of the 6th secondary winding
Lp (pri. leakage)	Leakage inductance of the primary winding
Ls_1 (sec. 1 leakage)	Leakage inductance of the 1st secondary winding
Ls_2 (sec. 2 leakage)	Leakage inductance of the 2nd secondary winding
Ls_3 (sec. 3 leakage)	Leakage inductance of the 3rd secondary winding
Ls_4 (sec. 4 leakage)	Leakage inductance of the 4th secondary winding
Ls_5 (sec. 5 leakage)	Leakage inductance of the 5th secondary winding
Ls_6 (sec. 6 leakage)	Leakage inductance of the 6th secondary winding
Lm (magnetizing)	Magnetizing inductance seen from the primary winding
Np (primary)	No. of turns of the primary winding
Ns_1 (secondary 1)	No. of turns of the 1st secondary winding
Ns_2 (secondary 2)	No. of turns of the 2nd secondary winding
Ns_3 (secondary 3)	No. of turns of the 3rd secondary winding
Ns_4 (secondary 4)	No. of turns of the 4th secondary winding
Ns_5 (secondary 5)	No. of turns of the 5th secondary winding
Ns_6 (secondary 6)	No. of turns of the 6th secondary winding
The resistance is in Ohm and the inductance is in H. All the resistance and inductance values are referred to the primary winding.


Single-Phase Transformer

Description:

1-ph 8-w Transformer	Single-phase transformer (2 primary and 6 secondary windings)

Image:

Parameters:

Rp_1 (primary 1)	Resistance of the 1st primary winding
Rp_2 (primary 2)	Resistance of the 2nd primary winding
Rs_1 (secondary 1)	Resistance of the 1st secondary winding
Rs_2 (secondary 2)	Resistance of the 2nd secondary winding
Rs_3 (secondary 3)	Resistance of the 3rd secondary winding
Rs_4 (secondary 4)	Resistance of the 4th secondary winding
Rs_5 (secondary 5)	Resistance of the 5th secondary winding
Rs_6 (secondary 6)	Resistance of the 6th secondary winding
Lp_1 (pri. 1 leakage)	Leakage inductance of the 1st primary winding
Lp_2 (pri. 2 leakage)	Leakage inductance of the 2nd primary winding
Ls_1 (sec. 1 leakage)	Leakage inductance of the 1st secondary winding
Ls_2 (sec. 2 leakage)	Leakage inductance of the 2nd secondary winding
Ls_3 (sec. 3 leakage)	Leakage inductance of the 3rd secondary winding
Ls_4 (sec. 4 leakage)	Leakage inductance of the 4th secondary winding
Ls_5 (sec. 5 leakage)	Leakage inductance of the 5th secondary winding
Ls_6 (sec. 6 leakage)	Leakage inductance of the 6th secondary winding
Lm (magnetizing)	Magnetizing inductance seen from the primary winding
Np_1 (primary 1)	No. of turns of the 1st primary winding
Np_2 (primary 2)	No. of turns of the 2nd primary winding
Ns_1 (secondary 1)	No. of turns of the 1st secondary winding
Ns_2 (secondary 2)	No. of turns of the 2nd secondary winding
Ns_3 (secondary 3)	No. of turns of the 3rd secondary winding
Ns_4 (secondary 4)	No. of turns of the 4th secondary winding
Ns_5 (secondary 5)	No. of turns of the 5th secondary winding
Ns_6 (secondary 6)	No. of turns of the 6th secondary winding
The resistance is in Ohm and the inductance is in H. All the resistance and inductance values are referred to the first primary winding.

With the transformer image in its upright position, the winding on the upper left (with the largest dot) is the first primary winding. The 1st to the 6th secondary windings are on the right, from the top to the bottom, respectively.


3-Phase Transformer

Description:

3-ph Y/Y Transformer	3-phase Y/Y transformer

Parameters:

Rp (primary)	Resistance of the primary winding
Rs (secondary)	Resistance of the secondary winding
Lp (pri. leakage)	Leakage inductance of the primary winding
Ls (sec. leakage)	Leakage inductance of the secondary winding
Lm (magnetizing)	Magnetizing inductance seen from the primary winding
Np (primary)	No. of turns of the primary winding
Ns (secondary)	No. of turns of the secondary winding

The resistance is in Ohm and the inductance is in H. All the resistance and inductance values are referred to the primary side.

The label “p” refers to the primary side and “s” refers to the secondary side. Phase A, B, and C are from the top to the bottom. The nodes at the bottom are the neutral points of the Y connections.


3-Phase Transformer

Description:

3-ph Y/D Transformer	3-phase Y/D transformer

Parameters:

Rp (primary)	Resistance of the primary winding
Rs (secondary)	Resistance of the secondary winding
Lp (pri. leakage)	Leakage inductance of the primary winding
Ls (sec. leakage)	Leakage inductance of the secondary winding
Lm (magnetizing)	Magnetizing inductance seen from the primary winding
Np (primary)	No. of turns of the primary winding
Ns (secondary)	No. of turns of the secondary winding
The resistance is in Ohm and the inductance is in H. All the resistance and inductance values are referred to the primary side.

The label “p” refers to the primary side and “s” refers to the secondary side. Phase A, B, and C are from the top to the bottom. The node at the bottom is the neutral point of the Y connection.


3-Phase Transformer

Description:

3-ph D/D Transformer	3-phase D/D transformer

Parameters:

Rp (primary)	Resistance of the primary winding
Rs (secondary)	Resistance of the secondary winding
Lp (pri. leakage)	Leakage inductance of the primary winding
Ls (sec. leakage)	Leakage inductance of the secondary winding
Lm (magnetizing)	Magnetizing inductance seen from the primary winding
Np (primary)	No. of turns of the primary winding
Ns (secondary)	No. of turns of the secondary winding

The resistance is in Ohm and the inductance is in H. All the resistance and inductance values are referred to the primary side.

The label “p” refers to the primary side and “s” refers to the secondary side. Phase A, B, and C are from the top to the bottom.


3-Phase 3-Winding Transformer

Description:

3-ph Y/Y/D Transformer	3-phase 3-winding Y/Y/D transformer

Parameters:

Rp (primary)	Resistance of the primary winding
Rs (secondary)	Resistance of the secondary winding
Rt (tertiary)	Resistance of the tertiary winding
Lp (pri. leakage)	Leakage inductance of the primary winding
Ls (sec. leakage)	Leakage inductance of the secondary winding
Lt (tertiary leakage)	Leakage inductance of the tertiary winding
Lm (magnetizing)	Magnetizing inductance seen from the primary winding
Np (primary)	No. of turns of the primary winding
Ns (secondary)	No. of turns of the secondary winding
Nt (tertiary)	No. of turns of the tertiary winding

The resistance is in Ohm and the inductance is in H. All the resistance and inductance values are referred to the primary side.

The label “p” refers to the primary side, “s” to the secondary, and “t” to the tertiary side. For the primary and secondary windings, Phase A, B, and C are from the top to the bottom. For the tertiary winding, Phase A, B, and C are from the left to the right.

The neutral points of the primary/secondary windings are at the top.


3-Phase 3-Winding Transformer

Description:

3-ph Y/D/D Transformer	3-phase 3-winding Y/D/D transformer

Parameters:

Rp (primary)	Resistance of the primary winding
Rs (secondary)	Resistance of the secondary winding
Rt (tertiary)	Resistance of the tertiary winding
Lp (pri. leakage)	Leakage inductance of the primary winding
Ls (sec. leakage)	Leakage inductance of the secondary winding
Lt (tertiary leakage)	Leakage inductance of the tertiary winding
Lm (magnetizing)	Magnetizing inductance seen from the primary winding
Np (primary)	No. of turns of the primary winding
Ns (secondary)	No. of turns of the secondary winding
Nt (tertiary)	No. of turns of the tertiary winding

The resistance is in Ohm and the inductance is in H. All the resistance and inductance values are referred to the primary side.

The label “p” refers to the primary side, “s” to the secondary, and “t” to the tertiary side. For the primary and secondary windings, Phase A, B, and C are from the top to the bottom. For the tertiary winding, Phase A, B, and C are from the left to the right.

The neutral point of the primary winding is at the top.


3-Phase Transformer

Description:

3-ph Transformer	3-phase transformer (windings unconnected)
Image:

Parameters:

Rp (primary)	Resistance of the primary winding
Rs (secondary)	Resistance of the secondary winding
Lp (pri. leakage)	Leakage inductance of the primary winding
Ls (sec. leakage)	Leakage inductance of the secondary winding
Lm (magnetizing)	Magnetizing inductance seen from the primary winding
Np (primary)	No. of turns of the primary winding
Ns (secondary)	No. of turns of the secondary winding

The resistance is in Ohm and the inductance is in H. All the resistance and inductance values are referred to the primary side.

The label “p” refers to the primary side and “s” refers to the secondary side.

The windings of the transformer are not connected. The node assignments are:


3-Phase Transformer

Description:

3-ph 3-w Transformer	3-phase 3-winding transformer (windings unconnected)
Image:

Parameters:

Rp (primary)	Resistance of the primary winding
Rs (secondary)	Resistance of the secondary winding
Rt (tertiary)	Resistance of the tertiary winding
Lp (pri. leakage)	Leakage inductance of the primary winding
Ls (sec. leakage)	Leakage inductance of the secondary winding
Lt (tertiary leakage)	Leakage inductance of the tertiary winding
Lm (magnetizing)	Magnetizing inductance seen from the primary winding
Np (primary)	No. of turns of the primary winding
Ns (secondary)	No. of turns of the secondary winding
Nt (tertiary)	No. of turns of the tertiary winding

The resistance is in Ohm and the inductance is in H. All the resistance and inductance values are referred to the primary side.

The label “p” refers to the primary side, “s” refers to the secondary side, and “t” refers to the tertiary side. The windings of the transformer are not connected.

The node assignments of the transformer are as follows:


3-Phase Transformer

Description:

3-ph 4-w Transformer	3-phase 4-winding transformer (windings unconnected)
Image:

Parameters:

Rp_1 (primary 1)	Resistance of the 1st primary winding
Rp_2 (primary 2)	Resistance of the 2nd primary winding
Rs (secondary)	Resistance of the secondary winding
Rt (tertiary)	Resistance of the tertiary winding
Lp_1 (pri. 1 leakage)	Leakage inductance of the 1st primary winding
Lp_2 (pri. 2 leakage)	Leakage inductance of the 2nd primary winding
Ls (sec. leakage)	Leakage inductance of the secondary winding
Lt (tertiary leakage)	Leakage inductance of the tertiary winding
Lm (magnetizing)	Magnetizing inductance seen from the 1st primary winding
Np_1 (primary 1)	No. of turns of the 1st primary winding
Np_2 (primary 2)	No. of turns of the 2nd primary winding
Ns (secondary)	No. of turns of the secondary winding
Nt (tertiary)	No. of turns of the tertiary winding
The resistance is in Ohm and the inductance is in H. All the resistance and inductance values are referred to the 1st primary winding.

The label “p_1” refers to the 1st primary side, “p_2” refers to the 2nd primary side, “s” refers to the secondary side, and “t” refers to the tertiary side. The windings of the transformer are not connected.


DV_DT

Description:

dv/dt	The dv/dt block
The dv/dt block has the same function as the differentiator in the control circuit, except that it is used in the power circuit. The output of the dv/dt block is equal to the derivative of the input voltage versus time. It is calculated as: Vo = (Vin(t) - Vin (t-delt))/delt where delt is the time step.


DCM

Description:

DC Machine	DC machine
Parameters:

Ra (armature)	Armature winding resistance, in Ohm
La (armature)	Armature winding inductance, in H
Rf (field)	Field winding resistance, in Ohm
Lf (field)	Field winding inductance, in H
Moment of Inertia	Moment of inertia J, in kg*m*m
Vt (rated)	Rated terminal voltage, in V
Ia (rated)	Rated armature current, in A
N (rated)	Rated mechanical speed, in rpm
If (rated)	Rated field current, in A
Torque Flag	Output flag for internal torque Tem (0 or 1)
Master/Slave Flag	Flag for master/slave mode (1: master; 0: slave)

The master/slave flag defines the mode of operation of the machine. In a mechanical system, only one machine or mechanical-electrical interface block and at least one machine/mechanical-electrical interface block should be set to the master mode (referred to as the master unit), and the rest to the slave mode.

We use the concept *reference direction* to define the positive notation of speed sensors, torque sensors, and loads in a mechanical system. The reference direction of the mechanical system is defined as the direction from the shaft node of the master unit to the rest of the mechanical system along the shaft. Furthermore, we define the mechanical speed to be positive if the armature and field currents of the master machine are positive.

Based on this notation, if the reference direction enters an element from the dotted side, it is said that this element is along the reference direction. Otherwise, it is opposite to the reference direction.

Therefore, if a speed sensor is along the reference direction, a positive speed produced by the master machine will give a positive speed sensor output.

A dc machine is described by the following equations:

where:

Vt:	terminal voltage

Ea:	back emf

Ia:	armature current

If:	field current

Wm:	mechanical speed, in rad./sec.

Laf:	mutual inductance between the field and the armature windings

The term “Laf * If” is often defined as “k phi” in many text books. Note that the relationship between the flux phi and the field current If is assumed to be linear. Magnetic saturation is not considered.

The mutual inductance Laf is calculated as follows based on the specified rated operating condition:


INDM_3S

Description:

Squirrel-cage Ind. Machine Squirrel-cage Ind. Machine (neutral)	3-phase symmetrical squirrel-cage induction machine 3-phase symmetrical squirrel-cage induction machine with neutral
Parameters:

Rs (stator)	Stator winding resistance, in Ohm
Ls (stator)	Stator winding leakage inductance, in H
Rr (rotor)	Rotor winding resistance, in Ohm
Lr (rotor)	Rotor winding leakage inductance, in H
Lm (magnetizing)	Magnetizing inductance, in H
No. of Poles P	No. of poles
Moment of Inertia	Moment of inertia J, in kg*m*m
Torque Flag	Output flag for internal torque Tem (0 or 1)
Master/Slave Flag	Flag for master/slave mode (1: master; 0: slave)

All the parameters are referred to the stator side.

Both machine models are symmetrical and are connected in Y on the stator.

For more explanation on how to set up the Master/Slave Flag, refer to the relevant section under the DC Machine.

Equations that describe the machine operations are given in the User Manual.


INDM3_S_LIN

Description:

Squirrel-cage Ind. Machine (linear) Squirrel-cage Ind. Machine (nonlinear)	3-phase squirrel-cage induction machine (general model, unconnected). 3-phase squirrel-cage induction machine with saturation.
Image:

Parameters:

Rs (stator)	Stator winding resistance, in Ohm
Ls (stator)	Stator winding leakage inductance, in H
Rr (rotor)	Rotor winding resistance, in Ohm
Lr (rotor)	Rotor winding leakage inductance, in H
Lm (magnetizing)	Magnetizing inductance, in H (for general linear model only)
No. of Poles P	No. of poles
Moment of Inertia	Moment of inertia J, in kg*m*m
Torque Flag	Output flag for internal torque Tem (0 or 1)
Master/Slave Flag	Flag for master/slave mode (1: master; 0: slave)
Im v.s. Lm (Im1,Lm1) …	Nonlinear characteristics of the magnetizing current versus the magnetizing inductance (for nonlinear model only)

All the parameters are referred to the stator side.

For both models, the stator windings are unconnected and can be connected in any way by the user.

For the model with saturation, the curve of the magnetizing current versus the inductance is entered. Note only the first quadrant curve needs to be specified. The program will automatically derive the data for the third quadrant.


INDM3_WR

Description:

Wound-rotor Ind. Machine	3-phase symmetrical wound-rotor induction machine
Image:

Parameters:

Rs (stator)	Stator winding resistance, in Ohm
Ls (stator)	Stator winding leakage inductance, in H
Rr (rotor)	Rotor winding resistance, in Ohm
Lr (rotor)	Rotor winding leakage inductance, in H
Lm (magnetizing)	Magnetizing inductance, in H
Ns/Nr Turns Ratio	Ratio of the stator and rotor windings
No. of Poles P	No. of poles
Moment of Inertia	Moment of inertia J, in kg*m*m
Torque Flag	Output flag for internal torque Tem (0 or 1)
Master/Slave Flag	Flag for master/slave mode (1: master; 0: slave)

All the parameters are referred to the stator side.

The machine is symmetrical, and both the stator and rotor windings are connected in Y.

Equations that describe the machine operations are given in the User Manual.


INDM3_WR_LIN

Description:

Wound-rotor Ind. Machine (linear) Wound-rotor Ind. Machine (nonlinear)	3-phase wound-rotor induction machine (general model, unconnected). 3-phase wound-rotor induction machine with saturation.
Image:

Parameters:

Rs (stator)	Stator winding resistance, in Ohm
Ls (stator)	Stator winding leakage inductance, in H
Rr (rotor)	Rotor winding resistance, in Ohm
Lr (rotor)	Rotor winding leakage inductance, in H
Lm (magnetizing)	Magnetizing inductance, in H (for general linear model only)
Ns/Nr Turns Ratio	Ratio of the stator and rotor windings
No. of Poles P	No. of poles
Moment of Inertia	Moment of inertia J, in kg*m*m
Torque Flag	Output flag for internal torque Tem (0 or 1)
Master/Slave Flag	Flag for master/slave mode (1: master; 0: slave)
Im v.s. Lm (Im1,Lm1) …	Nonlinear characteristics of the magnetizing current versus the magnetizing inductance (for nonlinear model only)

All the parameters are referred to the stator side.

For both models, the stator windings are unconnected and can be connected in any way by the user.

For the model with saturation, the curve of the magnetizing current versus the inductance is entered. Note only the first quadrant curve needs to be specified. The program will automatically derive the data for the third quadrant.


BDCM3

Description:

Brushless DC Machine	3-phase permanent magnet brushless dc machine with trapezoidal back emf
Image:

Parameters:

R (stator resistance)	Stator winding resistance R, in Ohm.
L (stator self ind.)	Stator self  inductance, in H
M (stator mutual ind.)	Stator mutual inductance, in H. The stator mutual inductance M is a negative value. Depending on the winding structure, the ratio between M and the stator self inductance L is normally between -1/3 and -1/2. If M is unknown, a reasonable value of -0.4*L can be used as the default value.
Vpk / krpm	Peak line-to-line back emf constant, in V/krpm (mechanical speed).
Vrms / krpm	Rms line-to-line back emf constant, in V/krpm (mechanical speed). The values of Vpk/krpm and Vrms/krpm should be available from the machine data sheet. If these data are not available, they can be obtained through experiments by operating the machine as a generator at 1000 rpm and measuring the peak and rms line-to-line voltages.
No. of Poles P	No. of poles of the machine
Moment of Inertia	Moment of inertia J, in kg*m*m
Mech. Time Constant	Mechanical time constant tau_mech
è0	Initial rotor angle, in electrical deg. The initial rotor angle is the rotor angle at t=0. The zero rotor angle position is defined as the position where Phase A back emf crosses zero (from negative to positive) under a positive rotation speed.
èadvance	Position sensor advance angle, in electrical deg. The advance angle is defined as the angle difference between the turn-on angle of Phase A upper switch and 30 deg. in an 120-deg. conduction mode. For example, if Phase A is turned on at 25 deg., the advance angle will be 5 deg. (i.e. 30 - 25 = 5 deg.)
Conduction Pulse width	Position sensor conduction pulse width, in electrical deg. Positive conduction pulse can turn on the upper switch and negative pulse can turn on the lower switch in a full bridge  inverter. The conduction pulse width is 120 electrical deg. for 120 deg. conduction mode.
Torque Flag	Output flag for internal developed torque Tem (1: output; 0: no output)
Master/Slave Flag	Flag for master/slave mode (1: master; 0: slave). The flag defines the mode of operation of the machine. A detailed explanation of the definition and usage is given in the Help for DC machines.

In the image, Node a, b, c are the stator winding terminals for Phase A, B, and C, respectively, and Node n Is the neutral point. The stator windings are Y-connected.

Node sa, sb, and sc are the Phase A, B, and C outputs of the built-in six-pulse hall effect position sensors. The output signal of the position sensor is a bipolar commutation pulse (1, 0, and -1) which can be used to operate the three-phase voltage source inverter in a six-step mode. They are all control nodes and should be connected to the control circuit.

More Explanation on the Hall Effect Position Sensor:

A hall effect position sensor consists of a set of hall switches and a set of trigger magnets.

The hall switch is a semiconductor switch (e.g. MOSFET or BJT) that opens or closes when the magnetic field is higher or lower than a certain threshold value. It is based on the hall effect, which generates an emf proportional to the flux-density when the switch is conducting a current supplied by an external source. It is common to detect the emf using a signal conditioning circuit integrated with the hall switch or mounted very closely to it. This provides a TTL-compatible pulse with sharp edges and high noise immunity for connection to the controller via a screened cable. For a three-phase brushless dc motor, three hall switches are spaced 120 electrical deg. apart and are mounted on the stator frame.

The set of trigger magnets can be a separate set of magnets, or it can use the rotor magnets of the brushless motor. If the trigger magnets are separate, they should have the matched pole spacing  (with respect to the rotor magnets), should be mounted on the shaft in close proximity to the hall switches. If the trigger magnets use the rotor magnets of the machine, the hall switches must be mounted close enough to the rotor magnets, where they can be energized by the leakage flux at the appropriate rotor positions.


PMSM3

Description:

Permanent Magnet Sync. Machine Permanent Magnet Sync. Machine (V)	3-phase permanent magnet synchronous machine with sinusoidal back emf (current-type interface). 3-phase permanent magnet synchronous machine with sinusoidal back emf (voltage-type interface).
Image:

Parameters:

Rs (stator resistance)	Stator winding resistance R, in Ohm.
Ld (d-axis ind.)	Stator d-axis inductance, in H
Lq (q-axis ind.)	Stator q-axis inductance, in H. The d-q coordinate is defined that the d-axis passes through the center of the magnet, and the q-axis is in the middle between two magnets. The q-axis is leading the d-axis.
Vpk / krpm	Peak line-to-line back emf constant, in V/krpm (mechanical speed). The value of Vpk/krpm should be available from the machine data sheet. If this data is not available, it can be obtained through an experiment by operating the machine as a generator at 1000 rpm and measuring the peak line-to-line voltage.
No. of Poles P	No. of poles of the machine
Moment of Inertia	Moment of inertia J, in kg*m*m
Mech. Time Constant	Mechanical time constant tau_mech
Torque Flag	Output flag for internal developed torque Tem (1: output; 0: no output)
Master/Slave Flag	Flag for master/slave mode (1: master; 0: slave). The flag defines the mode of operation of the machine. A detailed explanation of the definition and usage is given in the Help for DC machines.

The stator windings are Y-connected.

Depending on the way the internal model interfaces with the external stator circuitry, there are two types of interface: one is the voltage-type interface (Permanent Magnet Sync. Machine (V)), and the other is the current-type interface (Permanent Magnet Sync. Machine). The model for the voltage-type interface consists of controlled voltage sources on the stator side, and this model is suitable in situations where the machine operates as a generator and/or the stator external circuit is in series with inductive branches. On the other hand, The model for the current-type interface consists of controlled current sources on the stator side, and this model is suitable in situations where the machine operates as a motor and/or the stator external circuit is in parallel with capacitive branches.


SYNM3

Description:

Synchronous Machine Synchronous Machine (I)	3-phase synchronous machine with external excitation (voltage-type interface). 3-phase synchronous machine with external excitation (current-type interface).
Image:

Parameters:

Rs (stator)	Stator winding resistance R, in Ohm.
Ls (stator)	Stator leakage inductance, in H
Ldm (d-axis mag. Ind.)	d-axis magnetizing inductance, in H
Lqm (q-axis mag. Ind.)	q-axis magnetizing inductance, in H
Rf (field)	Field winding resistance, in Ohm
Lfl (field leakage ind.)	Field winding leakage inductance, in H
Rdr (damping cage)	Rotor damping cage d-axis resistance, in Ohm
Ldrl (damping cage)	Rotor damping cage d-axis leakage inductance, in H
Rqr (damping cage)	Rotor damping cage q-axis resistance, in Ohm
Lqrl (damping cage)	Rotor damping cage q-axis leakage inductance, in H
Ns/Nf (effective)	Stator-field winding effective turns ratio
Number of Poles P	Number of Poles P
Moment of Inertia	Moment of inertia J of the machine, in kg*m2
Torque Flag	Output flag for internal developed torque Tem (1: output; 0: no output)
Master/Slave Flag	Flag for master/slave mode (1: master; 0: slave). The flag defines the mode of operation of the machine. A detailed explanation of the definition and usage is given in the Help for DC machines.

All the parameters are referred to the stator side.

Depending on the way the internal model interfaces with the external stator circuitry, there are two types of interface: one is the voltage-type interface (Synchronous Machine), and the other is the current-type interface (Synchronous Machine (I)). The model for the voltage-type interface consists of controlled voltage sources on the stator side, and this model is suitable in situations where the machine operates as a generator and/or the stator external circuit is in series with inductive branches. On the other hand, The model for the current-type interface consists of controlled current sources on the stator side, and this model is suitable in situations where the machine operates as a motor and/or the stator external circuit is in parallel with capacitive branches.


SRM3

Description:

Switched Reluctance Machine	3-phase switched reluctance machine (6 stator and 4 rotor teeth)
Image:

Parameters:

Resistance	Stator phase resistance R, in Ohm
Inductance Lmin	Minimum phase inductance, in H
Inductance Lmax	Maximum phase inductance, in H
èr (deg.)	Duration of the interval where the inductance increases, in deg.
Moment of Inertia	Moment of inertia J, in kg*m*m
Torque Flag	Output flag for internal torque Tem (0 or 1)
Master/Slave Flag	Flag for master/slave mode (1: master; 0: slave)

The master/slave flag defines the mode of operation of the machine. A detailed explanation of the definition and usage is given in the Help for DC machines.

In the image, Node a+, a-, b+, b-, c+, c- are the winding terminals of Phase A, B, and C, respectively. They are all power nodes and should be connected to the power circuit.

Node c1a…c4a, c1b…c4b, and c1c…c4c are the control signals for Phase A, B, and C, respectively. Node theta is the mechanical rotor angle (in rad.). They are all control nodes and should be connected to the control circuit.

The control signal defines the inductance of the winding. For example, when c1a is high (1), the winding inductance in Phase A is in the rising stage (see below). The rotor angle is defined such that when the stator and the rotor teeth are completely out of alignment, theta = 0.

The equation of the switched reluctance machine for one phase is:

where:

v:	phase voltage

i:	phase current

L:	phase inductance

R:	phase resistance

The inductance L is a function of the rotor angle .

r is the duration where the inductance rises (or falls). Let  k = (Lmax-Lmin) / èr, we can express the inductance as a function of :

[rising stage; control signal c1=1]

[flat-top stage; control signal c2=1]

[falling stage; control signal c3=1]

[flat-bottom stage; control signal c4=1]

The selection of the operating state is done through the control signals c1, c2, c3, and c4 which are applied externally. For example, when c1a is high (1), the rising stage is selected and L = Lmin + k * è.

The developed torque per phase is:

Based on the inductance expression, we have:

[rising stage]

[flat-top stage]

[falling stage]

[flat-bottom stage]

Note that, in this model, saturation is not considered.


MLOAD

Description:

Mechanical Load (general)	General resistive mechanical load
Parameters:

Tc	Torque constant, in N*m
K1 (coefficient)	Coefficient for the linear term
K2 (coefficient)	Coefficient for the square term
K3 (coefficient)	Coefficient for the cubic term
Moment of Inertia	Moment of inertia J, in kg*m*m

A general resistive mechanical load is expressed as:

where:

ùm:	mechanical speed, in rad./sec.

sign(ùm):	sign of the mechanical speed

(1 if ùm  is positive; and -1 if ùm is negative)

This load is of resistive type. That is, the load torque is always against the direction of the rotation.

By choosing the coefficients properly, one can model various types of mechanical load, such as:

- Conveyor (Tload = K1 * ùm)

- Fans, centrifugal pumps, and compressors (Tload = K2 * ùm * ùm)

Example:

To define a resistive constant-torque load with a value of 10 N*m, we have:

Tc = 10; K1 = 0; K2 = 0; K3 = 0.


MLOAD_T

Description:

Mechanical Load (constant-torque)	Constant-torque mechanical load
Parameters:

Tc	Torque constant, in N*m
Moment of Inertia	Moment of inertia J, in kg*m*m

A constant-torque mechanical load is expressed as:

Tload = Tc

where Tc is a constant. Typical loads include belt conveyors with a fixed loading, extruders, hoists, and mine lifts.

Note that this type of constant-torque load is different from the resistive constant-torque load defined by MLOAD. With MLOAD_T, the load torque is always in one direction, independent of the speed; whereas with MLOAD, the load torque direction changes with the rotation direction.

The loading torque of the constant-load MLOAD_T depends on its position relative to the machine. If the load is along the reference direction of the mechanical system (the reference direction enters the dotted side of the load), the loading torque to the master machine is Tc. Otherwise, the loading torque to the master machine is - Tc.


MLOAD_P

Description:

Mechanical Load (constant-power)	Constant-power mechanical load
Parameters:

Maximum Torque	Maximum torque Tmax, in N*m
Base Speed (in rpm)	Base speed n_base, in rpm
Moment of Inertia	Moment of inertia J, in kg*m*m

A constant-power mechanical load is expressed as:

      When the absolute value of the mechanical speed n is less than the base speed limit:

      When the absolute value of the mechanical speed is above the base speed limit:

where:

ùm:	mechanical speed, in rad./sec.

sign(ùm):	sign of the mechanical speed

(1 if Wm is positive; and -1 if Wm is negative)

This load is of resistive type. That is, the load torque is always against the direction of

the rotation.


MLOAD_WM

Description:

Mechanical Load (constant-speed)	Constant-speed mechanical load
Parameters:

Constant Speed (rpm)	Speed constant, in rpm
Moment of Inertia	Moment of inertia J, in kg*m*m

A constant-speed mechanical load defines the speed of a mechanical system, and the speed will remain constant, as defined by the speed constant.


GEARBOX

Description:

Gear Box	Gear Box
Image:

Parameters:

Gear Ratio	Gear Ratio a

If the numbers of teeth of the first gear and the second gear are n1 and n2, respectively, the gear ratio a is defined as: a = n1 / n2. Let the radius, torque, and speed of these two gears be: r1, r2, T1, T2, w1, and  w2, we have: T1 / T2 = r1 / r2 = w2 / w1= a.


MECH_ELEC

Description:

Mechanical-Electrical Interface	Mechanical-electrical interface block
Parameters:

Master/Slave Flag	Flag for master/slave mode (1: master; 0: slave)

The master/slave flag defines the mode of operation of the machine. In a mechanical system, only one machine or mechanical-electrical interface block and at least one machine/mechanical-electrical interface block should be set to the master mode (referred to as the master unit), and the rest to the slave mode. For further explanation on the master/slave flag, refer to the Help for the dc machine (DCM).

This block allows users to access the internal equivalent circuit of the mechanical system for a machine. Let’s assume that a drive system consists of a motor (with a developed torque of Tem and a moment of inertia of J1) and a mechanical load (with a load torque of Tload and a moment of inertia of J2). The equation that describes the mechanical system is:

where Wm is the shaft mechanical speed. In PSIM, this equation is represented by an equivalent circuit consisting of two current sources in parallel with two capacitors. The two current sources have the values of Tem and Tload, and the capacitors have the values of J1 and J2 (in F). The node-to-ground voltage represents the mechanical speed Wm. This is analogous to C dV/dt = i for a capacitor where C=J1+J2, V= ùm, and i=Tem-Tload.

In PSIM, the mechanical equivalent circuit for motors and mechanical loads all uses the capacitor-based circuit model. The mechanical-electrical interface block provides the access to the internal mechanical equivalent circuit. If the mechanical side of the interface block (with the letters “MECH”) is connected to a mechanical shaft, the electrical side (with the letters “ELEC”) will be the speed node of the mechanical equivalent circuit. One can thus connect any electrical circuits to this node.

With this element, users can connect the built-in motors or mechanical loads with custom-built load or motor models.


Control
Control Library

The control library contains the following:

Filters	Filter blocks.
Computational Blocks	Various computational blocks.
Other Function Blocks	Various function blocks.
Logic Elements	Logic elements.
Digital Control Module	Digital Control Module. It contains various discrete elements.
SimCoupler Module	SimCoupler Module. It contains the link nodes to be used for interface to Matlab/Simulink.
Proportional	Proportional (P) block.
Integrator	Integrator.
Resetable Integrator	Resetable integrator
Differentiator	Differentiator.
PI	Proportional-Integral (PI) controller
Comparator	Comparator
Limiter	Limiter
Summer (1-input)	Summer with 1 input
Summer (+/-)	Summer with 2 input (one positive and the other negative)
Summer (+/+)	Summer with 2 positive input
Summer (3-input)	Summer with 3 input
Additional information, such as “Manufacturer” and “Part No.”, can be specified for some of the control elements by clicking on the “Other Info” tab of the parameter specification window.


P

Description:

Proportional	Proportional block

Parameters:

Gain	Gain k of the block

The output and the input have the following relationship:

Vout = k * Vin


PI

Description:

PI	Proportional-integral (PI) controller

Parameters:

Gain	Gain k of the PI controller

Time Constant	Time constant T of the PI controller, in second

The transfer function of the PI controller is defined as:

G(s) = k * (1 + sT) / (sT)


I

Description:

Integrator	Integrator
Parameters:

Time Constant	Time constant T of the integrator, in sec.
Initial Output Value	Initial output value of the integrator
The transfer function of the integrator is defined as:

G(s) = 1 / (sT)


RESETI

Description:

Resetable Integrator	Resetable integrator
Parameters:

Time Constant	Time constant T of the integrator, in second
Initial Output Value	Initial output value of the integrator
Reset Flag	Reset flag (0: edge reset; 1: level reset)
The transfer function of the integrator is defined as:

G(s) = 1 / (sT)

The output of the resetable integrator can be reset through an external control signal (at the bottom of the block). For the edge reset (reset flag = 0), the integrator output is reset to zero at the rising edge of the control signal. For the level reset (reset flag = 1), the integrator output is reset to zero as long as the control signal is high (1).


D

Description:

Differentiator	Differentiator

Parameters:

Time Constant	Time constant T of the differentiator

The transfer function of the differentiator is defined as:

G(s) = sT

A differentiator is calculated as:

where tstep is the simulation time step, Vin (t) and Vin (t - tstep) are the

input values at the present and the previous time step.


COMP

Description:

Comparator	Comparator

The output of a comparator is high (value=1) when the non-inverting input is

higher than the inverting input. When the positive input is lower, the output

is zero. If the two input are equal, the output is undefined and it will keep the

previous value.


OP_AMP

Description:

Op. Amp.	Operational amplifier
Op. Amp. (1)	Operational amplifier (with the reference ground accessible)
Op. Amp. (2)	Operational amplifier (with the reference ground accessible)
Parameters:

Voltage Vs+	Upper voltage source level of the operational amplifier
Voltage Vs-	Lower voltage source level of the operational amplifier

For Op. Amp (1) and Op. Amp. (2), the node at the bottom is the reference ground node.

The model of the operational amplifier is ideal. It consists of a controlled voltage source in series with an output resistor. The amplitude of the controlled voltage source is equal to the op. amp. gain multiplied by the input voltage difference. The output of the op. amp. is limited by the upper

and the lower source voltages Vs+ and Vs-.

In PSIM, the op. amp. gain is set at 100,000. and the output resistance is set at 80 Ohms.

The difference between Op. Amp. and Op. Amp. (1)/ Op. Amp. (2) is that, for Op. Amp., the op. amp. reference node is connected to the power ground; whereas for Op. Amp (1)/ Op. Amp. (2), the op. amp. reference node is accessible and can be floating. Op. Amp. (1) and Op. Amp. (2) are identical except that the plus sign and minus sign are reversed.

Therefore, if the op. amp. reference ground is the same as the power circuit ground, Op. Amp.  can be used. But if the op. amp. reference ground is floating, either Op. Amp. (1) or Op. Amp. (2) must be used.

Note: One limitation of the op. amp. model in PSIM is that it does not work in the positive feedback mode.


Limiter

Description:

Limiter	Limiter

Parameters:

Lower Limit	Lower limit of the limiter

Upper Limit	Upper limit of the limiter

The output of a limiter is clamped to the upper/lower limit whenever the input

exceeds the limiter range. If the input is within the limit, the output is equal to

the input.


LIMIT_DVDT

Description:

dv/dt Limiter	Gradient (dv/dt) limiter

Parameters:

dv/dt Limit	Lower limit of the limiter

A gradient (dv/dt) limiter limits the rate of change of the input. If the rate of change is within the limit, the output is equal to the input.


Summer

Description:

Summer (1-input)	Summer with 1 input

Parameters:

Gain_1 (+)	Gain k of the input

The 1-input summer is primarily designed for the summation of a vector elements,

although the input can also be a scalar.

If the input is a scalar, the output of the summer is:

Vo = k * Vin

where Vin is the input value.

If the input is a vector, let Vin = [a1  a2  a3  ...  an], the output of the summer is:

Vo = k * (a1 + a2 + a3 + ... + an)

Example:

If the input is a vector defined as Vin = [1  2  3  4], and k=1,

Vo = 1 + 2 + 3 + 4 = 10.


Summer

Description:

Summer (+/-)	Summer with 2 input

Parameters:

Gain_1 (+)	Gain k1 of the positive input

Gain_2 (-)	Gain k2 of the negative input

The input of a 2-input summer can be either a scalar or a vector.

If the inputs are scalar, the output of the summer is defined as:

Vo = k1 * Vin,1 + k2 * Vin,2

where Vin,1 and Vin,2 are the positive and negative input, respectively.

If the inputs are vector, let

Vin,1 = [a1  a2  a3  ...  an]

Vin,2 = [b1  b2  b3  ... bn]

then

Vo = k1 * Vin,1 + k2 * Vin,2

     = [k1*a1+k2*b1   k1*a2+k2*b2   ...  k1*an+k2*bn]


Summer

Description:

Summer (+/+)	Summer with 2 input

Parameters:

Gain_1	Gain k1 of the first input

Gain_2	Gain k2 of the second input

In the default upright position, the input on the middle left is the first input.

The input of a 2-input summer can be either a scalar or a vector.

If the inputs are scalar, the output of the summer is defined as:

Vo = k1 * Vin,1 + k2 * Vin,2

where Vin,1 and Vin,2 are the positive and negative input, respectively.

If the inputs are vector, let

Vin,1 = [a1  a2  a3  ...  an]

Vin,2 = [b1  b2  b3  ... bn]

then

Vo = k1 * Vin,1 + k2 * Vin,2

     = [k1*a1+k2*b1   k1*a2+k2*b2   ...  k1*an+k2*bn]


Summer

Description:

Summer (3-input)	Summer with 3 input

Parameters:

Gain_1	Gain k1 of the first input

Gain_2	Gain k2 of the second input

Gain_3	Gain k3 of the third input

The output of the summer is defined as:

Vo = k1 * Vin,1 + k2 * Vin,2 + k3 * Vin,3

where Vin,1, Vin,2, and Vin,3 are the first, second, and the third input,

respectively. The input with a dot is the first input.

Note that the input of the 3-input summer can only be a scalar.


MUX2

Description:

Multiplexer (2-input)	2-input multiplexer

Image:

The truth table is:

 	s0	Y

-------------

0	d0

1	d1

Note that the input d0 and d1 can be either an analog or a digital signal.


MUX4

Description:

Multiplexer (4-input)	4-input multiplexer

Image:

The truth table is:

 	s1	s0	Y

------------------------

0	0	d0

0	1	d1

1	0	d2

1	1	d3

Note that the input can be either analog or digital signals.


MUX8

Description:

Multiplexer (8-input)	8-input multiplexer

Image:

The truth table is:

 	s2	s1	s0	Y

-----------------------------------

0	0	0	d0

0	0	1	d1

0	1	0	d2

0	1	1	d3

1	0	0	d4

1	0	1	d5

1	1	0	d6

1	1	1	d7

Note that the input can be either analog or digital signals.


Filters

2nd-order Low-pass Filter	2nd-order low-pass filter

2nd-order High-pass Filter	2nd-order high-pass filter

2nd-order Band-pass Filter	2nd-order band-pass filter

2nd-order Band-stop Filter	2nd-order band-stop filter


Low-Pass Filter

Description:

2nd-order Low-pass Filter	2nd-order low-pass filter

Parameters:

Gain	Gain k

Damping Ratio	Damping ratio î

Cut-off Frequency	Cut-off frequency fc, in Hz (fc=ùc/2ð)

The transfer function of the 2nd-order low-pass filter is:


High-Pass Filter

Description:

2nd-order High-pass Filter	2nd-order high-pass filter

Parameters:

Gain	Gain k

Damping Ratio	Damping ratio î

Cut-off Frequency	Cut-off frequency fc, in Hz (fc=ùc/(2 ð))

The transfer function of the 2nd-order high-pass filter is:


Band-Pass Filter

Description:

2nd-order Band-pass Filter	2nd-order band-pass filter

Parameters:

Gain	Gain k

Center Frequency	Center frequency fo, in Hz (fo = ùo / (2 ð))

Passing Band	Frequency width fb of the passing band,

in Hz (fb = B / (2 ð))

The transfer function of the 2nd-order band-pass filter is:


Band-Stop Filter

Description:

2nd-order Band-stop Filter 	2nd-order band-stop filter

Parameters:

Gain	Gain k

Center Frequency	Center frequency fo, in Hz (fo = ùo / (2 ð))

Stopping Band	Frequency width fb of the stopping band,

in Hz (fb = B / (2 ð))

The transfer function of the 2nd-order band-stop filter is:


Function Blocks

Absolute Value	Absolute function block
Cosine	Cosine function block
Cosine Inverse	Cosine inverse function block
Divider	Divider
Exponential (a^x)	Exponential function block
FFT	Fast Fourier Transformation block
dv/dt Limiter	Gradient (dv/dt) limiter
2-dimensional Lookup Table	2-dimensional lookup table
Lookup Table (Trapezoid)	Trapezoidal waveform lookup table
Lookup Table (square)	Square waveform lookup table
Multiplexer (2-input)	2-input multiplexer
Multiplexer (4-input)	4-input multiplexer
Multiplexer (8-input)	8-input multiplexer
Multiplier	Multiplier
Power (x^a)	Power function block
RMS	Root-mean-square (RMS) function block
Roundoff	Round-off function block
Sampler-and-hold	Sampling/hold block
Sign	Sign function block
Sine	Sinusoidal function block
Square Root	Square-root function block
Time Delay	Time delay function block
s-domain Transfer Function	s-domain transfer function block
s-domain Transfer Function (1)	s-domain transfer function block with initial conditions
Tangent Inverse	Tangent inverse function block
THD	Total-Harmonic-Distortion (THD) block


ABS

Description:

Absolute Value	Absolute function block

The output of the block is equal to the absolute value of the input.


SIGN

Description:

Sign	Sign function block
The output of the sign function block Vo is the sign of the input Vin. For example, if Vin=5,

Vo=1; and if Vin=-5, Vo=-1.


Cosine

Description:

Cosine	Cosine function block

The input of the cosine function block is in degree. The output is equal to

the cosine of the input.


Cosine inverse

Description:

Cosine Inverse	Cosine inverse function block

The output is equal to the cosine inverse of the input, and it is in degree.


Sine

Description:

Sine	Sine function block

The input of the sine function block is in degree. The output is equal to

the sine of the input.


Sine inverse

Description:

Sine Inverse	Sine inverse function block

The output is equal to the sine inverse of the input, and it is in degree.


Tan

Description:

Tangent	Tangent function block

The input of the tangent function block is in degree. The output is equal to

the tangent of the input.


Tangent inverse

Description:

Tangent Inverse	Tangent inverse function block

Image:

The output is equal to the tangent inverse of the input, and it is in degree.

The output is the arc tangent of the ratio between the imaginary

input Vimag and the real input Vreal, i.e.

.


Multiplier

Description:

Multiplier	Multiplier

The input of a multiplier can be either a scalar or a vector.

If the inputs are scalar, the output is:

If the inputs are vectors, let:

then

where [image]  means that the vector is transposed.

Example:

If Vin,1 = [1  2  3], Vin,2 = [2  3  4], then

Vo = 1x2 + 2x3 + 3x4 = 20


Divider

Description:

Divider	Divider

Image:

The output of a divider is equal to the division of the two input signals.


Square-root block

Description:

Square Root	Square-root block

The output of a square-root block is equal to the square-root of the input.


Root-mean-square block

Description:

RMS	Root-mean-square (rms) block

Parameters:

Base Frequency	Base frequency fb, in Hz

The output of a rms block is equal to the root-mean-square of the input.

The period, which is used to calculate the mean (average), is equal to 1/ fb.


Exponential function block

Description:

Exponential (a^x)	Exponential function block

Parameters:

Coefficient k1	Coefficient k1

Coefficient k2	Coefficient k2

The output of an exponential block is expressed as:

For example, if k1=1, k2=0.5, and Vin=2, we have:

If k2=2.718281828, we have

where e is the base of the natural logarithm.


Power function block

Description:

Power (x^a)	Power function block

Parameters:

Coefficient k1	Coefficient k1

Coefficient k2	Coefficient k2

The output of a power function block is expressed as:


Logarithmic function block

Description:

LOG	Logarithmic (base e) function block

This block gives the natural logarithm (base e) of the input. It is expressed as:

For example, if Vin = 2, Vo = 0.6931.


Logarithmic function block

Description:

LOG10	Logarithmic (base 10) function block

This block gives the common logarithm (base 10) of the input. It is expressed as:

For example, if Vin = 2, Vo = 0.301.


Round-off block

Description:

Roundoff	Round-off function block

Parameters:

No. of Digits	No. of digits after the decimal point

Truncation Flag	Truncation flag (0: round-off; 1: truncation)

The no. of digits N defines the scaling factor to the input. The scaled input becomes:

The truncation flag Tflag defines whether it is truncation or round-off.  If the truncation

flag is 1, the output is equal to the integer part of Vscale divided by [image]. If the truncation

flag is 0, the output is equal to Vscale rounded off to nearest integer, then divided by [image].

Example:

Vin=34.5678, N=0, Tflag=0

Vo=35.

Vin=34.5678, N=0, Tflag=1

Vo=34.

Vin=34.5678, N=1, Tflag=1

Vo=34.5

Vin=34.5678, N=-1, Tflag=1

Vo=30.


FFT

Description:

FFT	Fast Fourier Transform (FFT) block
Image:

Parameters:

No. of Samples	No. of samples N in one fundamental cycle
Sampling Frequency	Sampling frequency, in Hz
The FFT block calculates the fundamental component of the input. The FFT

algorithm is based on the radix-2/decimation-in-frequency method.

The number of the samples in one fundamental period should be

where N is an integer. The maximum number of sampling points allowed is

1024.

The output gives the amplitude (peak) and the phase angle (in deg.) of the input

fundamental component.

Example:

If the input is 100sin(ùt), the output will be: Amplitude = 100; Angle = 0.

If the input is 100sin(ùt+ð/6), the output will be: Amplitude = 100; Angle = 30. deg.


LKUP

Description:

Lookup Table	Lookup table

Parameters:

File Name	Name of the file storing the lookup table

The lookup table stores two data arrays in a file, one for the input and the

other for the output. The format of the table is as follows:

Vin(1),  Vo(1)

Vin(2),  Vo(2)

Vin(3),  Vo(3)

 … … … …

Vin(n),  Vo(n)

The input array Vin must be monotonically increasing. Between two points,

linear interpolation is used to obtain the output. For example, if the input

Vinput is greater than Vin(k) but less than Vin(k+1), the output will be equal to:

If the input is less than Vin(1) or greater than Vin(n), the output will be clamped

to Vo(1) or Vo(n).

Note that the lookup table can be used in both the power circuit and control circuit.

Example:

The following shows a lookup table:

1., 10.

2., 30.

3., 20.

4., 60.

5., 50.

If the input is 0.99, the output will be 10. If the input is 1.5, the output will be

10 + (30 - 10) x (1.5 - 1) / (2 - 1) = 20.


LKUP_TZ

Description:

Lookup Table (trapezoid)	Trapezoidal waveform lookup table
Parameters:

Rising Angle theta	The rising angle from 0 to the peak value, in deg.
Peak Value	The peak value of the waveform

The relationship between the input Vin and the output Vo of the trapezoidal waveform lookup

table is shown as follows:

The input Vin of the lookup table block is in degree. The range of the input value can be from

-360 deg. to 360 deg. The waveform is half-wave and quarter-wave symmetrical.

Example:

Let è=30 and the peak value of the waveform be 10, if Vin=15, Vo will be 5. If Vin=90, Vo=10.


LKUP_SQ

Description:

Lookup Table (square)	Square waveform lookup table
Parameters:

Pulse Width (deg.)	The one-time width of the pulse in half cycle, in deg.

The relationship between the input Vin and the output Vo of the square waveform lookup

table is shown as follows:

where theta is the pulse width. The input Vin of the lookup table block is in degree. The range

of the input value can be from -360 deg. to 360 deg. The waveform is half-wave and

quarter-wave symmetrical.

Example:

Let è=120, Vo=0 when Vin is from 0 to 30 deg., and Vo=1 when Vin is from 30 to 150. deg.


LKUP2D

Description:

2-dimensional Lookup Table	2-dimensional lookup table

Parameters:

File Name	Name of the file storing the lookup table

The 2-dimensional lookup table has two input and one output. The output

data is stored in a 2-dimensional matrix. The two input correspond to the

row and column indices of the matrix. For example, if the row index is 3

and the column index is 4, the output will be A(3,4) where A is the data

matrix.

The data for the lookup table are stored in a file and have the following

format:

m, n

A(1,1),  A(1,2), …, A(1,n)

A(2,1),  A(2,2), …, A(2,n)

… … … … … … … … …

A(m,1),  A(m,2), …, A(m,n)

where m and n are the number of rows and columns, respectively. Since

the row and the column index must be an integer, the input value is

automatically converted to an integer. If either the row or the column

index is out of the range (for example, if the row index is less than 1 or

greater than m), the output will be zero.

Example:

The following shows a 2-dimensional lookup table:

3, 4

1., -2., 4., 1.

2., 3., 5., 8.

3., 8., -2., 9.

If the row index is 2 and the column index is 4, the output will be 8. If the row

index is 5, regardless of the column index, the output will be 0.


Sampling/hold block

Description:

Sample-and-Hold	Sampling/Hold block

The node at the bottom of the block is for the control signal.

The output of a sampling/hold block samples the input when the control signal

changes from low to high (e.g. from 0 to 1), and holds the sampled value for the

rest of the sampling period.

Note: This block is treated as a continuous-domain element, not a discrete element.

One other difference between Sample-and-Hold  and the discrete element Zero-Order Hold is

that the sampling moment can be controlled in Sample-and-Hold, whereas the sampling moment

in Zero-Order Hold is fixed.

For digital control or discrete circuits, Zero-Order Hold should be used.


Time delay block

Description:

Time Delay	Time delay block

Parameters:

Time Delay	Time delay, in second

A time delay block delays the input waveform by a specified amount of time

interval. It can be used to model the propagation delay of a logic element.


THD

Description:

THD	Total Harmonic Distortion (THD) block

Image:

Parameters:

Fundamental Frequency	Fundamental frequency of the input, in Hz
Passing Band	Passing band of the band-pass filter, in Hz
For an ac waveform that contains both the fundamental and harmonic

components, the total harmonic distortion of the waveform is defined as:

where V1 is the fundamental component and Vrms is the overall rms value of

the waveform.

A 2nd-order band-pass filter is used to extract the fundamental component.

The center frequency (fundamental frequency) and the passing band of the

filter are the parameters that need to be specified.

For the THD block, the output terminal with a dot is for the THD value

and the other is for the fundamental component of the input.


TFCTN

Description:

s-domain Transfer Function	s-domain transfer function block
Parameters:

Order n	Order n of the transfer function
Gain	Gain k of the transfer function
Coeff. B0…Bn	Coefficients of the nominator (from Bn to B0)
Coeff. An…A0	Coefficients of the denominator (from An to A0)
A s-domain transfer function block is expressed in polynomial form as:

The initial values of the function block are zero. Use the block TFCTN1 if you need to specify the initial conditions of the function block.

Example:

The following is a 2nd-order transfer function:

The specifications are:

Order n	2

Gain	1.5

Coeff. Bn…B0	0.  0.  400.

Coeff. An…A0	1. 10. 400.


TFCTN1

Description:

s-domain Transfer Function (1)	s-domain transfer function block with initial conditions
Parameters:

Order n	Order n of the transfer function
Gain	Gain k of the transfer function
Coeff. Bn…B0	Coefficients of the nominator (from Bn to B0)
Coeff. An…A0	Coefficients of the denominator (from An to A0)
Initial Values xn…x1	Initial values of the state variables (from xn to x1)
A s-domain transfer function block is expressed in polynomial form as:

Let Y(s) = G(s) * U(s) where Y(s) is the output and U(s) is the input, we can convert the s-domain expression into the differential equation form as follows:

The corresponding output equation in the time domain can be expressed as:

The initial values of the state variables xn to x1 are specified at the input.

Example:

The 1st-order transfer function G(s) = 1.5 * (0.01 s + 1) / (0.1 s + 1) has an initial state variable value of 25. The specifications will be:

Order n	1

Gain	1.5

Coeff. Bn…B0	0.01   1

Coeff. An…A0	0.1     1

Initial Values xn..x1	25

More on Initial Conditions:

The initial output of a block is determined by the initial value of the state variable xn and the initial input u. For the first-order transfer function G(s) = Bo / (s + A0), for example, if the initial value of the state variable x1 is x1(0), the initial output will be:

y(0) = x1(0)

If the transfer function is G(s) = (B1 s + B0) / (s + A0), and the initial value of the state variable is x1(0), the initial output will be:

y(0) = x1(0) + B1 * u(0)

where ì(0) is the input initial value.


Logic Elements

AND Gate	AND gate
AND Gate (3-input)	AND gate with 3 inputs
OR Gate	OR gate
OR Gate (3-input)	OR gate with 3 inputs
XOR Gate	XOR gate
NOT Gate	NOT gate
NAND Gate	NAND gate
NOR Gate	NOR gate
Set-Reset Flip-Flop	Set-Reset flip-flop
JK Flip-Flop	J-K flip-flop
D Flip-Flop	D flip-flop
Monostable	Monostable multivibrator
Controlled Monostable	Controlled monostable multivibrator
Pulse Width Counter	Pulse width counter
A/D Converter (8-bit)	8-bit A/D converter
A/D Converter (10-bit)	10-bit A/D converter
D/A Converter (8-bit)	8-bit D/A converter
D/A Converter (10-bit)	10-bit D/A converter


AND gate

Description:

AND Gate	AND gate

AND Gate (3-input)	AND gate with 3 inputs

The output is the AND of the input logic signals.


OR gate

Description:

OR Gate	OR gate

OR Gate3	OR gate with 3 inputs

The output is the OR of the input logic signals.

The truth table of a 2-input OR gate is:


XOR gate

Description:

XOR Gate	exclusive-OR gate

The truth table of an exclusive-OR gate is:


NOT gate

Description:

NOT Gate	NOT gate

The output is the inversion of the input logic signal.


NAND gate

Description:

NAND Gate	NAND gate

The output is the NAND of the two input logic signals.


NOR gate

Description:

NOR Gate	NOR gate

The output is the NOR of the two input logic signals.


SRFF

Description:

Set-Reset Flip-Flop	Set-Reset Flip-Flop

Parameters:

Trigger Flag	Trigger flag (0: edge-triggered; 1: level-triggered)

A set-reset flip-flop can be either edge-triggered or level-triggered.

The truth table of an edge-triggered set-reset flip-flop is:

x: do not care

The truth table of a level-triggered set-reset flip-flop is:


JKFF

Description:

JK Flip-Flop	J-K flip-flop

The truth table of a J-K flip-flop table is:


D_FF

Description:

D Flip-Flop	D flip-flop

The truth table of a D flip-flop table is:

D	Clock	Q	Qn

0	0 -> 1	0	1

1	0 -> 1	1	0


MONO

Description:

Monostable	Monostable multivibrator

Parameters:

Pulse Width	On-time pulse width, in sec.

The positive (or negative) edge of the input signal triggers the monostable.

A pulse, with the specified pulse width, will be generated at the output.


MONOC

Description:

Controlled Monostable	Controlled monostable multivibrator

The controlled monostable multivibrator allows the pulse width to be specified

externally. The node at the bottom of block is for the input that defines the

pulse width.


PWCT

Description:

Pulse Width Counter	Pulse width counter

The pulse width counter measures the width of a pulse. The rising edge

of the input activates the counter. At the falling edge of the input, the output

gives the width of the pulse, in second.

During the interval of two falling pulse edges, the pulse width counter output

remains unchanged.


ADC

Description:

A/D Converter (8-bit)	8-bit A/D converter

A/D Converter (10-bit)	10-bit A/D converter

D/A Converter (8-bit)	8-bit D/A converter

D/A Converter (10-bit)	10-bit D/A converter

Image:

Let N be the number of bits, for the A/D converter, the output is calculated as:

For example, if Vref = 5 V, Vin = 3.2 V, N = 8 bits, Vo = 256/5*3.2 = 163.84 = 10100011 (binary).

For the D/A converter, the output is calculated as:

For example, if Vref = 5 V, Vin = 10100011 (binary) = 163, N = 8 bits, Vo = 163/256*5 = 3.1836.


Quantization function block

Description:

Quantization Block	Quantization function block

Parameters:

No. of Bits	No. of bits N
Vin (min)	Lower limit of the input Vin_min
Vin (max)	Upper limit of the input Vin_max
Vo (min)	Lower limit of the output Vo_min
Vo (min)	Upper limit of the output Vo_max
Sampling Frequency	Sampling frequency of the block
The quantization block performs two functions: scaling and quantization.

The input value Vin, sampled at the given sampling frequency, is first scaled based

on the following:

The no. of bits determines the output resolution dV which is defined as:

The output Vo will be equal to the truncated value of Vox based on the resolution dV.

Example:

if N=4, Vin_min=0; Vin_max=10; Vo_min=-5, Vo_max=5; and Vin=3.2:

The value -1.8 is between -2.33332 and -1.66665. The lower value is selected, that is,

Vo = -1.66665.


ZOH block

Description:

Zero-Order-Hold	Zero-order hold

Parameters:

Sampling Frequency	Sampling frequency of the block

This is a zero-order sampling/hold block (ZOH). The ZOH samples the input

at the beginning of a clock cycle, and holds the sampled value until the next

clock cycle.

The difference between the element ZOH and the sampling/hold element SAMP

is that, while the clock is provided externally in SAMP, the clock is free-running for

ZOH.

For example, if the sampling frequency of ZOH is 1000, the sampling will occur at

0., 0.001 sec., 0.002 sec., etc.


Unit delay block

Description:

Unit Delay	Unit delay block

Parameters:

Sampling Frequency	Sampling frequency of the block

A unit delay block delays the input by one sampling period.


I_D

Description:

Discrete Integrator	Discrete integrator
Parameters:

Algorithm Flag	Flag for integration algorithm      0: trapezoidal rule      1: backward Euler      2: forward Euler
Initial Output Value	Initial output value
Sampling Frequency	Sampling frequency of the integrator
If we define u(t) as the input, y(t) as the output, T as the sampling period,

and H(z) as the transfer function, in discrete domain, an integrator is expressed as:

With Trapezoidal Rule:

y(n) = y(n-1) + T/2 * (u(n) + u(n-1))

or

H(z) = T/2 * (z + 1) / (z - 1)

With Backward Euler:

y(n) = y(n-1) + T * u(n)

or

H(z) = T * z / (z - 1)

With Forward Euler:

y(n) = y(n-1) + T * u(n-1)

or

H(z) = T / (z - 1)


I_RESET_D

Description:

Resetable Discrete Integrator	Discrete resetable integrator
Parameters:

Algorithm Flag	Flag for integration algorithm      0: trapezoidal rule      1: backward Euler      2: forward Euler
Initial Output Value	Initial output value
Reset Flag	reset flag (0: edge reset; 1: level reset)
Sampling Frequency	Sampling frequency of the integrator

The output of the resetable integrator can be reset through an external

control signal (at the bottom of the block). For the edge reset (reset flag = 0),

the integrator output is reset to zero at the rising edge of the control signal.

For the level reset (reset flag = 1), the integrator output is reset to zero as long

as the control signal is high (1).

If we define u(t) as the input, y(t) as the output, T as the sampling period,

and H(z) as the transfer function, in discrete domain, the integrator is expressed as:

With Trapezoidal Rule:

y(n) = y(n-1) + T/2 * (u(n) + u(n-1))

or

H(z) = T/2 * (z + 1) / (z - 1)

With Backward Euler:

y(n) = y(n-1) + T * u(n)

or

H(z) = T * z / (z - 1)

With Forward Euler:

y(n) = y(n-1) + T * u(n-1)

or

H(z) = T / (z - 1)


D_D

Description:

Discrete Differentiator	Discrete differentiator
Parameters:

Sampling Frequency	Sampling frequency
If we define u(t) as the input, y(t) as the output, T as the sampling period,

and H(z) as the transfer function, in discrete domain, a differentiator is expressed as:

y(n) = (u(n) - u(n-1)) / T

or

H(z) = 1/T * (z-1) / z


TFCTN_D

Description:

z-domain Transfer Function	z-domain transfer function block
Parameters:

Order N	Order N of the transfer function
Coeff. b0…bN	Coefficients of the nominator (from b0 to bN)
Coeff. a0…aN	Coefficients of the denominator (from a0 to aN)
Sampling Frequency	Sampling frequency
A transfer function block is expressed as:

If a0 = 1, the output y and the input u can be expressed by the following difference equation:

.


FILTER_FIR

Description:

FIR Filter	FIR (finite impulse response) filter
FIR Filter (1)	FIR filter with file input
Parameters:

For FILTER_FIR:

Order N	Order N of the transfer function
Coeff. b0…bN	Coefficients of the nominator (from b0 to bN)
Sampling Frequency	Sampling frequency of the filter

For FILTER_FIR1:

File Name for Coeff.	Name of the file storing coefficients
Sampling Frequency	Sampling frequency of the filter

The transfer function of a FIR filter is expressed as:

The output y and the input u can be expressed by the following difference equation:

For the FILTER_FIR1 block, the order N and the coefficients are stored in a file.

The format of the file is as follows:


FILTER_D

Description:

Digital Filter	Digital filter
Digital Filter (1)	Digital filter with file input
Parameters:

For FILTER_D:

Order N	Order N of the transfer function
Coeff. b0…bN	Coefficients of the nominator (from b0 to bN)
Coeff. a0…aN	Coefficients of the denominator (from a0 to aN)
Sampling Frequency	Sampling frequency of the filter

For FILTER_D1:

File Name for Coeff.	Name of the file storing coefficients
Sampling Frequency	Sampling frequency of the filter

The transfer function of a general digital filter is expressed as:

If a0 = 1, the output y and the input u can be expressed by the following difference equation:

For the FILTER_FIR1 block, the order N and the coefficients are stored in a file. The format of the file can be one of the following:

or

When denominator coefficients are non zero, this type of filter is also called IIR (infinite impulse response) filter.

Example:

To design a 2nd-oder low-pass Butterworth filter with the cut-off frequency fc = 1 kHz, assuming the sampling frequency fs = 10 kHz, using MATLAB, we have:

Nyquist fn = fs / 2 = 5 kHz

Normalized cut-off frequency fc* = fc / fn = 1 / 5 = 0.2

[B, A] = butter(2, fc*)

which will give us:

B = [ 0.0201  0.0402  0.0201] = [b0  b1  b2]

A = [    1        -1.561   0.6414] = [a0  a1  a2]

The transfer function in z domain is:

The input-output difference equation is:

y(n) =  0.0201 u(n) + 0.0402 u(n-1) + 0.0201 u(n-1)  + 1.561 y(n-1) - 0.6414 y(n-2)

The parameter specification of the filter in PSIM will be:

Order N	2

Coeff. b0…bN	0.0201  0.0402  0.0201

Coeff. a0…aN	1.         -1.561    0.6414

Sampling frequency	10000.

If the coefficients are read from a file, the content of the file is as follows:

2

0.0201

0.0402

0.0201

1.

-1.561

0.6414

or the content can be:

2

0.0201	1

0.0402	-1.561

0.0201	0.6414


C_BUFFER

Description:

Circular Buffer	Circular buffer
Parameters:

Buffer Length	The length of the circular buffer
Sampling Frequency	Sampling frequency
A circular buffer stores data in a buffer. When it reaches the end of the buffer, it will

start again from the beginning.

The value of the memory location can be accessed using the memory read block (MEMREAD).

Example:

Assume a circular buffer has a buffer length of 4 and sampling frequency of 10 Hz, we

have:

Time       Input         Value at Memory Location

                                 1          2           3           4

---------------------------------------------------------------------------

0.            0.11           0.11      0.          0.        0.

0.1          0.22           0.11      0.22       0.        0.

0.2          0.33           0.11      0.22      0.33     0.

0.3          0.44           0.11      0.22      0.33     0.44

0.4          0.55           0.55      0.22      0.33     0.44

 ... ... ...


ARRAY

Description:

Array	1-dimensional data array
Array (1)	1-dimensional data array (with the data from a file)
Parameters:

For ARRAY:

Array Length	The length of the data array
Values	Values of the array
For ARRAY1:

File for Coefficients	The name of the file that stores the data array

This is a 1-dimensional array. The output is a vector, not a scalar.

For ARRAY1, the data array is stored in a text file. The file has the following format:

where N is the number of points.

Example:

To define the array c = [2 4 6 8], we will have:

For ARRAY:

Array length:	4

Values:	2  4  6  8

For ARRAY1:

File for Coefficients:	test.tbl

The file “test.tbl” will have the following content:

4

2.

4.

6.

8.


CONV

Description:

Convolution	Convolution block
The output of the block is the convolution of the two input vectors. If Input A and B are

defined as:

then

where

Example:

If A = [1 2 3] and B = [4 5], we have the convolution of A and B as:

C = [ 4  13  22 15 ].


MEMREAD

Description:

Memory Read	Memory read block
Parameters:

Memory Index Offset	Offset from the starting memory location

This block allows users to access the memory location of a vector output (such as

convolution block, vector array, circular buffer). The index offset defines the offset

from the starting memory location.

Example:

If A = [2  4  6  8], when offset = 0, the memory read block output is 2. When the

offset is 2, the output is 6.


STACK

Description:

Stack	Stack block
Parameters:

Stack Depth	Stack Depth
A stack is a first-in-last-out register.

The rising edge triggers the push or pop action. When a pop action is performed and the stack is empty, the output remains unchanged. When a push action is performed and the stack is already full, the data at the bottom of the stack will be pushed out and will be lost.


Other

Other elements include:

Switch Controllers	Switch controllers
Sensors	Voltage and current sensors
Probes	Voltage and current probes
Function Blocks	Other function blocks
Control-to-power Interface	Control-to-power interface block
Ground	Ground
Ground (1)	Ground with a different image
Ground (2)	Ground with a different image
.FILE	File that stores element parameter values
.ACSWEEP	Setup for ac sweep (frequency response analysis)
.PARAMSWEEP	Setup for parameter sweep


Other Function Blocks

Other function blocks include:

ABC2DQO	abc-to-dqo transformation block
DQO2ABC	dqo-to-abc transformation block
Lookup Table	Lookup table
Math Function	Math function block
Math Function (2)	2-input math function block
Math Function (3)	3-input math function block
Math Function (5)	5-input math function block
Math Function (10)	10-input math function block
DLL_EXT1	External DLL block (1 input, 1 output)
DLL_EXT3	External DLL block (3 inputs, 3 outputs)
DLL_EXT6	External DLL block (6 inputs, 6 outputs)
DLL_EXT12	External DLL block (12 inputs, 12 outputs)
DLL_EXT20	External DLL block (20 inputs, 20 outputs)
DLL_EXT25	External DLL block (25 inputs, 25 outputs)


ABC2DQO

Description:

ABC-DQO Transformation	abc to dqo transformation block
This block transforms 3-phase abc quantities to dqo quantities. This block can be used in both the power circuit and the control circuit.

Note that only the voltage quantities can be transformed used this block. To transform current quantities, they must first be converted to voltage quantities using current-controlled voltage sources.

The transformation equations from abc to dqo are:

The angle X, in rad., is specified externally through the input node at the bottom of the block.

Examples:

Let phases a, b, and c to be symmetrical, and X = wt.

If Va = 10*sin (wt), then Vd = 0, Vq = 10.

If Va = 10*sin (wt + ð / 6), then Vd = 5, Vq = 8.66.

If Va = 10*sin (wt - ð / 6), then Vd = -5, Vq = 8.66.


DQO2ABC

Description:

DQO-ABC Transformation	dqo to abc transformation block
This block transforms dqo quantities to abc quantities. This block can be used in both the power circuit and the control circuit.

Note that only the voltage quantities can be transformed used this block. To transform current quantities, they must first be converted to voltage quantities using current-controlled voltage sources.

The transformation equations from dqo to abc are:

Va = cosX * Vd + sinX * Vq + Vo

Vb = cos(X - 2 ð / 3) * Vd + sin(X - 2 ð / 3) * Vq + Vo

Vc = cos(X + 2 ð / 3) * Vd + sin(X + 2 ð / 3) * Vq + Vo

The angle X, in rad., is specified externally through the input node at the bottom of the block..


FCN_MATH

Description:

Math Function	Math function block
Math Function (2)	2-input math function block
Math Function (3)	3-input math function block
Math Function (5)	5-input math function block
Math Function (10)	10-input math function block
Parameters:

Expression f(x1,x2,…,xn)	Expression of the output versus the input where n is the number of inputs
Expression df/dxi	The derivative of the function versus the ith input
The output of a math function block is expressed as the mathematical function of the inputs. With this block, one can implement complex and nonlinear relationship easily and conveniently. Blocks with 1, 2, 3, 5, and 10 inputs are provided.

The derivative df/dxi can be set to zero.

The variables that are allowed in the expression are: T or t for time, and xi (i from 1 to n) which represents the ith input. For example, for the 3-input math function block, the allowed variables are: T, t, x1, x2, and x3. For the 1-input math function block, the variable x, which refers to the only input, is also allowed.


CTOP

Description:

Control-to-Power Interface	Control-power interface block

In PSIM, power circuit and control circuit are separated and are solved

sequentially. The control-power interface block allows a control circuit

quantity to be passed unchanged to the power circuit. The output of the

interface block is treated as a constant voltage source in the power circuit.

By using this block, some of the functions that can only be generated in

the control circuit can be passed to the power circuit.


DLL_EXT

Description:

DLL Block (1-input)	External DLL block with 1 input and 1 output
DLL Block (3-input)	External DLL block with 3 inputs and 3 outputs
DLL Block (6-input)	External DLL block with 6 inputs and 6 outputs
DLL Block (12-input)	External DLL block with 12 inputs and 12 outputs
DLL Block (20-input)	External DLL block with 20 inputs and 20 outputs
Parameters:

File Name	Name of the DLL file
The node assignments for the 3-input-3-output block (DLL_EXT3), for example, are:

The input pin with a dot is for the first input in[0]. Note that unused input nodes must be connected to ground.

This block allows the user to write code in C, compile it into DLL, and link it with PSIM. PSIM calls the DLL routine at each simulation time step. However, when the inputs of the DLL block are connected to the output of one of these discrete elements (zero-order hold ZOH, unit delay UDELAY, integrator I_D, differentiator D_D, z-domain transfer function block TFCTN_D, and digital filters), the DLL block is considered as a discrete element. In this case, the DLL block is called only at the discrete times.

The DLL block receives the values from PSIM as the input, performs the calculation, and sends the output back to PSIM. The node assignments are: the input nodes are on the left, and the output nodes are on the right. The sequence is from the top to the bottom.

The name of the DLL file can be arbitrary. The DLL file, however, must be in the same directory as the schematic file that uses the DLL file.

The following shows two sample programs, one for Microsoft C/C++ compiler.

--------------------------------- DLL Routine for Microsoft C/C++ -----------------------------------begin

// This sample program implement the control of the circuit "pfc-vi-dll.sch" in a C routine.

//	Input: in[0]=Vin; in[1]=iL; in[2]=Vo

//	Output: Vm=out[0]; iref=out[1]

// You may change the variable names (say from "t" to "Time").

// But DO NOT change the function name, number of variables, variable type, and sequence.

// Variables:

//      t: Time, passed from PSIM by value

//   delt: Time step, passed from PSIM by value

//     in: input array, passed from PSIM by reference

//    out: output array, sent back to PSIM (Note: the values of out[*] can be modified in PSIM)

// The maximum length of the input and output array "in" and "out" is 20.

// Warning: Global variables above the function simuser (t,delt,in,out) are not allowed!!!

#include <math.h>

__declspec(dllexport) void simuser (t, delt, in, out)

// Note that all the variables must be defined as "double"

double t, delt;

double *in, *out;

{

// Place your code here............begin

double Voref=10.5, Va, iref, iL, Vo, Vm, errv, erri, Ts=33.33e-6;

static double yv=0., yi=0., uv=0., ui=0.;

// Input

Va=fabs(in[0]);

iL=in[1];

Vo=in[2];

// Outer Loop

errv=Voref-Vo;

// Trapezoidal Rule

yv=yv+(33.33*errv+uv)*Ts/2.;

iref=(errv+yv)*Va;

// Inner Loop

erri=iref-iL;

// Trapezoidal Rule

yi=yi+(4761.9*erri+ui)*Ts/2.;

Vm=yi+0.4*erri;

// Store old values

uv=33.33*errv;

ui=4761.9*erri;

// Output

out[0]=Vm;

out[1]=iref;

// Place your code here............end

}

--------------------------------- DLL Routine for Microsoft C/C++ ----------------------------------end


.FILE

Description:

.FILE	File for storing element parameter values
Parameters:

File Name	Name of the parameter file
This element defines the name of the file that stores the component parameters and limit settings. For example, the resistance of a resistor can be specified as R1, and in the parameter file, the value of R1 is defined.

The parameter file is a text file created by the user. The format of the parameter file is:

<name> = <value>

<name> <value>

LIMIT <name> <lower limit> <upper limit>

% A comment line

The field <value> can be either a numerical number (e.g. ”R1 = 12.3”) or a mathematical expression (e.g. ‘‘R3 = R1 + R2/2.’’). The name and the value can be separated by either an equation sign (e.g. ‘R1=12.3’) or a space (e.g. ‘R1 12.3’). Text from the character ‘%’ to the end of the line is treated as comments (e.g. ‘% R3 is the load resistance’).

For example, a parameter file may look like the following:

R1=12.3

R2  23.4Ohm

% R3 is the load resistance

R3=R1+R2/2.

L1=3m

C1=20uF

N=234

LIMIT  R3  5.  25.


.ACSWEEP

Description:

.ACSWEEP	Setup for the ac analysis
Parameters:

Start Frequency	Start frequency of the ac sweep, in Hz
End Frequency	End frequency of the ac sweep, in Hz
No. of Points	Number of data points
Flag for Points	Flag to define how the data points is generated. Flag = 0: Points are distributed linearly in LOG10 scale Flag = 1: Points are distributed linearly in linear scale
Source Name	Name of the excitation source
Start Amplitude	Excitation source amplitude at the start frequency
End Amplitude	Excitation source amplitude at the end frequency
Freq. for extra Points	Frequencies of additional data points. If the frequency-domain characteristics change rapidly at a certain frequency range, one can add extra points in this region to obtain better data resolution.
The following are the steps to set up the ac analysis:

-	Identify a sinusoidal source (VSIN) as the excitation source for the ac sweep.

-	Place the ac sweep probes (ACSWEEP_OUT) at the desired output location. To measure the loop response of a closed control loop, use the node-to-node probe (ACSWEEP_OUT2).

-	Place the .ACSWEEP element on the schematic, and define the parameters of the ac sweep.

-	Run PSIM.

With the ac analysis, the frequency response of a circuit or a control loop can be obtained. A key feature of the ac analysis in PSIM is that, if a circuit is switchmode, it can be in its original switchmode form, and no average model is required. Nevertheless, with the average model, the time it takes to perform the ac analysis will be shorter.

The principle of the ac analysis is that a small ac excitation signal is injected into the system as the perturbation, and the signal at the same frequency is extracted at the output. To obtain accurate ac analysis results, the excitation source amplitude must be set properly. The amplitude must be small enough so that the perturbation stays in the linear region. On the other hand, the excitation source amplitude must be large enough so that the output signal is not affected by numerical errors.

In general, a physical system has low attenuation in the low frequency range and high attenuation in the high frequency range. A good selection of the excitation source amplitude would be to have a relatively small amplitude at the start frequency, and a relatively large amplitude at the end frequency.

Sometimes, after ac analysis is complete, a warning message is displayed as follows:

Warning: The program did not reach the steady state after 60 cycles. See File “message.doc” for more details.

This message occurs when the software fails to detect the steady state at the ac sweep output after 60 cycles. To address this problem, one may increase damping in the circuit (by including parasitic resistances, for example), or adjust the excitation source amplitude, or reduce the simulation time step. The file “message.doc” gives the information on the frequency at which this occurs and the relative error. The relative error will indicate how far the data point is from reaching the steady state.


.PARAMSWEEP

Description:

.PARAMSWEEP	Setup for parameter sweep
Parameters:

Start Value	Starting value of the parameter
End Value	End value of the parameter
Increment Step	Increment step
Parameter to be Swept	Parameter to be swept
Parameter sweep can be performed for the following parameters:

- Resistance, inductance, and capacitance of RLC branches

- Gain of proportional blocks (Proportional)

- Time constant of integrators (Integrator)

- Gain and time constant of PI (proportional-integral) controllers

- Gain, cut-off frequency, and damping ratio of 2nd-order low-pass/high-pass filters

  (2nd-order Low-pass Filter/2nd-order High-pass Filter)

- Gain, center frequency, and passing/stopping band of 2nd-order bandpass/bandstop

  filters (2nd-order Band-pass Filter/2nd-order Band-stop Filter)

For example, if a resistor “R1” has a resistance of “Ro”. To sweep the resistance “Ro” from 2 Ohm to 10 Ohm, with a step of 2 Ohm, the specification will be:

Start Value	2
End Value	10
Increment Step	2
Parameter to be Swept	Ro

Please note that the value for Parameter to be Swept should be the parameter value, not the name of the branch. For example, in this case, you should define Parameter to be Swept as “Ro”, not as “R1” since “R1” is the branch name, not the parameter value.


Ground

Description:

Ground	Ground

The ground provides a common point or a reference for power/control

circuits. Since the power circuit and control circuit are separate, the two

grounds are isolated.


Ground

Description:

Ground (1) Ground (2)	Grounds with different images

These ground elements are the same as the standard ground, except the image is different.


Switch Controllers

On-off Controller	On-off switch controller
Alpha Controller	Delay angle alpha controller
PWM Pattern Controller	PWM pattern controller


ONCTRL

Description:

On-Off Controller	On-off switch controller

The on-off switch controller interfaces between the control circuit and the power circuit. The input is a logic signal (0 or 1) from the control circuit. The output is connected to the gate (base) node of a switch (or multiple switches) to control the conduction of the switch.

The signal level of 1 is for switch on and 0 for switch off.


ACTRL

Description:

Alpha Controller	alpha controller

Image:

Parameters:

Frequency	Operating frequency of the controlled switch or

switch module, in Hz

Pulse Width	On-time pulse width of the gating signal, in deg.

The alpha controller is used for the delay angle control of thyristor switches or bridges. There are three input for the controller:

- alpha value, in degree (at the center bottom)

- synchronization signal (at the left bottom)

- enable/disable signal (at the middle right)

The alpha controller is enabled (or disabled) if the enable/disable signal is high (or low).

The transition of the synchronization signal from low to high (from 0 to 1) provides the synchronization and this moment corresponds to when the delay angle alpha equals zero. A gating pulse with a delay of alpha degrees is generated and sent to the thyristors. The alpha value is updated instantaneously.


PATTCTRL

Description:

PWM Pattern Controller	PWM pattern controller

Image:

Parameters:

Frequency	Operating frequency of the controlled switch or

switch module, in Hz

Update Angle	Update angle, in deg., based on which the switch

gatings are internally updated. If the angle is 360o,

the gatings are updated at every cycle. If it is 60o,

the gatings are updated at every 60o.

File Name	Name of the file storing the PWM patterns

The PWM pattern controller is used to control a switch or switch module with pre-calculated PWM patterns. A series of PWM patterns is stored in a lookup table in a file. Based on the input, a particular PWM pattern will be selected and switch gatings updated.

There are four input for the controller:

- modulation index (at the center bottom)

- delay angle, in deg. (at the left bottom)

- synchronization signal (at the right bottom)

- enable/disable signal (at the middle right)

The PWM pattern is selected based on the modulation index. The synchronization signal provides the synchronization to the PWM pattern. The switch gatings are updated when the synchronization signal changes from low to high. The delay angle defines the relative angle between the gating pattern and the synchronization signal. For example, if the delay angle is 10o, the gating pattern will be  leading the synchronization signal by 10o.

The PWM pattern controller is enabled (or disabled) if the enable/disable signal is high (or low).

A lookup table, which is stored in a file, contains the PWM patterns. It has the following format:

n, m1, m2, …, mn

k1

G(1,1), G(1,2), …, G(1,k1)

… … … … …

kn

G(n,1), G(n,2), …, G(n,kn)

where n is the number of PWM patterns, mi is the modulation index

corresponding to Pattern i, and ki is the number of points in Pattern i. The modulation index array m1 to mn should be monotonically increasing. The output will select the ith pattern if the input modulation index is smaller than or equal to mi. If the input exceeds mn, the last pattern will be selected.


Sensors

Voltage Sensor	Voltage sensor
Current Sensor	Current sensor


VSEN

Description:

Voltage Sensor	Voltage sensor

Parameters:

Gain	Gain of the voltage sensor

The voltage sensor measures the voltage of the power circuit and passes the value to the control circuit.


ISEN

Description:

Current Sensor	Current sensor

Parameters:

Gain	Gain of the current sensor

The current sensor measures the current of the power circuit and passes the value to the control circuit.

The current sensor has an internal resistance of 1 uOhm.


WSEN

Description:

Speed Sensor	Speed sensor

Parameters:

Gain	Gain of the speed sensor

The current sensor measures the speed of a mechanical system. The speed is by default in rpm.


TSEN

Description:

Torque Sensor	Torque sensor

Parameters:

Gain	Gain of the torque sensor

The torque sensor measures the torque transferred from one side of the torque sensor to the other.


Probes

The following probes and meters are used to measure voltage, current, and power.

Voltage Probe	Voltage probe (node to ground)
Voltage Probe (node-to-node)	Voltage probe (between two nodes)
Current Probe	Current probe
AC Voltmeter	AC voltmeter
DC Voltmeter	DC voltmeter
AC Ammeter	AC ammeter
DC Ammeter	DC ammeter
Watt Meter	Wattmeter
3-ph Watt Meter	3-phase wattmeter
VA/Power Factor Meter	VA-power factor meter
3-ph VA/Power Factor Meter	3-phase VA-power factor meter
VAR Meter	VAR meter
3-ph VAR Meter	3-phase VAR meter
AC Sweep Probe	AC sweep probe
AC Sweep Probe (loop)	AC sweep probe (measuring loop transfer function)

Note that in the control circuit, only node-to-ground voltage probe VP is allowed. All other probes and meters should be used in the power circuit only.


VP

Description:

Voltage Probe	Voltage probe (between node to ground)

The voltage probe measures the voltage between a node and the ground. The voltage value is saved to the output file for display.


VP2

Description:

Voltage Probe (node-to-node)	Voltage probe (between two nodes)

The node-to-node voltage probe measures the voltage between two nodes. The voltage value is saved to the output file for display.

Note that the node-to-node voltage probe can only be used in the power circuit.


ACSWEEP_OUT

Description:

AC Sweep Probe	AC sweep probe

The ac sweep probe gives the ac sweep output at the output node. The ac sweep output consists of two parts: the amplitude in dB and the phase angle in degree. The amplitude output is defined as the amplitude ratio between the output voltage (the voltage at the node which the ac sweep probe is connected to) and the excitation voltage. The phase angle output is defined as the phase difference between the output voltage and the excitation voltage.

Note that the amplitude output is in dB. Assuming that the amplitude ratio is kv, the output in dB will be 20*LOG10(kv).


ACSWEEP_OUT2

Description:

AC Sweep Probe (loop)	AC sweep probe for measuring loop response

The ac sweep probe (loop) measures the loop transfer function of a closed-loop control system. With the loop transfer function, one can determine the bandwidth and phase margin of the control system. Again, the probe output consists of two parts: the amplitude in dB and the phase angle in degree.

The example below illustrates how an ac sweep probe (loop) is used to determine the loop transfer function of a closed-loop circuit. This circuit has a current feedback loop, and the excitation source Vsweep is added to the current in the feedback path. Please note that the ac sweep probe should be connected in such a way that the dotted side is connected to the node after the excitation source is added.


IP

Description:

Current Probe	Current probe (between two nodes)

The current probe measures the current of the power circuit. The current value is saved to the output file for display.

Note that IP can only be used in the power circuit. Also, in the current probe, a small resistor of 1 uOhm is used internally to measure the current.


V_AC

Description:

AC Voltmeter	AC voltmeter

Parameters:

Op. Frequency	Operating frequency of the meter
Cut-off Frequency	Cut-off frequency of the filter

The ac voltmeter measures the rms value of the ac voltage at the operating frequency. The cut-off frequency is for the high-pass filter in the meter model for dc component filtering.

If the ac voltage contains the fundamental as well as harmonic components, the meter will give the rms value of the total waveform. For example, if

where ù1 is the fundamental (operating) frequency, and ù2 and ù3 are harmonic frequencies, the meter reading will be:


V_DC

Description:

DC Voltmeter	DC voltmeter

Parameters:

Cut-off Frequency	Cut-off frequency of the filter

The dc voltmeter measures the dc value of the voltage. The cut-off frequency is for the low-pass filter in the meter model for ac component filtering.


A_AC

Description:

AC Ammeter	AC ammeter

Parameters:

Op. Frequency	Operating frequency of the meter
Cut-off Frequency	Cut-off frequency of the filter

The ac ammeter measures the rms value of the ac current at the operating frequency. The cut-off frequency is for the high-pass filter in the meter model for dc component filtering.

If the ac voltage contains the fundamental as well as harmonic components, the meter will give the rms value of the total waveform. For example, if

where ù1 is the fundamental (operating) frequency, and ù2 and ù3 are harmonic frequencies, the meter reading will be:


A_DC

Description:

DC Ammeter	DC ammeter

Parameters:

Cut-off Frequency	Cut-off frequency of the filter

The dc ammeter measures the dc value of the current. The cut-off frequency is for the low-pass filter in the meter model for ac component filtering.


W

Description:

Watt Meter	Wattmeter

Parameters:

Cut-off Frequency	Cut-off frequency of the filter

The wattmeter measures the real power (also called average power) of a circuit. The cut-off frequency is for the low-pass filter in the meter model for ac component filtering.


W3

Description:

3-ph Watt Meter	3-phase Wattmeter

Parameters:

Cut-off Frequency	Cut-off frequency of the filter

The 3-phase wattmeter measures the real power (or average power) of a 3-phase 3-wire circuit. The cut-off frequency is for the low-pass filter in the meter model for ac component filtering.

Note that this meter can not be used to measure the power of a 3-phase 4-wire circuit. In such a case, 3 single-phase meters should be used instead.


VA_PF

Description:

VA/Power Factor Meter	VA-power factor meter

Parameters:

Operating Frequency	Operating frequency (fundamental frequency) of the meter, in Hz
Cut-off Frequency	Cut-off frequency of the internal low-pass filter, in Hz
VA Display Flag	Flag for VA display (0: no display; 1: display)
PF Display Flag	Flag for power factor display (0: no display; 1: display)
DPF Display Flag	Flag for displacement power factor display (0: no display; 1: display)

The VA-power factor meter measures the apparent power (VA), the power factor, and the displacement power factor of a circuit.

Given the voltage and current of the circuit as:

where ù1 is the fundamental frequency. The apparent power S is defined as:

where Vrms and Irms are the rms values of the voltage and current which are defined as:

The real (average) power of the circuit is:

A low-pass filter is used to obtain the real power. There is a compromise in selecting the low-pass filter cut-off frequency fc. If fc is too low, it will give a good attenuation to the ac components but it takes a long time to reach the steady state. On the other hand, if fc is too high, the transient is shorter, but the filtering to the ac components is not good. A good selection is around 20 Hz for a 60-Hz system.

The power factor is defined as:

The displacement power factor is defined as:

One needs to find out whether the power factor is leading or lagging by inspecting the voltage and current waveforms.


VA_PF3

Description:

3-ph VA/Power Factor Meter	3-phase VA-power factor meter

Parameters:

Operating Frequency	Operating frequency (fundamental frequency) of the meter, in Hz
Cut-off Frequency	Cut-off frequency of the internal low-pass filter, in Hz
VA Display Flag	Flag for VA display (0: no display; 1: display)
PF Display Flag	Flag for power factor display (0: no display; 1: display)
DPF Display Flag	Flag for displacement power factor display (0: no display; 1: display)

The VA-power factor meter measures the apparent power (VA), the power factor, and the displacement power factor of a 3-phase 3-wire circuit. For the 3-phase 3-wire circuit, the summation of the phase voltages or currents is zero, that is:

The apparent power S of a 3-phase system is defined as:

where Va, Vb, Vc, and Ia, Ib, Ic are the total rms values of the phase voltages and currents, respectively.

The real (average) power of the circuit is:

A low-pass filter is used to obtain the real power. There is a compromise in selecting the low-pass filter cut-off frequency fc. If fc is too low, it will give a good attenuation to the ac components but it takes a long time to reach the steady state. On the other hand, if fc is too high, the transient is shorter, but the filtering to the ac components is not good. A good selection is around 40 Hz for a 60-Hz system.

The power factor is defined as:

The displacement power factor is defined as:

DPF = cos (ö1 - è1)

Where ö1 is the phase angle of the phase A fundamental voltage, and è1 is the phase angle of the phase A fundamental current.

One needs to find out whether the power factor is leading or lagging by inspecting the voltage and current waveforms.


VAR

Description:

VAR Meter	VAR meter

Parameters:

Operating Frequency	Operating frequency, or fundamental frequency, of the meter

The VAR meter measures the reactive power of a circuit. If the voltages or currents contain harmonics, the meter will give the reactive power at the fundamental frequency.

The sign of the VAR meter is defined such that the reactive power by an inductive circuit (for example, a resistor-inductor circuit) is positive.


VAR3

Description:

3-ph VAR Meter	3-phase VAR meter

Parameters:

Operating Frequency	Operating frequency, or fundamental frequency, of the meter

The 3-phase VAR meter measures the reactive power of a 3-phase circuit. If the voltages or currents contain harmonics, the meter will give the reactive power at the fundamental frequency.

The sign of the VAR meter is defined such that the reactive power by an inductive circuit (for example, a resistor-inductor circuit) is positive.

Note that this meter can not be used to measure the power of a 3-phase 4-wire circuit. In such a case, 3 single-phase meters should be used instead.


Sources
Source Library

Voltage	Voltage sources
Current	Current sources
Time	Time, in sec.


Voltage

DC	DC voltage source
DC (battery)	DC voltage source (with battery cell image)
Sine	Sinusoidal voltage source
3-ph Sine	3-phase sinusoidal voltage source
Triangular	Triangular voltage source
Step	Step voltage source (from 0 to 1)
Step (1)	Step voltage source (from Vstep1 to Vstep2)
Square	Square-wave voltage source
Piecewise Linear	Piece-wise linear voltage source
Piecewise Linear (1)	Piece-wise linear voltage source (time and value pair)
Random	Random voltage source
Voltage-controlled	Voltage-controlled voltage source
Variable-gain Voltage-controlled	Variable-gain voltage-controlled voltage source
Current-controlled	Current-controlled voltage source
Current-controlled (1)	Current-controlled voltage source
Nonlinear (multiplication)	Nonlinear voltage source (input multiplication)
Nonlinear (division)	Nonlinear voltage source (input division)
Nonlinear (square-root)	Nonlinear voltage source (input square root)
Grounded DC	Grounded dc voltage source
Power	Nonlinear voltage source (power function)
Math Function	Voltage source expressed in math function
Note that controlled voltage sources and nonlinear voltage sources are allowed in the power circuit only.


Time

Description:

Time	Time, in sec.

The Time element gives the time of the simulation, in sec. It behaviors like a voltage source.

The time can also be implemented using the piecewise linear voltage source VGNL with zero frequency, and two points: one at t=0 with V=0, and the other at t=100. with V=100.


VDC

Description:

DC	DC voltage source
DC (battery)	DC voltage source (with battery cell image)

Parameters:

Amplitude	Amplitude of the dc source

These two dc sources are the same, except the images are different.


VDC_GND

Description:

Grounded DC	Grounded dc voltage source

Parameters:

Amplitude	Amplitude of the source, in V

The source is grounded at the reference node.


VSIN

Description:

Sine	Sinusoidal voltage source

Parameters:

Peak Amplitude	Amplitude Vm of the source, in V

Frequency	Frequency f, in Hz

Phase Angle	Initial phase angle è, in deg.

DC Offset	DC offset Voffset, in V

Tstart	Starting time, in sec. Before this time, the source is zero.

A sinusoidal source is defined as:


VSIN3

Description:

3-ph Sine	3-phase Y-connected sinusoidal voltage source

Parameters:

V (line-line-rms)	Line-to-line rms voltage amplitude Vll of the

3-phase source, in V

Frequency	Frequency f, in Hz

Init. Angle (phase A)	Initial phase angle è for Phase A, in deg.

DC Offset	DC offset Voffset, in V

Tstart	Starting time, in sec. Before this time, the source is zero.

The three phases are symmetrical and are Y-connected. The dotted phase of the module refers to Phase A.

The 3-phase voltage sources are defined as:


VSQU

Description:

Square	Square-wave voltage source

Parameters:

Vpeak-peak	Peak-to-peak voltage amplitude Vpp, in V

Frequency	Frequency f, in Hz

Duty Cycle	Duty cycle D of the high-potential interval

DC Offset	DC offset Voffset, in V

Tstart      	Starting time, in sec. Before this time, the source is zero.

Phase Delay	Phase delay, in deg.

The duty cycle D is defined as the ratio between the high-potential interval and the period. The Phase Delay defines the phase shift of the waveform from the original position.

For example, if

Vpeak-peak = 1

Frequency = 1kHz

Duty Cycle = 0.5

DC Offset = 0

Tstart = 0

and if  Phase Shift = 0, the waveform will be 1 from 0 to 0.5 msec., and 0 from 0.5 msec. to 1 msec.

But if Phase Shift = 90., the waveform will be shifted to the right by 90 deg. (0.25 msec. in this case). That is, the waveform will be 0 from 0 to 0.25 msec., 1 from 0.25 to 0.75 msec., and 0 from 0.75 to 1 msec.


VTRI

Description:

Triangular	Triangular voltage source

Parameters:

Vpeak-peak	Peak-to-peak voltage amplitude Vpp, in V

Frequency	Frequency f, in Hz

Duty Cycle	Duty cycle D of the rising slope interval

DC Offset	DC offset Voffset, in V

Tstart      	Starting time, in sec. Before this time, the source is zero.

Phase Delay	Phase delay, in deg.

The duty cycle D is defined as the ratio between the high-potential interval and the period. The Phase Delay defines the phase shift of the waveform from the original position.

For example, if

Vpeak-peak = 1

Frequency = 1kHz

Duty Cycle = 0.5

DC Offset = 0

Tstart = 0

and if  Phase Shift = 0, the waveform will be triangular, starting from 0 at 0 sec., linearly increasing to 1 at 0.5 msec., and decreasing back to 0 at 1 msec.

But if Phase Shift = 90., the waveform will be shifted to the right by 90 deg. (0.25 msec. in this case). That is, the waveform will be 0.5 at 0 sec., 0 at 0.25 msec., 1 at 0.75 msec., and back to 0.5 at 1 msec.


VSTEP

Description:

Step	Step voltage source

Parameters:

Vstep	Value Vstep, in V, after the step change

Tstep	Time Tstep, in sec., at which the step change occurs

The step voltage source changes from 0 to Vstep at the time Tstep.


VSTEP_1

Description:

Step (1)	Step voltage source

Parameters:

Vstep1	Value Vstep1, in V, before the step change

Vstep2	Value Vstep2, in V, after the step change

Tstep	Time Tstep, in sec., at which the step change occurs

T_transition	Transition time, in sec., from Vstep1 to Vstep2

The step voltage source changes from Vstep1 to Vstep2 at the time Tstep. The transition time from Vstep1 to Vstep2 is T_transition.


VGNL

Description:

Piecewise Linear	Piecewise linear voltage source

Parameters:

Frequency	Frequency of the waveform, in Hz

No. of Points n	No. of points

Values V1…Vn	Values at each point, in V

Time T1…Tn	Time at each point, in sec.

This source has a waveform consisting of many linear segments. The value and time at each point are specified.

Example:

The following waveform has 4 points, and it can be defined as follows:

Frequency	0.

No. of Points n	4

Values V1…Vn	1    1      3     3

Time T1…Tn	0.  0.1  0.2  0.3


VGNL_1

Description:

Piecewise Linear (1)	 Piecewise linear voltage source

Parameters:

Frequency	 Frequency of the waveform, in Hz

Times, Values (t1,v1) …	 Time and value at each point, in sec. and V

The waveform of the source consists of many linear segments. The time and value pair at each point is specified and they must be enclosed in brackets. A space or comma separates the time and the value.

Example:

A straight line with a slope of 1 can be defined as follows:

Frequency	      	0.

Times, Values (t1, v1) …     	(0, 0) (1., 1.).


VRAND

Description:

Random	Random voltage source

Parameters:

Peak-peak Amplitude	Amplitude Vm of the source, in V

DC Offset	DC offset Voffset, in V

A random voltage source is defined as:

where n is a random number in the range of 0 to 1.

Example:

To create a random voltage source that varies from -10V to 10 V, choose Vm=20V and Voffset=-10V.


VVCVS

Description:

Voltage-controlled	Voltage-controlled voltage source

Parameters:

Gain	Gain of the source

The voltage source value is equal to the gain multiplied by the controlling voltage. The positive and negative nodes of the controlling voltage are on the left.


VVCVSV

Description:

Variable-gain Voltage-controlled	Variable-gain voltage-controlled voltage source

Image:

Parameters:

Gain	Gain of the source
The voltage source value is equal to the gain multiplied by two controlling voltages Vin1 and Vin2:

The 1st input Vin is on the side with the multiplication sign, and the 2nd input is on the side with the letter “k”.

The difference between this source and the nonlinear voltage source Nonlinear (multiplication) (where Vo = k * Vin1 * Vin2) is that, with Nonlinear (multiplication), both Vin1 and Vin2 are updated at each iteration. But with Variable-gain Voltage-controlled voltage source, it is assumed that the change of Vin2 is small, and the value of Vin2 at the previous time step is used at the current time step. This assumption is valid as long as Vin2 changes at a much slower rate as compared to Vin1. This source can be used in circuits which may have the problem of math floating point overflow if the voltage source Nonlinear (multiplication) is used.


VCCVS

Description:

Current-controlled	Current-controlled voltage source

Parameters:

Gain	Gain of the source

The voltage source value is equal to the gain multiplied by the controlling current. The control nodes, on the left, should be connected across a resistor/inductor/capacitor branch, and the arrow indicates the direction of the controlling current.


VCCVS_1

Description:

Current-controlled (1)	Current-controlled voltage source

Parameters:

Gain	Gain of the source

The voltage source value is equal to the gain multiplied by the controlling current. The controlling current flows into one control node, and out of the other. The current flow direction is indicated by the arrow. A 10-uOhm resistor is used to sense the controlling current.


VNONM

Description:

Nonlinear (multiplication)	Nonlinear voltage source with input multiplication

Parameters:

Gain	Gain k of the source

The voltage source value is equal to the multiplication of the two input voltages, or:

Vo = k * Vin1 * Vin2


VNOND

Description:

VNOND	Nonlinear voltage source with input division

Parameters:

Gain	Gain k of the source

The voltage source value is equal to the division of the two input voltages, or:

Input 1 is on the side of the division sign.


VNONSQ

Description:

Nonlinear (square-root)	Nonlinear voltage source with input square-root

calculation

Parameters:

Gain	Gain k of the source

The voltage source value is equal to the square-root of the input voltage, or:


VPOWERS

Description:

Power	Nonlinear voltage source (power function)

Parameters:

Gain	Gain K
Coefficient k1	Coefficient k1
Coefficient k2	Coefficient k2
For the VPOWERS voltage source, the relationship between the output voltage Vo and the input voltage Vin is expressed as:

where the term “sign(Vin)” is 1 if Vin is positive, and -1 if Vin is negative. The symbol ^ means “to the power of”.

Note that this source can be used in the power circuit only.


VMATH

Description:

Math Function	Voltage source expressed in mathematical function

Parameters:

Expression	The mathematical expression of the source
Tstart	Start time of the source

The math function source allows one to define the source in any mathematical expression.

In the expression, “T” or “t” represents time. For example, to implement a sinusoidal source, the expression can be: sin(2*3.14159*60*t+2.09).


Current

DC	DC current source
Sine	Sinusoidal current source
Triangular	Triangular current source
Step	Step current source (from 0 to 1)
Step (1)	Step current source (from I1 to I2)
Square	Square-wave current source
Piecewise Linear	Piecewise linear current source
Piecewise Linear (1)	Piece-wise linear current source (time and value pair)
Random	Random current source
Voltage-controlled	Voltage-controlled current source
Current-controlled	Current-controlled current source
Current-controlled (1)	Current-controlled current source
Nonlinear (multiplication)	Nonlinear current source (input multiplication)
Nonlinear (division)	Nonlinear current source (input division)
Nonlinear (square-root)	Nonlinear current source (input square root)
Polynomial	Nonlinear current source (special type 1)
Polynomial (1)	Nonlinear current source (special type 2)
Variable-gain Voltage-controlled	Variable-gain voltage-controlled current source

Note that all the current sources are allowed in the power circuit only.


IDC

Description:

DC	DC current source

Parameters:

Amplitude	Amplitude of the source, in A


ISIN

Description:

Sine	Sinusoidal current source

Parameters:

Peak Amplitude	Amplitude Im of the source, in A

Frequency	Frequency f, in Hz

Phase Angle	Initial phase angle theta, in deg.

DC Offset	DC offset Ioffset, in A

Tstart	Starting time, in sec. Before this time, the

source is zero.

A sinusoidal source is defined as:


ISQU

Description:

Square	Square-wave current source

Parameters:

Ipeak-peak	Peak-to-peak current amplitude Ipp, in A

Frequency	Frequency f, in Hz

Duty Cycle	Duty cycle D of the high-potential interval

DC Offset	DC offset Ioffset, in A

Tstart      	Starting time, in sec. Before this time, the source is zero.

Phase Delay	Phase delay, in deg.

The duty cycle D is defined as the ratio between the high-potential interval and the period. The Phase Delay defines the phase shift of the waveform from the original position.

For example, if

Ipeak-peak = 1

Frequency = 1kHz

Duty Cycle = 0.5

DC Offset = 0

Tstart = 0

and if  Phase Shift = 0, the waveform will be 1 from 0 to 0.5 msec., and 0 from 0.5 msec. to 1 msec.

But if Phase Shift = 90., the waveform will be shifted to the right by 90 deg. (0.25 msec. in this case). That is, the waveform will be 0 from 0 to 0.25 msec., 1 from 0.25 to 0.75 msec., and 0 from 0.75 to 1 msec.


ITRI

Description:

Triangular	Triangular current source

Parameters:

Ipeak-peak	Peak-to-peak current amplitude Ipp, in A

Frequency	Frequency f, in Hz

Duty Cycle	Duty cycle D of the rising slope interval

DC Offset	DC offset Ioffset, in A

Tstart      	Starting time, in sec. Before this time, the source is zero.

Phase Delay	Phase delay, in deg.

The duty cycle D is defined as the ratio between the high-potential interval and the period. The Phase Delay defines the phase shift of the waveform from the original position.

For example, if

Ipeak-peak = 1

Frequency = 1kHz

Duty Cycle = 0.5

DC Offset = 0

Tstart = 0

and if  Phase Shift = 0, the waveform will be triangular, starting from 0 at 0 sec., linearly increasing to 1 at 0.5 msec., and decreasing back to 0 at 1 msec.

But if Phase Shift = 90., the waveform will be shifted to the right by 90 deg. (0.25 msec. in this case). That is, the waveform will be 0.5 at 0 sec., 0 at 0.25 msec., 1 at 0.75 msec., and back to 0.5 at 1 msec.


ISTEP

Description:

Step	Step current source

Parameters:

Istep	Value Istep, in A, after the step change

Tstep	Time Tstep, in sec., at which the step change occurs

The step current source changes from 0 to Istep at the time Tstep.


ISTEP_1

Description:

Step (1)	Step current source

Parameters:

Amplitude 1	Value I1, in A, before the step change

Amplitude 2	Value I2, in A, after the step change

Tstep	Time Tstep, in sec., at which the step change occurs

T_transition	Transition time, in sec., from I1 to I2

The step current source changes from I1 to I2 at the time Tstep. The transition time from I1 to I2 is T_transition.


IGNL

Description:

Piecewise Linear	Piece-wise linear current source

Parameters:

Frequency	Frequency of the waveform, in Hz

No. of Points n	No. of points

Values I1…In	Values at each point, in A

Time T1…Tn	Time at each point, in sec.

This source has a waveform consisting of many linear segments. The value and time at each point are specified.

Example:

A straight line with a slope of 1 can be defined as follows:

Frequency	0.

No. of Points n	2

Values I1…In	0.   1.

Time T1…Tn	0.   1.


IGNL_1

Description:

Piecewise Linear (1)	 Piece-wise linear current source

Parameters:

Frequency	 Frequency of the waveform, in Hz

Times, Values (t1,i1) …	 Time and value at each point, in sec. and A

The waveform of the source consists of many linear segments. The time and value pair at each point is specified and they must be enclosed in brackets. A space or comma separates the time and the value.

Example:

A straight line with a slope of 1 can be defined as follows:

Frequency	      	0.

Times, Values (t1, i1) …     	(0, 0) (1., 1.).


IRAND

Description:

Random	Random current source

Parameters:

Peak-peak Amplitude	Amplitude Im of the source, in A

DC Offset	DC offset Ioffset, in A

A random voltage source is defined as:

Io = Im * n + Ioffset

where n is a random number in the range of 0 to 1.

Example:

To create a random current source that varies from -10A to 10A, choose Im=20A and Ioffset=-10A.


IVCCS

Description:

Voltage-controlled	Voltage-controlled current source

Parameters:

Gain	Gain of the source

The current source value is equal to the gain multiplied by the controlling voltage. That is:

Io = k * Vin

The positive and negative nodes of the controlling voltage are on the left of the source image.


IVCCSV

Description:

Variable-gain Voltage-controlled	Variable-gain voltage-controlled current source
Image:

Parameters:

Gain	Gain of the source
The current source value is equal to the gain multiplied by two controlling voltages Vin1 and Vin2:

Io = [k * Vin2] * Vin1

The 1st input Vin is on the side with the multiplication sign, and the 2nd input is on the side with the letter “k”.

The difference between this source and the nonlinear current source Nonlinear (multiplication) (where Io = k * Vin1 * Vin2) is that, with Nonlinear (multiplication), both Vin1 and Vin2 are updated at each iteration. But with Variable-gain Voltage-controlled current source, it is assumed that the change of Vin2 is small, and the value of Vin2 at the previous time step is used at the current time step. This assumption is valid as long as Vin2 changes at a much slower rate as compared to Vin1. This source can be used in circuits which may have the problem of math floating point overflow if the current source Nonlinear (multiplication) is used.


ICCCS

Description:

Current-controlled	Current-controlled current source

Parameters:

Gain	Gain of the source

The current source value is equal to the gain multiplied by the controlling current. The control nodes, on the left, should be connected across a resistor/inductor/capacitor branch, and the arrow indicates the direction of the controlling current.


ICCCS_1

Description:

Current-controlled (1)	Current-controlled current source

Parameters:

Gain	Gain of the source

The current source value is equal to the gain multiplied by the controlling current. The controlling current flows into one control node, and out of the other. The current flow direction is indicated by the arrow. A 10-uOhm resistor is used to sense the controlling current.


INONM

Description:

Nonlinear (multiplication)	Nonlinear current source with input multiplication

Parameters:

Gain	Gain k of the source

The current source value is equal to the multiplication of the two input voltages, or:

Io = k * Vin1 * Vin2


INOND

Description:

Nonlinear (division)	Nonlinear current source with input division

Parameters:

Gain	Gain k of the source

The current source value is equal to the division of the two input voltages, or:

Io = k * Vin1 / Vin2

Input 1 is on the side of the division sign.


INONSP_1

Description:

Polynomial 	Current source with polynomial expression

Parameters:

Constant	Constant Idc, in A
K1 (coefficient)	Coefficient for the linear term
K2 (coefficient)	Coefficient for the square term
K3 (coefficient)	Coefficient for the cubic term

This current source is designed primarily for the modeling of mechanical load. It is expressed as:

where:

Vi:	controlling voltage

sign(Vi):	sign of the input voltage

(1 if Vi is positive; and -1 if Vi is negative)


INONSP_2

Description:

Polynomial (1)	Current source with polynomial expression

Parameters:

Imax	Maximum current, in A
Vi,low	Lower input limit
Vi,high	Upper input limit

This current source is designed primarily for the modeling of mechanical load. It is expressed as:

When the absolute value of the controlling voltage Vi is less than the lower limit Vi,min:

Io = Imax

When the absolute value of the controlling voltage Vi is between the lower and the upper limits:

Io = P / | Vi | = (I_max * Vi_low) / | Vi |

When the absolute value of the controlling voltage Vi is greater than the upper limit:

Io = 0


INONSQ

Description:

Square-root	Nonlinear current source with input square-root calculation

Parameters:

Gain	Gain k of the source

The current source value is equal to the square-root of the input voltage, or:


SLINK

Description:

In Link Node	In link node

Out Link Node	Out link node

The link nodes are used in PSIM to provide interface to Simulink. An In Link Node receives a value from Simulink, and the node behaviors as a voltage source. An Out Link Node passes a value to Simulink.

Refer to the SimCoupler Module section regarding the setup of the SimCouple Module.