The role of automotive Ethernet in cars

Publisher:绿意盎然Latest update time:2023-02-02 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

I. Introduction to Automotive Ethernet Bus

1.1 Ethernet makes connection easier

Ethernet technology is used everywhere in our daily life. The daily computer and mobile Internet access are inseparable from Ethernet. The 5G Internet of Vehicles, V2X, and the intelligent applications of cars in the future are all inseparable from Ethernet technology.


1.2 The biggest advantage of automotive Ethernet: high bandwidth and high maturity

35b85ddc-a02a-11ed-bfe3-dac502259ad0.png

The popularity of automotive Ethernet mainly relies on two advantages of Ethernet: high bandwidth and high maturity. The bandwidth of automotive Ethernet is currently 100M or 1000M, and it can even reach 2.5G, 5G, and 10G bandwidth as technology develops.

At present, industrial Ethernet can reach 100G bandwidth. The application of industrial Ethernet to automotive Ethernet mainly solves the EMC problem in automobiles. There is no need for separate verification or technical problem research. It is equivalent to being directly applied, which is very beneficial to the development of automotive Ethernet. Therefore, the maturity of automotive Ethernet is relatively high, which is also an important reason for the widespread application of automotive Ethernet.


The development of automotive technology has significantly increased the demand for Ethernet:

1) With the emergence of high-computing-power, multi-functional, centralized intelligent ECUs, the flashing rate and iteration speed must be fast;

2) Advanced intelligent driving has put forward higher requirements for latency and bandwidth;

3) New energy battery replacement, wireless flexibility to meet the WIFI needs of battery replacement stations;

4) Intelligent car networking, ultimate cockpit enjoyment, consumer & automotive integration

Reduce costs and increase efficiency, use Ethernet AVB/TSN technology to achieve video transmission, and save the cost of LVDS dedicated wiring harnesses.

1.3 Common Ethernet Harness Classification

35c2cf24-a02a-11ed-bfe3-dac502259ad0.png

A pair of twisted wires

35ecb762-a02a-11ed-bfe3-dac502259ad0.png

Two twisted pairs

OBD external communication usually uses four pins 3, 11, 12, and 13, plus a pin 8 for DOIP activation. Among them, 3, 11, 12, and 13 are used for data transmission. These four pins use two pairs of twisted pair cables, and these four wires are connected to four of the external network cables to achieve data transmission with the diagnostic instrument or PCG.

361b5086-a02a-11ed-bfe3-dac502259ad0.png

Four twisted pairs (wire sequence is divided into T568A and T568B)

The above picture shows a common network cable. The network cable uses four pairs of twisted pairs. Generally, a 100M network will use 1, 2, 3, and 6. The four pins of the OBD port must be matched one by one with the four wires in the network cable to communicate outside the vehicle.

II. Automotive Ethernet Protocol Analysis

2.1 Ethernet Classic OSI (Open System Interconnect) Seven-Layer Model, Published by ISO

3641b8e8-a02a-11ed-bfe3-dac502259ad0.png

The Ethernet classic OSI seven-layer model and its corresponding explanation are shown in the figure above. The TCP/IP five-layer model is also listed for comparison. In comparison, OSI and TCP/IP essentially describe the same thing, except that OSI breaks down the top application layer of TCP/IP into three layers and gives a detailed functional description, which is convenient for deepening understanding. However, in actual learning and implementation, the TCP/IP five-layer model is more often used.

3648e69a-a02a-11ed-bfe3-dac502259ad0.png

OSI model protocol distribution

2.2 Ethernet frame structure

3656e4d4-a02a-11ed-bfe3-dac502259ad0.png

The Ethernet frame structure is shown in the figure above. The Ethernet message frame we can capture starts from the target MAC address to the IP datagram. The preceding preamble and frame start mark have been parsed before the packet is captured, and there is a frame spacing between frames.


Therefore, an Ethernet frame consists of a destination MAC address, a source MAC address, a frame type, and an IP datagram. The IP datagram has a specified length, ranging from 46 bytes to 1500 bytes. Therefore, Ethernet has a maximum frame and a minimum frame:

1) Ethernet maximum frame:

6+6+2+1500+4=1518 bytes

2) Ethernet minimum frame

6+6+2+46+4=64 bytes

2.3IP and subnet mask: Subnet mask cannot exist alone, it must be used in conjunction with IP address

36626836-a02a-11ed-bfe3-dac502259ad0.png

1) The function of subnet mask: it divides an IP address into two parts: network address and host address.

2) For example, 192.168.1.1/24 or 192.168.1.1, 255.255.255.0, then the number of hosts is 2^8-2=254

Ethernet routing example:

366b2610-a02a-11ed-bfe3-dac502259ad0.png

Take PC accessing Baidu as an example. For PC, it doesn’t know or care about

Whether it is in Beijing or Shenzhen, it only needs to do routing according to its default gateway and know where to send the IP. It is like when we send a courier to Beijing, after the courier picks up the package from this area, he does not need to know the specific route to Beijing.

He only needs to send the object to the next gathering point, just like a relay. This is the concept of Ethernet communication. Therefore, when designing Ethernet communication, you need to consider to whom the information is sent.


Computer obtains network card IP information

36724864-a02a-11ed-bfe3-dac502259ad0.png

2.4 Ethernet DOIP Protocol

367c4580-a02a-11ed-bfe3-dac502259ad0.png

The above picture shows a captured DOIP message. Please note that the frame in the picture does not include the preamble, frame start character, and CRC check part. These have been stripped off, especially the CRC check. If this frame can be captured, it means that the CRC check must have passed.


The entire DOIP message in the figure has a total of 69 bytes, which are:

14-byte data label layer, including 6 bytes of source MAC, 6 bytes of destination MAC, 2 bytes of frame type,

and then IPV4. Generally, the default is 20 bytes. In some cases, there will be some additional option fields, which may be more than 20 bytes. This situation is rarely used, so you can just understand it.

Next is TCP, which also defaults to 20 bytes, and in rare cases may have additional option bytes.

The DOIP protocol has an 8-byte header. Note that the header does not contain a logical address.

The above is the frame structure of the DOIP protocol

2.5 Ethernet SOMEIP Protocol

3687eeb2-a02a-11ed-bfe3-dac502259ad0.png

The SOMEIP protocol frame structure is shown in the figure above. SOMEIP is a protocol commonly used in SOA. The SOMEIP frame structure is similar to the DOIP frame structure. The front part is basically the same. The SOMEIP message header has 16 bytes, including Service ID, Method ID, length, etc.

Different SOMEIP requests or messages require different parsing of their payloads, because different OEMs have different payload definitions, and some additional plug-ins may be needed for parsing.

III. Application Scenarios of Automotive Ethernet

3.1 DoIP Application

36985aae-a02a-11ed-bfe3-dac502259ad0.png

DOIP protocol data format

36b5514a-a02a-11ed-bfe3-dac502259ad0.png

The diagnostic instrument communicates with the gateway through DOIP, from the internal gateway to the internal, including four situations:

1) CAN ECU: The diagnostic instrument establishes a DOIP link with the gateway and performs ECU diagnosis through gateway protocol conversion;

2) Intelligent ECU: The diagnostic instrument establishes a DOIP link with the gateway and performs ECU diagnosis through the gateway protocol brick-mixing;

3) Smart ECU: Gateway agent: The diagnostic instrument establishes a DOIP link with the gateway, and the gateway establishes 1) a DOIP link with the smart ECU to perform ECU diagnosis;

4) Smart ECU: Gateway penetration: The diagnostic instrument establishes a DOIP link with the smart ECU to perform ECU diagnosis.

36bda1d8-a02a-11ed-bfe3-dac502259ad0.png

Example of DOIP application process

36c3383c-a02a-11ed-bfe3-dac502259ad0.png

Example of DOIP application process

3.2 Application of Port Mirroring

36c8b2da-a02a-11ed-bfe3-dac502259ad0.png

Mirroring means copying a message from a specified source to a destination port. The specified source is called a mirror source, the destination port is called an observation port, and the copied message is called a mirror message.

Mirroring can copy a message without affecting the normal processing of the original message by the device, and send it to the monitoring device through the observation port to determine whether the services running on the network are normal.

Mirror port: the port through which the original message passes

Observation port: the port for connecting monitoring equipment, usually the OBD port on the vehicle

Principle: PC can be connected through OBD, and the port mirroring function can be turned on through diagnostic instructions to capture the communication message from ECU1 to ECU2 for analysis and problem solving.

IV. Project Experience of Automotive Ethernet

4.1 Considerations for the implementation of in-vehicle Ethernet

When designing a vehicle with in-vehicle Ethernet, it is necessary to know the physical characteristics of Ethernet communication to determine the selection direction of wiring harnesses and plug-ins:

1) Choose shielded or unshielded cable based on your needs (cost and length)

2) The selection of wiring harness requires reference impedance and S parameters, and is subject to TC2/9 specification constraints

3) The pull-off force has requirements on the supplier's production and crimping process

4) Performance testing can be performed with PHY to test latency and frame loss rate

36d157a0-a02a-11ed-bfe3-dac502259ad0.png

36d8f2bc-a02a-11ed-bfe3-dac502259ad0.png

4.2 Wireless WIFI Communication Optimization Optimization 1: Channel Management

36e417dc-a02a-11ed-bfe3-dac502259ad0.png

Optimization 1: Channel Management

When everyone is sending signals or transmitting data at the same time, it means that there is mutual interference between the devices. For example, when everyone is surfing the Internet in the office at the same time, the same network sometimes works well and sometimes doesn't work well. This may sometimes cause a lot of interference.

In this case, channel management is required, that is, channels must be staggered. Generally, there are about 11 channels in China, from channel 1 to channel 11, and there must be 5 channels between channels to avoid interference.

[1] [2]
Reference address:The role of automotive Ethernet in cars

Previous article:Minimizing Noise and Power Consumption in Automotive Audio Systems with SigmaDSP
Next article:What to consider when designing an automotive Ethernet firewall

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号