Commit 8d1043cc by John Donnal

auto doc rebuild

parent 70ba4632
Showing with 1847 additions and 36 deletions
# append plugins to the list below, separate entries with commas
# name, description, documentation_folder
#LabJack, Acquire data from UE9 devices, labjack
#NILM, Non-Intrusive Load Monitoring, nilm
NILM, Non-Intrusive Load Monitoring, nilm
#SmartEE, Connect to Smart Plugs, smartee
Non-Intrusive Load Monitoring (NILM) Documentation
==================================================
Non-Intrusive Load Monitoring
=============================
Non-Intrusive Load Monitors (NILM) collect high bandwidth electrical data
(voltage, current, and power) There are two different kinds of meters: contact
and non-contact. The contact system uses commercial current and voltage sensors
and should be installed by an electrician. The non-contact system uses
electromagnetic field sensors to measure current and voltage without touching
the powerline. The contact system is more accurate but expensive and difficult
to install. The non-contact system can be installed quickly and easily but
requires an additional calibration step. A single computer can manage one or
more of either type of meter.
Start Here:
-----------
1. Install the software: :ref:`installation`
2. Install meters: :ref:`hardware_setup`
3. Configure the meters: :ref:`software`
4. Capture data: :ref:`operation`
.. figure:: _static/yp_installation.jpg
Non-contact meter installed on US Navy ship in Annapolis, MD.
.. toctree::
:maxdepth: 2
:maxdepth: 3
:caption: Contents:
installation
setup
software
operation
readers
filters
Indices and tables
......
.. _installation:
Installation
------------
......@@ -19,6 +21,3 @@ The NILM plugin and its dependencies are available on the wattsworth git reposit
$> git clone git@git.wattsworth.net:nilm/ethstream.git
$> cd ethstream
$> sudo make install
.. _operation:
System Operation
================
After your meter is installed and configured you are ready to collect data.
See :ref:`hardware_setup` for details on meter installation and :ref:`software`
for details on meter configuration.
Follow these three steps to start collecting data:
1. Verify waveforms with :ref:`operation:nilm_scope`
2. Generate joule configuration files with :ref:`operation:nilm_configure`
3. Restart joule and verify the NILM modules are running
.. code-block:: bash
# 1. verify sensor waveforms look correct
$> nilm scope meterX -c 1 2 3
# 2. generate joule modules
$> sudo nilm configure
# 3. restart joule
$> sudo service jouled restart
Once joule has restarted check that the modules are operational:
.. code-block:: bash
$> joule modules
+--------------------------------+----------------+-----------------+---------+-----+--------------+
| Module | Sources | Destinations | Status | CPU | mem |
+--------------------------------+----------------+-----------------+---------+-----+--------------+
| meter1 process: | /meter1/sensor | /meter1/prep | running | 82% | 28 MB (302%) |
| reconstruct -> sinefit -> prep | | /meter1/sinefit | | | |
| | | /meter1/iv | | | |
| meter1 capture: | | /meter1/sensor | running | 13% | 26 MB (283%) |
| serial data capture | | | | | |
+--------------------------------+----------------+-----------------+---------+-----+--------------+
$> joule logs "meterX capture"
[24 Aug 2017 16:35:53] ---starting module---
$> joule logs "meterX process"
[24 Aug 2017 16:35:53] ---starting module---
.. _operation:nilm_scope:
``nilm scope``
--------------
NILM scope can display the sensor waveforms for either a non-contact or contact
meter in realtime. The program requires two parameters, the meter name
from the ``meters.yml`` configuration file and a list of channels to display. A
legend is automatically built using the configuration in ``meters.yml``.
Before you begin collecting data with Joule it is often helpful to view
the sensor waveforms to make sure you are measuring what you expect. You
should check the following:
Non-contact meters:
* make sure each magnetic sensor picks up a different mixture of phases
* if you have multiple e-field pickups select the strongest to use for the voltage reference
Contact sensors:
* make sure the current channels have an appropriate gain. If they are too low
or are too high (saturating), adjust the resistor banks appropriately.
* verify the sensor->phase mapping in ``meters.yml`` is correct.
Usage
.. code-block:: bash
nilm scope [-h] --channels CHANNELS [CHANNELS ...]
[--config-file CONFIG_FILE]
meter
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>meter</dt>
<dd>meter name from <mono>meters.yml</mono> (<mono>meter1</mono>,<mono>meter2</mono>, etc)</dd>
<dt>-c CHANNELS</dt>
<dd>Space seperated list of channel indices to plot <mono>[0-5]</mono> for contact meters and <mono>[0-7]</mono> for non-contact meters</dd>
</dl>
</div>
Example
.. code-block:: bash
$> nilm-scope meter1 -c 2 4 #display channels 2 and 4 from meter1
.. figure:: _static/operation/nilm_scope1.png
NILM Scope running on a contact meter
.. figure:: _static/operation/nilm_scope2.png
NILM Scope running on a non-contact meter
.. _operation:nilm_configure:
``nilm configure``
------------------
Build joule module and stream configuration files for all enabled meters.
Usage
.. code-block:: bash
nilm configure [-h] [--config-file CONFIG_FILE]
[--stream-configs STREAM_DIR]
[--module-configs MODULE_DIR] [--nilmdb-url NILMDB_URL]
[--legacy]
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>--config-file</dt>
<dd>override default location of <mono>meters.yml</mono> file</dd>
<dt>--stream-configs</dt>
<dd>override default location of joule stream *.conf files</dd>
<dt>--module-configs</dt>
<dd>override default location of joule module *.conf files</dd>
<dt>--nilmdb-url</dt>
<dd>override default URL of nilmdb repository</dd>
<dt>--legacy</dt>
<dd>split prep output into per-phase streams. Default is a single prep stream</dd>
</dl>
</div>
Example
.. code-block:: bash
$> sudo nilm configure #writing to the joule directories requires root privileges
Set up a NILM Device
--------------------
.. _hardware_setup:
Hardware Setup
--------------
.. _hardware_setup:contact_meter:
Contact Meter
=============
The contact meter uses LEM voltage and current sensors. The sensors are
digitized by a UE9 LabJack. The LabJack has multiple input channels. The sensor
to LabJack channel mapping (``index``) is shown in the figure below. The
current sensors connect to the PCB with Molex plugs. Trace the twisted cable
from the plug to the panel mounts and label the outside of the box before
installing the system. This will make it easier to assign the correct channel
mappings.
.. _hardware_setup:contact_meter:connections:
Connections
+++++++++++
.. image:: _static/hardware/nemo_pinout.png
The sensors must be scaled correctly to convert the measurements to volts and
amps. The voltage scale factor is set in hardware to ``0.0919`` and the current
scale factor can be calculated using the formula in the figure below.
``alpha_LEM`` is the *Conversion ratio* found on the LEM sensor datasheet. This
is usually on the order of 1000. See `LA 55-P datasheet`_ for an example.
``R`` is the load resistance set by the channel DIP switches (see the chart
below).
.. _hardware_setup:contact_meter:conversion_factors:
Conversion Factors
++++++++++++++++++
.. image:: _static/hardware/nemo_constants.png
Configure ``meters.yml`` with the LabJack ``index`` to sensor mapping and the
scale factor required for each sensor. For more information see Configuring a
:ref:`software:contact_meter`.
.. _hardware_setup:noncontact_meter:
Non-Contact Meter
=================
The non-contact meter uses magnetic and electric field sensors to indirectly
measure the current and voltage in a powerline. This system is easier to install
than a contact meter but requires an additional calibration step. There are two
different non-contact sensor hardware platforms. The Flex Board and the D-A-Y
Boards. Each non-contact board has a firmware-assigned serial number. A computer
may not have two non-contact meters with the same serial number. To view the
serial number (if it is not printed on the meter) execute the following command
in a terminal:
.. code-block:: bash
$> ls /dev/nilm
meterXXXX-ctrl meterXXXX-data
#each meter should have two entries,
# meterXXXX is the serial number
If this directory is empty or does not exist check to make sure the noncontact
meter is connected and powered on.
.. _hardware_setup:noncontact_meter:flex_board:
Flex Board
++++++++++
The Flex Board is an all-in-one platform with both sensors and a microcontroller
for data acquisition. The main PCB has an electric field sensor, and a magnetic
field sensor. There is also compensation circuitry to provide an integrated
electric field output which is proportional to the line voltage. The magnetic
sensor also contains a PTAT (proportional to absolute temperature) sensor. The
flexible arms hold four more magnetic sensors. The microcontroller samples all
eight sensor outputs and provides the values over USB. The sensor indices are
provided in the figure below. Unless there is a need for a hardware integrated
signal, the raw electric field output (index 0) with digital integration is the
recommended configuration.
See Configuring a :ref:`software:noncontact_meter` for details on setting
up your ``meters.yml`` file and starting the data capture.
.. figure:: _static/hardware/flex_pinout.png
Flex board ``index`` to sensor mapping. See the board silk screen header pinout.
.. _hardware_setup:noncontact_meter:day_boards:
D-A-Y Boards
++++++++++++
The other non-contact platform is a suite of three seperate boards. The standard
configuration is a data acquisition (D) Board and at least as many analog sensor
(A) boards as phases (eg 3 phase system = 3 or more A Boards). Each A-Board has
a current sensor and a "derivative of voltage" sensor. The figure below shows
the channel to sensor mapping when A-Boards are connected directly to the
D-Board.
.. figure:: _static/hardware/dboard_pinout.png
D-Board ``index`` to sensor mapping. Each A-Board measures current
and the derivative of voltage
Securely connect each A-Board to the power cable using a zip tie as shown. The
accuracy of the meter depends on the stability of this connection. If the
A-Boards rotate after installation the meter will need to be recalibrated. The
quality of the output depends on how well the sensors are positioned. If the
location of the conductors is visible try to align each A-Boards to a separate
conductor. If the conductor geometry is not known use the nilm-scope utility
once you have set up the meter in ``meters.yml`` to determine optimal sensor
placement. Loads on each phase should exicte a different "mix" of the sensors.
Only one of the four A-Boards is used to determine the line
voltage. Use the nilm scope utility to determine which A-Board has
the strongest reading and use its index as the ``voltage:sensor_index``
in ``meters.yml``.
See Configuring a :ref:`software:noncontact_meter` for details on setting
up your ``meters.yml`` file and starting the data capture.
.. figure:: _static/hardware/non_contact_1.JPG
:figwidth: 40 %
:align: left
Capture the ribbon cable and securely attach to the powerline
.. figure:: _static/hardware/non_contact_2.JPG
:figwidth: 40 %
:align: right
Multiple sensors can be connected with a single zip tie
.. _hardware_setup:noncontact_meter:using_the_y_board:
Using the Y Board
+++++++++++++++++
The non-contact meter can adapt to a wide variety of installation types through
the use of the Y Board adapater. The Y Board multiplexes two A Boards into a
single pair of channels and provides optional hardware integration. The lefthand
figure below shows a cartoon of the Y Board schematic. Zero ohm 0603 jumpers are
used to select which of the six available inputs are placed on each output (S1
and S2). *Note: only use one jumper per channel*
.. figure:: _static/hardware/non_contact_yboard_pic.png
:figwidth: 40 %
:align: left
Y Board configured for V1 and integrated V1 output
.. figure:: _static/hardware/non_contact_yboard.png
:figwidth: 40 %
:align: right
Y Board jumper pinout. Use 0603 zero ohm resistors
.. _LA 55-P datasheet: _static/hardware/la55.pdf
.. _software:
Software Setup
==============
The NILM is completely configured by the ``meters.yml`` located in
``/opt/configs/``. An example is located in ``/opt/configs/meters.example.yml``.
This file lists sample configurations for both contact and noncontact meters. A
single computer can run multiple meters of either type. Meters are listed
sequentially as ``meter1`` to ``meterN``. After any change to this file,
reconfigure the nilm joule modules and restart the joule system:
.. code-block:: bash
$> sudo nilm configure
$> sudo service jouled restart
Some settings may not be changed after a meter is initialized (eg the number of
phases), others may be changed at any time (eg the amount of data to keep on
disk).
.. _software:contact_meter:
Contact Meter
+++++++++++++
The contact meter should be installed before it is configured. Make careful note
of the current sensor connections and their relative orientations. Run the
command below to check the communication link between the computer and the
meter. You should have 0% packet loss. If you cannot ping the LabJack
see :ref:`software:contact_meter:network_setup` for help.
.. code-block:: bash
$> ping <LabJack IP Address> -c 4
--- 192.168.1.209 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2998ms
rtt min/avg/max/mdev = 0.026/0.031/0.035/0.006 ms
Open ``meters.example.yml`` in a text editor and copy the example configuration
to ``/opt/configs/meters.yml``. Create this file if it does not exist. If there
is already a ``meter1``, give this meter a unique index (eg ``meter2``). If you
reuse a meter name, for example change meter1 from a contact meter to a
non-contact meter, or change the meter from 2 phase to 3 phase operation, you
must either rename or completely flush the previous meter's data streams from
the database. See <a href="/help/cli#cli_nilmtools"> command line tools</a>
for details on moving and renaming streams in NilmDB.
After the ``meters.yml`` file is configured the meter is ready to collect data.
See :ref:`operation` for more details.
.. _software:contact_meter:meters.yml:
Example ``meters.yml``
----------------------
Note that all fields are required. Details about each field are described after
the example. Standard defaults are provided but ``sensor_scales`` must be set
for your specific installation (see contact meter hardware). The nilm scope
utility is useful for ensuring the channel mappings and sinefit rotations are
correct.
.. code-block:: yaml
meter1: type: contact
enabled: true # set to false to disable this meter
ip_address: 192.168.1.209 # default LabJack address
phases: 3 # 1 - 3
sensors:
voltage:
sensor_indices: [3,4,5] # maps to phase A,B,C
sensor_scales: 0.0919 # built-in constant
sinefit_phase: A # [A,B,C] voltage used by sinefit
nominal_rms_voltage: 120 # used to scale prep to watts
current:
sensor_indices: [0,1,2] # maps to phase A,B,C
sensor_scales: XX # set by resistors and LEM, see hardware help page
sinefit_rotations: [0,120,240] # relative to sinefit_phase voltage
streams:
sinefit:
decimate: true # if [false] only the base stream will be saved
keep: 1m # how much data to keep as [amount][units]
iv: # h: hours, d: days, w: weeks
decimate: true # m: months, y: years
keep: 1w # if [false] no data will be saved
prep:
decimate: true
keep: 3w
sensor:
keep: false
.. _software:contact_meter:configuration_fields:
Configuration Fields
--------------------
``type``
This should be set to ``contact``
``enabled``
``true``/``false`` If false, no data is captured from this meter
``ip_address``
The IP address of the LabJack. This defaults to 192.168.1.209 but can be set
to another value using the LabJack software (Window's only). When more than
one Contact NILM is used or if the 192.168.1.0 subnet is unavailable you must
change this default value. Note that each LabJack must be on it's own subnet.
See :ref:`software:contact_meter:network_setup` for more details.
``phases``
A value between 1 and 3. This depends on the power system being monitored.
``sensors:voltage``
"""""""""""""""""""
``sensor_indices``
These are the voltage sensor LabJack channels. The sensors are connected to
channels 3 4 and 5. The order of this list is used to name Phases A, B, and C.
When you are installing the system note the phase connection and order this
list accordingly (see :ref:`hardware_setup:contact_meter:connections` for
reference).
``sensor_scales``
The scaling coeffecient to convert sensor output to Volts. This is hardwired
to ``0.0919``. Seperate scaling factors may be applied to each sensor by using
an array instead of a single value: ``[XA,XB,XC]`` where X is the scale factor
for each phase.
``sinefit_phase``
``A``,``B``,``C`` The phase used by the sinefit processor.
``nominal_rms_voltage``
This is used to scale prep to approximate power (Watts)
``sensors:current``
"""""""""""""""""""
``sensor_indices``
These are the current sensor LabJack channels. The sensors are connected to
channels 0 1 and 2. The order of this list should match the order used in the
voltage configuration (seea
:ref:`hardware_setup:contact_meter:connections` for reference).
``sensor_scales``
The scaling coeffecient to convert sensor output to Amps. See
:ref:`hardware_setup:contact_meter:conversion_factors` for details on
calculating this value. Seperate scaling factors may be applied to each sensor
by using an array instead of a single value: ``[XA,XB,XC]`` where X is the
scale factor for each phase.
``sinefit_rotation``
The phase difference in degrees from the ``sinefit_phase`` voltage for each
phase (note that the coeffecient for the phase used by sinefit should be a 0
in this array)
.. _software:contact_meter:configuration_fields:streams:
``streams``
"""""""""""
The ``streams`` configuration block determine how much data is retained for each
stream and whether or not the stream is decimated as it is collected. It is very
important to make sure the total size required by the database will fit on your
storage drive.
``decimate``
``true``/``false`` Whether or not the stream should be decimated. This makes
the stream plottable in the web interface but roughly doubles the amount of
space required to store this data. There is also some network overhead
associated with decimation so if you are experiencing high processor load try
disabling this for some streams.
``keep``
How much data to keep for this stream. The is specified as a coefficient and
unit. Valid units are ``h`` for hours, ``w`` for weeks, ``m`` for months, and
``y`` for years. Set to ``false`` to discard the stream data.
.. _software:contact_meter:network_setup:
Network Setup
-------------
The LabJacks in contact meters require an ethernet connection. If you need
more ethernet ports than the computer has available, use a USB to ethernet
adapter. While most adapters should work out of the box, the recommended
adapter is the **TU2-ET100** from TRENDnet. After you connect the contact
meter to the computer note the MAC address of the USB adapter. This is found
on the backside of the TU2-ET100 as shown in the figure below. Open the
network connection editor and configure the interface for the MAC address used
by the NILM. Each interface has a unique MAC address and it is helpful to
rename the connection to "NILM" or "Web" depending on the role of the
interface. For interfaces connecting to the web, set the IPv4 address method
to **DHCP** from the **IPv4 Settings** tab.
.. figure:: _static/software/network_setup_1.png
:figwidth: 40 %
:height: 288px
:align: left
Find the MAC address for the LabJack connection. On the TU2-ET100 this is on
the bottom sticker.
.. figure:: _static/software/network_setup_2.png
:figwidth: 45 %
:align: right
Configure the network interface for the MAC address associated with the LabJack.
For interfaces connected to a contact meter select the **IPv4 Settings** tab and
set Method to **manual**. Click ``[Add]`` and enter an IP address on the same
subnet as the LabJack. Unless you have set up an advanced configuration the IP
address should share the first three numbers as the LabJack and use a different
final number. For example, the default LabJack address is 192.168.1.209 and a
valid host IP address would be 192.168.1.200. The **Netmask** should be 24 or
255.255.255.0 and the **Gateway** should be left blank. Note that each interface
must be on a seperate subnet. If you need more than one contact meter you will
have to assign a different IP address to the additional LabJack devices. This is
done with the commercial configuration tool available through the `LabJack
website`_.
.. _LabJack website: http://labjack.com
.. figure:: _static/software/network_setup_3.png
:figwidth: 43 %
:align: left
Assign an address in the same subnet as the LabJack
.. figure:: _static/software/network_setup_4.png
:figwidth: 42 %
:align: right
Select the local routing check box in the Routes dialog
For multiple LabJack installations address them as 192.168.X.209 where X is
different for each device (between 1 - 255). After you assign the IP address
click ``[Routes...]`` and select the checkbox for local routing only as shown
in the figure. This prevents web bound traffic from getting sent to the
LabJack. Once you have completed the IP address configuration click
``[Save...]`` to close the network configuration dialog. Open a terminal and
enter the following command to reconfigure the network interfaces to use the
new values:
.. code-block:: bash
$> sudo service network-manager restart
.. _software:noncontact_meter:
Non-contact Meter
+++++++++++++++++
There are many different configurations for the non-contact sensors. See
:ref:`hardware_setup:noncontact_meter` for detailed information on connecting
and configuring the sensor hardware. The nilm scope utility can be helpful in
finding optimal installation sites for the non-contact sensors.
Open ``/opt/configs/meters.example.yml`` in a text editor and copy over the
example non_contact configuration to ``/opt/configs/meters.yml``. Create this
file if it does not exist. If there is already a ``meter2``, give this meter a
unique index (eg ``meter1``). If you reuse a meter name, for example change
meter1 from a contact meter to a non-contact meter, or change the meter from two
phase to three phase operation, you must either rename or completely flush the
previous meter's data streams from the database. See <a
href="/help/cli#cli_nilmtools"> command line tools</a> for details on moving and
renaming streams in NilmDB.
After the ``meters.yml`` file is configured correctly you must calibrate the
meter before it can collect data. See
:ref:`software:noncontact_meter:calibration` for details.
.. _software:noncontact_meter:meters.yml:
Example ``meters.yml``
----------------------
Note that all fields are required. Details about each field are described after
the example.
.. code-block:: yaml
meter1:
type: noncontact
enabled: true # set to false to disable this meter
serial_number: meterXXXX # found on the meter case
phases: 2 # 1 - 3
sensors:
voltage:
sensor_index: 0 # electric field sensor
digitally_integrate: true # if true, integrate using FIR filter
nominal_rms_voltage: 120 # used to scale the electric field
current: # --uncomment a line below, or customize--
sensor_indices: [1,3,5,7] # D-Board with 4 A-Boards
#sensor_indices: [1,2,3,4,5] # Flex Board
calibration:
duration: 30 # length of calibration in seconds
watts: 200 # power consumed by calibration load
has_neutral: true # [false] if the system has no neutral bus
streams:
sinefit:
decimate: true # if [false] only the base stream will be saved
keep: 1m # how much data to keep as [amount][units]
iv: # h: hours, d: days, w: weeks,
decimate: true # m: months, y: years
keep: 1w # if [false] no data will be saved
prep:
decimate: true
keep: 3w
sensor:
keep: false</textarea>
.. _software:noncontact_meter:configuration_fields:
Configuration Fields
--------------------
``type``
This should be set to ``noncontact``
``enabled``
``true``/``false`` If false, no data is captured from this meter
``serial_number``
This is printed on the DBoard meter case. See for
more information
``phases``
A value between 1 and 3. This depends on the power system being monitored
``sensors:voltage``
"""""""""""""""""""
``sensor_index``
This is the index of the electric field sensor to used to calculate the
effective voltage waveform. Use nilm scope to determine which electric field
sensor has the strongest signal and use its index here.
``digitally_integrate``
``true``/``false`` If the sensor specified in **sensor_index** does not have
hardware integration, set this to true. See
:ref:`hardware_setup:noncontact_meter` for reference. Sensors that require
digital integration are marked with a delta to indicate "derivative".
``nominal_rms_voltage``
The rated line voltage. This is used to scale the voltage waveform (it does
not effect prep)
``sensors:current``
"""""""""""""""""""
``sensor_indices``
These are the magnetic sensor indices. Place all available sensors in this
array. There must be at least as many sensors as phases. The order does not
matter.
``calibration``
"""""""""""""""
``duration``
Time in seconds to run the calibration load on each phase. Longer durations
can improve calibration results especially in environments with many
background loads. Do not use less than 30 seconds on a production system.
``watts``
The power draw of the calibration load. This is used to scale the prep output
``has_neutral``
``true``/``false`` If the system has a neutral bus (most common), set this to
true.
``streams``
"""""""""""
See :ref:`software:contact_meter:configuration_fields:streams`
.. _software:noncontact_meter:calibration:
Calibration
-----------
Non-contact meters must be calibrated before they can collect current and
voltage measurements. You will need a resistive load, a smart plug and a
micro-USB cable. The required wattage will depend on the other loads operating
on the system. In residential environments and small buildings try 200-500W.
Incandescent light bulbs work well. To calibrate the meter, open a terminal
window and run ``nilm calibrate`` with the name of the meter in ``meters.yml`` (
``meter1``, ``meter2``, etc.). Add ``--visualize`` to the command to generate
plots during the calibration process. These plots can help debug problematic
calibration scenarios like poor sensor placement or unexpected phase setups.
.. code-block:: bash
$> nilm calibrate meterX #--visualize (optional)
The script will first provide a summary of the meter configuration. If this
looks correct, answer ``y``. Any other key will cancel the calibration
process. Plug the smart plug into an outlet and connect it to the computer with
the USB cable. The status light will alternate between blue and green. Once it
is solid green, answer ``y`` at the prompt for programming the plug. If you
already have a plug in calibration mode you can answer ``n`` and reuse the plug
for this calibration. If an error occurs programming the plug wait until the
plug LED is solid green and try again.
Once the plug is programmed (or the step is skipped) you will be instructed to
connect the load to the first phase. Connect the smart plug to any outlet and
then connect the load. Once the load is turning on and off, hit ``[ENTER]``. *Do
not hit* ``[ENTER]`` *until the smart plug is turning on and off*.
If the meter is configured for multiphase operation you will be prompted to move
the plug to an outlet on each additional phase. Do not worry about identifying
which outlet is wired to which phase. The calibration program will automatically
detect if you have connected the load to a previous phase and prompt you to move
it.
Once the calibration program has run a sufficient number of measurements you
will be asked if you want to save the results. Choose ``y`` to commit the
calibration or ``n`` to discard. If you do not save the results the previous
calibration values will be used (if available).
After calibration is complete the meter is ready to collect data.
See :ref:`operation` for more details.
Line Frequency Note
-------------------
The code assumes a 60Hz line frequency. If you are using a digitally
integrated voltage sensor you must edit the code to use in 50Hz environments.
If you are using a hardware integration sensor or have another voltage reference
you do not need to edit the code.
In ``nilm/nilm/filters/reconstructor.py:158`` change the ``cycle_length`` from
``50`` to ``60``
.. code-block:: python
# assume 3kHz sampling on 60Hz line
def _setup_integration(self, cycle_length=50):
# set to 60 for 50Hz Operation----------^
Then rebuild the package:
.. code-block:: bash
$> sudo python3 setup.py install
.command-title {
background: #DDD;
padding: 8px;
border-radius: 4px;
margin-top: 40px;
border-top: black;
border-style: solid;
border-width: 1px
}
.command-title>i {
font-style: normal;
font-weight: bold;
font-family: monospace;
}
.text-mono {
font-family: monospace;
}
.block-indent {
margin-left: 20px;
}
.text-grey {
color: #808080;
}
.arglist>dd {
margin: 0px;
margin-left: 30px;
}
.arglist>dt {
color: #808080;
font-weight: normal;
font-family: monospace;
}
.arglist {
margin-top: -15px;
margin-bottom: 0px;
}
.plainlist {
margin-bottom: 0px;
}
.plainlist>dd {
margin-left: 30px;
}
.plainlist>dt {
font-weight: normal;
font-family: monospace;
}
.plug-cli {
font-family: monospace;
background: #DDD;
display: block;
margin: 5px;
padding: 5px;
border-radius: 4px;
border-style: solid;
border-width: 1px;
border-color: #BBB
}
.mono-dl>dt {
font-family: monospace;
}
.arglist.dl-horizontal>dt {
width: inherit;
}
.arglist.dl-horizontal>dd {
margin-left: 130px;
}
.command {
font-family: monospace;
color: #808080
}
.command>em {
font-weight: bold;
font-style: normal;
color: black;
}
......@@ -10,6 +10,7 @@
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -69,7 +70,9 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Set up a NILM Device</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Hardware Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="software.html">Software Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="operation.html">System Operation</a></li>
<li class="toctree-l1"><a class="reference internal" href="readers.html">Reader Modules</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Filter Modules</a></li>
</ul>
......
......@@ -11,6 +11,7 @@
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -68,7 +69,9 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Set up a NILM Device</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Hardware Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="software.html">Software Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="operation.html">System Operation</a></li>
<li class="toctree-l1"><a class="reference internal" href="readers.html">Reader Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="filters.html">Filter Modules</a></li>
</ul>
......
......@@ -6,10 +6,11 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Non-Intrusive Load Monitoring (NILM) Documentation &#8212; NILM 1.0 documentation</title>
<title>Non-Intrusive Load Monitoring &#8212; NILM 1.0 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -42,18 +43,74 @@
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="non-intrusive-load-monitoring-nilm-documentation">
<h1>Non-Intrusive Load Monitoring (NILM) Documentation<a class="headerlink" href="#non-intrusive-load-monitoring-nilm-documentation" title="Permalink to this headline"></a></h1>
<div class="section" id="non-intrusive-load-monitoring">
<h1>Non-Intrusive Load Monitoring<a class="headerlink" href="#non-intrusive-load-monitoring" title="Permalink to this headline"></a></h1>
<p>Non-Intrusive Load Monitors (NILM) collect high bandwidth electrical data
(voltage, current, and power) There are two different kinds of meters: contact
and non-contact. The contact system uses commercial current and voltage sensors
and should be installed by an electrician. The non-contact system uses
electromagnetic field sensors to measure current and voltage without touching
the powerline. The contact system is more accurate but expensive and difficult
to install. The non-contact system can be installed quickly and easily but
requires an additional calibration step. A single computer can manage one or
more of either type of meter.</p>
<div class="section" id="start-here">
<h2>Start Here:<a class="headerlink" href="#start-here" title="Permalink to this headline"></a></h2>
<ol class="arabic simple">
<li>Install the software: <a class="reference internal" href="installation.html#installation"><span class="std std-ref">Installation</span></a></li>
<li>Install meters: <a class="reference internal" href="setup.html#hardware-setup"><span class="std std-ref">Hardware Setup</span></a></li>
<li>Configure the meters: <a class="reference internal" href="software.html#software"><span class="std std-ref">Software Setup</span></a></li>
<li>Capture data: <a class="reference internal" href="operation.html#operation"><span class="std std-ref">System Operation</span></a></li>
</ol>
<div class="figure" id="id1">
<img alt="_images/yp_installation.jpg" src="_images/yp_installation.jpg" />
<p class="caption"><span class="caption-text">Non-contact meter installed on US Navy ship in Annapolis, MD.</span></p>
</div>
<div class="toctree-wrapper compound">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Set up a NILM Device</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Hardware Setup</a><ul>
<li class="toctree-l2"><a class="reference internal" href="setup.html#contact-meter">Contact Meter</a><ul>
<li class="toctree-l3"><a class="reference internal" href="setup.html#connections">Connections</a></li>
<li class="toctree-l3"><a class="reference internal" href="setup.html#conversion-factors">Conversion Factors</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#non-contact-meter">Non-Contact Meter</a><ul>
<li class="toctree-l3"><a class="reference internal" href="setup.html#flex-board">Flex Board</a></li>
<li class="toctree-l3"><a class="reference internal" href="setup.html#d-a-y-boards">D-A-Y Boards</a></li>
<li class="toctree-l3"><a class="reference internal" href="setup.html#using-the-y-board">Using the Y Board</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="software.html">Software Setup</a><ul>
<li class="toctree-l2"><a class="reference internal" href="software.html#contact-meter">Contact Meter</a><ul>
<li class="toctree-l3"><a class="reference internal" href="software.html#example-meters-yml">Example <code class="docutils literal"><span class="pre">meters.yml</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="software.html#configuration-fields">Configuration Fields</a></li>
<li class="toctree-l3"><a class="reference internal" href="software.html#network-setup">Network Setup</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="software.html#non-contact-meter">Non-contact Meter</a><ul>
<li class="toctree-l3"><a class="reference internal" href="software.html#software-noncontact-meter-meters-yml">Example <code class="docutils literal"><span class="pre">meters.yml</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="software.html#software-noncontact-meter-configuration-fields">Configuration Fields</a></li>
<li class="toctree-l3"><a class="reference internal" href="software.html#software-noncontact-meter-calibration">Calibration</a></li>
<li class="toctree-l3"><a class="reference internal" href="software.html#line-frequency-note">Line Frequency Note</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="operation.html">System Operation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="operation.html#nilm-scope"><code class="docutils literal"><span class="pre">nilm</span> <span class="pre">scope</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="operation.html#nilm-configure"><code class="docutils literal"><span class="pre">nilm</span> <span class="pre">configure</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="readers.html">Reader Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="filters.html">Filter Modules</a></li>
</ul>
</div>
</div>
</div>
<div class="section" id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline"></a></h1>
<ul class="simple">
......@@ -82,7 +139,9 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Set up a NILM Device</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Hardware Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="software.html">Software Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="operation.html">System Operation</a></li>
<li class="toctree-l1"><a class="reference internal" href="readers.html">Reader Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="filters.html">Filter Modules</a></li>
</ul>
......
......@@ -10,6 +10,7 @@
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -26,8 +27,8 @@
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Set up a NILM Device" href="setup.html" />
<link rel="prev" title="Non-Intrusive Load Monitoring (NILM) Documentation" href="index.html" />
<link rel="next" title="Hardware Setup" href="setup.html" />
<link rel="prev" title="Non-Intrusive Load Monitoring" href="index.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
......@@ -44,7 +45,7 @@
<div class="body" role="main">
<div class="section" id="installation">
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1>
<span id="id1"></span><h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1>
<p>The NILM plugin and its dependencies are available on the wattsworth git repository. For access contact <a class="reference external" href="mailto:donnal&#37;&#52;&#48;usna&#46;edu">donnal<span>&#64;</span>usna<span>&#46;</span>edu</a></p>
<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="c1"># install the dependencies</span>
$&gt; sudo apt-get update
......@@ -83,7 +84,9 @@ $&gt; sudo make install
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Set up a NILM Device</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Hardware Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="software.html">Software Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="operation.html">System Operation</a></li>
<li class="toctree-l1"><a class="reference internal" href="readers.html">Reader Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="filters.html">Filter Modules</a></li>
</ul>
......@@ -92,8 +95,8 @@ $&gt; sudo make install
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="index.html" title="previous chapter">Non-Intrusive Load Monitoring (NILM) Documentation</a></li>
<li>Next: <a href="setup.html" title="next chapter">Set up a NILM Device</a></li>
<li>Previous: <a href="index.html" title="previous chapter">Non-Intrusive Load Monitoring</a></li>
<li>Next: <a href="setup.html" title="next chapter">Hardware Setup</a></li>
</ul></li>
</ul>
</div>
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>System Operation &#8212; NILM 1.0 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Reader Modules" href="readers.html" />
<link rel="prev" title="Software Setup" href="software.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head>
<body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="system-operation">
<span id="operation"></span><h1>System Operation<a class="headerlink" href="#system-operation" title="Permalink to this headline"></a></h1>
<p>After your meter is installed and configured you are ready to collect data.
See <a class="reference internal" href="setup.html#hardware-setup"><span class="std std-ref">Hardware Setup</span></a> for details on meter installation and <a class="reference internal" href="software.html#software"><span class="std std-ref">Software Setup</span></a>
for details on meter configuration.</p>
<p>Follow these three steps to start collecting data:</p>
<blockquote>
<div><ol class="arabic simple">
<li>Verify waveforms with <a class="reference internal" href="#operation-nilm-scope"><span class="std std-ref">nilm scope</span></a></li>
<li>Generate joule configuration files with <a class="reference internal" href="#operation-nilm-configure"><span class="std std-ref">nilm configure</span></a></li>
<li>Restart joule and verify the NILM modules are running</li>
</ol>
</div></blockquote>
<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="c1"># 1. verify sensor waveforms look correct</span>
$&gt; nilm scope meterX -c <span class="m">1</span> <span class="m">2</span> <span class="m">3</span>
<span class="c1"># 2. generate joule modules</span>
$&gt; sudo nilm configure
<span class="c1"># 3. restart joule</span>
$&gt; sudo service jouled restart
</pre></div>
</div>
<p>Once joule has restarted check that the modules are operational:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$&gt; joule modules
+--------------------------------+----------------+-----------------+---------+-----+--------------+
<span class="p">|</span> Module <span class="p">|</span> Sources <span class="p">|</span> Destinations <span class="p">|</span> Status <span class="p">|</span> CPU <span class="p">|</span> mem <span class="p">|</span>
+--------------------------------+----------------+-----------------+---------+-----+--------------+
<span class="p">|</span> meter1 process: <span class="p">|</span> /meter1/sensor <span class="p">|</span> /meter1/prep <span class="p">|</span> running <span class="p">|</span> <span class="m">82</span>% <span class="p">|</span> <span class="m">28</span> MB <span class="o">(</span><span class="m">302</span>%<span class="o">)</span> <span class="p">|</span>
<span class="p">|</span> reconstruct -&gt; sinefit -&gt; prep <span class="p">|</span> <span class="p">|</span> /meter1/sinefit <span class="p">|</span> <span class="p">|</span> <span class="p">|</span> <span class="p">|</span>
<span class="p">|</span> <span class="p">|</span> <span class="p">|</span> /meter1/iv <span class="p">|</span> <span class="p">|</span> <span class="p">|</span> <span class="p">|</span>
<span class="p">|</span> meter1 capture: <span class="p">|</span> <span class="p">|</span> /meter1/sensor <span class="p">|</span> running <span class="p">|</span> <span class="m">13</span>% <span class="p">|</span> <span class="m">26</span> MB <span class="o">(</span><span class="m">283</span>%<span class="o">)</span> <span class="p">|</span>
<span class="p">|</span> serial data capture <span class="p">|</span> <span class="p">|</span> <span class="p">|</span> <span class="p">|</span> <span class="p">|</span> <span class="p">|</span>
+--------------------------------+----------------+-----------------+---------+-----+--------------+
$&gt; joule logs <span class="s2">&quot;meterX capture&quot;</span>
<span class="o">[</span><span class="m">24</span> Aug <span class="m">2017</span> <span class="m">16</span>:35:53<span class="o">]</span> ---starting module---
$&gt; joule logs <span class="s2">&quot;meterX process&quot;</span>
<span class="o">[</span><span class="m">24</span> Aug <span class="m">2017</span> <span class="m">16</span>:35:53<span class="o">]</span> ---starting module---
</pre></div>
</div>
<div class="section" id="nilm-scope">
<span id="operation-nilm-scope"></span><h2><code class="docutils literal"><span class="pre">nilm</span> <span class="pre">scope</span></code><a class="headerlink" href="#nilm-scope" title="Permalink to this headline"></a></h2>
<p>NILM scope can display the sensor waveforms for either a non-contact or contact
meter in realtime. The program requires two parameters, the meter name
from the <code class="docutils literal"><span class="pre">meters.yml</span></code> configuration file and a list of channels to display. A
legend is automatically built using the configuration in <code class="docutils literal"><span class="pre">meters.yml</span></code>.</p>
<p>Before you begin collecting data with Joule it is often helpful to view
the sensor waveforms to make sure you are measuring what you expect. You
should check the following:</p>
<dl class="docutils">
<dt>Non-contact meters:</dt>
<dd><ul class="first last simple">
<li>make sure each magnetic sensor picks up a different mixture of phases</li>
<li>if you have multiple e-field pickups select the strongest to use for the voltage reference</li>
</ul>
</dd>
<dt>Contact sensors:</dt>
<dd><ul class="first last simple">
<li>make sure the current channels have an appropriate gain. If they are too low
or are too high (saturating), adjust the resistor banks appropriately.</li>
<li>verify the sensor-&gt;phase mapping in <code class="docutils literal"><span class="pre">meters.yml</span></code> is correct.</li>
</ul>
</dd>
</dl>
<p>Usage</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>nilm scope <span class="o">[</span>-h<span class="o">]</span> --channels CHANNELS <span class="o">[</span>CHANNELS ...<span class="o">]</span>
<span class="o">[</span>--config-file CONFIG_FILE<span class="o">]</span>
meter
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>meter</dt>
<dd>meter name from <mono>meters.yml</mono> (<mono>meter1</mono>,<mono>meter2</mono>, etc)</dd>
<dt>-c CHANNELS</dt>
<dd>Space seperated list of channel indices to plot <mono>[0-5]</mono> for contact meters and <mono>[0-7]</mono> for non-contact meters</dd>
</dl>
</div><p>Example</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$&gt; nilm-scope meter1 -c <span class="m">2</span> <span class="m">4</span> <span class="c1">#display channels 2 and 4 from meter1</span>
</pre></div>
</div>
<div class="figure" id="id1">
<img alt="_images/nilm_scope1.png" src="_images/nilm_scope1.png" />
<p class="caption"><span class="caption-text">NILM Scope running on a contact meter</span></p>
</div>
<div class="figure" id="id2">
<img alt="_images/nilm_scope2.png" src="_images/nilm_scope2.png" />
<p class="caption"><span class="caption-text">NILM Scope running on a non-contact meter</span></p>
</div>
</div>
<div class="section" id="nilm-configure">
<span id="operation-nilm-configure"></span><h2><code class="docutils literal"><span class="pre">nilm</span> <span class="pre">configure</span></code><a class="headerlink" href="#nilm-configure" title="Permalink to this headline"></a></h2>
<p>Build joule module and stream configuration files for all enabled meters.</p>
<p>Usage</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>nilm configure <span class="o">[</span>-h<span class="o">]</span> <span class="o">[</span>--config-file CONFIG_FILE<span class="o">]</span>
<span class="o">[</span>--stream-configs STREAM_DIR<span class="o">]</span>
<span class="o">[</span>--module-configs MODULE_DIR<span class="o">]</span> <span class="o">[</span>--nilmdb-url NILMDB_URL<span class="o">]</span>
<span class="o">[</span>--legacy<span class="o">]</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>--config-file</dt>
<dd>override default location of <mono>meters.yml</mono> file</dd>
<dt>--stream-configs</dt>
<dd>override default location of joule stream *.conf files</dd>
<dt>--module-configs</dt>
<dd>override default location of joule module *.conf files</dd>
<dt>--nilmdb-url</dt>
<dd>override default URL of nilmdb repository</dd>
<dt>--legacy</dt>
<dd>split prep output into per-phase streams. Default is a single prep stream</dd>
</dl>
</div><p>Example</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$&gt; sudo nilm configure <span class="c1">#writing to the joule directories requires root privileges</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">NILM</a></h1>
<h3>Navigation</h3>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Hardware Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="software.html">Software Setup</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">System Operation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#nilm-scope"><code class="docutils literal"><span class="pre">nilm</span> <span class="pre">scope</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#nilm-configure"><code class="docutils literal"><span class="pre">nilm</span> <span class="pre">configure</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="readers.html">Reader Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="filters.html">Filter Modules</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="software.html" title="previous chapter">Software Setup</a></li>
<li>Next: <a href="readers.html" title="next chapter">Reader Modules</a></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2017, John Donnal, James Paris, Steven Leeb, et al.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.2</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
|
<a href="_sources/operation.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>
\ No newline at end of file
......@@ -10,6 +10,7 @@
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -27,7 +28,7 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Filter Modules" href="filters.html" />
<link rel="prev" title="Set up a NILM Device" href="setup.html" />
<link rel="prev" title="System Operation" href="operation.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
......@@ -67,7 +68,9 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Set up a NILM Device</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Hardware Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="software.html">Software Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="operation.html">System Operation</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Reader Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="filters.html">Filter Modules</a></li>
</ul>
......@@ -76,7 +79,7 @@
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="setup.html" title="previous chapter">Set up a NILM Device</a></li>
<li>Previous: <a href="operation.html" title="previous chapter">System Operation</a></li>
<li>Next: <a href="filters.html" title="next chapter">Filter Modules</a></li>
</ul></li>
</ul>
......
......@@ -10,6 +10,7 @@
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -91,7 +92,9 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Set up a NILM Device</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Hardware Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="software.html">Software Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="operation.html">System Operation</a></li>
<li class="toctree-l1"><a class="reference internal" href="readers.html">Reader Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="filters.html">Filter Modules</a></li>
</ul>
......
Search.setIndex({docnames:["filters","index","installation","readers","setup","tools"],envversion:52,filenames:["filters.rst","index.rst","installation.rst","readers.rst","setup.rst","tools.rst"],objects:{},objnames:{},objtypes:{},terms:{For:2,The:2,access:2,also:2,apt:2,avail:2,box:2,build:2,captur:3,clone:2,configur:5,contact:2,content:1,depend:2,devic:1,donnal:2,edu:2,essenti:2,ethstream:2,filter:1,get:2,git:2,index:1,initi:2,instal:1,its:2,make:2,meter:[2,5],modul:1,must:2,nemo:2,net:2,nilm:2,page:1,plugin:2,prep:0,python3:2,rawtoprep:0,reader:1,reconstructor:0,repositori:2,scope:5,search:1,set:1,setup:2,sinefit:0,softwar:2,sudo:2,updat:2,usna:2,wattsworth:2,yml:5,you:2},titles:["Filter Modules","Non-Intrusive Load Monitoring (NILM) Documentation","Installation","Reader Modules","Set up a NILM Device","NILM Tools"],titleterms:{devic:4,document:1,filter:0,indic:1,instal:2,intrus:1,load:1,modul:[0,3],monitor:1,nilm:[1,4,5],non:1,reader:3,set:4,tabl:1,tool:5}})
\ No newline at end of file
Search.setIndex({docnames:["filters","index","installation","operation","readers","setup","software"],envversion:52,filenames:["filters.rst","index.rst","installation.rst","operation.rst","readers.rst","setup.rst","software.rst"],objects:{},objnames:{},objtypes:{},terms:{"2998m":6,"3khz":6,"500w":6,"50hz":6,"60hz":6,"case":6,"default":[3,6],"final":6,"import":6,"new":6,"switch":5,"true":6,"try":[5,6],"while":6,For:[2,5,6],The:[1,2,3,5,6],Then:6,There:[1,5,6],These:6,Use:[5,6],Using:1,_setup_integr:6,about:6,absolut:5,access:2,accordingli:6,accur:1,accuraci:5,acquisit:5,adapat:5,adapt:[5,6],add:6,addit:[1,5,6],address:6,adjust:3,advanc:6,after:[3,5,6],again:6,align:5,all:[3,5,6],alpha_lem:5,alreadi:6,also:[2,5,6],altern:6,amount:6,amp:[5,6],analog:5,ani:6,annapoli:1,anoth:6,answer:6,appli:6,appropri:3,approxim:6,apt:2,argument:3,arm:5,arrai:6,ask:6,assign:[5,6],associ:6,assum:6,attach:5,aug:3,automat:[3,6],avail:[2,5,6],avg:6,background:6,backsid:6,bandwidth:1,bank:3,base:6,befor:[3,5,6],begin:3,being:6,below:[5,6],between:6,blank:6,block:6,blue:6,board:[1,6],both:[5,6],bottom:6,bound:6,box:[2,5,6],build:[2,3,6],built:[3,6],bulb:6,bus:6,cabl:[5,6],calcul:[5,6],calibr:[1,5],can:[1,3,5,6],cancel:6,cannot:6,captur:[1,3,4,5,6],care:6,cartoon:5,chang:6,channel:[3,5,6],chart:5,check:[3,5,6],checkbox:6,choos:6,circuitri:5,cli:6,cli_nilmtool:6,click:6,clone:2,close:6,code:6,coeffeci:6,coeffici:6,collect:[1,3,6],command:[5,6],commerci:[1,6],commit:6,common:6,commun:6,compens:5,complet:6,comput:[1,5,6],conductor:5,conf:3,config:[3,6],config_fil:3,configur:[1,5],connect:[1,6],constant:6,consum:6,contact:[1,2,3],contain:5,content:1,convers:[1,6],convert:[5,6],copi:6,correct:[3,5,6],correctli:[5,6],cpu:3,creat:6,ctrl:5,current:[1,3,5],custom:6,cycle_length:6,dai:6,data:[1,3,5,6],databas:6,datasheet:5,dboard:6,debug:6,decim:6,def:6,degre:6,delta:6,depend:[2,5,6],deriv:[5,6],describ:6,destin:3,detail:[3,5,6],detect:6,determin:[5,6],dev:5,devic:6,dhcp:6,dialog:6,differ:[1,3,5,6],difficult:1,digit:[5,6],digitally_integr:6,dip:5,directli:5,directori:[3,5],disabl:6,discard:6,disk:6,displai:3,doe:[5,6],done:6,donnal:2,doubl:6,draw:6,drive:6,durat:6,dure:6,each:[3,5,6],easier:5,easili:1,edit:6,editor:6,edu:2,effect:6,eight:5,either:[1,3,6],electr:[1,5,6],electrician:1,electromagnet:1,empti:5,enabl:[3,6],ensur:6,enter:6,entri:5,environ:6,error:6,especi:6,essenti:2,et100:6,etc:[3,6],ethernet:6,ethstream:2,exampl:[1,3,5],execut:5,exict:5,exist:[5,6],expect:3,expens:1,experienc:6,factor:[1,6],fals:6,field:[1,3,5],figur:[5,6],file:[3,5,6],filter:[1,6],find:6,fir:6,firmwar:5,first:6,fit:6,flex:[1,6],flexibl:5,flush:6,follow:[3,5,6],formula:5,found:[5,6],four:5,frequenc:1,from:[3,5,6],gain:3,gatewai:6,gener:[3,6],geometri:5,get:[2,6],git:2,give:6,green:6,hardwar:[1,3,6],hardwir:6,has:[3,5,6],has_neutr:6,have:[3,5,6],header:5,help:[3,6],here:6,high:[1,3,6],hit:6,hold:5,host:6,hour:6,how:[5,6],href:6,identifi:6,improv:6,incandesc:6,index:[1,5,6],indic:[3,5,6],indirectli:5,inform:[5,6],initi:[2,6],input:5,instal:[1,3,5,6],instead:6,instruct:6,integr:[5,6],interfac:6,ip_address:6,ipv4:6,its:[2,5,6],joul:[3,6],jumper:5,keep:6,kei:6,kind:1,known:5,label:5,labjack:[5,6],least:[5,6],led:6,left:6,lefthand:5,legaci:3,legend:3,lem:[5,6],length:6,less:6,light:6,like:6,line:[1,5],link:6,list:[3,6],load:[5,6],local:6,locat:[3,5,6],log:3,longer:6,look:[3,6],loss:6,low:3,mac:6,magnet:[3,5,6],mai:[5,6],main:5,make:[2,3,5,6],manag:[1,6],mani:[5,6],manual:6,map:[3,5,6],mark:6,match:6,matter:6,max:6,mdev:6,measur:[1,3,5,6],mem:3,meter1:[3,6],meter2:[3,6],meter:[1,2,3],metern:6,meterx:[3,6],meterxxxx:[5,6],method:6,micro:6,microcontrol:5,min:6,mix:5,mixtur:3,mode:6,modul:[1,3,6],module_dir:3,molex:5,monitor:6,month:6,more:[1,5,6],most:6,mount:5,move:6,much:6,multiphas:6,multipl:[3,5,6],multiplex:5,must:[2,5,6],name:[3,6],navi:1,need:[5,6],nemo:2,net:2,netmask:6,network:1,neutral:6,nilm:[1,2,5,6],nilmdb:[3,6],nilmdb_url:3,nominal_rms_voltag:6,non:3,non_contact:6,noncontact:[5,6],note:[1,5],number:[5,6],occur:6,off:6,often:3,ohm:5,onc:[3,5,6],one:[1,5,6],onli:[5,6],open:6,oper:[1,6],opt:6,optim:[5,6],option:[5,6],order:[5,6],orient:6,other:[5,6],out:6,outlet:6,output:[3,5,6],outsid:5,over:[5,6],overhead:6,overrid:3,own:6,packag:6,packet:6,page:[1,6],pair:5,panel:5,paramet:3,pcb:5,per:[3,5],phase:[3,5,6],pick:3,pickup:3,ping:6,pinout:5,pipelin:[],place:[5,6],placement:[5,6],platform:5,plot:[3,6],plottabl:6,plug:[5,6],plugin:2,poor:6,port:6,posit:5,power:[1,5,6],powerlin:[1,5],prep:[0,3,6],prevent:6,previou:6,print:[5,6],privileg:3,problemat:6,process:[3,6],processor:6,product:6,program:[3,6],prompt:6,proport:5,provid:[5,6],ptat:5,python3:[2,6],qualiti:5,quickli:1,rate:6,ratio:5,raw:5,rawtoprep:0,read:5,reader:1,readi:[3,6],realtim:3,rebuild:6,recalibr:5,receiv:6,recommend:[5,6],reconfigur:6,reconstruct:3,reconstructor:[0,6],refer:[3,6],rel:6,renam:6,repositori:[2,3],requir:[1,3,5,6],residenti:6,resist:[5,6],resistor:[3,5,6],restart:[3,6],result:6,retain:6,reus:6,ribbon:5,role:6,root:3,rotat:[5,6],roughli:6,rout:6,rtt:6,run:[3,6],same:[5,6],sampl:[5,6],satur:3,save:6,scale:[5,6],scenario:6,schemat:5,scope:[1,5,6],screen:5,script:6,search:1,second:6,secur:5,see:[3,5,6],seea:6,select:[3,5,6],self:6,sensor:[1,3,5],sensor_index:[5,6],sensor_indic:6,sensor_scal:6,sent:6,separ:5,seper:[3,5,6],sequenti:6,serial:[3,5],serial_numb:6,servic:[3,6],set:[5,6],setup:[1,2,3],share:6,ship:1,should:[1,3,5,6],show:5,shown:[5,6],signal:[5,6],silk:5,sinefit:[0,3,6],sinefit_phas:6,sinefit_rot:6,singl:[1,3,5,6],site:6,six:5,size:6,skip:6,small:6,smart:6,softwar:[1,2,3],solid:6,some:6,sourc:3,space:[3,6],specif:6,specifi:6,split:3,stabil:5,standard:[5,6],start:[3,5],statist:6,statu:[3,6],step:[1,3,5,6],sticker:6,storag:6,store:6,stream:3,stream_dir:3,strongest:[3,5,6],subnet:6,sudo:[2,3,6],suffici:6,suit:5,summari:6,sure:[3,5,6],system:[1,5,6],tab:6,temperatur:5,termin:[5,6],text:6,textarea:6,than:[5,6],thei:[3,6],them:6,thi:[5,6],three:[3,5,6],through:[5,6],tie:5,time:6,too:3,tool:6,total:6,touch:1,trace:5,traffic:6,transmit:6,trendnet:6,tu2:6,turn:6,twist:5,two:[1,3,5,6],type:[1,5,6],ue9:5,unavail:6,uncom:6,unexpect:6,uniqu:6,unit:6,unless:[5,6],until:6,updat:2,url:3,usag:3,usb:[5,6],use:[3,5,6],used:[5,6],useful:6,uses:[1,5],using:[3,5,6],usna:2,usual:5,util:[5,6],valid:6,valu:[5,6],varieti:5,veri:6,verifi:3,view:[3,5],visibl:5,visual:6,volt:[5,6],voltag:[1,3,5],wait:6,want:6,watt:6,wattag:6,wattsworth:2,waveform:[3,6],web:6,websit:6,week:6,well:[5,6],what:3,when:[5,6],where:6,whether:6,which:[5,6],wide:5,window:6,wire:6,without:1,work:6,worri:6,would:6,write:3,year:6,yml:[1,3,5],you:[2,3,5,6],your:[3,5,6],zero:5,zip:5},titles:["Filter Modules","Non-Intrusive Load Monitoring","Installation","System Operation","Reader Modules","Hardware Setup","Software Setup"],titleterms:{Using:5,board:5,calibr:6,configur:[3,6],connect:5,contact:[5,6],convers:5,current:6,exampl:6,factor:5,field:6,filter:0,flex:5,frequenc:6,hardwar:5,here:1,indic:1,instal:2,intrus:1,line:6,load:1,meter:[5,6],modul:[0,4],monitor:1,network:6,nilm:3,non:[1,5,6],note:6,oper:3,reader:4,scope:3,sensor:6,setup:[5,6],softwar:6,start:1,stream:6,system:3,tabl:1,voltag:6,yml:6}})
\ No newline at end of file
......@@ -6,10 +6,11 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Set up a NILM Device &#8212; NILM 1.0 documentation</title>
<title>Hardware Setup &#8212; NILM 1.0 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -26,7 +27,7 @@
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Reader Modules" href="readers.html" />
<link rel="next" title="Software Setup" href="software.html" />
<link rel="prev" title="Installation" href="installation.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
......@@ -43,8 +44,127 @@
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="set-up-a-nilm-device">
<h1>Set up a NILM Device<a class="headerlink" href="#set-up-a-nilm-device" title="Permalink to this headline"></a></h1>
<div class="section" id="hardware-setup">
<span id="id1"></span><h1>Hardware Setup<a class="headerlink" href="#hardware-setup" title="Permalink to this headline"></a></h1>
<div class="section" id="contact-meter">
<span id="hardware-setup-contact-meter"></span><h2>Contact Meter<a class="headerlink" href="#contact-meter" title="Permalink to this headline"></a></h2>
<p>The contact meter uses LEM voltage and current sensors. The sensors are
digitized by a UE9 LabJack. The LabJack has multiple input channels. The sensor
to LabJack channel mapping (<code class="docutils literal"><span class="pre">index</span></code>) is shown in the figure below. The
current sensors connect to the PCB with Molex plugs. Trace the twisted cable
from the plug to the panel mounts and label the outside of the box before
installing the system. This will make it easier to assign the correct channel
mappings.</p>
<div class="section" id="connections">
<span id="hardware-setup-contact-meter-connections"></span><h3>Connections<a class="headerlink" href="#connections" title="Permalink to this headline"></a></h3>
<img alt="_images/nemo_pinout.png" src="_images/nemo_pinout.png" />
<p>The sensors must be scaled correctly to convert the measurements to volts and
amps. The voltage scale factor is set in hardware to <code class="docutils literal"><span class="pre">0.0919</span></code> and the current
scale factor can be calculated using the formula in the figure below.
<code class="docutils literal"><span class="pre">alpha_LEM</span></code> is the <em>Conversion ratio</em> found on the LEM sensor datasheet. This
is usually on the order of 1000. See <a class="reference external" href="_static/hardware/la55.pdf">LA 55-P datasheet</a> for an example.
<code class="docutils literal"><span class="pre">R</span></code> is the load resistance set by the channel DIP switches (see the chart
below).</p>
</div>
<div class="section" id="conversion-factors">
<span id="hardware-setup-contact-meter-conversion-factors"></span><h3>Conversion Factors<a class="headerlink" href="#conversion-factors" title="Permalink to this headline"></a></h3>
<img alt="_images/nemo_constants.png" src="_images/nemo_constants.png" />
<p>Configure <code class="docutils literal"><span class="pre">meters.yml</span></code> with the LabJack <code class="docutils literal"><span class="pre">index</span></code> to sensor mapping and the
scale factor required for each sensor. For more information see Configuring a
<a class="reference internal" href="software.html#software-contact-meter"><span class="std std-ref">Contact Meter</span></a>.</p>
</div>
</div>
<div class="section" id="non-contact-meter">
<span id="hardware-setup-noncontact-meter"></span><h2>Non-Contact Meter<a class="headerlink" href="#non-contact-meter" title="Permalink to this headline"></a></h2>
<p>The non-contact meter uses magnetic and electric field sensors to indirectly
measure the current and voltage in a powerline. This system is easier to install
than a contact meter but requires an additional calibration step. There are two
different non-contact sensor hardware platforms. The Flex Board and the D-A-Y
Boards. Each non-contact board has a firmware-assigned serial number. A computer
may not have two non-contact meters with the same serial number. To view the
serial number (if it is not printed on the meter) execute the following command
in a terminal:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$&gt; ls /dev/nilm
meterXXXX-ctrl meterXXXX-data
<span class="c1">#each meter should have two entries,</span>
<span class="c1"># meterXXXX is the serial number</span>
</pre></div>
</div>
<p>If this directory is empty or does not exist check to make sure the noncontact
meter is connected and powered on.</p>
<div class="section" id="flex-board">
<span id="hardware-setup-noncontact-meter-flex-board"></span><h3>Flex Board<a class="headerlink" href="#flex-board" title="Permalink to this headline"></a></h3>
<p>The Flex Board is an all-in-one platform with both sensors and a microcontroller
for data acquisition. The main PCB has an electric field sensor, and a magnetic
field sensor. There is also compensation circuitry to provide an integrated
electric field output which is proportional to the line voltage. The magnetic
sensor also contains a PTAT (proportional to absolute temperature) sensor. The
flexible arms hold four more magnetic sensors. The microcontroller samples all
eight sensor outputs and provides the values over USB. The sensor indices are
provided in the figure below. Unless there is a need for a hardware integrated
signal, the raw electric field output (index 0) with digital integration is the
recommended configuration.</p>
<p>See Configuring a <a class="reference internal" href="software.html#software-noncontact-meter"><span class="std std-ref">Non-contact Meter</span></a> for details on setting
up your <code class="docutils literal"><span class="pre">meters.yml</span></code> file and starting the data capture.</p>
<div class="figure" id="id2">
<img alt="_images/flex_pinout.png" src="_images/flex_pinout.png" />
<p class="caption"><span class="caption-text">Flex board <code class="docutils literal"><span class="pre">index</span></code> to sensor mapping. See the board silk screen header pinout.</span></p>
</div>
</div>
<div class="section" id="d-a-y-boards">
<span id="hardware-setup-noncontact-meter-day-boards"></span><h3>D-A-Y Boards<a class="headerlink" href="#d-a-y-boards" title="Permalink to this headline"></a></h3>
<p>The other non-contact platform is a suite of three seperate boards. The standard
configuration is a data acquisition (D) Board and at least as many analog sensor
(A) boards as phases (eg 3 phase system = 3 or more A Boards). Each A-Board has
a current sensor and a “derivative of voltage” sensor. The figure below shows
the channel to sensor mapping when A-Boards are connected directly to the
D-Board.</p>
<div class="figure" id="id3">
<img alt="_images/dboard_pinout.png" src="_images/dboard_pinout.png" />
<p class="caption"><span class="caption-text">D-Board <code class="docutils literal"><span class="pre">index</span></code> to sensor mapping. Each A-Board measures current
and the derivative of voltage</span></p>
</div>
<p>Securely connect each A-Board to the power cable using a zip tie as shown. The
accuracy of the meter depends on the stability of this connection. If the
A-Boards rotate after installation the meter will need to be recalibrated. The
quality of the output depends on how well the sensors are positioned. If the
location of the conductors is visible try to align each A-Boards to a separate
conductor. If the conductor geometry is not known use the nilm-scope utility
once you have set up the meter in <code class="docutils literal"><span class="pre">meters.yml</span></code> to determine optimal sensor
placement. Loads on each phase should exicte a different “mix” of the sensors.
Only one of the four A-Boards is used to determine the line
voltage. Use the nilm scope utility to determine which A-Board has
the strongest reading and use its index as the <code class="docutils literal"><span class="pre">voltage:sensor_index</span></code>
in <code class="docutils literal"><span class="pre">meters.yml</span></code>.</p>
<p>See Configuring a <a class="reference internal" href="software.html#software-noncontact-meter"><span class="std std-ref">Non-contact Meter</span></a> for details on setting
up your <code class="docutils literal"><span class="pre">meters.yml</span></code> file and starting the data capture.</p>
<div class="figure align-left" id="id4" style="width: 40%">
<img alt="_images/non_contact_1.JPG" src="_images/non_contact_1.JPG" />
<p class="caption"><span class="caption-text">Capture the ribbon cable and securely attach to the powerline</span></p>
</div>
<div class="figure align-right" id="id5" style="width: 40%">
<img alt="_images/non_contact_2.JPG" src="_images/non_contact_2.JPG" />
<p class="caption"><span class="caption-text">Multiple sensors can be connected with a single zip tie</span></p>
</div>
</div>
<div class="section" id="using-the-y-board">
<span id="hardware-setup-noncontact-meter-using-the-y-board"></span><h3>Using the Y Board<a class="headerlink" href="#using-the-y-board" title="Permalink to this headline"></a></h3>
<p>The non-contact meter can adapt to a wide variety of installation types through
the use of the Y Board adapater. The Y Board multiplexes two A Boards into a
single pair of channels and provides optional hardware integration. The lefthand
figure below shows a cartoon of the Y Board schematic. Zero ohm 0603 jumpers are
used to select which of the six available inputs are placed on each output (S1
and S2). <em>Note: only use one jumper per channel</em></p>
<div class="figure align-left" id="id6" style="width: 40%">
<img alt="_images/non_contact_yboard_pic.png" src="_images/non_contact_yboard_pic.png" />
<p class="caption"><span class="caption-text">Y Board configured for V1 and integrated V1 output</span></p>
</div>
<div class="figure align-right" id="id7" style="width: 40%">
<img alt="_images/non_contact_yboard.png" src="_images/non_contact_yboard.png" />
<p class="caption"><span class="caption-text">Y Board jumper pinout. Use 0603 zero ohm resistors</span></p>
</div>
</div>
</div>
</div>
......@@ -66,7 +186,22 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Set up a NILM Device</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Hardware Setup</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#contact-meter">Contact Meter</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#connections">Connections</a></li>
<li class="toctree-l3"><a class="reference internal" href="#conversion-factors">Conversion Factors</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#non-contact-meter">Non-Contact Meter</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#flex-board">Flex Board</a></li>
<li class="toctree-l3"><a class="reference internal" href="#d-a-y-boards">D-A-Y Boards</a></li>
<li class="toctree-l3"><a class="reference internal" href="#using-the-y-board">Using the Y Board</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="software.html">Software Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="operation.html">System Operation</a></li>
<li class="toctree-l1"><a class="reference internal" href="readers.html">Reader Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="filters.html">Filter Modules</a></li>
</ul>
......@@ -76,7 +211,7 @@
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="installation.html" title="previous chapter">Installation</a></li>
<li>Next: <a href="readers.html" title="next chapter">Reader Modules</a></li>
<li>Next: <a href="software.html" title="next chapter">Software Setup</a></li>
</ul></li>
</ul>
</div>
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Software Setup &#8212; NILM 1.0 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="System Operation" href="operation.html" />
<link rel="prev" title="Hardware Setup" href="setup.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head>
<body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="software-setup">
<span id="software"></span><h1>Software Setup<a class="headerlink" href="#software-setup" title="Permalink to this headline"></a></h1>
<p>The NILM is completely configured by the <code class="docutils literal"><span class="pre">meters.yml</span></code> located in
<code class="docutils literal"><span class="pre">/opt/configs/</span></code>. An example is located in <code class="docutils literal"><span class="pre">/opt/configs/meters.example.yml</span></code>.
This file lists sample configurations for both contact and noncontact meters. A
single computer can run multiple meters of either type. Meters are listed
sequentially as <code class="docutils literal"><span class="pre">meter1</span></code> to <code class="docutils literal"><span class="pre">meterN</span></code>. After any change to this file,
reconfigure the nilm joule modules and restart the joule system:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$&gt; sudo nilm configure
$&gt; sudo service jouled restart
</pre></div>
</div>
<p>Some settings may not be changed after a meter is initialized (eg the number of
phases), others may be changed at any time (eg the amount of data to keep on
disk).</p>
<div class="section" id="contact-meter">
<span id="software-contact-meter"></span><h2>Contact Meter<a class="headerlink" href="#contact-meter" title="Permalink to this headline"></a></h2>
<p>The contact meter should be installed before it is configured. Make careful note
of the current sensor connections and their relative orientations. Run the
command below to check the communication link between the computer and the
meter. You should have 0% packet loss. If you cannot ping the LabJack
see <a class="reference internal" href="#software-contact-meter-network-setup"><span class="std std-ref">Network Setup</span></a> for help.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$&gt; ping &lt;LabJack IP Address&gt; -c <span class="m">4</span>
--- <span class="m">192</span>.168.1.209 ping statistics ---
<span class="m">4</span> packets transmitted, <span class="m">4</span> received, <span class="m">0</span>% packet loss, <span class="nb">time</span> 2998ms
rtt min/avg/max/mdev <span class="o">=</span> <span class="m">0</span>.026/0.031/0.035/0.006 ms
</pre></div>
</div>
<p>Open <code class="docutils literal"><span class="pre">meters.example.yml</span></code> in a text editor and copy the example configuration
to <code class="docutils literal"><span class="pre">/opt/configs/meters.yml</span></code>. Create this file if it does not exist. If there
is already a <code class="docutils literal"><span class="pre">meter1</span></code>, give this meter a unique index (eg <code class="docutils literal"><span class="pre">meter2</span></code>). If you
reuse a meter name, for example change meter1 from a contact meter to a
non-contact meter, or change the meter from 2 phase to 3 phase operation, you
must either rename or completely flush the previous meter’s data streams from
the database. See &lt;a href=”/help/cli#cli_nilmtools”&gt; command line tools&lt;/a&gt;
for details on moving and renaming streams in NilmDB.</p>
<p>After the <code class="docutils literal"><span class="pre">meters.yml</span></code> file is configured the meter is ready to collect data.
See <a class="reference internal" href="operation.html#operation"><span class="std std-ref">System Operation</span></a> for more details.</p>
<div class="section" id="example-meters-yml">
<span id="software-contact-meter-meters-yml"></span><h3>Example <code class="docutils literal"><span class="pre">meters.yml</span></code><a class="headerlink" href="#example-meters-yml" title="Permalink to this headline"></a></h3>
<p>Note that all fields are required. Details about each field are described after
the example. Standard defaults are provided but <code class="docutils literal"><span class="pre">sensor_scales</span></code> must be set
for your specific installation (see contact meter hardware). The nilm scope
utility is useful for ensuring the channel mappings and sinefit rotations are
correct.</p>
<div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">meter1</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">type</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">contact</span>
<span class="l l-Scalar l-Scalar-Plain">enabled</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="c1"># set to false to disable this meter</span>
<span class="l l-Scalar l-Scalar-Plain">ip_address</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">192.168.1.209</span> <span class="c1"># default LabJack address</span>
<span class="l l-Scalar l-Scalar-Plain">phases</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">3</span> <span class="c1"># 1 - 3</span>
<span class="l l-Scalar l-Scalar-Plain">sensors</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">voltage</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">sensor_indices</span><span class="p p-Indicator">:</span> <span class="p p-Indicator">[</span><span class="nv">3</span><span class="p p-Indicator">,</span><span class="nv">4</span><span class="p p-Indicator">,</span><span class="nv">5</span><span class="p p-Indicator">]</span> <span class="c1"># maps to phase A,B,C</span>
<span class="l l-Scalar l-Scalar-Plain">sensor_scales</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">0.0919</span> <span class="c1"># built-in constant</span>
<span class="l l-Scalar l-Scalar-Plain">sinefit_phase</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">A</span> <span class="c1"># [A,B,C] voltage used by sinefit</span>
<span class="l l-Scalar l-Scalar-Plain">nominal_rms_voltage</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">120</span> <span class="c1"># used to scale prep to watts</span>
<span class="l l-Scalar l-Scalar-Plain">current</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">sensor_indices</span><span class="p p-Indicator">:</span> <span class="p p-Indicator">[</span><span class="nv">0</span><span class="p p-Indicator">,</span><span class="nv">1</span><span class="p p-Indicator">,</span><span class="nv">2</span><span class="p p-Indicator">]</span> <span class="c1"># maps to phase A,B,C</span>
<span class="l l-Scalar l-Scalar-Plain">sensor_scales</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">XX</span> <span class="c1"># set by resistors and LEM, see hardware help page</span>
<span class="l l-Scalar l-Scalar-Plain">sinefit_rotations</span><span class="p p-Indicator">:</span> <span class="p p-Indicator">[</span><span class="nv">0</span><span class="p p-Indicator">,</span><span class="nv">120</span><span class="p p-Indicator">,</span><span class="nv">240</span><span class="p p-Indicator">]</span> <span class="c1"># relative to sinefit_phase voltage</span>
<span class="l l-Scalar l-Scalar-Plain">streams</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">sinefit</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">decimate</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="c1"># if [false] only the base stream will be saved</span>
<span class="l l-Scalar l-Scalar-Plain">keep</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">1m</span> <span class="c1"># how much data to keep as [amount][units]</span>
<span class="l l-Scalar l-Scalar-Plain">iv</span><span class="p p-Indicator">:</span> <span class="c1"># h: hours, d: days, w: weeks</span>
<span class="l l-Scalar l-Scalar-Plain">decimate</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="c1"># m: months, y: years</span>
<span class="l l-Scalar l-Scalar-Plain">keep</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">1w</span> <span class="c1"># if [false] no data will be saved</span>
<span class="l l-Scalar l-Scalar-Plain">prep</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">decimate</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="l l-Scalar l-Scalar-Plain">keep</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">3w</span>
<span class="l l-Scalar l-Scalar-Plain">sensor</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">keep</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">false</span>
</pre></div>
</div>
</div>
<div class="section" id="configuration-fields">
<span id="software-contact-meter-configuration-fields"></span><h3>Configuration Fields<a class="headerlink" href="#configuration-fields" title="Permalink to this headline"></a></h3>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">type</span></code></dt>
<dd>This should be set to <code class="docutils literal"><span class="pre">contact</span></code></dd>
<dt><code class="docutils literal"><span class="pre">enabled</span></code></dt>
<dd><code class="docutils literal"><span class="pre">true</span></code>/<code class="docutils literal"><span class="pre">false</span></code> If false, no data is captured from this meter</dd>
<dt><code class="docutils literal"><span class="pre">ip_address</span></code></dt>
<dd>The IP address of the LabJack. This defaults to 192.168.1.209 but can be set
to another value using the LabJack software (Window’s only). When more than
one Contact NILM is used or if the 192.168.1.0 subnet is unavailable you must
change this default value. Note that each LabJack must be on it’s own subnet.
See <a class="reference internal" href="#software-contact-meter-network-setup"><span class="std std-ref">Network Setup</span></a> for more details.</dd>
<dt><code class="docutils literal"><span class="pre">phases</span></code></dt>
<dd>A value between 1 and 3. This depends on the power system being monitored.</dd>
</dl>
<div class="section" id="sensors-voltage">
<h4><code class="docutils literal"><span class="pre">sensors:voltage</span></code><a class="headerlink" href="#sensors-voltage" title="Permalink to this headline"></a></h4>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">sensor_indices</span></code></dt>
<dd>These are the voltage sensor LabJack channels. The sensors are connected to
channels 3 4 and 5. The order of this list is used to name Phases A, B, and C.
When you are installing the system note the phase connection and order this
list accordingly (see <a class="reference internal" href="setup.html#hardware-setup-contact-meter-connections"><span class="std std-ref">Connections</span></a> for
reference).</dd>
<dt><code class="docutils literal"><span class="pre">sensor_scales</span></code></dt>
<dd>The scaling coeffecient to convert sensor output to Volts. This is hardwired
to <code class="docutils literal"><span class="pre">0.0919</span></code>. Seperate scaling factors may be applied to each sensor by using
an array instead of a single value: <code class="docutils literal"><span class="pre">[XA,XB,XC]</span></code> where X is the scale factor
for each phase.</dd>
<dt><code class="docutils literal"><span class="pre">sinefit_phase</span></code></dt>
<dd><code class="docutils literal"><span class="pre">A</span></code>,“B“,“C“ The phase used by the sinefit processor.</dd>
<dt><code class="docutils literal"><span class="pre">nominal_rms_voltage</span></code></dt>
<dd>This is used to scale prep to approximate power (Watts)</dd>
</dl>
</div>
<div class="section" id="sensors-current">
<h4><code class="docutils literal"><span class="pre">sensors:current</span></code><a class="headerlink" href="#sensors-current" title="Permalink to this headline"></a></h4>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">sensor_indices</span></code></dt>
<dd>These are the current sensor LabJack channels. The sensors are connected to
channels 0 1 and 2. The order of this list should match the order used in the
voltage configuration (seea
<a class="reference internal" href="setup.html#hardware-setup-contact-meter-connections"><span class="std std-ref">Connections</span></a> for reference).</dd>
<dt><code class="docutils literal"><span class="pre">sensor_scales</span></code></dt>
<dd>The scaling coeffecient to convert sensor output to Amps. See
<a class="reference internal" href="setup.html#hardware-setup-contact-meter-conversion-factors"><span class="std std-ref">Conversion Factors</span></a> for details on
calculating this value. Seperate scaling factors may be applied to each sensor
by using an array instead of a single value: <code class="docutils literal"><span class="pre">[XA,XB,XC]</span></code> where X is the
scale factor for each phase.</dd>
<dt><code class="docutils literal"><span class="pre">sinefit_rotation</span></code></dt>
<dd>The phase difference in degrees from the <code class="docutils literal"><span class="pre">sinefit_phase</span></code> voltage for each
phase (note that the coeffecient for the phase used by sinefit should be a 0
in this array)</dd>
</dl>
</div>
<div class="section" id="streams">
<span id="software-contact-meter-configuration-fields-streams"></span><h4><code class="docutils literal"><span class="pre">streams</span></code><a class="headerlink" href="#streams" title="Permalink to this headline"></a></h4>
<p>The <code class="docutils literal"><span class="pre">streams</span></code> configuration block determine how much data is retained for each
stream and whether or not the stream is decimated as it is collected. It is very
important to make sure the total size required by the database will fit on your
storage drive.</p>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">decimate</span></code></dt>
<dd><code class="docutils literal"><span class="pre">true</span></code>/<code class="docutils literal"><span class="pre">false</span></code> Whether or not the stream should be decimated. This makes
the stream plottable in the web interface but roughly doubles the amount of
space required to store this data. There is also some network overhead
associated with decimation so if you are experiencing high processor load try
disabling this for some streams.</dd>
<dt><code class="docutils literal"><span class="pre">keep</span></code></dt>
<dd>How much data to keep for this stream. The is specified as a coefficient and
unit. Valid units are <code class="docutils literal"><span class="pre">h</span></code> for hours, <code class="docutils literal"><span class="pre">w</span></code> for weeks, <code class="docutils literal"><span class="pre">m</span></code> for months, and
<code class="docutils literal"><span class="pre">y</span></code> for years. Set to <code class="docutils literal"><span class="pre">false</span></code> to discard the stream data.</dd>
</dl>
</div>
</div>
<div class="section" id="network-setup">
<span id="software-contact-meter-network-setup"></span><h3>Network Setup<a class="headerlink" href="#network-setup" title="Permalink to this headline"></a></h3>
<p>The LabJacks in contact meters require an ethernet connection. If you need
more ethernet ports than the computer has available, use a USB to ethernet
adapter. While most adapters should work out of the box, the recommended
adapter is the <strong>TU2-ET100</strong> from TRENDnet. After you connect the contact
meter to the computer note the MAC address of the USB adapter. This is found
on the backside of the TU2-ET100 as shown in the figure below. Open the
network connection editor and configure the interface for the MAC address used
by the NILM. Each interface has a unique MAC address and it is helpful to
rename the connection to “NILM” or “Web” depending on the role of the
interface. For interfaces connecting to the web, set the IPv4 address method
to <strong>DHCP</strong> from the <strong>IPv4 Settings</strong> tab.</p>
<div class="figure align-left" id="id7" style="width: 40%">
<a class="reference internal image-reference" href="_images/network_setup_1.png"><img alt="_images/network_setup_1.png" src="_images/network_setup_1.png" style="height: 288px;" /></a>
<p class="caption"><span class="caption-text">Find the MAC address for the LabJack connection. On the TU2-ET100 this is on
the bottom sticker.</span></p>
</div>
<div class="figure align-right" id="id8" style="width: 45%">
<img alt="_images/network_setup_2.png" src="_images/network_setup_2.png" />
<p class="caption"><span class="caption-text">Configure the network interface for the MAC address associated with the LabJack.</span></p>
</div>
<p>For interfaces connected to a contact meter select the <strong>IPv4 Settings</strong> tab and
set Method to <strong>manual</strong>. Click <code class="docutils literal"><span class="pre">[Add]</span></code> and enter an IP address on the same
subnet as the LabJack. Unless you have set up an advanced configuration the IP
address should share the first three numbers as the LabJack and use a different
final number. For example, the default LabJack address is 192.168.1.209 and a
valid host IP address would be 192.168.1.200. The <strong>Netmask</strong> should be 24 or
255.255.255.0 and the <strong>Gateway</strong> should be left blank. Note that each interface
must be on a seperate subnet. If you need more than one contact meter you will
have to assign a different IP address to the additional LabJack devices. This is
done with the commercial configuration tool available through the <a class="reference external" href="http://labjack.com">LabJack
website</a>.</p>
<div class="figure align-left" id="id9" style="width: 43%">
<img alt="_images/network_setup_3.png" src="_images/network_setup_3.png" />
<p class="caption"><span class="caption-text">Assign an address in the same subnet as the LabJack</span></p>
</div>
<div class="figure align-right" id="id10" style="width: 42%">
<img alt="_images/network_setup_4.png" src="_images/network_setup_4.png" />
<p class="caption"><span class="caption-text">Select the local routing check box in the Routes dialog</span></p>
</div>
<p>For multiple LabJack installations address them as 192.168.X.209 where X is
different for each device (between 1 - 255). After you assign the IP address
click <code class="docutils literal"><span class="pre">[Routes...]</span></code> and select the checkbox for local routing only as shown
in the figure. This prevents web bound traffic from getting sent to the
LabJack. Once you have completed the IP address configuration click
<code class="docutils literal"><span class="pre">[Save...]</span></code> to close the network configuration dialog. Open a terminal and
enter the following command to reconfigure the network interfaces to use the
new values:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$&gt; sudo service network-manager restart
</pre></div>
</div>
</div>
</div>
<div class="section" id="non-contact-meter">
<span id="software-noncontact-meter"></span><h2>Non-contact Meter<a class="headerlink" href="#non-contact-meter" title="Permalink to this headline"></a></h2>
<p>There are many different configurations for the non-contact sensors. See
<a class="reference internal" href="setup.html#hardware-setup-noncontact-meter"><span class="std std-ref">Non-Contact Meter</span></a> for detailed information on connecting
and configuring the sensor hardware. The nilm scope utility can be helpful in
finding optimal installation sites for the non-contact sensors.</p>
<p>Open <code class="docutils literal"><span class="pre">/opt/configs/meters.example.yml</span></code> in a text editor and copy over the
example non_contact configuration to <code class="docutils literal"><span class="pre">/opt/configs/meters.yml</span></code>. Create this
file if it does not exist. If there is already a <code class="docutils literal"><span class="pre">meter2</span></code>, give this meter a
unique index (eg <code class="docutils literal"><span class="pre">meter1</span></code>). If you reuse a meter name, for example change
meter1 from a contact meter to a non-contact meter, or change the meter from two
phase to three phase operation, you must either rename or completely flush the
previous meter’s data streams from the database. See &lt;a
href=”/help/cli#cli_nilmtools”&gt; command line tools&lt;/a&gt; for details on moving and
renaming streams in NilmDB.</p>
<p>After the <code class="docutils literal"><span class="pre">meters.yml</span></code> file is configured correctly you must calibrate the
meter before it can collect data. See
<a class="reference internal" href="#software-noncontact-meter-calibration"><span class="std std-ref">Calibration</span></a> for details.</p>
<div class="section" id="software-noncontact-meter-meters-yml">
<span id="id1"></span><h3>Example <code class="docutils literal"><span class="pre">meters.yml</span></code><a class="headerlink" href="#software-noncontact-meter-meters-yml" title="Permalink to this headline"></a></h3>
<p>Note that all fields are required. Details about each field are described after
the example.</p>
<div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">meter1</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">type</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">noncontact</span>
<span class="l l-Scalar l-Scalar-Plain">enabled</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="c1"># set to false to disable this meter</span>
<span class="l l-Scalar l-Scalar-Plain">serial_number</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">meterXXXX</span> <span class="c1"># found on the meter case</span>
<span class="l l-Scalar l-Scalar-Plain">phases</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">2</span> <span class="c1"># 1 - 3</span>
<span class="l l-Scalar l-Scalar-Plain">sensors</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">voltage</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">sensor_index</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">0</span> <span class="c1"># electric field sensor</span>
<span class="l l-Scalar l-Scalar-Plain">digitally_integrate</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="c1"># if true, integrate using FIR filter</span>
<span class="l l-Scalar l-Scalar-Plain">nominal_rms_voltage</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">120</span> <span class="c1"># used to scale the electric field</span>
<span class="l l-Scalar l-Scalar-Plain">current</span><span class="p p-Indicator">:</span> <span class="c1"># --uncomment a line below, or customize--</span>
<span class="l l-Scalar l-Scalar-Plain">sensor_indices</span><span class="p p-Indicator">:</span> <span class="p p-Indicator">[</span><span class="nv">1</span><span class="p p-Indicator">,</span><span class="nv">3</span><span class="p p-Indicator">,</span><span class="nv">5</span><span class="p p-Indicator">,</span><span class="nv">7</span><span class="p p-Indicator">]</span> <span class="c1"># D-Board with 4 A-Boards</span>
<span class="c1">#sensor_indices: [1,2,3,4,5] # Flex Board</span>
<span class="l l-Scalar l-Scalar-Plain">calibration</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">duration</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">30</span> <span class="c1"># length of calibration in seconds</span>
<span class="l l-Scalar l-Scalar-Plain">watts</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">200</span> <span class="c1"># power consumed by calibration load</span>
<span class="l l-Scalar l-Scalar-Plain">has_neutral</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="c1"># [false] if the system has no neutral bus</span>
<span class="l l-Scalar l-Scalar-Plain">streams</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">sinefit</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">decimate</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="c1"># if [false] only the base stream will be saved</span>
<span class="l l-Scalar l-Scalar-Plain">keep</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">1m</span> <span class="c1"># how much data to keep as [amount][units]</span>
<span class="l l-Scalar l-Scalar-Plain">iv</span><span class="p p-Indicator">:</span> <span class="c1"># h: hours, d: days, w: weeks,</span>
<span class="l l-Scalar l-Scalar-Plain">decimate</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="c1"># m: months, y: years</span>
<span class="l l-Scalar l-Scalar-Plain">keep</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">1w</span> <span class="c1"># if [false] no data will be saved</span>
<span class="l l-Scalar l-Scalar-Plain">prep</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">decimate</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="l l-Scalar l-Scalar-Plain">keep</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">3w</span>
<span class="l l-Scalar l-Scalar-Plain">sensor</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">keep</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">false&lt;/textarea&gt;</span>
</pre></div>
</div>
</div>
<div class="section" id="software-noncontact-meter-configuration-fields">
<span id="id2"></span><h3>Configuration Fields<a class="headerlink" href="#software-noncontact-meter-configuration-fields" title="Permalink to this headline"></a></h3>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">type</span></code></dt>
<dd>This should be set to <code class="docutils literal"><span class="pre">noncontact</span></code></dd>
<dt><code class="docutils literal"><span class="pre">enabled</span></code></dt>
<dd><code class="docutils literal"><span class="pre">true</span></code>/<code class="docutils literal"><span class="pre">false</span></code> If false, no data is captured from this meter</dd>
<dt><code class="docutils literal"><span class="pre">serial_number</span></code></dt>
<dd>This is printed on the DBoard meter case. See for
more information</dd>
<dt><code class="docutils literal"><span class="pre">phases</span></code></dt>
<dd>A value between 1 and 3. This depends on the power system being monitored</dd>
</dl>
<div class="section" id="id3">
<h4><code class="docutils literal"><span class="pre">sensors:voltage</span></code><a class="headerlink" href="#id3" title="Permalink to this headline"></a></h4>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">sensor_index</span></code></dt>
<dd>This is the index of the electric field sensor to used to calculate the
effective voltage waveform. Use nilm scope to determine which electric field
sensor has the strongest signal and use its index here.</dd>
<dt><code class="docutils literal"><span class="pre">digitally_integrate</span></code></dt>
<dd><code class="docutils literal"><span class="pre">true</span></code>/<code class="docutils literal"><span class="pre">false</span></code> If the sensor specified in <strong>sensor_index</strong> does not have
hardware integration, set this to true. See
<a class="reference internal" href="setup.html#hardware-setup-noncontact-meter"><span class="std std-ref">Non-Contact Meter</span></a> for reference. Sensors that require
digital integration are marked with a delta to indicate “derivative”.</dd>
<dt><code class="docutils literal"><span class="pre">nominal_rms_voltage</span></code></dt>
<dd>The rated line voltage. This is used to scale the voltage waveform (it does
not effect prep)</dd>
</dl>
</div>
<div class="section" id="id4">
<h4><code class="docutils literal"><span class="pre">sensors:current</span></code><a class="headerlink" href="#id4" title="Permalink to this headline"></a></h4>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">sensor_indices</span></code></dt>
<dd>These are the magnetic sensor indices. Place all available sensors in this
array. There must be at least as many sensors as phases. The order does not
matter.</dd>
</dl>
</div>
<div class="section" id="calibration">
<h4><code class="docutils literal"><span class="pre">calibration</span></code><a class="headerlink" href="#calibration" title="Permalink to this headline"></a></h4>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">duration</span></code></dt>
<dd>Time in seconds to run the calibration load on each phase. Longer durations
can improve calibration results especially in environments with many
background loads. Do not use less than 30 seconds on a production system.</dd>
<dt><code class="docutils literal"><span class="pre">watts</span></code></dt>
<dd>The power draw of the calibration load. This is used to scale the prep output</dd>
<dt><code class="docutils literal"><span class="pre">has_neutral</span></code></dt>
<dd><code class="docutils literal"><span class="pre">true</span></code>/<code class="docutils literal"><span class="pre">false</span></code> If the system has a neutral bus (most common), set this to
true.</dd>
</dl>
</div>
<div class="section" id="id5">
<h4><code class="docutils literal"><span class="pre">streams</span></code><a class="headerlink" href="#id5" title="Permalink to this headline"></a></h4>
<p>See <a class="reference internal" href="#software-contact-meter-configuration-fields-streams"><span class="std std-ref">streams</span></a></p>
</div>
</div>
<div class="section" id="software-noncontact-meter-calibration">
<span id="id6"></span><h3>Calibration<a class="headerlink" href="#software-noncontact-meter-calibration" title="Permalink to this headline"></a></h3>
<p>Non-contact meters must be calibrated before they can collect current and
voltage measurements. You will need a resistive load, a smart plug and a
micro-USB cable. The required wattage will depend on the other loads operating
on the system. In residential environments and small buildings try 200-500W.
Incandescent light bulbs work well. To calibrate the meter, open a terminal
window and run <code class="docutils literal"><span class="pre">nilm</span> <span class="pre">calibrate</span></code> with the name of the meter in <code class="docutils literal"><span class="pre">meters.yml</span></code> (
<code class="docutils literal"><span class="pre">meter1</span></code>, <code class="docutils literal"><span class="pre">meter2</span></code>, etc.). Add <code class="docutils literal"><span class="pre">--visualize</span></code> to the command to generate
plots during the calibration process. These plots can help debug problematic
calibration scenarios like poor sensor placement or unexpected phase setups.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$&gt; nilm calibrate meterX <span class="c1">#--visualize (optional)</span>
</pre></div>
</div>
<p>The script will first provide a summary of the meter configuration. If this
looks correct, answer <code class="docutils literal"><span class="pre">y</span></code>. Any other key will cancel the calibration
process. Plug the smart plug into an outlet and connect it to the computer with
the USB cable. The status light will alternate between blue and green. Once it
is solid green, answer <code class="docutils literal"><span class="pre">y</span></code> at the prompt for programming the plug. If you
already have a plug in calibration mode you can answer <code class="docutils literal"><span class="pre">n</span></code> and reuse the plug
for this calibration. If an error occurs programming the plug wait until the
plug LED is solid green and try again.</p>
<p>Once the plug is programmed (or the step is skipped) you will be instructed to
connect the load to the first phase. Connect the smart plug to any outlet and
then connect the load. Once the load is turning on and off, hit <code class="docutils literal"><span class="pre">[ENTER]</span></code>. <em>Do
not hit</em> <code class="docutils literal"><span class="pre">[ENTER]</span></code> <em>until the smart plug is turning on and off</em>.</p>
<p>If the meter is configured for multiphase operation you will be prompted to move
the plug to an outlet on each additional phase. Do not worry about identifying
which outlet is wired to which phase. The calibration program will automatically
detect if you have connected the load to a previous phase and prompt you to move
it.</p>
<p>Once the calibration program has run a sufficient number of measurements you
will be asked if you want to save the results. Choose <code class="docutils literal"><span class="pre">y</span></code> to commit the
calibration or <code class="docutils literal"><span class="pre">n</span></code> to discard. If you do not save the results the previous
calibration values will be used (if available).</p>
<p>After calibration is complete the meter is ready to collect data.
See <a class="reference internal" href="operation.html#operation"><span class="std std-ref">System Operation</span></a> for more details.</p>
</div>
<div class="section" id="line-frequency-note">
<h3>Line Frequency Note<a class="headerlink" href="#line-frequency-note" title="Permalink to this headline"></a></h3>
<p>The code assumes a 60Hz line frequency. If you are using a digitally
integrated voltage sensor you must edit the code to use in 50Hz environments.
If you are using a hardware integration sensor or have another voltage reference
you do not need to edit the code.</p>
<p>In <code class="docutils literal"><span class="pre">nilm/nilm/filters/reconstructor.py:158</span></code> change the <code class="docutils literal"><span class="pre">cycle_length</span></code> from
<code class="docutils literal"><span class="pre">50</span></code> to <code class="docutils literal"><span class="pre">60</span></code></p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="c1"># assume 3kHz sampling on 60Hz line</span>
<span class="k">def</span> <span class="nf">_setup_integration</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cycle_length</span><span class="o">=</span><span class="mi">50</span><span class="p">):</span>
<span class="c1"># set to 60 for 50Hz Operation----------^</span>
</pre></div>
</div>
<p>Then rebuild the package:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$&gt; sudo python3 setup.py install
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">NILM</a></h1>
<h3>Navigation</h3>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Hardware Setup</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Software Setup</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#contact-meter">Contact Meter</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#example-meters-yml">Example <code class="docutils literal"><span class="pre">meters.yml</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#configuration-fields">Configuration Fields</a></li>
<li class="toctree-l3"><a class="reference internal" href="#network-setup">Network Setup</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#non-contact-meter">Non-contact Meter</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#software-noncontact-meter-meters-yml">Example <code class="docutils literal"><span class="pre">meters.yml</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#software-noncontact-meter-configuration-fields">Configuration Fields</a></li>
<li class="toctree-l3"><a class="reference internal" href="#software-noncontact-meter-calibration">Calibration</a></li>
<li class="toctree-l3"><a class="reference internal" href="#line-frequency-note">Line Frequency Note</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="operation.html">System Operation</a></li>
<li class="toctree-l1"><a class="reference internal" href="readers.html">Reader Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="filters.html">Filter Modules</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="setup.html" title="previous chapter">Hardware Setup</a></li>
<li>Next: <a href="operation.html" title="next chapter">System Operation</a></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2017, John Donnal, James Paris, Steven Leeb, et al.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.2</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
|
<a href="_sources/software.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment