Electrical Grids and Load Shedding

No preview image

1 collaborator

Default-person Jane Antonas (Author)

Tags

electricity 

Tagged by Jane Antonas almost 2 years ago

electricity utilities 

Tagged by Jane Antonas almost 2 years ago

grid 

Tagged by Jane Antonas almost 2 years ago

power generation 

Tagged by Jane Antonas almost 2 years ago

transmission, generations 

Tagged by Jane Antonas almost 2 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.3.0 • Viewed 405 times • Downloaded 35 times • Run 0 times
Download the 'Electrical Grids and Load Shedding' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This model seeks to answer the questions: How do interruption events impact the frequency of the US's electrical grids? How can frequency recovery be modeled using agent-based modeling? How do the quantities of supply and demand affect frequency recovery?

The United States is made up of three major grids ("interconnections"). Each grid is required to provide a frequency of power that is very strictly regulated. The power "delivered" to homes and businesses must have a frequency of 60 Hz. A deviation of even 0.3 Hz can be catastrophic.

This model demonstrates the changes in frequency that happen when a generator fails to supply enough power and cannot maintain the required 60 Hz frequency. In reality, this can occur due to extreme weather events or mechanical failures.

HOW IT WORKS

This models uses four breeds: Houses, Generators, Hz, and Frowns. Hz and Frowns are sprouted purely as visual aids. Houses represent customers that make up the grid's energy demand. Generators (there is only 1 in this version of the model) represent the generation facility that supplies power to customers.

Two link breeds are also used. "Roads" connect houses and the generator and are used purely for setting up the model in a "radial" shape (useing the link primitive layout-radial). "Cables" connect Hz to the generator and change color based on the amount of power being supplied (relative to the 60 Hz target).

HOW TO USE IT

To see the whole process (generation, failure, recovery, stabilization) play out on the plotter, simply press Setup and then Go. Adjust the number of houses and the amount of power available using the two sliders. To watch each stage take place on both the plotter and the viewer, select the buttons that represent different stages of the process.

EXTENDING THE MODEL

Potential extension include:

  • assigning blackouts differently so they are grouped based on location rather than being randomly assigned

  • adding renewable resources that strengthen grid reliability and provide alternative sources of energy during interruptions

  • adding multiple generators to represent different interconnections (these generators could share power to supplement each other during interruptions)

  • adding a graph of supply and demand and plotting the market price based on these

RELATED MODELS

The "Network Example" model from the Netlogo Models Library was used as reference when configuring links between agents

CREDITS AND REFERENCES

“Electric Systems Respond Quickly to the Sudden Loss of Supply or Demand.” Homepage - U.S. Energy Information Administration (EIA), www.eia.gov/todayinenergy/detail.php?id=3990.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

breed [houses house]
breed [generators generator]
breed [Hz a-Hz]
breed [frowns frown]

undirected-link-breed [ cables cable ]
undirected-link-breed [ roads road ]

globals [potential poweredhouses unpoweredhouses poweredhousesfreq]

houses-own [frequency capacity]
Hz-own [location]

to setup
  ca
  ask patches [ ;;make background white
    set pcolor white
  ]
  create-generators 1
  ask generators [ ;;make generator
    set size 6
    set shape "factory"
    set color black
  ]
  create-houses num-houses ;;make amount of houses according to slider
  set-default-shape houses "house efficiency"
  ask houses [
    set size 7
    set color 5
  ]
  ask houses [ create-roads-with other generators ] ;;create links between houses and generator
  layout-radial houses roads (generator 0) ;;layout houses in a circle with generator in the center (need "road" links for this primitive)
  create-Hz 1 [ ;;places a Hz on the generator for visual representation of power generation
    set color yellow
    set shape "lightning"
    set size 3
    set location generator 0
    move-to location
  ]
  ask houses [ ;;change pcolor of house patches to red
    if pcolor = white [
      set pcolor red
    ]
  ]
  ask roads [set thickness 0] ;;make roads less visible (only needed them for layout-radial)
  reset-ticks
end 

to go
  if ticks < 4 [ ;;don't allow "go" to be repeated without setting up again
  normal-operations
  generator-failure
  tick ;;represents reaction time of transmission operator or
  tick ;;automatic fail-safe procedures
  load-shed
  stabilize
  ]
end 

to normal-operations
  ask Hz [ die ] ;;get rid of Hz
  ask houses [
    set pcolor red ;;here AND in setup so users don't have to click setup between load-shed back to normal operations
  ]
   ask houses [
    set capacity (60 * num-houses) ;;capacity of generator during normal operations should allow it to supply 60 Hz to all customers
  ]                                ;;so capacity depends on number of customers
  ask houses [
    set frequency (capacity / num-houses) ;;frequency of houses is an even distribution of generator capacity
  ]
  ask patches with [ pcolor = red ] [ ;;all houses sprout a Hz
    sprout-Hz 1 [
      set size 3
      set color yellow
      set shape "lightning"
    ]
  ]
  ask roads [ ;;links between houses and generator change color to indicate houses being powered
    set thickness 0.5
    set color yellow ;;yellow roads represent transmission of target frequency
  ]
  change-color ;;update visuals
  tick
end 

to generator-failure
  ask Hz [ die ] ;;get rid of Hz
  ask patches with [ pcolor = red ] [ ;;only powered houses have Hz
   sprout-Hz 1
  ]
  ask Hz [
   set size 3
   set color red ;red Hz represent frequency too low
   set shape "lightning"
  ]
  ask houses [
    set capacity (generator-capacity * (60 * num-houses)) ;;capacity of generator is a percentage (based on slider) of the frequency it should be able to provide
    set frequency (capacity / num-houses) ;;change frequency of houses based on new diminished capacity
  ]
  change-color ;;adjust visuals
  tick ;;plot frequency
end 

to load-shed
  ask Hz [ die ] ;;get rid of Hz
  ask houses [
    set capacity (generator-capacity * (60 * num-houses)) ;;change generator capacity based on slider
    if capacity < 60 [ ;;can't power any houses if capacity is less than 60 Hz
      set capacity 0
      set frequency 0
      set color red] ;;red houses aren't powered
    ]
  ask houses [
    set potential (capacity / 60) ;;how many houses can be fully powered (60Hz) with decreased capacity
    show potential]
  ask houses with [ who <= (potential) ] [ ;;turns a number of houses green according to potential
    set color green
    set pcolor red ]
  ask houses with [ who > (potential) ] [ ;;turns the rest of houses red
    set color red
    set pcolor cyan ]
  ask houses [
    set poweredhouses (count houses with [color = green] ) ;;green houses get power
    set unpoweredhouses (count houses with [color = red] ) ] ;;red houses get a blackout
  ask houses [
    if color = green [
      set frequency ( capacity / (count houses with [color = green] )) ;;frequency of powered houses is an equal distribution of available generator capacity
    ]                                                                  ;;note: this value will be greater than 60 Hz, creating a peak on frequency graph
  ]
  ask houses [
    if color = red [ ;;red houses are unpowered and therefore have a frequency of 0
      set frequency 0 ]
  ]
  ask patches [
    if pcolor = red [ ;;change visuals based on whether house is powered or unpowered
    sprout-Hz 2
    ]
    if pcolor = cyan [
    sprout-frowns 1
    ]
  ]
  ask frowns [ ;;unpowered houses get a frowny face :(
    set shape "face sad"
    set size 2
    set color white
  ]
  ask Hz [
    set color blue
    set shape "lightning"
    set size 3
  ]
  ask Hz [ ;;create links between Hz and generator
    create-cables-with generators ]
  ask cables [ ;;blue cables represent frequency being too high
    set color blue
    set thickness 0.5
  ]
  ask roads [die] ;;roads no longer necessary
  tick
end 

to stabilize ;;transmission operator decreases generation to only what is necessary to power as many houses as possible given maximum capacity
  ask houses [ ;;set frequency of unpowered houses to whatever remains after fully powering as many houses as possible
    if color = red [ ;;however, for purposes of the plotter, red houses are treated as if having 0 frequency and are not counted in average frequency
      set frequency ( (capacity - (60 * poweredhouses)) / (unpoweredhouses) ) ;;this is only for demonstration purposes to show how little the frequency of these houses
    ]                                                                        ;;would be without stabilization
    if color = green [
      set frequency 60
    ]
  ]
  ask cables [ ;;yellow cables represent transmission of target frequency
    set color yellow
  ]
  ask Hz [
    set color yellow
  ]
  tick
end 

to change-color
  ask houses [
    if frequency = 60 [ ;;fully powered houses are green with yellow roads
      set color green
      ask roads [
        set color yellow]
    ]
    if frequency < 60 and frequency > 0 [ ;;houses that are only partially-powered (experiencing interruptions) are yellow
      set color yellow
      ask roads [
        set color red] ;;red roads indicate power interruption
    ]
  ]
end 

There is only one version of this model, created almost 2 years ago by Jane Antonas.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.