PSIM eHS interface OPAL RT

advertisement

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

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

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

Introduction : electric Hardware Solver (3/3)

USER INPUT

Structure of converter

PSIM circuit editor

(Circuit.psimsch)

OUTPUTS eHS

(electrical Hardware Simulation)

Solver

Automatic methodology

Automatic generation of NetList file (circuit.cct)

Parsing NetList

Nodal Analysis Approach

FPGA

Implementation

Generating eHS matrixes

Building a PSIM model with eHS solver

PSIM Electrical Source Library

Switches Sources Passive components

Measurements

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

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

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.

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)

Building a PSIM model with eHS solver

Example of a valid PSIM model for eHS

Building a PSIM model with eHS solver

Example of a valid PSIM model for eHS

SW01 SW03

SW05

SW02

SW04

SW06 switches

Building a PSIM model with eHS solver

Example of a valid PSIM model for eHS

U01

U02

U03 sources

Building a PSIM model with eHS solver

Example of a valid PSIM model for eHS

Y01

Y02

Y03

Y04

Y05

Y06 measurements

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

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)

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

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)

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

• Add Simulink CPU model to

RT-LAB

• 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

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)

Step 1

Step 2

Step 3

Case studies

Case studies

Boost

Case studies

Three-phase inverter

Case studies

Case studies

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

LabVIEW Panel

Prospective

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

Matlab/Simulink.

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

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

• Add CPU Simulink model

• Assign and configure a target to the model

Create a RT-LAB

Project

Step 1

Step 2

Step 3

Compare online simulations with

PSIM simulations

Build the model and

Load/Execute

(XHP mode)

Prospective – 4Q2014

Modeling Steps

• Rename elements by using the eHS naming convention

• Select the order of outputs

Create a PSIM Model with eHS supported blocks

Step 1

• Assign and configure a target to the model

• I/O

Create a RT-LAB

Project

Compare online simulations with

PSIM simulations

Build the model and

Load/Execute

(XHP mode)

Step 2

New Workflow

Select Torque

Select AI_01

Drag & Drop

Thank You!

Download