Вы находитесь на странице: 1из 33

OPAL-RT TECHNOLOGIES

REAL-TIME POWER SYSTEMS SIMULATOR

PSIM-eHS Interface

Asma Merdassi, Ph.D.


05/12/2014

www.opal-rt.com

Outline
Introduction : electric Hardware Solver (eHS)
Building a PSIM model with eHS solver
How to Start
Case studies
DEMO
Prospective : New Workflow
2

Introduction : electric Hardware Solver (1/3)


eHS : electric Hardware Solver
Simulation of switched electronic circuit on FPGA
Very high sampling frequency, up to 5 MHz

Building electric circuit models from a PSIM circuit in real-time (with


Ts between 150 nanos to 1s)

No need to write mathematical equations


Use of PSIM schematic editor

Can be interfaced with real devices, such electronic system


controllers, through analog and digital input, output hardware
3

Introduction : electric Hardware Solver (2/3)


eHS : electric Hardware Solver
Circuit parameters and topology can be changed without
regenerating the bitstream
Up to four (4) eHS cores can be interconnected

Data logging implemented on FPGA to record signals with


time steps as low as 200 nanoseconds
4

Introduction : electric Hardware Solver (3/3)


USER INPUT
Structure of converter

PSIM circuit editor


(Circuit.psimsch)
eHS
(electrical Hardware Simulation)
Solver
Automatic methodology

Automatic generation of NetList


file (circuit.cct)

OUTPUTS

Parsing NetList
FPGA
Implementation

Nodal Analysis Approach

Generating eHS matrixes

Building a PSIM model with eHS solver


PSIM Electrical Source Library

Switches

Sources

Passive

Measurements

components

Building a PSIM model with eHS solver


Parameter settings for switches
For one circuit, the eHS solver
supports a maximum number of
24 switches.

Building a PSIM model with eHS solver


Parameter settings for passive components
For one circuit, the eHS solver
supports a maximum number of 60
non-switching devices (ie. L and
C) and unlimited number of
resistors.

Building a PSIM model with eHS solver


Parameter settings for sources

For one circuit, the eHS


solver supports a maximum
number of 16 inputs
(voltage/current sources).

Building a PSIM model with eHS solver


Parameter settings for sources

10

Building a PSIM model with eHS solver


Parameter settings for measurement components

For one circuit, the eHS solver


supports a maximum number of
16 outputs (voltage/current
measurements).

11

Building a PSIM model with eHS solver


Ground
Each circuit requires at least one ground.
It is used as a reference by the solver and can be placed anywhere in the circuit.

12

Building a PSIM model with eHS solver


Rules of design Inputs and Outputs
There are two types of inputs and one type of output to eHS:
Inputs
1. Electrical source (voltage or current) referred to as U
2. Pulse controlling a power switch referred to as SW
Outputs
1. Electrical measurement (voltage or current) referred to as Y
The order of the inputs and outputs in the vector is determined by their
name.
Note:
1. The names for all blocks used for input and output must start with the
type+index (U01/SW02/Y01) and the 0 cannot be ignored
2. The order of the inputs and outputs must match the index
3. The index must be consecutive (ie. 01,02,03; not 01,03)
13

Building a PSIM model with eHS solver


Example of a valid PSIM model for eHS

14

Building a PSIM model with eHS solver


Example of a valid PSIM model for eHS

SW01

SW03

SW05

SW04

SW06

SW02
switches
15

Building a PSIM model with eHS solver


Example of a valid PSIM model for eHS

U01
U02
U03

sources

16

Building a PSIM model with eHS solver


Example of a valid PSIM model for eHS

Y08

Y01
Y02
Y03
Y04
Y05
Y06

Y07

measurements

Note: the
snubber resistors
across the
switches are not
required for eHS
simulation; this
may be useful to
prevent
discharge of
output capacitor
for no-load cases

17

Building a PSIM model with eHS solver


Inserting the PSIM circuit into an RT-LAB Model
Implements the
driver that
manages all
communication with
the eHS firmware.
Initializes the solver
and transmission in
real time of the
circuit control
signals (current and
voltage source
control signals,
switching
information of the
switches).

Note: You can find more details for eHS dual block in the MatlabeFPGAsim Blockset Help (eHS User Guide)
18

Building a PSIM model with eHS solver


Offline Simulation
This block enables the developer to
simulate each part of the circuit
with exactly the same eHS solver
used for FPGA simulation with the
same sample time.
Users can then compare results
expected with eHS with PSIM
results using off-line simulation,
without using FPGA hardware
The effect of parasitic inductors and
capacitors added by eHS can then
be easily assessed
This block enables the developer to
connect the block exactly as it is
connected inside the FPGA-based
board firmware
One offline block should be added
for each eHS solver core
19

How to Start
Requirements
The following toolboxes are needed:
RT-LAB
RT-EVENTS (to simulate accurate controller on CPU)
eFPGAsim (to interconnect the CPU and FPGA and load the bitstream)

Supported FPGA boards:


OP5600 : ML605 VIRTEX 6
OP4500: KINTEX 7
OP5607: VIRTEX 7
NI cRIO ZYNQ7020
Software versions:
RT-LAB v10.6.4.280
PSIM v9.3 (64 bits)

20

How to Start
Rename elements using the
eHS naming convention
Select the order of outputs
Make a Simulink model for
Controller and I/O
Choose a fixed-step solver,
sample time (Ts)
Configure parameters of Dual
eHS block

Create a PSIM Model


with eHS supported
blocks
Create a CPU Model
Simulink

Step 1
Step 2

Save the CPU Model


on the same folder
with the PSIM model

Add Simulink CPU model to


RT-LAB
Assign and configure a target to
the model

Create a RT-LAB
Project

Compare online
simulations with
PSIM simulations

Build the model and


Load/Execute
(XHP mode)

Step 3

21

Case studies

22

Case studies

Boost

23

Case studies

Three-phase inverter

24

Case studies

25

Case studies

26

DEMO
Boost Converter
PSIM simulation
eHS offline
Real-time simulation

Inverter 3 ph
PSIM simulation
eHS offline
Real-time simulation

Inverter 3 Level (NPC)


Real-time simulation

27

LabVIEW Panel

28

Prospective

All I/O specifications and acquisition control will be


specified, configured and controlled outside of
Matlab/Simulink.

29

Prospective 4Q2014
Modeling Steps
Rename elements using the
eHS naming convention
Select the order of outputs
Choose fixed-step solver,
sample time (Ts)
Configure parameters of Dual
eHS block
Control + I/O
Add CPU Simulink model
Assign and configure a target to
the model

Compare online
simulations with
PSIM simulations

Create a PSIM Model


with eHS supported
blocks
Create a CPU Model
Simulink

Step 1
Step 2

Save the CPU Model


on the same folder
with the PSIM model
Create a RT-LAB
Project

Step 3

Build the model and


Load/Execute
(XHP mode)
30

Prospective 4Q2014
Modeling Steps

Rename elements by using


the eHS naming convention
Select the order of outputs

Assign and configure a target to


the model
I/O

Compare online
simulations with
PSIM simulations

Create a PSIM Model


with eHS supported
blocks

Create a RT-LAB
Project

Step 1

Step 2

Build the model and


Load/Execute
(XHP mode)
31

New Workflow

Select Torque
Drag & Drop

Select AI_01

32

Thank You!

33

Вам также может понравиться