# Broadband Power Line Communication for Integration of Energy Sensors within a Smart City Ecosystem
## 2 State of the Art
### Simulation Environment Review  
Because there was no specialized tool for construction and simulation of PLC networks in the commercial sphere, the PLC module for the Network Simulator 3 framework (NS-3) [23] was developed at the University of British Columbia in Vancouver. The simulator is primarily intended to design and simulate network technologies. There are also similar tools in the Matlab environment, but they do not have NS-3 potential and capabilities, especially for the purpose of combining different network technologies in one hybrid topology, i.e., Canete [24] or FTW [25; 26]. The source codes for the FTW simulator are also available for NS-3. The comparison of these simulators is dealt with in [27]. The configuration file (Matlab type) is available for the Canete simulator only. It is not possible to apply custom model algorithms, but only set values for parameters, which is considerably limiting. All these allow simulation in extensive topologies. These simulators are focused on physical layers (channel frequency response) and RLGC parameters. The NS-3 framework allows the implementation of library-based communication technologies with the ability to edit communication layers. The PLC framework is open source. The framework allows the definition of different topologies and enables time-variable and frequency-variable behavior of the PLC channel in the simulation. The advantage of NS-3 against the Matlab-based simulator is that there are libraries for many of the communication technologies implemented in NS-3. Therefore, it is possible to combine multiple technologies and simulate, for example, smart grid applications or heterogeneous/hybrid networks. The PLC module is designed to develop and test applications for power transmission between PLC devices in network topology. The user must specify topology parameters such as geometry, used cable types, impedance values, and location of PLC devices in the network. Ref. [28] shows the importance of modelling a network topology in BPLC. PLC channel response for a typical indoor home network is analyzed. Refs. [29; 30] are based on simulations in the Matlab environment. Ref. [29] is focused on attenuation in low-voltage PLC and creates an OFDM model for comparison of the bit-error rates. In [30], the transfer function, phase response and channel capacity of different indoor power line models are investigated by varying the different parameters of the powerline, focusing on the factors of attenuation and distortion in BPL. Refs. [31; 32] demonstrate results using the Network Simulator. Ref. [31] uses the older Network Simulator 2. Ref. [32] demonstrates results of BPL simulation using NS-3 with implemented Standard IEEE P1901 and medium access CSMA/CA. The paper shows in-home simulations where KNX smart appliances are considered, along with the monitored packet losses and network bitrate in a 24-h simulation. Extensive work in [33] describes in detail the used power line model and performs a number of simulations covering the possibilities of the PLC module for NS-3. This work shows the complex potential of using the PLC module for NS-3. Evidence of this is also seen in [34], which focuses on modelling of the PLC channel in a home PLC environment with cross-layer optimization of PHY and MAC layers, etc. ref. [35; 36; 37; 38; 39] are essential for this paper. These papers work with a G.hn standard implementation and other mechanisms to improve communication performance based on the PLC module by G.hn extension in NS-3 (hereinafter, 'the simulator'). These implementations cover adjustments to PHY, MAC and APP layers. Because the standard is the latest in the BPL area, it is important to improve the simulations. The overall intent of this article is to demonstrate the simulation results of G.hn communication in order to create a complex simulation tool to predict BPLC communication in a given topology. To achieve the presented results, simulation models of devices and their specific settings based on the G.hn extension were created in [37].