Security for Optical Ports on Energy Meters

Optical ports provide local access for service engineers during installation or maintenance of energy meters.

Households have physical access to their energy meter and might try to get access to the meter software.

The optical interface for smart meters from almost every manufacturer is specified in the IEC 62056-21. (The US-American ANSI C12.18 is not covered by this article.)

Main functions that can be accessed using optical communication

  • Billing data readout
  • TOU (Time of Use) readout and modification
  • Billing period reset
  • Register and profile resets
  • Parameter readout and modification
  • Communication input settings
  • Analysis and diagnostic functions

Note: During the production process electronic meters need to be adjusted. This is done by writing correction values in a dedicated memory inside the meter. This correction values are protected against external access and can not be overwritten once the meter has left the manufacturing site. There are different protection solutions. Some manufacturers are using the optical port for adjustment and lock later this memory section. CLOU meters are using a special port on the PCB for adjustment, which has no physical connection with the infrared port in compliance with the Measuring Instruments Directive (MID).

Protection of the Optical Port

The IEC specification defines the following communication modes:

  • Mode A
  • supports bidirectional data exchange at 300 baud without baud rate switching. This protocol mode permits data readout and programming with optional password protection.

  • Mode B
  • offers the same functionality as protocol mode A, but with additional support for baud rate switching.

  • Mode C
  • offers the same functionality as protocol mode B with enhanced security and manufacturer-specific modes.

  • Mode D
  • supports unidirectional data exchange at a fixed baud rate of 2400 baud and permits data readout only.

  • Mode E
  • allows the use of other protocols.

For the password command, the following command type identifiers are defined:

– 0 data is operand for secure algorithm

– 1 data is operand for comparison with internally held password

– 2 data is result of secure algorithm (manufacturer-specific)

These defined command type identifiers allow static passwords (1) or a manufacturer-specific challenge-response algorithm (0 and 2). Furthermore operation mode C supports manufacturer-specific enhanced security, which is out of the scope of the IEC standard.

Besides this password protection, the IEC standard defines a set of security levels for use in combination with mode C.

  • Access level 1
  • only requires knowledge of the protocol to gain access.

  • Access level 2
  • requires a password to be correctly entered.

  • Access level 3
  • requires operation of a sealable button or manipulation of certain data with a secret algorithm to gain access.

  • Access level 4
  • requires physical entry into the case of the meter and effecting a physical change, such as making/breaking a link or operation of a switch, before further communications access is allowed.

Practical security implementation

The safest method for optical port protection is a authentication by a challenge-response algorithm. This requires that each meter has a unique key. The complex key administration is a back-draw for optical port communication because each handheld- or PC need to keep the meter specific key, while each meter needs to keep the PC specific key. For remote access (AMI systems) this procedure is recommended.

The CLOU risk analysis shows that the most suitable approach is to use a password for read-only operations, together with a manufacturer specific data encryption. For writing operations the terminal cover must be open.

Once the terminal cover is opened unauthorized the meter is recording a tamper event. Depending on the meter type the relay trips and in case of a AMI system the tamper event is forwarded to the centre.

A sealing of the optical port itself does not provide additional security.

When do I need Isolation Current Transformers?

This question comes always up together with stationary meter testing in laboratories. Isolation Current Transformers (ICT) are needed to test more than one direct connected energy meter on a test bench with multiple positions, assuming that the I-P links can not be opened.
terminal blockIf you can’t find the links (red arrows) on the meter terminal block you need to use ICTs for testing.
And why?
All electronic meters have a power supply, linked between phases and neutral. This power supplies have a consumption (see e.g. IEC62053-21, #7.7.1). According to the Kirchhoff’s Circuit Laws a fraction of the test current will be used by the power supply. This leads to a current-drop on the next test position and to an increasing error from position to position.
The smaller the test current, the higher is the impact on error measurement.
And how does an ICT overcome this problem?
An ICT is principally a transformer with a 1:1 ratio. You have a primary side (where the source is injecting the current) and a secondary side with the connections to the meter. The test voltage is individually provided to each meter on the secondary side of the ICT. So all meters get the same test current. See for example our ICT CL2030 with advanced additional features like protection and remote access by PC-software.
What about single phase meters?
Closed link single phase meters can be tested with ICTs. For single-phase test benches a Multi Secondary Voltage Transformer (MSVT) can be used. With a MSVT the test voltage is made galvanic free, while an ICT makes the currents galvanic free.
To test single-phase meters with closed links you need to have a testbench with MSVTs.
To test three-phase meters with closed links you need to have a testbench with ICTs.
For testing of transformer operated meters (CT, CT/VT) we recommend a direct connection to the test bench. This meters have the current- and voltage circuits separated internally.

Why do I need a vector diagram?

Modern reference standards and calibration devices have usually a graphical function to show the relationship between the voltages and the currents. Most equipment manufacturers call this function vector diagram or vectorial diagram.
In fact it is a phasor diagram. It represents a the phase relations of a sinusoidal rotating system at a certain time.
The system rotation (everything inside the circle) is anti-clockwise. The graph is shown either with

  • current phase L1 in zero degrees position
  • voltage phase L1 in 90° position

Actually the vector diagrams in test equipments are showing only the angles and not the amplitude of the phases. The reason behind is that you won’t see very small current vectors with the given resolution. Anyway, we can nicely read all amplitude values from the instrument. Common practice is to show the voltages with higher amplitude than the currents (voltages are on the outer circle).

Main use for vector diagrams is to check the proper connection of the instrument before you make error measurements.
If you see e.g. that the current of a phase is in opposite to the voltage, it is likely possible that the current clamp is connected in the wrong direction.

The simulation below is kept very simple. You can set the phase angles between I and U, the phase sequence and the reference for the system. The power values are calculated based on your settings.

phase L1phase L2phase L3

With a right-click on desktop PCs you can save your drawing(s).

What is the meaning of the different current subscripts?

Together with tender documents and meter specifications you will find various subscripts related to current.

  • current I without subscript
    This is the actual current flowing trough the energy meter.
  • starting current Ist
    This is the lowest value of current at which the meter should register electrical energy at unity power factor and, for poly-phase meters, with balanced load.
  • minimum current Imin
    This is the lowest value of current at which the meter is specified to meet the accuracy requirements.
  • transitional current Itr
    At this value of current and above the meter must to lie within the smallest maximum permissible error corresponding to the accuracy class of the meter.
  • basic current Ib
    This term is used in IEC standards for direct connected meters. All accuracy values are related to Ib
  • nominal current In
    This is the same like Ib but for transformer operated meters.
  • reference current Iref
    The term is only used in EN 50470-1. It is the reference current (for direct connected meters Iref = 10 x Itr = Ib according to EN 62052-11,; for CT-connected meters Iref = 20 x Itr = In
  • maximum current Imax
    This is the highest value of current at which the meter is specified to meet the accuracy requirements.

Now let’s look more in detail:

  1. Starting current Ist according to IEC
    The starting current is a fraction of the basic current or nominal current. See the multiplication factors below:

    PASS/FAIL criteria:
    The meter has to start and continue recording energy. Means, we need to receive at least two pulses from the meter within a certain period of time.
    How to calculate the time?
    We have the nominal voltage, the number of elements, the starting current and the meter constant. Now we can calculate:

    This is the duration for one pulse for a meter with zero error. So, first we double the time because we need to receive two pulses. Then, the IEC does not specify any accuracy for starting test. So we need to consider the meter error. Best practice is to add 20 % to your calculated time for two pulses. This will be in most cases sufficient.
    If the meter fails with this time-out calculation you are allowed to extend it. The standard setting of CLOU test benches is 120 %.
    From the formula you can see that a higher meter constant is preferable because it saves testing time.
  2. Starting current Ist according to EN
    As usual we have to deal with more standards. For MID the relevant standards are EN 50470-1 and EN 50470-3 .
    Here is the starting current a fraction of Itr

    Itr is directly liked to Iref (see above). So, if we have a direct connected meter Itr is 10 % of Ib. For CT meters Itr is 5 % of In
    The PASS/FAIL criteria are exactly the same as described in #1: starting current Ist according to IEC
  3. Starting current Ist according to OIML R46
    OIML stands for ORGANISATION INTERNATIONALE DE MÉTROLOGIE LÉGALE, in English: International Organization of Legal Metrology. The OIML has published the recommendation R46 (please download the actual version from the OIML website). This description is based on the document r46-p-e12.pdf.
    PASS/FAIL criteria:
    The R46 requires an error measurement for starting current. This means, we set our test equipment to error measurement mode. Best practice is to make the error measurement for two pulses. During production and knowing the behavior of the meter you can also test with one pulse (leads to a higher error deviation).
    The maximum permissible error needs to be calculated.

    Note: The 2010 edition had a more restrict calculation formula for the allowed error. Please make sure that you work with the actual document.

What are harmonics ?

Note: This post is extremely simplified to give some brief information.
Generally a harmonic is a integer multiple of the fundamental frequency (nominal frequency fn). The fundamental frequency is either 50 Hz or 60 Hz.
So, when we have a nominal frequency fn of 50 Hz, the 3rd harmonics is traveling with a frequency of 50 Hz multiplied by 3 = 150 Hz.
We can have harmonics in the voltages and in the currents.
Current harmonics
In a normal AC power system we have a sinusoidally current with the same frequency as the voltage. When a non-linear load is connected, the current waveform will become complex. But the wave can be split in harmonic sine waves with the help of the Fourier analysis. Don’t worry, the calculations are done by the CLOU reference standards and advanced AMI meters.
What can cause current harmonics?

  • rectifiers
  • computer
  • UPS
  • fluorescent lighting
  • battery chargers
  • variable speed drives
  • PV- and wind power converters

Voltage harmonics
Voltage harmonics are caused by the current harmonics, so they are typically smaller than the current harmonics.

Beside of a magnitude harmonics also have a phase angle, indicated relative to the fundamental wave.

What is the impact of harmonics?
Harmonics can cause

  • overheating of motors, transformers, cables
  • malfunction of relays and breakers
  • disturbance of PLC communication
  • damage of capacitors or capacitor banks for power factor compensation

What are the limits?
Most countries follow the IEEE 519 recommendations.
Voltages up to 1 kV are allowed to have a individual harmonics content of 5 %, the THD (total harmonic distortion) should not exceed 8 %. Odd current harmonics (between order no. 3 and 11) with a current between 50 A and 100 A are allowed to have 7 % for individual currents and a maximum THD of 8 %.
Please note that utility regulations might be different.

With CLOU portable reference standards you can monitor the harmonics behavior on site during a calibration. Our AMI systems can provide long time statistics.

order no.amplitude %phase shift °

The fundamental wave is blue, the total harmonic distortion is red.

Reference literature:
IEC 61000-4-7

What is the difference between adjustment and calibration?

The term calibration is often misused.
Calibration means the comparison of a unit under test (in our case a energy meter or reference standard) with a test equipment with higher accuracy. It is a strict comparison to evaluate the accuracy error.

Adjustment involves a manipulation of the unit under test. Electromechanical meters have adjustment screws, electronic meters have special memory for correction values.
After production a energy meter is adjusted first. The target is to bring the meter as close to zero error as possible. Once the meter is adjusted, the performance must be verified.
This is done with a calibration.

What is Maximum Demand Measurement?

Demand is a measure of average power consumption over a fixed time interval. Maximum (or peak) demand is the highest demand recorded over the billing period. The billing period is mostly end of the month.

Non-domestic electrical power users often have to pay a maximum demand charge in addition to the charge for the consumed energy. This additional charge is based on the highest amount of power used over a period (e.g. 15 minutes) during the billing period.

CLOU meters can operate with a fixed window or with a sliding window.1

What is the difference?

The fixed window is defined in certain steps (e.g. 15 minutes), starting at the full hour. It can be programmed for the following fixed intervals:

  • 5 minutes
  • 15 minutes
  • 30 minutes
  • 60 minutes

At the end of each fixed window period, the average power for that period is calculated. If this value is higher than the already existing value, it is stored as the MD (maximum demand).

The sliding window is the CLOU default setting. For sub integration period the default is 1 minute.

At the end of a sub integration period the average power is calculated for one integration period. If this value is higher than the already existing value then this is stored as MD. The integration period slides by a window of the sub integration period.

sub periods
Sub periods for sliding window
Integration period1 min2 min5 min6 min12 min
5 min51
15 min153
30 min301565
60 min603012105

The maximum demand register MD will be reset at the set transferring time of each month (1stof each month).
Demand value measured in 6 digits, including 4 integers and 2 decimals.

Which impact has the measurement with fixed- or sliding window on the result?
We take a simple example:
Below we see the energy consumption for a time period from 9 o’clock to 9:30. The reading is once per minute.
energy consumption
The diagram below shows the calculated demand for above load profile between 09:15 and 09:33. We can see that the sliding window calculation shows a MD of 157 kW (blue line) while the fixed window shows a MD of 141 kW (red line).
maximum demand
What do we learn?
With the same load profile the maximum demand values can be different. If the customer has to pay an additional penalty for exceeding 150 kW, he does not have to pay by calculation with fixed window.
With sliding window calculation he needs to pay, because with 157 kW he is exceeding his limit.
The benefit for utilities is that the consumers will not switch-on all machines and appliances at the same time to avoid the penalty. This effect has also big influence on minimizing of peak loads in the grid.
We recommend to use our default setting with 15 minutes interval, sliding by one minute.

The four-quadrant diagram in electricity metering

When we talk about power we always need to indicate the direction and which sort of power.
We can have:

  • Active power, P
    Active power is expressed in watt (W). Sometimes this power is also called “real power”
    This is the power you are actually consuming.
  • Reactive power, Q
    Reactive power is expressed in volt-ampere reactive (var)
    This power is stored in components, then released again back to the source through the AC cycle. Capacitors and inductors do this.
  • Apparent power, S
    Apparent power is expressed in volt-ampere (VA)
    (RMS voltage times the RMS current). A power supply must be capable to output the full apparent power delivered to a circuit, not just the active power.

Quadrant I
Quadrant I is defined as an area where both powers flow positively. Both are delivered to the consumer load. In many cases the CLOU terminology is forward. The power factor is lagging, we have inductive influence.
The IEC literature is using the term import.
In this quadrant we have Import of active power and Import of reactive power.

Quadrant II
In quadrant II, reactive power is positive and active power flows negatively. In many cases the CLOU terminology is reversed. The IEC literature is using the term export.

Quadrant III
In quadrant III, reactive and active power flow negatively (both powers are received from the customer). This is also a export condition.

Quadrant IV
In quadrant IV, reactive power flows negatively, and active power flows positively. This is a import condition.

The diagram below shows the relationship between the phase angle φ, apparent-, active- and reactive power respective energy.  The diagram is in accordance with clauses 12 and 14 of IEC 60375. Reference is the current vector (fixed on right-hand line, 0°). The phase angle φ between voltage V and current I is taken to be positive in the mathematical sense (counter clockwise).

How long does a no-load test take?

First we take a look at the IEC standards.

The run-time depends on several factors like

  • accuracy class
  • meter constant
  • number of elements
  • Nominal Voltage
  • Maximum Current

Test criteria
When the voltage is applied with no current flowing in the current circuit, the test output of the meter shall not produce more than one pulse.
For this test, the current circuit shall be open-circuit and a voltage of 115 % of the reference voltage shall be applied to the voltage circuits.

For MID meters according to DIN EN BS 50470-3 the calculation formula is different.

Which standard is applicable for acceptance tests for energy meters?

From time to time there are some questions regarding the acceptance inspection for energy meters. This paper is to clarify the legal and metrological matters.

The IEC 61358 (later referred to old) was published in May 1996 and withdrawn in September 2008. The old standard has been replaced by IEC 62058-11 and IEC 62058-31.
This new standards take special care about the electronic energy meters while the old standard was written at a time where electromechanically energy meters have been wide spread.

For full wording see introduction of IEC 62058-11
This standard (IEC 62058-11)… and IEC 62058-31… cancels and replaces the following standards..
IEC 61358 Acceptance inspection for direct connected alternating current static watt-hour meters for active energy (classes 1 and 2).

While IEC 62058-11 is dealing with the General Acceptance Methods, for this document the relevant part is the IEC 62058-31 (later referred to new).

Means, the old standard is already cancelled since > 8 years.
The guaranteed stability date of the new standard is 2018. Soon we can expect either a updated release of the IEC 62058 family or a “very new” standard.

From the legal point of view a end-customer (the domestic user) can claim that the initial verification done by the old standard is not valid. The comparison table below covers only the essential part for the metrology. Differences in the sampling methods are not covered. Comments are cursive.

IEC 61358, oldIEC 62058-31, new
Item 8.2, Test No.1, AC voltage test

Parameters: 4 kV for 1 minute

Item 5.3, Test No.1, AC voltage test Parameters: 3.2 kV for 2 seconds
The IEC committee had certain reasons to reduce the time and voltage:

1. The electronic meters have a plastic housing together with a printed circuit board. The historical events of poor wiring insulation versus a metal housing are not occurring anymore.

2. The lifetime of e electronic meter is increasing by putting less stress on the PCB board.

Item 8.5, Tests No. 4…9 (values for cl.1)

Accuracy limits for meters class 1

Item 5.6, Tests No. 4…9

Accuracy limits for meters class 1

Test No.4+/- 2.5 %Test No.4+/- 1.5 %
Test No.5+/- 1.5 %Test No.5+/- 1.0 %
Test No.6+/- 2.0 %Test No.6+/- 1.0 %
Test No.7+/- 2.5 %Test No.7+/- 2.0 %
Test No.8+/- 2.5 %Test No.8+/- 2.0 %
Test No.9+/- 1.5 %Test No.9+/- 1.0 %
Electronic energy meters are much more accurate than electromechanical meters, therefor all error tolerances are reduced.
Item 8.6, Test No.10,

verification of the meter constant


Difference between metrological pulse output and display increment

Allowed error: +/- 0.2%

Item 5.7, Test No.10,

verification of the register


Difference between injected energy and incremented energy on display

Allowed error: +/- 1 %

Here we have a comparison of pulses generated by the rotating disk or pulse output with the recorded energy. This means, on top of the error evaluation limits (Tests No.4…9) an additional +/-0.2% error for display incrementing is allowed on top of the +/-1.5% error (considering tests are done with Imax).

The reason behind is a possible additional error coming from the gear-driven mechanical counters.

Here the register increment is compared with the real injected energy by the source.

There is no additional error allowance. The +/- 1% limits for class 1 on Imax are still valid.

This measurement is gives the utilities the evidence that the billing is aligned with the meter accuracy.

Nevertheless we expect that also this standard will change in future because of the rapidly increasing higher meter accuracies.

Thank you for interest.