## 2 V2G Communication System  
The present paper aims to optimally design a PLC system that allows to manage a distributed energy storage system integrated with a smart grid. The storage is composed of a number of electric vehicle batteries connected to prefixed charging stations. It is assumed that one modem is installed at the interface between the charging station and the smart grid. Therefore, the lines connecting the charging station to the plugs are not considered in the design problem. To prove the validity of the method, a simple feeder network is considered, which is a part of a wider network already considered in [19]; this does not invalidate the generality of the results, as the method is applied separately for each single feeder. Moreover, frequency responses and noise spectra are obtained from simulations rather than measurements because the method can be demonstrated regardless of the actual data. Network Simulator 3 (NS-3) [20], which is a free and open source discrete event network simulator, has been used. Figure 2 shows the topology of the case study, with a number of low voltage nodes, 3 kW loads, and four charging stations (checkered squares in Figure 2) supplied by a medium voltage/low voltage substation with 20 kV/400 V, 1 MVA transformer. All the lines are three-phase underground commercial cables, whose datasheets are included in the database of the simulator. A phase-neutral cable, among all those available, has been randomly chosen to be the PLCchannel. The lengths of the lines are reported in Figure 2. Each charging station supplies a variable number of charging plugs and it is connected to the control center through the smart grid. As each charging station is connected to the control center by a different path, each one is associated to a different frequency response. As known, the PLC channels are not time invariant due to load connection/disconnection [21]. For this reason, different scenarios have been simulated corresponding to different configurations of loads and active charging plugs and the lower envelop of the frequency responses has been assumed. In Figure 3, the power spectral densities (PSDs) of the signal as a function of the frequency in the nodes corresponding to the charging stations are shown. The frequency responses have been determined by feeding the channel with a white Gaussian noise and by measuring the spectrum of the signal at the receiver side. As a simplifying assumption, only the transmission from the charging station to the control center has been considered, without losing generality. Nonetheless, for each channel, two frequency responses for bi-directional transmission should be assessed, and a separate sub-band should be allocated to each. Thus, transmissions wouldn't need to be synchronized. Since the attenuation affects the performance of the PLC network, increasing with frequency and distance, longer LV lines must use frequencies in lower bands to guarantee a minimum performance. Figure 3: PSD of charging stations #3, #4, #7, and #12 connected to the control node 1. Figure 2: The case study: node 1 is the substation, the charging stations are the checkered nodes 3, 4, 7, and 12, whereas the black nodes are the low voltage 3 kW loads. Depending on the occupation level of the channel, different information can be exchanged between the charging stations and the control system. Note that, because all the charging stations are connected to the same feeder, any transmission reaches all the nodes. However, as each sub-carrier is assigned exclusively to a specific node, each receiver is able to retrieve the transmission addressed to it. Each node is connected to the control node through a power line, whose frequency response depends on the cable-laying and the length. For this reason, the optimal bit-loading should consider all the different frequency responses and all the possible states of the network.