Discrete Event Simulation, Smart Grids and Other Topics Dan Gordon - - PowerPoint PPT Presentation

discrete event simulation smart grids and other topics
SMART_READER_LITE
LIVE PREVIEW

Discrete Event Simulation, Smart Grids and Other Topics Dan Gordon - - PowerPoint PPT Presentation

Discrete Event Simulation, Smart Grids and Other Topics Dan Gordon My Simulation Journey Quantum Mechanics of Bose-Einstein Condensation Airline Crew Scheduling Biophysics of Ion Channels Brownian Dynamics Molecular Dynamics


slide-1
SLIDE 1

Discrete Event Simulation, Smart Grids and Other Topics

Dan Gordon

slide-2
SLIDE 2

My Simulation Journey

  • Quantum Mechanics of Bose-Einstein Condensation
  • Airline Crew Scheduling
  • Biophysics of Ion Channels
  • Brownian Dynamics
  • Molecular Dynamics
  • Smart Grids and Renewables
  • SmartGridToolbox - Discrete Event Simulation
  • CONSORT : Bruny Island Battery Trial
slide-3
SLIDE 3

Time-Stepped Simulations

  • Simulate a continuous or regular process
  • Calculate the state of the system at discrete time steps
  • Time steps need not be all equal: we could use an

adaptive step size that decreases when the system is rapidly changing

  • Example: simulate the trajectory of a thrown ball
slide-4
SLIDE 4

Trajectory of a Thrown Ball

Analytical Solution Numerical Solution (Simulation using Euler’s Method) Newton’s Equation of Motion

md2y dt2 = −mg − bdy dt

<latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit>

y(t) = y0 + mv0 b ⇣ 1 − e− b

m t⌘

+ m2g b2 ✓ 1 − e− b

m t − b

mt ◆

<latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit>

v(t + ∆t) = v(t) + ✓ −g − b mv(t) ◆ ∆t y(t + ∆t) = y(t) + v(t)∆t t → t + ∆t

<latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit>
slide-5
SLIDE 5

Trajectory of a Thrown Ball

slide-6
SLIDE 6

Molecular Dynamics

Forces

BONDS ! !V(bond) = Kb(b - b0)**2 ! !Kb: kcal/mole/A**2 !b0: A ! !atom type Kb b0 ! !Carbon Dioxide CST OST 937.96 1.1600 ! JES !Heme to Sulfate (PSUL) link SS FE 250.0 2.3200 !force constant a guess !equilbrium bond length optimized to reproduce !CSD survey values of !2.341pm0.01 (mean, standard error) !adm jr., 7/01 C C 600.000 1.3350 ! ALLOW ARO HEM ! Heme vinyl substituent (KK, from propene (JCS)) CA CA 305.000 1.3750 ! ALLOW ARO ! benzene, JES 8/25/89 CE1 CE1 440.000 1.3400 ! ! for butene; from propene, yin/adm jr., 12/95 CE1 CE2 500.000 1.3420 ! ! for propene, yin/adm jr., 12/95 CE1 CT2 365.000 1.5020 ! ! for butene; from propene, yin/adm jr., 12/95 CE1 CT3 383.000 1.5040 ! ! for butene, yin/adm jr., 12/95 CE2 CE2 510.000 1.3300 ! ! for ethene, yin/adm jr., 12/95

slide-7
SLIDE 7

Molecular Dynamics

slide-8
SLIDE 8

Brownian Dynamics

slide-9
SLIDE 9

Discrete Event Simulations

  • We have seen some examples of time-stepped simulations. What about cases where the action depends on the irregular
  • ccurrence of events?
  • Basic Sequence:
  • Work out when next event (event i) occurs
  • Perform any necessary calculations at event i
  • Event i may trigger other events
  • Iterate
  • Canonical example: queues
  • Arrivals in the queue occur according to a random distribution. Each arrival is an event.
  • Random distribution varies according to time of day
  • Someone reaching front of queue is another event
  • Someone finishing transaction is another event, with its time calculated according to a random distribution of service

times

  • Calculate statistics of waiting times, etc.
slide-10
SLIDE 10

Discrete Event Simulations: BusPlus (Phil Kilby, NICTA)

  • Proposed system for off-peak public transport
  • Seven hubs in Canberra with frequent buses running between hubs
  • Taxi-based ride sharing to and from hubs
  • Integrated booking for buses and taxis
  • Advanced scheduling and routing software for taxis
  • Event-based simulator was developed
  • Events are:
  • Passenger bookings
  • Passenger arrives at collection point (bus stop)
  • Passenger collections and drop offs
  • Taxis / bus departures, arrivals, waypoints
  • Simulator employs advanced scheduling software to route the taxis
  • Same software intended for the finished product
slide-11
SLIDE 11

Discrete Event Simulations: BusPlus (Phil Kilby, NICTA)

slide-12
SLIDE 12

Agent-Based Simulation

  • Identify agents in a simulation: individual entities that

determine their own behaviour

  • This is a kind of object-oriented approach to simulation,

since the code for each agent is encapsulated within itself

  • Agents may interact with other agents, ideally via well-

defined (code) interfaces

  • Classic example: gaming!
slide-13
SLIDE 13

Electricity Grids Past and Present

13

Pi − X

j

|Vi||Vj|[Gij cos(θi − θj) + Bij sin(θi − θj)] = 0 Qi − X

j

|Vi||Vj|[Gij sin(θi − θj) − Bij cos(θi − θj)] = 0

<latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit>
slide-14
SLIDE 14

Electricity Grids Present and Future

  • Modern electricity grids are becoming much more complicated
  • Distributed generation & storage, grid level renewables &

storage, the emergence of electricity markets…

  • Developments in computing and communications make a more

active, optimal control strategy possible for electricity grids

  • This describes the smart grid.
  • It is inherently harder to model and simulate

14

slide-15
SLIDE 15

SmartGridToolbox Software

  • Combines traditional power

flow equations with discrete- event, agent-based simulation

  • C++ libraries for flexibility and

extensibility

  • Build custom applications on

top of libraries

  • SgtCore library: utilities and

power flow equations

  • SgtSim library: discrete event

simulation, component library (batteries, solar, tap changers, controllers, optimisation…)

slide-16
SLIDE 16

SmartGridToolbox Discrete Event Simulations

  • A simulation consists of components
  • E.g. lines, transformers, loads, generators, houses with PV,

battery, local controller, voltage regulators with control, central controllers / coordination, weather modelling…

slide-17
SLIDE 17

SmartGridToolbox Discrete Event Simulations

  • Each component defines the following member functions (and more):


void initializeState() Time validUntil() void updateState(t)

  • At the start of the simulation, all components get a chance to initialize

themselves via the initializeState() funtion

  • Then, validUntil() is called for each component to work out when the

components are next scheduled to update

  • These updates are sorted by time. If there are several components due

to update at the same time, they are sorted according to previously defined dependencies

  • These scheduled updates are performed one by one, in order, by calling

the updateState(t) function of each component

slide-18
SLIDE 18

SmartGridToolbox Discrete Event Simulations

  • During an update, a component may trigger other components to

register a contingent update at the current timestep.

  • Contingent updates are pushed to the end of all updates at the

current timestep

  • This careful ordering of scheduled and contingent updates is,

roughly, an example of the three phase* method for discrete event simulations

  • Updates may be triggered directly from within the updateState(t)

function, or may be set up to trigger as a result of other events

  • triggering. This is done through a special event-action mechanism

that is a specialisation of the observer pattern of software design.

* Michael Pidd (1998). Computer simulation in management science – fourth edition. Wiley.

slide-19
SLIDE 19

SmartGridToolbox: Tap Changer Example

  • Distribution networks sometimes use special transformers

called voltage regulators to adjust the network voltage at strategic locations. These are often controlled by special devices known as automatic tap changers, that sense the local voltage and make adjustments to the tap changer to keep the voltage within an allowable range

  • Typically, distribution lines have three wires, each carrying

its own AC voltage stream. This is an example of three phase power.

  • Suppose we have a three-phase voltage regulator, with

three sets of taps, each sensing the voltage between two phases (wires) and adjusting the associated tap if the voltage gets too high or low.

slide-20
SLIDE 20

SmartGridToolbox: Tap Changer Example

  • When a network load (e.g. the consumption of a house)

changes, due to a scheduled update, an “injectionChanged” event is triggered.

  • The network is registered to insert a contingent update

into the event queue when this occurs. This update will

  • ccur after all scheduled updates are finished.
  • When the network updates, the voltage at its nodes

typically changes. This triggers a “voltageChanged” event.

  • The tap changers are registered to insert a contingent

update into the event queue when this happens. During the updates, the changers decide whether a tap change is necessary, based on the voltage.

slide-21
SLIDE 21

SmartGridToolbox: Tap Changer Example

  • If one of the tap changers changes the

transformer tap, the transformer triggers an “admittanceChanged” event.

  • The network inserts a contingent update when

this occurs. Due to dependency ordering, this update happens only after all pending tap changes have occurred

  • After the network updates, the voltages may

change, and the tap changers may again need to change their tap settings. So we may need to iterate a few times before things settle down.

slide-22
SLIDE 22

Change tap A admittanceChanged Change tap C admittanceChanged

SmartGridToolbox: Tap Changer Example

Network contingent update voltageChanged Contingent update A Contingent update B Contingent update C House1 sched. update loadChanged House2 sched. update loadChanged etc… Network contingent update voltageChanged

Loads Network Tap Changers Transformer

slide-23
SLIDE 23

CONSORT: Bruny Island Battery Trial

  • ANU led, ARENA funded project to

investigate using residential PV + batteries to help support the network

  • ANU, TasNetworks, Reposit Power,

UTAS, USYD

  • Bruny Island off Hobart is supplied

with electricity by 1950s cable from mainland.

  • Cable becomes overloaded during

holiday periods; TasNetworks needs to run expensive and polluting diesel generator

  • We asked the question: can batteries

attached to households with PV be used to help support the network during periods of stress?

slide-24
SLIDE 24

CONSORT: Bruny Island Battery Trial

slide-25
SLIDE 25

CONSORT: Bruny Island Battery Trial

  • During the trial, 35 PV + battery, each

with a “Reposit box” controller, were subsidised.

  • A “Reposit box” is a smart energy

management system that charges and discharges battery to minimise costs to household

  • How do we recruit and coordinate

household batteries to help the network when it’s struggling?

  • Preserve agency and privacy of

households

  • Households should only ever act in

their own best interest

  • Ensure that network constraints are

satisfied at minimal cost

slide-26
SLIDE 26

CONSORT: Network Aware Coordination (NAC)

Sg

i − Sl i − P j Sij = 0

Sij = zijViY ∗

ijV ∗ j

|Sij| ≤ Su

ij

<latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit><latexit sha1_base64="(nul)">(nul)</latexit>

Dealer

Prices Incentives Dispatch Dispatch

slide-27
SLIDE 27

CONSORT: Simulation

slide-28
SLIDE 28

CONSORT: Simulation

slide-29
SLIDE 29

CONSORT: Simulation

Battery Load (kW) Diesel "Load" (kW) 100 50 50 100 NAC Sim NAC Perf Manual Indep 06 09 12 15 18 21 Time (hh) 300 200 100 NAC Sim NAC Perf Manual Indep

slide-30
SLIDE 30

CONSORT: Simulation

slide-31
SLIDE 31

CONSORT Animation