## 2 Background: Electric Vehicle Charging Systems and Standards
### ISO/IEC 15118: High-Level Communication  
At the heart of the EV charging mechanism is the ISO/IEC 15118 standard, and our test system mainly focuses on the conformance test to this standard. ISO/IEC 15118 defines its concepts and use cases in Part 1, communication details in Parts 2 and 3 and testing methods in Parts 4 and 5. ISO/IEC 15118 defines the communication details in all seven layers of OSI; physical and data-link layers are defined in Part 3, and all upper layers are defined in Part 2, as shown in Figure 2. Other parts of the standard are out of scope of this paper.  
In the physical and data-link layer, Power Line Communication (PLC) is used. In particular, HPGP [11] standard is adopted for PLC, but other kinds of PLC technologies could be used if HPGP cannot be used in certain countries. For testing, ISO/IEC 15118 Part 5 only focuses on the pairing protocol of HPGP, called SLAC (Signal Level Attenuation Characterization). Our test system also follows this approach, and other parts of HPGP are out of the scope of this paper.  
On top of PLC, IPv6 is used for the network layer, and UDP (User Datagram Protocol)/TCP (Transmission Control Protocol) is used for the transport layer. As these protocols are well implemented  
Figure 2: The protocol stack of ISO/IEC 15118.  
by off-the-shelf operating systems, such as Windows or Linux, to name a few, our testing system does not test these protocols explicitly, although the incorrect implementation of these layers will be indirectly detected by the test system.  
For session management, ISO/IEC 15118 defines V2 GTP (Vehicle-to-Grid Transfer Protocol), and all of the messages are delivered in V2 GTP packets. The V2 GTP protocol simply indicates the version of ISO/IEC 15118 in action and the packet type enclosed therein. The first packet type of the V2 GTP packet is SDP (SECC Discovery Protocol). By this protocol, the EVCC broadcasts an SDP request packet and waits for a reply from an SECC. From the reply, EVCC learns about the IP address and the communication port of the SECC. The second packet type is the application message. Each application message is internally represented in XML (Extensible Markup Language) for maximum flexibility and portability, but the actual message in transit is encoded by the EXI (Efficient XML Interchange) algorithm for the compactness of the packet.  
The communication of ISO/IEC 15118 is in the client-server model; for each application message type, the client, EV, sends a request message, and the server, EVSE, replies with a response message. By a series of request and response messages, the EV and EVSE exchange necessary information before, during and after charging. For example, for the session setup message type, EV sends the SessionSetupRequest message to EVSE and EVSE replies with the SessionSetupResponse message. The order of the application message types in the table roughly matches the actual communication order, but they are not necessarily the same.  
For security, TLS (Transport Layer Security) helps EV to authenticate EVSE, protecting the confidentiality and integrity of the application messages. Additional protection of sensitive information is provided by XML security features. With XML encryption and signature features, EV can protect the confidentiality and authenticity of sensitive information, such as credit card numbers. The explicit test of theses functionalities is out of the scope of this work.