Open main menu

Changes

<blockquote>'''''Editor’s Note:'''''
Without being able to describe all aspects of the above-mentioned standards and their implications in whole, I will follow a route on how it works and what is happening from the point of view of a regular consumer of energy services. Pleas keep in mind that the roll-out for this digital infrastructure is still in full swing at the point time of this writing (20252024). Whenever use cases are used as examples, they refer to electric energy. This should not divert attention from the fact, these communication standards and protocols do apply to all metered products (Sparten) in energy industries (Water, Heat, Gas, Contracting Services…) as well. Also, I do use the words “electricity” and “electric energy” synonymously and electricity or energy cannot be “consumed” – I know that. Finally: I am only beginning to investigate this. I have some professional experience, but it is limited. If I am wrong and/or describing situations inadequately, please share your insight either in this Wiki, Recessim Discord or DM (Discord)</blockquote>
=Chapter 1 Home=
So you live in an apartment or house and use electricity. Big deal! And it really is. Let us see why. All the electric energy delivered for your convenience goes through at least one measuring device – the meter. That will be in our digitized world an electronic device called in Germany for unknown reasons a '''smart-meter''' or moderne Messeinrichtung ('''mME'''). This thing in its initial configuration is not “smart” at all, given the idea "smart" means also: able to communicate. It’s not. It is an electronic counter with no ability to communicate. Here's a [https://www.youtube.com/watch?v=wEnofAOLAdY&t=2s video] on this variant. The meter resides logically in a '''market-locatio'''n or '''MaLo''' (address of the building or apartment), which is associated with your invoicing details (customer name & address). The meter itself or multiple meters represent the '''measuring-location''' or '''MeLo'''. Ant this is bound to a '''meter-ID''' which is then associated with the physical meter, which again has a '''serial number'''.
[[List of EU Smart Meters]]
=====Local Metrological Network or LMN=====
In order to “smartify” the situation, communication must be enabled. Therefore an communication interface needs to be added to the smart-meter. Furthermore a smart-meter-gateway ('''SMGW''') needs to be added and accessible from the meters communication interface. These two devices can now communicate and are called in Germany an intelligent measuring system or '''iMSys''' - and yes, this communication is already protected (encrypted). The protocol used here is a COSEM (Companion Specification for Energy Metering) / OBIS (Object Identification System) / OMS (Operation Management System) protocol based on RS485 which can be either by wire or wireless, defined in [https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Publikationen/TechnischeRichtlinien/TR03109/TR-03109-1_Detailspezifikation.pdf?__blob=publicationFile&v=4 TR-03109]. It also contains a [https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Publikationen/TechnischeRichtlinien/TR03109/TR-03109-2-Anforderungen_an_die_Funktionalitaet.pdf?__blob=publicationFile&v=3 security module], which is used to controll the meters PKI function using the BSI PACE-Protokoll.
[[File:LMN Stack.png|thumb]]
One or more smart-meters with communication interfaces connect with a single smart meter gateway and form the '''Local Metrological Network''' or '''LMN'''.
[[File:LNMHANWAN.png|thumb|LNM HAN WAN Overview]]
[[File:FlashlightPIN.png|alt=https://www.youtube.com/watch?v=zqpaXnFCUYQ|thumb|entering PIN with a flashlight]]
[[File:SM reader writer.png|alt=https://amzn.eu/d/c23GH7Z|thumb|Tasmota based reader writer]]
Most smart meters in Germany are equipped with an bidirectional ifrared-port (actually two ports: one for TX and one for RX) for sending and receiving data. This port will send additional metering information if activated. This includes momentary power import/export to and from the grid and voltage in different phases (L1, L2, L3). Activation is protected by a 4-digit PIN, which is (for data protection reasons) only available from the company owning the meter, or if unconfigured "0000" as a factory default. To activate the sending of additional metering data, the pin has to be entered by using a simple flashlight. Here's a [https://www.youtube.com/watch?v=zqpaXnFCUYQ video] showing, how this is done. PIN protetion can be permanaently deactivated. After successfull activation, the meter can be configured by sending serial communication commands via the ir port either by SML or OBIS protocol (ASCII or binary (SML) depending on the meter). After configuration the meter will transmit the information requested via the ir-port. Users communicate with these meters via diy-style serial opto-couples via cable link or WiFi. Freely available [https://www.tasmota.info/ Tasmota] (github) software based soultions do make use of inexpensive microcontrollers (ESP8266 or ESP32) for that purpose. There is a description of the smart meter interface API, running an OBIS-Protocol [https://tasmota.github.io/docs/Smart-Meter-Interface/ here].
=Chapter 2 Public Key Infrastructure=
 
=====General=====
While until 1st of April 2024 most communications between energy market participants (roles) were relying on automatically processed [https://de.wikipedia.org/wiki/EDIFACT EDIFACT] messages in email, this is changed to a [https://www.edi-energy.de/index.php?id=38&tx_bdew_bdew%5Buid%5D=1608&tx_bdew_bdew%5Baction%5D=download&tx_bdew_bdew%5Bcontroller%5D=Dokument&cHash=5fbee16dcbd284d5f9899875d50353de machine-to-machine communication via webservices], using [[wikipedia:AS4|AS4]] encrypted payloads. The [https://www.edi-energy.de/index.php?id=38&tx_bdew_bdew%5Buid%5D=1606&tx_bdew_bdew%5Baction%5D=download&tx_bdew_bdew%5Bcontroller%5D=Dokument&cHash=6b7d02fa38030119e628544f92fcdc07 requirements] for the XML encryption / signing public key infrastructure (PKI) leans on Diffie-Hellman key exchange procedures. The keys algorithms themselves however can be based on [https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Publikationen/TechnischeRichtlinien/TR02102/BSI-TR-02102.pdf?__blob=publicationFile&v=9 anything] commonly accepted like: RSA, Diffie-Hellman, DLIES or Elliptic-Curve.
 
=====Smartmeter PKI functions=====
The smart meter gateway contains a [https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Publikationen/TechnischeRichtlinien/TR03109/TR-03109-2-Anforderungen_an_die_Funktionalitaet.pdf?__blob=publicationFile&v=3 security module], which is used to controll the meters PKI function using the proprietary BSI PACE-Protokoll (Password Authenticated Connection Establishment).
 
=====Backend Keygen and Distribution=====
In theory every market participant is obliged to create their own key-pair for each role in the EDI@Energy framework. Then the public key needs to be signed by an officially certified CA. Officially certified CAs in this case are IT service providers, registered with the National Energy Grid Agency (BNetzA) and do include like Arvato, Telesec and Deutsche Telekom. The signed public key must be made available in a central directory operated by the BDEW, an energy industry standardization organization. It turns out, the challenge to generate key pairs in a secure fashion is overwhelming most IT organizations in small and medium sized utilities companies. The challenges arising from installing and maintaining trust-centre grade “circle of trust” procedures including the necessary escrow mechanisms, keeping employees from stealing keys and passwords, are substantial. Some larger organizations are known to have the resources and procedures in place, most smaller companies seem to ignore the risks and have their admins generating X.509 keys with ssh-keygen on their Linux machines and some totally rely on the service offerings of the CAs. In the case of some IT-guy made the key pair, there is a substantial risk, this pair will sooner or later be compromised. Additionally relying on a CA service provider to generate, distribute and maintain thousands of key-pairs for smaller organizations creates a single target, which if compromised, will void the security of the whole PKI at least for a while.
 
=====Payload Encryption vs. Transport encryption=====
The National Institute for IT Security (BSI) emphasizes two alternative AS4 compatible approaches: PKI encrypted payloads with electronic signatures and transport based (TLS 1.2) encryption. It is not clear from the [https://www.bsi.bund.de/DE/Themen/Unternehmen-und-Organisationen/Standards-und-Zertifizierung/Technische-Richtlinien/TR-nach-Thema-sortiert/tr02102/tr02102_node.html requirements specification] which one should be used when. But the initial thinking probably was to go for the payload encryption in the first place and to fall back to TLS, when the procedures implemented proved technically unreliable ot too complicated for the market participants. As this is currently under implementation by a multitude of software vendors for energy market communication products at the point of this writing (March/2024), no statement can be made on the initial success and use of payload encryption.
 
=Chapter 3 Grid Operators=
 =====Maintaining Stability=====[[File:TransmissionGridOperatorsGER.png|thumb|Transmission Systems (Grid) Operators]]Electricity grid operators play a crucial role in ensuring the reliable and efficient functioning of electricity grids. Their primary purpose is to manage the flow of electricity across the grid, maintain grid stability, and ensure that supply meets demand in real-time. Grid operators in germany distinguish themselves into two categories: [[wikipedia:Transmission_system_operator|national transmission grid operatiors]] and local distribution grid operators.   Here's a breakdown of their key responsibilities and the means they use to ensure grid stability and frequency: #Grid Management Grid operators monitor the flow of electricity through the grid and balance the supply and demand of electricity in real-time. They must ensure that enough electricity is generated to meet current demand while maintaining grid stability.#Load Balancing Grid operators must balance the load on the grid by adjusting the generation of electricity to match the fluctuating demand throughout the day. They use various tools and techniques to predict and manage load changes, such as demand response programs, energy storage systems, and grid interconnections.#Frequency Regulation Grid operators maintain the frequency of the electricity grid within a narrow range to ensure stable and reliable operation. In most power systems, the standard frequency is 50 Hz or 60 Hz. Fluctuations in frequency can cause disruptions to sensitive equipment and lead to power outages. Grid operators use frequency regulation mechanisms such as automatic generation control (AGC) and frequency response services to stabilize the grid frequency.#Grid Monitoring and Control Grid operators continuously monitor the performance of the grid using advanced control systems and monitoring devices. These systems provide real-time data on grid conditions, including voltage levels, power flows, and equipment status. By analyzing this data, operators can identify potential issues and take corrective actions to maintain grid stability.#Emergency Response Grid operators must be prepared to respond quickly to unexpected events such as equipment failures, natural disasters, or sudden changes in demand or generation. They have contingency plans in place to minimize disruptions and restore power as quickly as possible in the event of an emergency.#Grid Expansion and Maintenance Grid operators also play a role in planning and expanding the grid infrastructure to accommodate growing demand and integrate renewable energy sources. They coordinate with utilities, regulators, and other stakeholders to invest in new transmission lines, substations, and other infrastructure projects. Overall, electricity grid operators are essential for ensuring the reliable and secure operation of electricity grids. Through careful monitoring, control, and coordination, they help maintain grid stability and ensure that electricity is delivered safely and efficiently to consumers. =====Day Ahead and Merit Order=====In Germany, the electricity market operates using a "day-ahead" scheduling system and a "merit order" mechanism to determine the dispatch of power plants and the pricing of electricity: #[[File:ESS Schedule.png|thumb|ESS Schedule]]Day-Ahead Scheduling <br />The day-ahead scheduling system allows market participants, including generators, retailers, and traders, to submit their electricity supply and demand forecasts for the next day. <br />Market participants submit bids indicating the quantity of electricity they are willing to buy or sell at various price levels. Based on these bids, the market operator determines the optimal schedule for electricity generation and consumption to meet forecasted demand while minimizing costs. The day-ahead market clears once a day, typically in the evening, and establishes the prices and quantities of electricity for the following day. The system and protocols “ESS” (ENTSO-E Scheduling System) are described tin this [https://www.50hertz.com/Portals/1/Dokumente/Vertragspartner/Fahrplanmanagement/20211001%20FPM%20EN.pdf?ver=2021-04-07-070603-687 document].<br />#Merit Order System <br />The merit order system is used to dispatch power plants based on their marginal costs of generation. Power plants are ranked in ascending order of their marginal costs, with renewable energy sources like wind and solar typically having the lowest marginal costs (since their fuel is free), followed by nuclear, coal, gas, and finally, peaking plants. The system dispatches power plants in order of increasing marginal costs until the forecasted demand is met. The clearing price in the day-ahead market is often determined by the marginal cost of the last unit of electricity needed to meet demand, which is typically set by a gas-fired or coal-fired power plant. As a result, renewable energy sources are typically dispatched first when their output is available, helping to reduce the overall cost of electricity generation and promote the integration of renewable energy into the grid. In Germany, the combination of the day-ahead scheduling system and the merit order mechanism helps to ensure the efficient and cost-effective operation of the electricity market while integrating a growing share of renewable energy sources. It also provides transparency and market signals for investment in new generation capacity and grid infrastructure. =====Redispatch 2.0=====Redispatch 2.0 is a term used in Germany to refer to a set of regulatory changes aimed at optimizing the management of electricity grid operations, particularly in light of the increasing integration of renewable energy sources and the evolving energy landscape. It builds upon the original redispatch measures implemented to maintain grid stability but introduces several updates and enhancements to better accommodate the changing dynamics of the energy market: #Background <br />Germany, like many other countries, is transitioning its energy system towards a greater share of renewable energy sources such as wind and solar power. Renewable energy generation is often decentralized and intermittent, which poses challenges for grid stability and management.#Original Redispatch Measures <br />The original redispatch measures allowed grid operators to instruct power plants to adjust their output or generation schedules to maintain grid stability. This was primarily done to manage congestion on transmission lines and prevent overloading of the grid. Redispatch is based on [https://www.edi-energy.de/index.php?id=38&tx_bdew_bdew%5Buid%5D=1214&tx_bdew_bdew%5Baction%5D=download&tx_bdew_bdew%5Bcontroller%5D=Dokument&cHash=9999cb93e8b0b35e4ba88a8338a8fdc3 order] and [https://www.edi-energy.de/index.php?id=38&tx_bdew_bdew%5Buid%5D=2051&tx_bdew_bdew%5Baction%5D=download&tx_bdew_bdew%5Bcontroller%5D=Dokument&cHash=5ae1916661f37fea620dc2bb7b82808a acknowledgement] messages within the communication framework EDI@Energy defined between market participants.#Redispatch 2.0 Enhancements <br />Greater Flexibility: Redispatch 2.0 introduces measures to enhance the flexibility of the electricity system, allowing grid operators to better manage fluctuations in renewable energy generation. <br />Market-Based Approaches: It encourages the use of market-based mechanisms to manage congestion and grid stability, such as the use of flexible market products and incentives for demand response. Decentralization: Redispatch 2.0 recognizes the increasing decentralization of energy generation and consumption, encouraging the integration of distributed energy resources and demand-side management solutions. <br />Digitalization: The implementation of digital technologies and advanced grid monitoring systems is also a key aspect of Redispatch 2.0, enabling real-time monitoring and control of grid operations. <br />Cost Allocation: Redispatch 2.0 includes provisions for the fair allocation of costs associated with redispatch measures among market participants, ensuring that the costs are allocated efficiently and transparently. <br />#Objectives The primary objectives of Redispatch 2.0 are to improve grid stability, increase the efficiency of grid operations, and facilitate the integration of renewable energy into the electricity system. It aims to achieve these objectives while minimizing the overall cost to consumers and ensuring fair and transparent market practices. Redispatch 2.0 represents a comprehensive framework for modernizing grid management practices and adapting to the changing dynamics of the energy market in Germany. It reflects the ongoing transition towards a more sustainable and flexible energy system driven by renewable energy and digital innovation and for this reason includes functions embedded into consumers smart meters. If frequency rises and conventional cut off of generated power is not sufficient, the transmission grid operator sends a message to the smart meter operator via the distribution grid operator and telling it to cut of the CLS (controllable local system) for consumer-side electric generators (photovoltaik, wind, gas). Similar things happens with sinking frequencies from a higher demmand exceeding available conventinal energy reserves. In this case the smart meter gateway shuts down the CLSs assiciated with high enegy consuming devices (wallbox, heat-pumps...) =Chapter 4 Energy Suppliers/ Retailers=[[File:TAF.png|thumb|Tarif-Anwendungsfälle (TAF)]]The market role "Lieferant" (retailer or supplier) is the consumers contracting party for energy delivery. This party is not necessarily the same organization or company acting in the role of grid or smart meter operator. Nevertheless it has vital interest to influence the behaviour of energy deliver to the customer via the smart meter. For this purpose the retailer is using the role of "external market participant" in the WAN connected to the smart meter gateway. The messages from the retailer can be authenticated by the smart meter gateway using the PKI and do include meter readouts (MSCONS 13017), status information and changes in tarriffs. =====Tarif Anwendungsfälle (TAF)=====The following 14 [https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/SmartMeter/Stufenmodell/Energiewirtschaftliche_Anwendungsfaelle.pdf?__blob=publicationFile&v=5 tarrif schemes] (TAF) are defined for smart meters in Germany: '''TAF 1:''' low frequency communication mode '''TAF 2:''' variable tariff by time '''TAF 3:''' variable tariff by grid load '''TAF 4:''' variable tariff by consuption '''TAF 5:''' variable tariff by event '''TAF 6:''' meter readout on demand for unpredicted events '''TAF 7:''' normal frequency communication mode '''TAF 8:''' min max recording mode '''TAF 9:''' consumer generated electricity (grid import) momentary value '''TAF 10:''' complete status readout including fraud registers '''TAF 11:''' CLS control (on/off) '''TAF 12:''' prepaid '''TAF 13:''' consumer data copy (HAN>WAN) '''TAF 14:''' high frequency communication modeExample: If the consumer is notoriously late paying bills, switching to TAF12 will put the meter into prepaid mode. The meter will allow electricity to be delivered only if accounts receivable balance is positive. 
=Chapter 5 Energy Generation / Powerplants=
Actual powerplants do not have a direct technical relation to smartmeters in Germany. They function as an indication on who and how much is to charge for their operation of course. Power plants are connected to Redispatch 2.0 and are under the control of the grid controllers of course. They schedule their activities by load prrofiles, derived from historic data. This is then overlyd with "day-ahed" planning and immediate reaction to redispatch measures. They function by their ablity to react on sudden demmand changes. This leads to a hirarchy of systems and fuels:
 
* gas operated (can be quickly activated an shut down, recation time <30 Mins)
* coal and biogas operated (can be scheduled to react in about 4-5 hrs)
* nuclear operated (can be scheduled to react in about 4-5 hrs, not existing in Germany anymore (2024))
* wind and solar power (basically uncontrolled, can be disconnected in thess than a second)
 
Redispatch will force all of them to disconnect from the grid within very short timespans. Addin them for stabilizing reasons has to schedulaed according to their natural time to react. As electricity from solar and wind energy generators are given priority but in the same moment do expose the grid to an extensive volatilities, other means for stabilizing the grid need to be either based on gas operated sources or planned ahead. All of this includes extensive weather monitoring and forcasting to maintain grid (frequency) stability while still allowing wind and solar generated eletriciy to be used with their inevitable volatile nature.
 
=Chapter 6 Energy Import /Export in the EU and Worldwide=
113

edits