psim interface opal rt

33
www.opal-rt.com Asma Merdassi, Ph.D. 05/12/2014 OPAL - RT TECHNOLOGIES REAL - TIME POWER SYSTEMS SIMULATOR PSIM-eHS Interface

Upload: tvskrishnavarma

Post on 07-Feb-2016

39 views

Category:

Documents


0 download

DESCRIPTION

Good Information

TRANSCRIPT

Page 1: Psim Interface Opal Rt

www.opal-rt.com

Asma Merdassi, Ph.D.05/12/2014

OPAL-RT TECHNOLOGIESREAL-TIME POWER SYSTEMS SIMULATOR

PSIM-eHS Interface

Page 2: Psim Interface Opal Rt

22

Outline

• Introduction : electric Hardware Solver (eHS)

• Building a PSIM model with eHS solver

• How to Start

• Case studies

• DEMO

• Prospective : New Workflow

Page 3: Psim Interface Opal Rt

33

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 1µs)

• 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

Page 4: Psim Interface Opal Rt

44

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

Page 5: Psim Interface Opal Rt

55

eHS

(electrical Hardware Simulation)

Solver

Automatic generation of NetListfile (circuit.cct)

Parsing NetList

Nodal Analysis Approach

Generating eHS matrixes

Automatic methodology

OUTPUTS

FPGA Implementation

USER INPUT

Introduction : electric Hardware Solver (3/3)

Structure of converter

PSIM circuit editor

(Circuit.psimsch)

Page 6: Psim Interface Opal Rt

66

Building a PSIM model with eHS solver

Switches

Sources

Passive

components

Measurements

PSIM Electrical Source Library

Page 7: Psim Interface Opal Rt

77

Parameter settings for switches

Building a PSIM model with eHS solver

For one circuit, the eHS solver

supports a maximum number of

24 switches.

Page 8: Psim Interface Opal Rt

88

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.

Page 9: Psim Interface Opal Rt

99

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).

Page 10: Psim Interface Opal Rt

1010

Building a PSIM model with eHS solver

Parameter settings for sources

Page 11: Psim Interface Opal Rt

1111

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).

Page 12: Psim Interface Opal Rt

1212

Building a PSIM model with eHS solver

• Each circuit requires at least one ground.

• It is used as a reference by the solver and can be placed anywhere in the circuit.

Ground

Page 13: Psim Interface Opal Rt

1313

Building a PSIM model with eHS solver

• 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”

Outputs1. 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)

Rules of design – Inputs and Outputs

Page 14: Psim Interface Opal Rt

1414

Building a PSIM model with eHS solver

Example of a valid PSIM model for eHS

Page 15: Psim Interface Opal Rt

1515

Building a PSIM model with eHS solver

Example of a valid PSIM model for eHS

switches

SW01

SW02

SW03

SW04

SW05

SW06

Page 16: Psim Interface Opal Rt

1616

Building a PSIM model with eHS solver

Example of a valid PSIM model for eHS

sourcesU01U02

U03

Page 17: Psim Interface Opal Rt

1717

Building a PSIM model with eHS solver

Example of a valid PSIM model for eHS

measurements

Y01Y02

Y06

Y03

Y05Y04

Y08

Y07

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

Page 18: Psim Interface Opal Rt

1818

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 Matlab-

eFPGAsim Blockset Help (eHS User Guide)

Page 19: Psim Interface Opal Rt

1919

• 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

Building a PSIM model with eHS solver

Offline Simulation

Page 20: Psim Interface Opal Rt

2020

How to Start

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)

Requirements

Page 21: Psim Interface Opal Rt

2121

Create a PSIM Model with eHS supported

blocks

Create a CPU Model Simulink

Save the CPU Model on the same folder

with the PSIM model

Create a RT-LAB Project

Build the model and Load/Execute(XHP mode)

Compare online simulations with PSIM simulations

• Make a Simulink model for

Controller and I/O

• Choose a fixed-step solver,

sample time (Ts)

• Configure parameters of Dual

eHS block

• Add Simulink CPU model to

RT-LAB

• Assign and configure a target to

the model

• Rename elements using the

eHS naming convention

• Select the order of outputs

Step 1

Step 2

Step 3

How to Start

Page 22: Psim Interface Opal Rt

2222

Case studies

Page 23: Psim Interface Opal Rt

2323

Boost

Case studies

Page 24: Psim Interface Opal Rt

2424

Case studies

Three-phase inverter

Page 25: Psim Interface Opal Rt

2525

Case studies

Page 26: Psim Interface Opal Rt

2626

Case studies

Page 27: Psim Interface Opal Rt

2727

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

Page 28: Psim Interface Opal Rt

2828

LabVIEW Panel

Page 29: Psim Interface Opal Rt

2929

Prospective

All I/O specifications and acquisition control will be specified, configured and controlled outside of

Matlab/Simulink.

Page 30: Psim Interface Opal Rt

3030

Prospective – 4Q2014

Create a PSIM Model with eHS supported

blocks

Create a CPU Model Simulink

Save the CPU Model on the same folder

with the PSIM model

Create a RT-LAB Project

Build the model and Load/Execute(XHP mode)

Compare online simulations with PSIM simulations

• 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

• Rename elements using the

eHS naming convention

• Select the order of outputs

Modeling Steps

Step 1

Step 2

Step 3

Page 31: Psim Interface Opal Rt

3131

Prospective – 4Q2014

Create a PSIM Model with eHS supported

blocks

Create a RT-LAB Project

Build the model and Load/Execute(XHP mode)

Compare online simulations with PSIM simulations

• Assign and configure a target to

the model

• I/O

• Rename elements by using

the eHS naming convention

• Select the order of outputs

Modeling Steps

Step 1

Step 2

Page 32: Psim Interface Opal Rt

32

New Workflow

32

Select Torque

Select AI_01

Drag & Drop

Page 33: Psim Interface Opal Rt

3333

Thank You!