opal rt giroux scrpting in emtp works
TRANSCRIPT
OPAL-RT Real-Time simulation of Power Systems 4/30/2009Electrical website 12007.03.20RT-LAB Electrical Applications 1
Opal-RT Technologies
EMTP-RV User Group Meeting
Dubrovnik, Croatia
April 30th 2009
Scripting in EMTPWorks :
From EMTP-RV Circuits to Simulink
Diagrams for Real-Time Simulation
Mathieu Giroux
Opal-RT Presentation
OPAL-RT From EMTP-RV to Real-Time 4/30/2009 2
Contents
OPAL-RT Technologies at a glance
What is an RT-Simulator, why RT-Simulation
EMTP-RV real-time interface / specifications
Developments realized in EMTPWorks
Conclusions
OPAL-RT From EMTP-RV to Real-Time 4/30/2009 3
Opal-RT Technologies at a glance
Established in 1997, in Montreal, Canada
Branch offices in USA and in India, worldwide distributor network
50+ employees
Hardware and Software
HIL and fully digital simulators Integrated with Matlab/Simulink
FPGA development system and IOs
Solutions for testing and development of controls in Power Systems, Automotive, Aerospace and Defense
Control Prototyping Systems
Electronic Control Unit (ECU) Tester
Hardware-in-the-Loop
eDRIVEsim and eMEGAsim: Opal-RT real-time power system simulators based on SimPowerSystems
COTS-based Real-Time Simulation and HIL Test Systems
OPAL-RT Real-Time simulation of Power Systems 44
OPAL-RT – Electric & Power Electronics
June 12, 2008
CONVERTEAM
TRAIN & HVDC
More Electrical
Aircraft
French Navy
OPAL-RT From EMTP-RV to Real-Time 4/30/2009 5
What is a Real-Time Simulator
Real-Time computer and
I/O system
Integrated with modeling
and simulation software
RT-LAB PLANT
SIMULATOR
+
-Motor
Capable of emulating the simulated plan, control systemsor both simultanously
With sufficient accuracy to meettest and design objectives
RT-LAB eDRIVEsim and
eMEGAsim simulators are
integrated with:
MATLAB, SIMULINK
SimPowerSystems, RTW
EMTP-RV, JMAG-RT
QNX and LINUX RTOS
Windows and LabVIEW
REAL or RT-LAB
SIMULINK-BASED
PROTOTYPE CONTROLLER
OPAL-RT Real-Time simulation of Power Systems
C
Motor Drives
AC Fed DriveMulti-Level & Matrix Converters
AC Grid
& Protection Systems
Ships and Aircrafts
Smart Grids
APPLICATIONS VS RT-LAB REAL-TIME DIGITAL SIMULATOR PRODUCT FAMILY
eDRIVEsim eMEGAsim
Prototype Controllers
Mechatronic Systems
POWER GRIDS
Wind farm AC/DC Grids
Thyristor-based HVDC and FACTS
IGBT-based VSC, FACTS, STATCOM
Voltage Source
Converters
POWER ELECTRONICS
D E FB
Train Traction Systems
2 to 8 CPU 4 to 64CPU1 to 4CPU
RT-LAB
eDRIVElabEducational
RT-LAB BERTASpeed Regutator Tester
RT-LAB XSGFPGA Dev System
JMAG-RTFEA Motor Model
Ac grids & HVDC
DRIVES & VSC
CONTROLLERS
Any Power System can now be accurately simulated in Real-Time!
OPAL-RT Real-Time simulation of Power Systems 4/30/2009 77
Why Real-Time and Faster than Real-time Simulation?
Use of Modeling and Simulation at every step of the design: MODEL-BASED DESIGN
Why Fast off-line simulationwith parallel computers Fast user interaction
Feasibility and concept analysis
Design optimization of large systems
Statistical / Monte Carlo analysis
Why Real-Time (RT)? Connection to real physical equipment
Fast user interaction for debugging, tuning, optimizing, training …
Integration tests: functionality, performance, reliability, and safety
Applications of Real-Time Simulation : Full digital simulation for Software-In-The-Loop (SIL)
Rapid Control Prototyping (RCP) with physical or virtual plants
Hardware-In-the-Loop (HIL) with actual or prototype controllers
SpecifyFesabilty
DesignImpl-
ement
Test
Prototyping
BETTER AND MORE TESTS IN SHORTER TIME
OPAL-RT Real-Time simulation of Power Systems
EMTP-RV real-time interface
4/30/2009 8
Project goal• Provide to existing Opal-RT users a better interface for large and very large topologies
• Provide to existing EMTP-RV users a real-time interface in EMTPWorks
Requirements
1) Develop a data translator:
from EMTP-RV data to
Simulink/SimPowerSystems data
2) Enable model separation tools
in EMTPWorks (distributed simulation)
3) Add to EMTPWorks special
real-time libraries. (Signal acquisition,
communication with IOs, special
models for real-time, etc…)
OPAL-RT Real-Time simulation of Power Systems
EMTP-RV to Simulink Data translator - Architecture
4/30/2009 9
EMTPWorks NetlistData Parsing
Data translation
Simulink files
creation
Simulink
Real-Time
-Real-time libraries
(EMTPWorks .clf
creation tools)
-Model validation for
real-time simulation
-(dwj scripts)
- Model Separation
functions added
(dwj scripts)
mdl files ready for
real-time with RT-LAB
Initialize machines
from EMTP-RV load-
flow and steady-state
results
(HTML files)
m scripting
Text File
readable/parseable
New netlist format
required
(Report Script
Language)
With EMTPWorks scripting tools, it is possible to customize the modeling
environment without any “hard-code” change
OPAL-RT Real-Time simulation of Power Systems
Custom Netlist generation
4/30/2009 10
• The EMTP-RV Netlist contains only the data required by its
computational engine (solver)
• Netlist generation rules can be modified by users (see C:\Program Files\EMTPWorks\Report Scripts\EMTP \Netlist.rfm)
• The Netlist generation script is called the Report Script
Language.
• We modified the Netlist to provide to the data converter the
missing elements (device position, orientation, subsystem-
device (ex: transformer, etc…)
OPAL-RT Real-Time simulation of Power Systems
Machine Initialization in SPS from EMTP-RV data
4/30/2009 11
EMTPWorks
Steady State
Load FlowHTML
files
Initialize automatically
Mechanical Power and
Field Voltage values.
Calculate speed,
machine angles, and currents
OPAL-RT Real-Time simulation of Power Systems
Real-time interface process (from EMTP-RV to real-time)
4/30/2009 12
Model separation for real-time – right click on any power line
Automatically, the network topology is divided into 2 parts
Power systems can be separated on lines and signals
Control systems can be separated on signals
Separation can also be performed in subsystems
OPAL-RT Real-Time simulation of Power Systems
Interface the model with I/Os
4/30/2009 13
OPAL-RT Real-Time simulation of Power Systems
Generation of Simulink files ready for real-time
4/30/2009 14
netlist netlist
Conversion
RT-LAB files
master slave
console
RL-LAB separation files
1 Simulink file is generated
per processor
OPAL-RT Real-Time simulation of Power Systems
Examples – 23 bus network
4/30/2009 15
In one click
10 subsystem levels
294 blocks
325 signalsare converted in an equivalent
Simulink model within 20 s
OPAL-RT Real-Time simulation of Power Systems
Examples – 23 bus network
4/30/2009 16
OPAL-RT Real-Time simulation of Power Systems
Examples – ASM machines / EMTP-RV demo
4/30/2009 17
+
AC2
?vi
0.2kV /_0
+
R2
1
scope wr
scope Tem
scope THETAr
Tm
+
AC1
?vi
0.2kV /_0
c1
C1
+
R1
1
i(t) p1 i(t) p2
sc
op
e
ia
sc
op
e
ib
sc
op
e
ic
sc
op
e
iar
sc
op
e
ibr
sc
op
e
icr
i(t) p3
sc
op
e
iaA
SM
sc
op
e
ibA
SM
i(t) p4
sc
op
e
iarA
SM
sc
op
e
ibrA
SM
sc
op
e
icrA
SM
sc
op
e
icA
SM
ASMS R
N
ASM1
?m
0.2kV
0.750kVA
THETAr
Tem
iar
ias
ibr
ibs
icr
ics
wrm
c1
C2
crbr
ar
Tm
Mes
csbs
as
ASM_block
+
R3
1
+
R4
1
This EMTP-RV demo compares 2
asynchronous machine models:
1) Model built with controls
2) Hard-coded model
Hard-coded model
OPAL-RT Real-Time simulation of Power Systems
Examples – ASM machines / EMTP-RV demo
4/30/2009 18
OPAL-RT Real-Time simulation of Power Systems
Examples – ASM machines / EMTP-RV demo
4/30/2009 19
OPAL-RT Real-Time simulation of Power Systems
Conclusions
4/30/2009 20
EMTPWorks is an highly customizable tool.
With dwj scripts, circuit separation and validation tools were
developed
A new augmented Netlist for data exchange was created using
Report Script Language
HTML for new block panels and for SimPowerSystems machines
initialization
Most of EMTP-RV models and functionalities can be translated in
Simulink/SimPowerSystems
The EMTP-RV real-time interface is now commercialized
OPAL-RT Real-Time simulation of Power Systems
Thank you.
Questions?
Learn more about Opal-RT products and solutions on
www.opal-rt.com
Technical papers: www.rt-lab.com
Newsletter: www.planetrt.com
Mathieu Giroux
Stendaler Straße 4
10559 Berlin, GERMANY
Phone: +49 (0)30 2904 4231
Cell: +49 (0)17 5526 7025
Skype: giroux_opalrt