Electrical Basics bus
Below is an overview of the electrical engineering principles of bus systems in the automotive industry. The section is organized as follows:
Verbindungstypen
If a motor vehicle bus systems we have in general a bit-serial transmission, which is usually provided as a half-duplex connection. Half-duplex connection is, that with two communication partners, although both can talk to each other, but always in such a way that sends one to the other listens, and vice versa. A full-duplex connection in which could send both controllers simultaneously, is much more complicated and therefore cost reasons in the motor vehicle is not used.
Connection: usually half-duplex
At low bit rates, for example, LIN, the line connections are usually single-wire connections. For all bus systems that use a higher bit rate - that CAN and FlexRay - we have two-wire connections in which the difference signal on the two lines, the data is transferred. In general, these two wires are twisted together then also. There is talk of a so-called "Twisted Pair" cable.
Leader: usually 2 wire twisted pair
The message transport from the sender to one or more receivers will be held in the form of a broadcast. That is, the sender simply sends its data to the bus line - in the way in radio or television - and all interested participants can receive the message.
Topologie
The topology of the bus system in the vehicle for the design of the harness a key issue. Here we have different versions: CAN, LIN or use the so-called linear topology, in which the various control units are connected by more or less short spur lines to a line that connects the control units together. The length of these stubs is dependent on the desired bit rate. The higher the bit rate, the shorter the permissible length of the spurs.
Different bus topologies (linear, star and ring)
The FlexRay bus system can also configure it as a city bus. The default configuration of FlexRay is the star, which is one, usually active and neutral are all ECUs are connected to this star point.
MOST, the bus system, the optical and electrical connections used employs a ring structure in which the control units in the form of a ring are connected.
Kopplung
For coupling the control unit to the bus system is generally used a bus controller. The bus controller is usually already in the microcontroller of the control apparatus. He wrapped the bits in each frame and takes care of the whole bus management. For signal matching between the controller and you need a few bus transceiver. Some bus systems, such as FlexRay, we have star center known as repeaters, the only electric brush up on the bus signal again. They increase the amplitude and filter the signals a little. This allows longer signal lines and improves the signal quality. At the points where different bus systems, either with different bit rates (eg low - and high-speed CAN) or with different bus protocols (eg CAN and MOST) must be coupled together, one set at a called gateway. Gateways are control devices whose main function is to receive the messages from the bus system and put on the messages of another bus.
Bit coding and line length
For the bit coding of the signals on the bus lines is used as a rule the so-called NRZ-coding (non-return-to-zero). During a bit clock while the signal level on the line to ground either constant or a positive voltage. Thus, a logical 0 and logical 1 encoded.
Other coding schemes such as Manchester coding, as known from Ethernet to be used in vehicles not yet available. For SAE J1850 are still found in the exotic vehicle technology PWM encoding. The coding of the signals is carried out via the pulse width.
An important aspect for the transmission reliability is the relationship between wavelength on the one hand and bit rate of the signals on the other side. From the electrical laws implies that one has always to do with wave of technical problems when the line length is about one tenth of the wavelength of the signals on the bus lines, see the formula:At a bit rate (signal fundamental frequency) of 1 Mbit / s. So that is likely to have cable lengths exceeding 30 m with wave effects. To reflections in this area and thus to avoid a significant deterioration in the quality of transmission, the lines must be completed with a matching resistance.
Data transmission
How does the individual bits are assembled into complete messages? We distinguish the so-called character-based and the bit stream based transmission.
In the character-based transmission, some summarized in Rule 8 bits to a character. Before the 8 bits, another bit, called the start bit, and sent at the end of another bit, called the stop bit. These are used for synchronization between the transmitter and receiver. Then there is a small break. Then follows the next character. The number of characters transmitted in this way corresponds to the length of a message. Thereafter, the transmission system will remain at rest, is transmitted to the next message. These breaks, on the one hand between the characters and on the other hand, between the individual messages, of course, reduce the data rate of the bus system.
For bus systems with higher bit rate, this character-based transmission system that we find at K-Line or LIN, unusual. There, one tries to break as small as possible and should use the bit stream based transmission. It can be easily shipped all bits of a message sent consecutively without a break, and only then if the message is complete, there is a more or less big break until the next message.
How the messages will now find its recipient? Here we distinguish two different processes: First, the device-based addressing. If you have any control device - ie transmitter and receiver - a private, individual and unique address. This addressing method is typical of protocols at the layer of the OSI 7-layer model (application level), particularly in the diagnostic area. Second, we have the content-based addressing. This we find in bus systems in cars at the level of the data link layer (Layer 2). Content-based addressing means, the message does not get any address that identifies who the recipient of the message. Rather, it has an identifier, called the message identifier that identifies the contents of the message. Anyone who is interested in its content, can receive the messages.
In addition to the actual user data in the messages typically mitversendet information for error detection and correction of any errors. In the simplest case is when the character-based transfers a single bit per character, the so-called parity. When the bit stream based transmission method and also with the character-based method at embassy level is usually a checksum, called the CRC-sum (Cyclic Redundancy Check). Accordingly, also monitor the transmitter and receiver of the transmission time-outs: When a character-based transmission is the maximum length of the spacing between characters and a bit stream for transmission via the minimum and maximum distances or breaks. In many cases, confirm the beneficiary through a so-called Acknowledge the positive reception of a message. If an error is detected or a reception is not confirmed, there will be a repeat of the transfer.
When transmitting data the term a significant role. Usually we think this first to the actual transmission time on the bus system. This depends on the bit rate and the number of transmitted data. But it must not be forgotten that for the provision of message time is needed, as illustrated. The message is usually provided at the application level must then be processed in several steps by software to generate the actual message to be sent. Then must be maintained until the bus is free. Only then can the message be sent. On the receiver side is there the opposite way: the message unpacked and it must have conversions are performed until the data available at the application layer of the receiver are. The total transmission time is called latency, and should of course be as short as possible. In any case shorter than required by the application. For control and regulation tasks, however, the so-called jitter is more important than latency. As the fluctuation of the latency jitter is referred to on the fly.Bus access
As we have seen, can in a bus system but are simultaneously received by several controllers, but it may only send a control unit. Who is allowed to send at what time is controlled by the bus access. Herein differ from the individual bus systems. This, together with the bit rate, often the decisive criterion for the selection of the individual bus systems.
We have controlled on one side and uncontrolled on the other access methods, see picture. In the controlled access process can distinguish between centrally and locally controlled systems. An example of a centrally controlled system is LIN, then there is a master control unit. This master control unit shall inform the slave control units one after the transmission authority. Who from the master does not receive permission to send can not.
Alternatively, we have locally controlled systems such as FlexRay, TTCAN (Time Triggered CAN) or in the vehicle to be used with TTP (Time Triggered Protocol). They use a so-called time slot method or time-division multiple-access methods. All control units here have a common time base. So they work in sync. Based on this time base, time windows are defined and each control device are assigned to one or more unique window of time in which it is allowed to send.
An essential feature of all time controlled process is that, unlike the event-driven systems, the question is allowed to send when a control unit, are already fixed in the development phase must.
When the bus access with uncontrolled access to the bus there is the variant with collision detection and collision resolution with the variant. Again, the bus access is not completely out of control. All these methods use a so-called carrier-sense multiple-access methods. This means that, although possible in principle to send anyone when he wants, but only if the bus is not busy. Sending is asynchronous way or event-driven. When you attempt to send a control unit, this will first check whether the bus is not busy. If so, the control unit begins to send. should begin case, two controllers simultaneously, it can cause a collision.
Now there are two ways to deal with the collision. One possibility is the collision detection or collision detect (eg Ethernet standard). There, the control devices monitor the bus lines during transmission, the transmitted compared with the actual measured data and can detect a collision. In a collision, have been withdrawing both controllers and back again after a time. Since the waiting time is randomly chosen in a particular setting, the likelihood of renewed conflict down substantially.
The disadvantage of this method is that it is not deterministic. You never know whether there will be collisions and it is not certain that a message can be effectively transferred immediately. A slightly better system therefore used in addition to collision detection and collision resolution. In these systems, with CAN as the main representative, it also comes to collisions. Here too, all stations detect a collision. But move there in a collision does not "win" the two channels back, but the station with the highest priority and resumes its transmission. This principle is known as arbitration. Only the one who "loses" the arbitration, withdraws. The other sends unchanged and continues without that he has ever encountered an error.
Bus - Wired-OR
As the collision detection and collision resolution function is to be demonstrated on a small circuit example, see figure:Here you can see the top right of the bus of a LIN bus system with two controllers, and ECU 1 ECU 2. The bus is, put simply, each from a pull-up resistor, which connects the bus to the supply voltage + UB and the transistors T1 and T2, that the bus can be connected to ground.
At rest, the two transistors on and off the bus line is thus at the level of the supply voltage + UB. will send when the control device 1 is now a logical 0 (Low) and the control unit 2 is at rest, then the controller 1 switches just his transistor is a T1, which is significantly lower resistance than the two pull-up resistors and the bus line is grounded drawn, see table.
States in the collision resolution
When the control device 1 against a logical wants 1 (High) and send the control unit 2 is still at rest, then the controller 1 can be switched off his transistor T1 simple. Thus, the bus line continues to exceed both pull-up resistors on UB. On the bus we find a positive signal (High).
Now suppose that while the control unit 1, this logical 1 (high) is, trying to send the control unit 2 also, just a logical 0 (Low). Then switch on the control unit 2 his transistor T2 and gets the bus line via the low transistor T2 to ground. This corresponds to a logical 0 (Low). That is, control unit 2 dominates the signal. The winner is thus the collision and can send. Now, if read along both control devices, the signals of the bus line and compare with what they actually wanted to send, then would determine in this case control unit 2 is not a problem. It wanted to send a 0 and was on the bus line actually see a 0. Control device 1, however, would find that there was a collision, since it will send a 1, a further reading 0th If this happens, the controller further sending withdraws, the controller can easily send two more. It does not even notice that it has ever been a collision. The collision was therefore dissolved.
The most significant Advantages and disadvantages the various Bus access once again with briefly:
-
Master-Slave:
- Simple feasibility (+)
- Seized maximum time deterministic (+)
- Maximum latency time is proportional to the number of bus users (-)
- Failure of the master breakdown of the entire system (-)
- Redundancy in cyclical transmission (-)
-
TDMA Time Division Multiple Access:
- High temporal precision (+)
- High protocol efficiency (+)
- Strictly deterministic (+)
- Temporal synchronization of the participants needed (-)
- Limited number of participants (-)
- Limited number of messages (-)
- Transmission of redundant data (-)
-
CSMA / CD (Collision Detect):
- Many participants possible (+)
- Low bus load (+)
- Users can be added or removed without bus reconfiguration (+)
- Non-deterministic (-)
- Long waiting times in high-load (-)
-
CSMA / CA (Collision Avoidance):
- Many participants possible (+)
- Users can be added or removed without bus reconfiguration (+)
- Hardly efficiency drop during high load (+)
- For high-priority messages deterministic (+)
- Maximum latency high-priority messages (-)
-
Created05. April 2011
-
Version9
-
Amended05. April 2011
-
Hits2169