PSIM Software
Tutorial oncots
How to U the SimCoupler Module
Powersim Inc.enhances
pastdueApril 2009
The SimCoupler Module provides the link between PSIM and Matlab/Simulink* for co-simulation. The objective of this tutorial is to show how to u the Simcoupler Module and t it up in PSIM and Simulink.
A simple buck converter with current feedback control (file “chop1q_ifb.sch”), as shown below in the PSIM environment, will be ud as the example. In this circuit, the inductor current is measured and compared with a reference. The error signal is nt to a PI controller, and the PI output is compared with a carrier waveform to generate the gating signal that controls the switch in the power circuit.
eno
In this tutorial, we will illustrate how to split the circuit so that part of the control circuit (as shown inside
the dotted rectangle) is implemented in the Simulink environment, and the rest of the circuit stays in PSIM. Note that this tutorial is for PSIM Version 8.0.
Note that this circuit can be simulated with the PSIM demo version.
法硕辅导班
The circuit inside the rectangle
will be implemented in Simulink.
* : Matlab and Simulink are registered trademarks of MathWorks, Inc
Below are the steps in the PSIM environment:
1. If multiple copies of PSIM are installed on the computer, in order to associate the PSIM
copy that you currently u to Matlab/Simulink for co-simulation, from the PSIM
directory, run the program “”. Note that this needs to be done only once
数学教学经验总结until next time you wish to associate another copy of PSIM with Matlab/Simulink for co-simulation.
2. Launch PSIM, and open the file “chop1q_ifb.sch”. The file can be found in the sub-folder
“examples\SimCoupler” in the PSIM directory.
hopkins
3. Save the file to a different name, “chop1q_ifb_psim.sch”, in the directory “c:\test”.
4. Modify the circuit by deleting the reference source, the summer, and the PI controller.
After the modification, the circuit will look as follows:
5. Go to Elements -> Control -> SimCoupler Module as shown below:
Select the Out Link Node. Connect it to the current nsor output, and rename it to “iL”.
Similarly, lect the In Link Node. Connect it to the comparator input, and rename it to “Vm”.
The SimCoupler Module us the SLink nodes to establish the interface between PSIM and Simulink. In Link Nodes receive values from Simulink, and Out Link Nodes nd values to Simulink.
Multiple In/Out Link Nodes can be ud in a circuit to exchange values between PSIM and Simulink. In this ca, for example, we are going to measure and nd the load voltage to Simulink by connecting a voltage nsor across the load resistor and placing an Out Link Node at the voltage nsor output. The Out Link Node will be renamed as “Vo”.
思路中文After this, the circuit will look as below.
Plea note that the PSIM demo version only allows one In Link Node and one Out Link Node. If you are using the demo version, do not add this extra link node for the output voltage.
6. If there are more than one In Link Node or Out Link Node (such as in this ca), one may
trojan horwish to arrange the order of the link nodes. Go to Simulate -> Arrange SLINK Nodes, and a dialog window will appear, as shown below. Arrange the order of the In nodes and Out nodes to be the same as how the input/output ports would appear in the SimCoupler model block in the Simulink environment. The order of the ports is from the top to the bottom. In this ca, the output port corresponding to “iL” will be on the top, and the output port corresponding to “Vo” will be on the bottom.
To re-arrange the node quence, highlight the name of the node, and click on the upper or down arrow.
7. Save the schematic file. In this example, the file will be saved to
“c:\test\chop1q_ifb_psim.sch”.
At this point, the tup in PSIM is complete, and we will start the tup in the Simulink environment.
8. Start Matlab.
9. Launch Simulink, and create a new file corresponding to the control circuit that was
deleted from the PSIM circuit in Step 4, as shown below.
10. Save the file to “c:\test\chop1q_ifb_simulink.mdl”.
11. In Simulink, go to the library browr, and you will e the SimCoupler block under the
menu S-function SimCoupler, as shown below:
利物浦大学排名