You are on page 1of 28

OPAL-RT

?
Typhoon HIL

Homogeneous Microgrid
Modeling for RT-HIL
Adventures in Software-to-Software Validation of Microgrid Models

Behrouz Azimian, Prottay Adhikari, Luigi Vanfretti | 10/14/2018

http://ALSETLab.com , luigi.vanfretti@gmail.com
Overview

▪ Preliminaries

− Motivation - need for reproducibility.

− Problem Statement

− Methodology OPAL-RT

▪ Background - HW/SW Platforms


?
▪ From Opal-RT/MATLAB/Simulink To Typhoon HIL

▪ From Typhoon HIL to Opal-RT/MATLAB/Simulink Typhoon HIL

▪ Typhoon HIL vs Opal-RT/MATLAB/Simulink

▪ Conclusions

▪ Recommendations

2
9/10/2018
Motivation

For this talk:

▪ Can Real-Time Hardware-In-the-Loop experiments be reproduced?


− Yes, but only if you use the same real-time simulation platform, and HIL experiment (devices,
comms, etc.)

▪ What if I don’t have the same Real-Time Simulator platform?

3
9/10/2018
Problem Statement

▪ 50% of research in Physics and Engineering


cannot be reproduced!
− How to mitigate this in RT-HIL in electrical power grid?
▪ Hypothesis: Homogenous RT Modeling
− Is is possible to achieve homogeneity in modeling or on
simulation “outputs”?
▪ Problem Formulation:
− Given the same test specimen to two different
laboratories, what is the major difference on the
experimental set-up under which the test specimen will be
tested?
− For the same specimen Testing using HIL with two
different systems, produce “similar” simulation outputs
under controlled HIL conditions with a low difference
(error).
▪ Reproducibility Requirement for RT-HIL:
− The behavior from the simulation, at the outputs to be
interfaced with hardware MUST expose identical behavior
in different experimental test benches.
− NOT only “of parts all of the same kind” → we need
the same output behavior.
▪ So, can you get the same simulation results
from two RTS?
4
9/10/2018
Methodology: Approach and Goal

▪ Two models (micro model and micro-grid)


have been implemented in two Real-Time
Simulators.

▪ The models presented in this work and its


simulation with different tools provides the
software-to-software verification basis for the
establishment of methods for homogenous
RT models.

▪ We propose a methodology for “homogeneity”


in RT-HIL experiments.

▪ The methods and model(s) can be used by


other researchers for testing numerical
methods and conducting research on smart
grid, control, protection, and dynamic studies.

5
9/10/2018
Background: HW Architectures

▪ Opal RT real time simulator is ▪ Typhoon HIL simulation model is


deployed using Xilinx Spartan FPGA deployed on a two-stage hardware
and Intel Xeon Processors. architecture: FPGA cores and ARM
▪ In RPI’s system, 32 Intel Xeon E5 processors.
Processors can run in parallel in ▪ The signal processing blocks (i.e. P-Q
order for real time simulation. and voltage measurement blocks)
▪ The Xilinx Spartan III FPGA can be executed on ARM processor with Ts
used for modeling purposes, as the execution rate.
however, in this work, it is only used ▪ The electrical circuit solver executes
for I/O management. on FPGA.

6
9/10/2018
Background: Development Tools

OPAL-RT Typhoon HIL

▪ MATLAB/Simulink ▪ Schematic Editor

▪ SSN ▪ Core Coupling:

− Similar to Stub line in OPAL-RT

▪ HIL SCADA
▪ RT-LAB

7
9/10/2018
From
Opal-RT/MATLAB/Simulink OPAL-RT

To
Typhoon HIL ?

Typhoon HIL

8
9/10/2018
Experiment I : Single Machine Model System
Simulink Model
Typhoon Model

9
9/10/2018
Typhoon

Simulink/OPAL
Parameterization

Setting the Parameters of Synchronous Machine

Setting the Parameters of Transformer

9/10/2018
10
Governor Model (From Simulink to Typhoon)
Available Governor Model in Simulink Library

Inside the Default Governor Block


The Simulink Governor Implemented on Step Response of
Typhoon Schematic from Scratch Both Governors
[Matched Perfectly] Red bubble- Typhoon
Black Line - Matlab

11
9/10/2018
Test Settings

▪ A 50 MVA, 20kV machine is connected to a 100 MVA 20kV/230kV Step up transformer


and is initially in open circuit condition.
▪ The machine is up and running, so in open circuit, the output nodes are floating at rated
voltage
▪ At time ‘t’, a balanced star connected load (connected to the secondary side of the
transformer) is switched on.
▪ In our experiment we simulated the same circuit in both the platforms and observed the
current and voltage profiles during and after the switching.
▪ The simulation results from those two platforms were logged and compared.

12
9/10/2018
Comparison of Results

● At t=10 s, a balanced load of


75 MW is switched on.

● The generator output voltage


is plotted for both platforms.

● Although the trend looks


similar, note that there is a
few hundred volts of steady
state error.
[about 490 V]

● The transient responses are


also different.

13
9/10/2018
From
Typhoon HIL Typhoon HIL

To ?
Opal-RT/MATLAB/Simulink

OPAL-RT

14
9/10/2018
Experiment II: Model Components

▪ 9 Constant Impedance loads


▪ 7 Transformers
▪ 1 Induction Motor
(Chiller Compressor)
▪ 1 Synchronous Generator
(Diesel Generator)
▪ 11 Transmission Lines

15
9/10/2018
Steady State Analysis

▪ Parametrization:
− All components’ parameters in Typhoon HIL are copied to the “similar” blocks in Simulink including
transmission lines resistor and inductor, active and reactive power load values, transformer inductors
and resistors.
▪ Solver Settings: Simulation step size is set to 4 microseconds in both platforms.
▪ Decoupling:
− Typhoon / Snubber-based Decoupling:
− Decoupling requires “snubber” capacitors - the simulation will have some numerical artifacts due to
these “artificial” RC dynamics.
− Opal-RT’s SSN-based Decoupling:
− The a state-space nodal solver (SSN) which allows decoupling of the cores, without the need of
snubbers. This is called “delay-free parallelization” **
− The SSN blocks are used to decouple the network in five coupling cores/SSN blocks which divide the
the whole microgrid into 6 subcircuits in both platforms
− However, in order to match the behavior of the Typhoon model, capacitors are added to the model in
Simulink.
▪ Steady State Analysis: Comparison
− Total active and reactive power injected from the main grid; voltages and angles at some buses will
− The source of difference is investigated ** H. Hooshyar, L. Vanfretti and C. Dufour, "Delay-free parallelization for real-time simulation of
a large active distribution grid model," IECON 2016 - 42nd Annual Conference of the IEEE
Industrial Electronics Society, Florence, 2016, pp. 6278-6284.

16
9/10/2018
Parameterization

Typhoon

Transmission Line Transformer Induction Motor

OPAL

17
9/10/2018
Steady State Results

Typhoon HIL OPAL-RT

P [MW] Q [MVAr] P [MW] Q [MVAr]

Injected power 4.16 1.79 4.13 1.82


from the main
grid

Bus number Voltage [V] Angle [degree] Voltage [V] Angle [degree]

5 474.5 -30.42 473.87 -30.67

8 13753.13 -0.12 137753.14 -0.91

12 465.84 -61.75 466.12 -61.78

16 13793.07 -0.02 13785.16 0.02

18
9/10/2018
Source of Differences

▪ To identify the source of differences, a simple model is used: 3 ph. source to load.
▪ Parameters:
− Vsource = 480V, R=1 Ohm, L=0.001 Henry,
▪ For such a simple model, manual calculations are possible - expected answer:
− P = 201729 W, Q = 76050 VAr
▪ For comparison, the model is built to compare the results.
− Solver: Euler for discretization method, different time and execution steps.
▪ Both platforms deviate from the expected answer depending on the simulation
settings.
▪ In a larger system this may lead to a larger error - cumulative effect!
Simulation settings Typhoon HIL OPAL-RT

Microseconds P [W] Q [VAr] P [W] Q [VAr]

Ts = 100, exec_step=4 201771 76087 201686 76012

Ts = 100, exec_step=2 201749 76068 210708 76031

Ts = 50, exec_step=1 201739 76059 201718 76040

19
9/10/2018
Source of Differences (Ts vs. Execution step size)

▪ Typhoon has two time steps: One for signal processing and scopes (Ts) and for
model solver (exec_step).
▪ However, in Simulink these are assumed to be the same.
▪ In order to investigate the effect of two different step size for the whole model in
simulink one should use the “Rate Transition” block.

20
9/10/2018
Transient Response Analysis

▪ For transient response analysis an Induction motor (200 kW chiller compressor) is


considered.
▪ The Typhoon parameters are imported to simulink model including snubber resistance and
stator and rotor resistor and inductor.

21
9/10/2018
Fast Transient Response Analysis

▪ It can be seen that the OPAL-RT does not have the intense variation during the fast transient
response. In addition, the initial overshoot for OPAL-RT is lower.
▪ Fast transient response will be filtered for parameter estimation.

22
9/10/2018
Parameter Estimation

▪ In order to have the same transient response the “parameter estimation tool” (PET) in
MATLAB simulink is used.
▪ After four iterations it can be seen that the snubber resistance is the main source of
difference. The value is decreased from 795 ohms (Typhoon HIL default) to 47 ohms in order
to achieve the same results.

Measured: Typhoon data


Simulated: PET output
J: Motor Inertia
Lls: Stator Inductance
Rs: Stator resistance
Rsnub: Motor snubber
resistance

23
9/10/2018
Typhoon vs. OPAL-RT

▪ One advantage of Typhoon HIL against OPAL-RT modeling toolchain in Matlab/Simulink is that there is no
need to determine the initial conditions for complex blocks such as generators and motors.
▪ Simulink is highly sensitive to initial conditions and if they are not appropriately determined, it will result in
very erratic behavior. The machine initialization tool has to be used to determine the initial conditions of
Generators and other dynamic models in Simulink.
▪ For instance, in order to generate 500 kW and 100kVar with a synchronous machine, the initial condition
has to be calculated and applied as follows:

24
9/10/2018
Conclusions

▪ Testing and Validation of technology, software, etc. (test


specimen) using RT-HIL is dependent on the results from the
simulator.
▪ To have 3rd party verification without the same RTS technology,
models need to be transformed.
− Not only pass/convert parameters → dynamic response must be the same! ❌
− Otherwise, expected “test specimen” will not perform equally in the different
environments.
− Risk: to attribute to the test specimen the differences produced by the artifacts
of nonhomogeneous modeling.
▪ From Opal-RT/MATLAB/Simulink to Typhoon HIL:
− It is not possible to transform the models and obtain identical results, even
when implementing models only available in one platform.
▪ From Typhoon HIL to Opal-RT/MATLAB/Simulink:
− The Simulink model can be modified with additional “snubbers” which can be

calibrated to match the simulation results from the Typhoon HIL.
− Yes, if fast-transients are neglected. This may not be important in some
studies/experiments, but needs to be further addressed when considering
certain protections.

25
9/10/2018
Recommendations

▪ Recommendation 1: Calibration Tools


Provide model calibration tools in Typhoon HIL to calibrate the
model with reference to other models, and even real field
measurements. ✅

▪ Recommendation 2: Interoperability

▪ Adopt FMI standard (for model exchange):


http://fmi-standard.org/
▪ This standard would allow to export obfuscated
(or open) C code between different platforms,
helping to deal with some of the issues shown in
this presentation.
▪ More than 100 tools support this standard!

26
9/10/2018
Acknowledgements

▪ To all the people from Typhoon!


− Thanks for your patience and support in getting us familiar with your system!
− Thank you for loaning us your great real time simulator!

27
9/10/2018

You might also like