# Web-Based Toolkit for Performance Simulation and Analysis of Power Line Communication Networks
## 2 PLC Technologies
### Prime  
The tools presented in this article, SimPRIME and PRIME Analytics, were developed based on the PRIME power line communication protocol. The second generation of this NB-PLC technology was initially developed by the PRIME alliance and adopted the physical layer (PHY), media access control (MAC), and convergence specifications developed by the ITU-T in 2012 in version 1.3.6 [22]. Later, in version 1.4, PRIME extends the range of frequencies used and adds some features to provide greater robustness of communication at the physical layer (PHY) and at the media access control layer (MAC). As for the physical layer of the protocol PRIME, it uses different frequency bands depending on the version. Version 1.3.6 uses the frequency band 41-89 kHz, and version 1.4 uses the frequency band 3-500 kHz, using the modulation Orthogonal Frequency Division Multiplexing. The carriers used in PRIME can use different encodings, differential 8 phase-shift keying (D8 PSK), differential quaternary phase-shift keying (DQPSK) or digital binary phase-shift keying (DBPSK). To increase the robustness of the communication, PRIME offers the possibility to interleave and encode the data before modulation, using forward error correction (FEC). Depending on the modulation and FEC used by PRIME, the data transmission rates of this protocol can range from 5.4 kbps to 1028.8 kbps. For the MAC layer, PRIME sets up two different types of nodes: Base Node and Service Node. The base node has the task of acting as a coordinator in the PLC network; therefore, PRIME allows only one node of this type. In the terminology of Advanced Metering Infrastructure (AMI), the base node is called a data concentrator or concentrator. This node is responsible for receiving all communication from the other service nodes in the PRIME network in which it resides. The service nodes are usually smart meters that form the end point of the PRIME network. However, these nodes can also serve as switches if the quality of communication requires it. The use of these switches aims to increase the range of the signal, avoiding communication problems due to attenuation or noise. Due to this feature, the physical topology of these networks follows a bus topology, while the logical topology is of the tree type. With respect to Media Access Control, PRIME sets up two access mechanisms. In the first, a common conflict time (SCP) is defined, and in the second, a conflict-free time (CFP). It should be noted that vendors currently implement only the first mechanism, SCP, which is based on Multiple Access by Carrier Detection with Collision Avoidance (CSMA/CA). Nevertheless, research continues on the use of PPC to support new intelligent network services [24]. In the convergence layer, we find the Logical Link Control (LLC) layer. This layer is responsible for managing the logical links of the PRIME network. It associates each transaction with a unique identifier and is responsible for controlling the flow of information. PRIME specifies a maximum transmission unit (MTU) and a sliding window system to perform flow control between its elements. Manufacturers encode this MTU in each smart meter and specify the maximum length of the MAC service data unit (MSDU) in bytes. However, it is possible to send a larger amount of data. For this, the LLC layer is responsible for fragmenting the data into multiple MSDUs without exceeding the maximum MTU size. Fragmentation involves tagging with an identifier so that the packet can be reassembled at the destination. As for the sliding window, PRIME implements a set of the maximum allowed values for the window size (WS), which are very important for performance related to latency. Another important point is the ability of the PRIME devicesto implement automatic repeat requests (ARQ) or not, in case you want to avoid packet loss, this capability is implemented end-to-end. PRIME uses at the application level the device language message specification or complementary specification for energy measurement (DLMS / COSEM).