IOS components in Swift Sliders, switches, segmented controls, pop-ups.
(co-)simulation of power systems, controls, components for ...
Transcript of (co-)simulation of power systems, controls, components for ...
Modelling and (Co-)simulation
of power systems, controls and components for
analysing complex energy systems
University College Dublin – 11th October 2013
Stifter Matthias – AIT, Energy Department, Complex Energy Systems
Workshop on Software Tools for Power System Modelling and
Analysis
About Co-Simulation
3 08.10.2013
Co-Simulation Motivation
Multi-domain problems not covered in one tool
Electrical power system
Communication system
Controls / SCADA
Different simulation time steps
Different concepts: continuous time and discrete event time systems
Use existing highly complex and detailed models
Integration of real components
Scalability and flexibility
Combine different dedicated simulation tools and domains
Analyse different subsystems and their interactions
4 08.10.2013
Co-Simulation Overview
Various types of modelling and simulation:
5 08.10.2013
re-unification of the separately modeled
subsystems equations co-simulation
„classical“ Simulation
model separation for simulation
closed simulation
distributed simulation
distributed modelling
closed modelling
number of integrators
number of modelers
=1
>1
=1 >1
Source: M. Geimer, T. Krüger, P. Linsel, Co-Simulation, gekoppelte Simulation oder
Simulatorkopplung? Simulation 2006.
Co-Simulation (1)
Coupling on model level
6 11.10.2013
Source: M. Geimer, T. Krüger, P. Linsel, Co-Simulation, gekoppelte Simulation oder
Simulatorkopplung? Simulation 2006.
Application 1 Application 2
Integrator level
Model level Model level
Integrator level
Model definition, equationsModel code export,
Model and integrator code export
Co-Simulation (2)
Coupling on integrator level
7 11.10.2013
Source: M. Geimer, T. Krüger, P. Linsel, Co-Simulation, gekoppelte Simulation oder
Simulatorkopplung? Simulation 2006.
Application 1 Application 2
Integrator level
Model level Model level
Integrator level
Equation evaluation (e.g. function call)
Integrator evaluation(distributed simulation)
Simulation challenge: power system and controls
System with controller to fulfilll certain functionalities: e.g., voltage control task
consists typically of the following parts:
Power system model
Component models
Controller /
SCADA
8 10.10.2013
Power Grid Simulation
Power System Analysis
ComInterface
transient/steady state
SCADAsystem
TCP, UPD, IEC 61850, IEC 60870-5-104
Controller
ComInterface
ComInterface
-
TCP, OPC
Component Simulation
-
TCP, OPC
Co-Simulation approach
In this simulation coupling, the individual simulators run in real time and parallel,
exchanging results and set-points.
PowerFactory Matlab / SimPowerSystem
PowerFactory 4DIAC (distributed control system)
4DIAC ScadaBR
9 10.10.2013
Controller Emulation
Power SystemAnalysis
ComponentSimulation SCADA Emulation
ASN.1 over TCP/IP
ASN.1 over TCP/IP
ASN.1 over TCP/IP
Grid Component
Simulation
(e.g., Distributed
Energy Resources)
Electricity Grid
Simulation
Supervisory Control
and Monitoring
Simulation
(Embedded) Control
System Development
and Simulation
Simulation challenge: dynamic EV charging
Need for simulation of :
impact of the electric vehicle energy demand
energy depends on trip length, temperature, etc.
test charging management strategies
charging power is not static
Hybrid system: discontinuity
taking place at discrete events
Need for simulation of the EV trip
to get the energy needed to recharge
Combine the power system simulation with the simulation of the discharging
10 10.10.2013
P
t
P
t
Recuperation
Dischargea) b)
Charge
Continuous System
Hybrid System
Simulation challenge: dynamic EV charging
11 20 May 2013
small scale distribution grid
medium/low voltage network with consumers
realistic battery model household load profiles
taken from measurement
campaign
charging control algorithm
distributed charging power
regulation
stochastic driving patterns
derived from real data
Simulation tools
12 08.10.2013
PSAT Power system analysis toolbox
Matlab/Simulink and Octave
continuous time-based
simulation
GridLAB-D multi-agent based power system
simulation
includes various energy-related
modules
discrete event-based simulation
4Diac / Forte framework for distributed
control systems
intended for event based
controls in real time
open source IDE and Runtime
Modelica dedicated multi-domain (physics)
simulation language
supports event handling
acausal simulation (continuous
time-based simulation)
Main challenge
coupling discrete event-based simulation with continuous time-based models.
Co-Simulation Interfaces and Mechanisms
13 10.10.2013
Co-Simulation: synchronous, sequentially
Co-Simulation run sequentially and blocks until the results are available
simulate same time step twice
simulate at next time step
14 10.10.2013
step ∆t
power flow
send result Ubus,Pmeas
notify INreceive
wait
send resultPset
notify OUTreceive
power flow
next step
simulate
send ready
wait send ready
Data exchange (OPC, TCP/IP)
Co-Simulation(parallel)
PowerFactoryt0 t1 t2
controller co-sim integration time
simulation time
t3
data exchange1 2
t0 t1 t2
continuous model co-sim integration time
simulation time
t3
1 2
t1-
data exchange
M. Stifter, R. Schwalbe, F. Andrén, and T. Strasser, “Steady-state co-simulation with PowerFactory,”
in Modeling and Simulation of Cyber-Physical Energy Systems, Berkeley, California, 2013.
Co-Simulation: asynchronous, parallel
Co-Simulation via external DLL
15 10.10.2013
stability (rms)
step ∆t
DSL model(external)
input invoke
result
store state
next step
simulate
PowerFactory
returnemit event
exec. event
Co-Simulation (sequential) via external DLL (digexdyn.dll)
t0 t1
∆tInt
t2
DSL integration time
simulation time
t3t3'
event
.
M. Stifter, R. Schwalbe, F. Andrén, and T. Strasser, “Steady-state co-simulation with PowerFactory,”
in Modeling and Simulation of Cyber-Physical Energy Systems, Berkeley, California, 2013.
Co-Simulation: real time synchronisation
Dynamic behaviour
C-HIL / Regler
Filters
Synchronisation with system time / scaled time base
16 10.10.2013
t0 t1 t2
parallel co-simulation
real-time
t3
1
2
∆tlag
∆tcommunication delay
Functional Mock-Up Interface for Model Exchange
FMI: A standarized API for describing
models of DAE-based modeling
environments (Modelica, Simulink, etc)
Functional Mock-Up Unit
model interface (shared library)
model description (XML file)
Executable according to C API
low-level approach
most fundamental functionalities
only
tool/platform independent
17 08.10.2013
Gaining popularity among tool vendors
CATIA, Simulink, OpenModelica, Dymola, JModelica, SimulationX, etc.
Simulation environment for FMI for Model Exchange
Simulation master algorithm not
covered by FMI specification
tool independence
Requirements
initialization
numerical integration
event handling
orchestration
Well suited for simulation tools
focusing on continuous time-based
modelling
What about plug-ins for discrete
event-driven simulation tools?
18 08.10.2013
The FMI++ library
High-level access to FMUs
model initialization, get/set
variable by name, etc.
High-level FMU functionalities
integrators, advanced event
handling, rollback mechanism,
look-ahead predictions, etc.
Open-source C++ library
tested on Linux and Windows
(MinGW/GCC and Visual Studio)
available at sourceforge.net
19 08.10.2013
synchronous interaction between discrete event-based environment and
a continuous equation-based component
Example Application: Controlled Charging
20 08.10.2013
GridLAB-D as co-simulation master
Discrete event-based simulator as
co-simulation master
GridLAB-D’s core functionalities
deployed as master algorithm
EV model:
agent based behavior over time
(individual driving patterns)
energy demand due to the trip
charging station handling
Interface
plugin validated tools and
continuous models via
standardized interface (FMI &
FMI++, etc.)
21 08.10.2013
Traffic Pattern / Electric Vehicles (GridLAB-D)
Charging Station
EV
Charging Station
EV
EVEV
EV Pset
Pcharge
Pset
Pcharge
+ -
+ -+ -
Charge Control
Charge Control
PSAT (Octave)
Power system analysis
power flow to determine bus
voltages
Network model:
medium voltage network with
low voltage networks
load presenting household and
charging station
Interface:
Connect to GridLAB-D via
Octave API
+ thin wrapper to access C
arrays instead of data types
22 08.10.2013
4Diac / FORTE
23 08.10.2013
Distributed control system
IEC 61499 reference model for
distributed automation
Model / control
Local voltage control (anxilliary
service) keep voltage limits
Interface:
TCP/IP socket communication
(ASN.1 format)
suitable for embedded system
environments
OpenModelica
multi-domain (physics) simulation
language
supports event handling
acausal simulation (continuous
time-based simulation)
Model
Industry proofed library for a
detailed Li-Ion battery model
constant current / constant
voltage charger
Interface
plug-in continuous time-based
models via FMI++
24 08.10.2013
Co-Sim Power System, EVs, Components and Controls
Open source based approach of electric vehicle energy management for
voltage control
25 08.10.2013
Traffic Pattern / Electric Vehicles (GridLAB-D)
(OpenModelica)(OpenModelica)
Charging Station
EV
Charging Station
EV
EVEV
EV Pset
Pcharge
Power System Analysis
(PSAT/Octave)
Pset
Pcharge
+ -
+ -+ -
Battery Model
Battery Model
Charge Control
Charge Control
Uactual
Pcharge
Uactual, Pcharge
ASN1 (TCP/IP)
FMIFMI
AP
I In
terf
ace
Distributed Control System(4DIAC)
Results
Voltage during charging process
26 08.10.2013
Simulation time step varies with time due to updates of control algorithm
Results
Reduced charging power has
impact on battery’s SOC
Increased number of updates
controller notifies the simulation
core more frequently, thus
increasing the simulation step
resolution.
Investigate interesting dynamic
effects more precisely.
27 08.10.2013
Co-Sim Power System and Control
Electric Vehicle charge management for voltage control
28 10.10.2013
Battery Model(OpenModelica)Battery Model
(OpenModelica)
(GridLAB-D)
Charging Point Group
Charging Point Group
EVEV
battery model(OpenModelica)
charging point groupelectric vehicle
Pset
Pcharge
FMI
Pcharge,V
distribution grid(PowerFactory)
trip data
API
schedule ChargingManagement
battery charger
driving behaviour distributions(departure, duration, length)
ChargingManagement
chargingmanagement
charging point
sim
ula
tio
n c
on
tro
l
Pcharge,Pset
P. Palensky, E. Widl, A. Elsheikh, and M. Stifter, “Modeling intelligent energy systems: Lessons learned from a flexible-demand EV charging management,”
Smart Grids, IEEE Transactions on (accepted), 2013.
Co-Sim Power System, Components and Control System
Detailed battery model based on chemical equations + Energy management
Power Flow for every time step
29 10.10.2013
control system
PV system + inverter
SCADA
simulation results
power system
Co-Sim Power System with Electrical Energy Storage
Detailed battery model based on chemical equations + Energy management
Power Flow for every time step
30 10.10.2013
F. Andrén, M. Stifter, T. Strasser, and D. Burnier de Castro, “Framework for co-ordinated simulation of power networks and components in smart grids using
common communication protocols,” in IECON 2011 - 37th
Co-Sim Power System, Communication and Control
Co-Simulation with PowerFactory API: Loose Coupling via Message Bus
31 10.10.2013
M. Ralf, K. Friederich, F. Mario, and S. Matthias, “Loose coupling architecture for co-simulation of heterogeneous components – support of controller
prototyping for smart grid applications,” in submitted to IECON 2013 - 39th Annual Conference on IEEE Industrial Electronics Society, Vienna, Austria, 2013.
Electric Vehicle Simulation Environment
32 10.10.2013
33 10.10.2013
EV Simulation Environment
Mobility
Simulation
Power Grid
Simulation
CP & EV
Simulation
Scenario &
Use-Case
Results
traffic data
trip data
power demand
EVSim - Architecture
Architecture
Specification for the simulation scenario
EV + battery, plug types including efficiency (temperature, losses)
locations and charging points
distributed generation (location based)
34 10.10.2013
Power SystemPower SystemCharge ManagementTransportationSimulation
Charging PointSimulation
Charging Station
Agents / EventsAgents / Events
Charging Station
Electric Vehicle SimulationEVSim
EVEV
EV EV + -
EV + - Pset
PowerFactory
EV Charge Controller
PDG
Uactual
Charging Controller
SOC
Pcharge
EVSim - Functionality
Configuration
simulation time: start / stop / step-size / loop / real-time
temperature dependency / performance of the battery
Output (csv)
SOC, power
Interfacing / co-simulation
OPC
OCPP (Open Charge Point Protocol)
Behaviour
connection / disconnection handling, authorisation
time to plug / unplug
charging noise
Charging algorithm
G2V, V2G, matching with local generation
35 10.10.2013
EVSim – Parameters and Interface
Internal variables and parameters
36 10.10.2013
events, behavior
Pset
Emax
SOC, Eactual
plugtype
1/3 phase
SLA
Ewish
status
temperature profile
Pactual
Electric Vehicle
- battery capacity - battery Type - range ideal - range real - charge Pmax
- discharge Pmax
- reactive power Qmax,min
- charge efficiency - charge temp. perf. - battery performance - time of stay / leave
Charging Point
- group ID - location - plugtype / phases - active power Pact
- reactive power Qact
- current I1act,I2act,I3act
- voltage Ubus
- connection Status - time of connection - time of departure
Charge Controller
Optimize
Echarge=∑[Emax,Ewish]
Global or location based contraints:
Pactual(t)=[Pmin,Pmax]∑Pactual = Pgeneration
Umin < Uactual < Umax
SLA(EV)
Pset
Pmax, Pmin
SLA
RFID
SOC, Eactual
Ewish
Emax
Charging Group - Total Pactual
Pmax, Pmin
Pactual
Generation - Total Pgeneration
Pgeneration
Pactual
Uactual
agentsT
Validation of charging management
Real and simulated EVs for charging management validation
37 10.10.2013
Charge Controller
Real World
Electric Vehicle Simulation EnvironmentEVSim
Charging Station
EV
Data ExchangeInterface
(OPC)
Charging Station
Charging Station
EV
ECAR DVCharging
Management
DEMSDistributed
Energy Management
System
Charging Station
EV
EV
RenewableGeneration
0
50
100
150
200
250
300
350
400
450
500
550
06:0
0
06:3
0
07:0
0
07:3
0
08:0
0
08:3
0
09:0
0
09:3
0
10:0
0
10:3
0
11:0
0
11:3
0
Pow
er
[kW
]
time [hh:mm]
Tolerance rangePactPset
-40
-20
0
20
40
60
06:0
0
06:3
0
07:0
0
07:3
0
08:0
0
08:3
0
09:0
0
09:3
0
10:0
0
10:3
0
11:0
0
11:3
0
Pow
er
[kW
]
time [hh:mm]
Level Pset
ΔP
Tolerance range, Pset and Pact during simulation and deviation
Simulation of EVs and power system
Impact of unbalanced charging in low voltage networks
38 10.10.2013
Voltages a the charging point for symmetrical
loaded phases (3 times 3.68kW). Note the
voltage rise due to PV generation
1439,1151,863,576,288,0,00 [-]
222,66
221,82
220,97
220,13
219,28
218,44
DA61368_60240880: Leiter-Neutral Spannung, Betrag L1 in V
DA61368_60240880: Leiter-Neutral Spannung, Betrag L2 in V
DA61368_60240880: Leiter-Neutral Spannung, Betrag L3 in V
1439,1151,863,576,288,0,00 [-]
222,66
221,82
220,97
220,13
219,28
218,44
DA61368_60240880: Leiter-Neutral Spannung, Betrag L1 in V
DA61368_60240880: Leiter-Neutral Spannung, Betrag L2 in V
DA61368_60240880: Leiter-Neutral Spannung, Betrag L3 in V
Voltages for unsymmetrical loaded phase (red:
11.04kW). Note the rise in the other phase
(green) due to neutral point displacement.
Temperature dependency
Region Lungau (Upper Austria) – approx. 6000 EVs
39 10.10.2013 Charging power for opportunity charging on a winter and summer day
Micro-simulation of region
Lungau, generating trip data
Simulation of EVs, control and power system
Local supply - demand match in medium voltage networks
40 10.10.2013
Uncontrolled and controlled charging of 306 EVs
with 11 kW during two sumer days.
Note: wind is accumulated on top of PV generation
0
100
200
300
400
500
600
700
800
00:0
0
04:0
0
08:0
0
12:0
0
16:0
0
20:0
0
00:0
0
04:0
0
08:0
0
12:0
0
16:0
0
20:0
0
Pow
er
[kW
]
time [hh:mm]
Generation from Wind
Generation from PV
Uncontrolled 11kW
Controlled 11kW; SOC-Level: 50%
Controlled 11kW; SOC-Level: 25%
Charging Mode
empty Evs
P-peak [kW]
Charged Energy [kWh]
DER Energy [kWh]
DER Coverage
[%]
uncontrolled 11kW
135 883 12613 3971 26%
controlled 11kW/SOC50
197 552 7267 3971 50%
controlled 11kW/SOC25
218 353 5051 3971 71%
Charging Mode
empty EVs
P-peak [kW]
Charged Energy [kWh]
DER Energy [kWh]
DER Coverage
[%]
uncontrolled 11kW
15 751 9964 8079 54%
controlled 11kW/SOC50
55 366 6832 8079 89%
controlled 11kW/SOC25
66 324 6229 8079 99%
Two days simulation in winter
Two days simulation in summer
Summary
Multi-agent based simulation tool, time-continuous multi-physics
simulation, controls and power system simulation, e.g.:
GridLAB-D, OpenModelica, PSAT, 4Diac, PowerFactory
Open source software can be used for co-simulation environments
A number of interfaces possibilities exist to couple simulation tools.
Model and integrator based coupling can be realised.
Proprietary interfaces are light-weighted but not very general, not usable
for other tools, no simulation time step synchronisation
Functional Mockup Interface for model exchange + co-simulation.
41 08.10.2013