Electric Load
=============

The Electric Load page allows you to specify the electric load for distributed projects with the Residential, Commercial, or one of the Third Party Ownership financial models. For these models, SAM assumes that electricity generated by the system reduces a building or facility's electricity consumption, and depending on the electricity rate structure on the :doc:`Electricity Rates <electricity_rates>` page, excess electricity is either sold to the electricity service provider, or accumulates toward net metering credits.

.. image:: ../images/SS_Load-ChooseOptions.png
   :align: center
   :alt: SS_Load-ChooseOptions.png

There are three options for specifying the building or facility's electric load:

* **No Load Data** is for a system that sells all of the power it generates at the retail electricity sell rates from the :doc:`Electricity Rates <electricity_rates>` page.

* :ref:`Input Time Series Load Data <electric-load-timeseries>` when you have hourly or subhourly time series load data.

* :ref:`Calculate Load Data <belpe>` automatically calculates hourly load data for a residential building from a monthly electricity bill, basic building energy parameters, and solar resource data. This option is only available with the residential or third party ownership financial models for performance models that use a solar resource weather file.

.. note:: You can use the Download Electric Load :doc:`macro <../reference/macros>` to automatically import reference residential and commercial building load data from the `Commercial and Residential Hourly Load Profiles for all TMY3 Locations in the United States <https://data.openei.org/submissions/153>`__ to SAM.

   For estimates of roof area available for different commercial building types, see the table at https://www.energy.gov/eere/buildings/commercial-reference-buildings and divide the total building area by the number of floors.

   If you are modeling a project with critical loads, specify the critical load on the :doc:`Grid Outage <../grid/grid_outage>` page.

.. _inputs:

Input Time Series Load Data
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Input Time Series Load Data option allows you to import hourly or subhourly load data from a text file, or copy and paste it from a spreadsheet or other program. It also provides an option for scaling the load data to better match the building's load or values from an electricity bill.

Hourly or Subhourly Load Profile
--------------------------------

**Electric load power, kW**
  Click **Edit array** to either cut and paste load data from another program or import data from a properly formatted text file. See :ref:`Working with Time Series Load Data <electric-load-timeseries>`   for instructions.

**Electric load scaling factor (optional)**
  Use the scaling factor to scale up or down the entire data set by the same amount. This option is useful when both the daily profile and seasonal pattern of your time series (hourly or subhourly) load data reasonably approximate the building's load, but the annual total does not. Click **View load data** to see the original and scaled data.

  When you change the scaling factor, SAM recalculates the monthly and annual energy and peak values shown on the Electric Load page so you can verify that the value is correct. These values depend on the underlying time series data. To change the monthly total energy (kWh) or peak (kW) values, either change the time series data or the scaling factor.

  To calculate the scaled load data, SAM multiplies the hourly or subhourly load data you by the scaling factor that you specify. For example, if you specify a scaling factor of 1.5, and the load at 2 p.m. on March 18th is 1.2 kW, SAM would use a load value of 1.5 × 1.2 = 1.8 kW for that hour.

**Electric load annual growth rate, %/yr**
  The load growth rate scales the load in years two and later by the percentage you specify. For example, if you specify a load growth rate of 0.5% per year, for each year in the analysis period specified on the :doc:`Financial Parameters <../financial-parameters/fin_overview>`   page, SAM would increase the load value in each time step by 0.5% of the previous year's load value for the same time step.

  You can also assign load growth rates to specific years using the annual schedule:

.. include:: /includes/snip_annual_values.rst

**January 1 day of week**
  By default, SAM assumes that January 1 is a Monday. 
  
  If the energy or demand rates on the :doc:`electricity_rates` page involve different weekday and weekend rates, and if you are using a weather file for a specific year, you can change the January 1 day of week to the appropriate day for that year to ensure that the weekday and weekend rates are applied on the correct days.

Adjust Load Profile to Monthly Usage
------------------------------------

Sometimes the only information you have about a building or facility's electric usage is total monthly usage in kWh and perhaps peak usage in kW from a monthly electricity bill. In this case, you can use time series load data from a model or other source of data to approximate the daily load shape, and scale this data so that the monthly totals of your data match the usage data from the electricity bill.

.. note:: If you are modeling a commercial project with demand charges, this approach does not accurately represent peak usage data from the electricity bill. If you want monthly peak values in kW to match the electricity bill data, you can edit the time series data so that each month's maximum value is equal to the peak value reported on the bill.

**Scale electric load profile to monthly usage**
  Check this option to specify the building's total monthly electricity consumption in kWh. SAM scales the hourly or subhourly data for each month accordingly.

  For example, if the sum of the original load data for January is 1,000 kWh, and you enter a value of 1,500 kWh for January, SAM will scale each load value in January by 1,500 ÷ 1,000 = 1.5. In that example, if the original load value on January 5 at 10 a.m. is 3 kW, the scaled value would be 4.5 kW.

**Monthly electricity usage for scaling (kWh)**
  Click **Edit values** to enter the building's total load in kWh for each month. SAM scales the hourly or subhourly load to match the values you enter as described above.

**View load data**
  Opens the :doc:`time series data viewer <../reference/time_series_viewer>`   to display graphs of the load data. If you chose one of the options to scale load data, the graphs show both the original data and the scaled data so you can verify that the scaled data is suitable for your analysis.

Download
--------

Click **Download Electric Load Data** to download hourly load data for a selection residential or commercial building types. Clicking the button is the same as running the "Download Electric Load" macro from the Macros page, which you can access by clicking **Macros** under the simulate button.

The macro downloads an hourly load file from the `Commercial and Residential Hourly Load Profiles for all TMY3 Locations in the United States <https://data.openei.org/submissions/153>`__ dataset and imports it to the Electric Load input page. *This dataset has limitations that are described on its web page.* These files are a collection of 8,760 hourly load profiles for a range of building types for each of the 1,020 U.S. locations in the legacy NSRDB TMY3 data set. The modeled load profiles were generated using typical meteorological year weather files. The macro identifies the TMY3 location nearest the latitude and longitude in your weather file, and downloads the load file for your building type for that TMY3 location. If the script cannot identify the latitude and longitude from your weather file, it prompts you for the values. 

.. note:: The `End-Use Load Profiles for the U.S. Building Stock <https://data.openei.org/submissions/4520>`__ provides access to thousands of 15-minute load profiles for many residential and commercial building types modeled using single-year NSRDB weather files for more recent years than the TMY3 data. You can use the `End Use Load Profiles Python package <https://github.com/NatLabRockies/SAM/tree/patch/samples/Python%20Scripts/End%20Use%20Load%20Profiles>`__ to access the data to use with SAM. Because of the much larger number of load profiles and building types represented in the data, it is not possible to create a short list of building types to choose from in the same way as the macro does for the older dataset. An API for the newer dataset may be available in the future that will make this possible.

Monthly Load Summary
--------------------

SAM displays the table of monthly and annual totals to help you verify that the load data is correct. SAM calculates these values from the time series load data. To change the monthly values, you have to either change the time series data, or change scaling factors.

**Energy (kWh)**
  The Energy column displays the building's total electric load for each month.

  SAM calculates the value by adding the hourly or subhourly values for each month and multiplying by the number of hours per time step. For example, for hourly data, the total energy value for January would be the sum of hourly load values in kW for Hours 1 to 744 multiplied by 1 hour per time step. For 15-minute load data, the value would be the sum of the subhourly values in kW multiplied by 0.25 hours per time step.

**Peak (kW)**
  The maximum load value in kW that occurs in each month.

**Annual Total**
  The total amount of electricity required by the building over an entire year, equivalent to the sum of the monthly energy values.

  The annual total applies to year one of the analysis period. If you specify a load growth rate rate under **Annual Adjustment**, the annual total does not reflect load data in years two and later.

**Annual Peak**
  The maximum load value that occurs in the year.

If you are modeling a behind-the-meter project with battery storage, and you have defined critical loads on the :doc:`Grid Outage <../grid/grid_outage>` page, SAM displays the monthly and annual critical load values based on whether you specify the critical load as a percentage of the load or as a separate time series load profile.

**Critical (kWh)**
  The total monthly and annual critical load.

.. _belpe:

Calculate Load Data
~~~~~~~~~~~~~~~~~~~
The calculate load data option for residential buildings allows you to use monthly electric bill data and basic building energy parameters to calculate an hourly load profile. You can use this option to estimate load data when you do not have access to more accurate data.

Building Energy Load Profile Estimator
--------------------------------------

The Building Energy Load Profile Estimator is a basic residential building model that calculates hourly electric load data given some simple building energy parameters, monthly electricity usage in kWh, and solar resource data from a weather file.

.. note:: The Building Energy Load Profile Estimator generates a rough estimate of a residential building's electric load. Click **View load data** to see the data it generates and verify that it is suitable for your analysis before you run a simulation. In some cases, it may generate extreme peak values for some hours that you can either ignore or edit. 

**To use the estimator:**

* Enter values and choose options to describe the residential building's basic energy performance.

* The occupancy and temperature schedules allow you to adjust the daily profile of the load. Click **Edit** to enter adjustment factors for each of the 24 hours in a day. (The 24 values should all be one for no adjustments.)

* Under **Monthly Load Data**, type monthly total electricity consumption values for one year's worth of electricity bills.

**January 1 day of week**
  By default, SAM assumes that January 1 is a Monday. 
  
  If the energy or demand rates on the :doc:`electricity_rates` page involve different weekday and weekend rates, and if you are using a weather file for a specific year, you can change the January 1 day of week to the appropriate day for that year to ensure that the weekday and weekend rates are applied on the correct days.

**View load data**
  Click **View load data** to open the :doc:`time series data viewer <../reference/time_series_viewer>` with the 8,760 hourly load profile generated by the estimator.

Annual Adjustment
-----------------

**Load growth rate, %/yr**
  The load growth rate scales the load in years two and later by the percentage you specify. For example, if you specify a load growth rate of 0.5% per year, for each year in the analysis period specified on the :doc:`Financial Parameters <../financial-parameters/fin_overview>`   page, SAM would increase the load value in each time step by 0.5% of the previous year's load value for the same time step.

  You can also assign load growth rates to specific years using the annual schedule:

.. include:: /includes/snip_annual_values.rst 

.. _electric-load-timeseries:

Working with Time Series Load Data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SAM requires time series load data with at least hourly resolution to run a simulation involving an electric load. You can either import the data from a properly formatted text file, or copy and paste the data from a spreadsheet program or other software..

Data Sources
~~~~~~~~~~~~

The following examples are some sources of electric load data:

* Electrical measurements from a building or other load center. Some electricity service providers make load data available to their customers.

* Data generated by a building simulation model.

* Some electric service area operators provide system-wide load data on their websites. For examples, see California ISO and Midwest ISO websites.

* Sample residential load data generated by the EnergyPlus load data generator supplied with SAM in *\samples\Simulated Electric Load Data - Residential* folder.

Time Step and Convention
~~~~~~~~~~~~~~~~~~~~~~~~

SAM requires load data in a single column of average kilowatt per time step values. The number of data rows depends on the time step.

For hourly data, SAM requires a column of 8,760 data rows, where each row contains a value in kilowatts representing the average power required by the load over the hour. For subhourly data, SAM requires a column of 8,760 × Number of Time Steps per Hour data rows, with kilowatt values representing the average electric power over the period of a single time step.

The load data time convention should follow the :doc:`weather file time convention <../weather-data/weather_time_convention>`. SAM assumes that January first is a Monday, defines weekdays as Monday-Friday and weekends as Saturday-Sunday, and does not account for daylight savings time or leap years.

When you use sub-hourly load data with hourly weather data, SAM uses hourly average load values to for the energy charge calculations, and the sub-hourly data to determine the peak load for demand charges. If you use sub-hourly weather data, you must also use sub-hourly load data with the same time step. (You can use hourly weather data with sub-hourly load data, but not vice versa.) For solar projects, you can use the Advanced Download option on the Solar Resource page to see if 15-minute weather data is available, or you can use the Solar Resource Interpolation :doc:`macro <../reference/macros>` to convert hourly weather data to match the load data time step.

Importing Data from a File
~~~~~~~~~~~~~~~~~~~~~~~~~~

SAM can import data from a text file that contains a single column of values representing the load in a single year. SAM ignores the first row, so you can use that row to store text describing the data. The number of rows depends on the number of time steps. For hourly data, the file should contain a total of 8,761 rows: The first row for header information, and the remaining rows for the load data. For 15-minute data, the file should contain 1 + 8760 x 4 = 35,041 rows.

**To import load data from a properly formatted text file:**

#. On the Electric Load page, choose the **Input Time Series Load Data** option.

#. Click **Edit Data**.

#. If the data is subhourly, click Change time step and type the data time step in minutes.

#. Navigate to the folder containing the load data file and open the file.

   SAM displays the data in the data table. Use the scroll bar to see all of the data.

#. Click **OK** to return to the Electric Load page.

SAM displays monthly and annual load data under **Monthly Load Summary**.

After importing the data, you can use the scaling and escalation factors to scale the entire data set up or down, and to model a load that increases from year to year by the percentage that you specify.

Pasting Load Data from your Computer's Clipboard
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you have load data in a spreadsheet or other program that allows you to copy columns of data to your computer's clipboard, you can paste the data into SAM. The data should be a single column of values in kilowatt-hours representing the load in a single year. The number of rows depends on the number of time steps. For hourly data, the column should contain 8,760 rows of load data.

**To paste load data from your computer's clipboard:**

#. On the Electric Load page, choose the **Input Time Series Load Data** option.

#. Click **Edit Data**.

#. Open the spreadsheet or other program containing the load data, select the entire column of data, and copy it.

#. In SAM's Edit Data window, click **Paste**.

   SAM displays the data in the data table. Use the scroll bar to see all of the data.

#. Click **OK** to return to the Electric Load page.