Communication system and communication device
By using a resistor module consisting of a variable resistor and a temperature sensor in the CAN bus communication system, the resistance value is adjusted according to the temperature, thus solving the resistance mismatch problem caused by changes in ambient temperature and improving the reliability and stability of the communication system.
Patent Information
- Application Number
- CN202510873761.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-10-28
AI Technical Summary
When the ambient temperature changes, the resistance values of the resistors in each branch of the CAN bus communication system become mismatched, which leads to a decrease in the reliability of signal transmission.
A resistor module consisting of a variable resistor and a temperature sensor is used. The controller adjusts the resistance value of the variable resistor according to the temperature detection to match the resistance of the bus and communication lines.
Impedance matching is achieved when the ambient temperature changes, avoiding signal oscillation and improving the reliability and normal operation of the communication system.
Smart Images

Figure CN120856494A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and more specifically, to a communication system and a communication device. Background Technology
[0002] The CAN bus is a transmission line where signals propagate as electromagnetic waves. When these waves encounter impedance changes, some energy is reflected back to the source, creating superimposed signals. Therefore, to reduce reflections on branch lines, branch resistors are connected in parallel at the nodes to match the resistance of the bus, thus minimizing reflections. However, when the ambient temperature changes significantly, the resistance values of the branch resistors also change, leading to resistance mismatch. This can affect signal transmission and reduce the reliability of CAN bus communication. Summary of the Invention
[0003] This application provides a communication system and a communication device.
[0004] The communication system of this application includes a bus, a resistor module, a temperature sensor, and a controller. The bus connects to devices. The resistor module is disposed on the communication line between the bus and the devices, and the resistor module includes a variable resistor. The temperature sensor is used to detect the temperature of the resistor module. The controller determines the current resistance value of the resistor module based on the temperature detected by the temperature sensor, and adjusts the resistance value of the variable resistor so that the resistance of the bus and the resistance of the communication line are consistent.
[0005] In some embodiments, the bus includes a high-order data line and a low-order data line, the two ends of the device are respectively connected to the high-order data line and the low-order data line, the two ends of the resistor module are respectively connected to the high-order data line and the low-order data line, and the resistor module is also connected in series with the device.
[0006] In some embodiments, the controller includes a first control module and a second control module, which are connected via data frame communication. The first control module is used to acquire the temperature of the temperature sensor and write a target data frame based on the temperature to transmit the target data frame to the second control module. The second control module is located within the resistor module and is used to control the resistance value of the variable resistor based on the target data frame.
[0007] In some implementations, the first control module is the main control module of the communication system.
[0008] In some implementations, the controller determines the current resistance value of the resistor module based on the temperature detected by the temperature sensor in order to adjust the resistance value of the variable resistor, including: the controller determines the current resistance value of the variable resistor based on the temperature detected by the temperature sensor and a first temperature-resistance mapping relationship corresponding to the variable resistor, and adjusts the resistance value of the variable resistor based on the current resistance value.
[0009] In some embodiments, the resistor module further includes a fixed resistor connected in series with the variable resistor. The controller determines the current resistance value of the resistor module based on the temperature detected by the temperature sensor to adjust the resistance value of the variable resistor. This includes: the controller determining the current resistance of the fixed resistor and the variable resistor based on the temperature detected by the temperature sensor, a first temperature-resistance mapping relationship corresponding to the variable resistor, and a second temperature-resistance mapping relationship corresponding to the fixed resistor, to adjust the resistance value of the variable resistor based on the current resistance of the fixed resistor and the variable resistor.
[0010] In some implementations, the temperature compensation state characterizes the degree of deviation between the current resistance value of the resistor module and the reference resistance value, the degree of deviation being reflected by the deviation rate and the corresponding deviation rate threshold; the controller determines the current resistance value of the resistor module based on the temperature detected by the temperature sensor to adjust the resistance value of the variable resistor, including: when the temperature compensation state of the communication system is such that the deviation rate between the current resistance value of the resistor module and the reference resistance value is greater than a first preset deviation rate and less than a second preset deviation rate, the controller adjusts the resistance value of the variable resistor based on the temperature detected by the temperature sensor, wherein the first preset deviation rate is less than the second preset deviation rate.
[0011] In some implementations, when the temperature compensation state of the communication system is such that the deviation rate between the current resistance value of the resistor module and the reference resistance value is less than a first preset deviation rate, the controller maintains the resistance value of the variable resistor unchanged.
[0012] In some implementations, when the temperature compensation state of the communication system is such that the deviation rate between the current resistance value of the resistor module and the reference resistance value is greater than a second preset deviation rate, the controller adjusts the resistance value of the variable resistor based on the temperature detected by the temperature sensor, and the controller also reduces the baud rate of the communication system and / or extends the bit period of the communication system.
[0013] In some implementations, when the temperature compensation state of the communication system is such that the deviation rate between the current resistance value of the resistor module and the reference resistance value is greater than a second preset deviation rate for a duration greater than a preset duration, the controller disconnects the connection between the device corresponding to the resistor module and the bus.
[0014] In some embodiments, the controller includes a first control module and a second control module, which are connected via data frame communication. The data frame of the communication system includes a target flag corresponding to the adjustment of the variable resistor, and the data of the target flag is used to characterize the temperature compensation state. The first control module writes the data corresponding to the target flag based on the deviation rate between the current resistance value of the resistor module and the reference resistance value to generate a target data frame. The first control module is also used to send the target data frame. The second control module is used to receive the target data frame and determine the temperature compensation state according to the data of the target flag, so as to control the resistance value of the variable resistor according to the temperature compensation state.
[0015] In some implementations, the target flag bit is located in a reserved bit field of the data frame.
[0016] In some implementations, the device includes multiple devices, and the controller sorts the deviation rates between the current resistance value and the reference resistance value of the resistor module corresponding to each device, and adjusts the priority of each device in the arbitration strategy of the communication system based on the sorting results, wherein the larger the deviation rate, the higher the priority.
[0017] The communication device according to the embodiments of this application includes a device and a communication system as described in any of the above embodiments. The bus is connected to the device.
[0018] In some embodiments, the communication device includes a vehicle and / or an energy storage device.
[0019] In the communication system and device of this application, the communication system includes a resistor module and a temperature sensor. The resistor module is disposed on the communication line between the bus and the device, and includes a variable resistor to facilitate changing the resistance of the communication line. The controller can determine the current resistance value of the resistor module based on the current temperature detected by the temperature sensor, and then adjust the resistance value of the variable resistor to make the resistance of the bus and the resistance of the communication line consistent. Thus, the communication system of this application can automatically adjust the resistance value of the variable resistor according to changes in ambient temperature, achieving impedance matching, thereby preventing signal oscillation on the bus and communication line, improving the communication reliability of the communication system, and ensuring the normal operation of the communication system.
[0020] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become obvious from the description below, or will be learned through practice of the embodiments of the present application. Attached Figure Description
[0021] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0022] Figure 1 This is a schematic diagram of the structure of a communication device according to certain embodiments of this application;
[0023] Figure 2 This is a schematic diagram of the communication system according to some embodiments of this application;
[0024] Figure 3 This is a schematic diagram of a resistor module according to certain embodiments of this application;
[0025] Figure 4 This is a schematic diagram of a data frame of a communication system according to certain embodiments of this application.
[0026] Explanation of key component symbols:
[0027] 1000. Communication devices;
[0028] 100. Communication system; 200. Equipment;
[0029] 10. Bus; 11. High-order data line; 12. Low-order data line; 20. Resistor module; 21. Variable resistor; 22. Fixed resistor; 30. Temperature sensor; 40. Controller; 41. First control module; 42. Second control module. Detailed Implementation
[0030] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of this application, and should not be construed as limiting the embodiments of this application.
[0031] Controller Area Network (CAN) is a multi-master local area network (LAN) introduced by Bosch for modern automotive applications. Due to its high performance, high reliability, and real-time capabilities, it is now widely used in communication systems within energy storage battery compartments. The CAN bus has two states: "dominant" and "recessive." "Dominant" represents "0," and "recessive" represents "1." The CAN protocol standard specifies that the differential levels for "dominant" and "recessive" must be within a certain threshold range for correct identification.
[0032] The CAN bus is a transmission line where signals propagate as electromagnetic waves. When these electromagnetic waves encounter impedance changes, some energy is reflected back to the source, creating a superimposed signal. Specifically, if the resistance of the branch resistor is mismatched with the CAN bus resistance, when a signal on the CAN branch structure (i.e., the branch line) reaches the end of the branch, it is reflected back to the branch point, and then reflected again from the branch point to the end of the branch, causing oscillations within the branch structure. Therefore, to reduce branch line reflections, branch line resistors are connected in parallel at the nodes.
[0033] However, when the ambient temperature changes significantly, the resistance values of each branch resistor will also change, leading to resistance mismatch. This can affect signal transmission and reduce the reliability of CAN bus communication. Therefore, ensuring the matching of resistance values of each branch resistor when the ambient temperature changes is directly related to whether the entire communication system can operate normally.
[0034] To resolve the above issues, please refer to [link / reference]. Figure 1 and Figure 2 This application provides a communication system 100, which includes a bus 10, a resistor module 20, a temperature sensor 30, and a controller 40. The bus 10 connects to a device 200. The resistor module 20 is disposed on the communication line between the bus 10 and the device 200, and includes a variable resistor 21. The temperature sensor 30 is used to detect the temperature of the resistor module 20. Based on the temperature detected by the temperature sensor 30, the controller 40 adjusts the resistance value of the variable resistor 21 so that the resistance of the bus 10 matches the resistance of the communication line.
[0035] Specifically, the communication system 100 is a CAN bus communication system 100. Bus 10 refers to the common communication channel shared by all nodes (devices 200), i.e., the physical medium and electrical path used for data transmission. A stub (also called a branch line or branch line) refers to a shorter cable segment branching off from bus 10, used to connect nodes on bus 10. A node refers to an independent device 200 or electronic control unit (ECU) connected to bus 10 and participating in communication. Each node can send and receive data via CAN bus 10 and communicate according to the CAN protocol. Devices 200 connected to bus 10 are nodes, such as vehicles and / or energy storage devices. The communication line between bus 10 and device 200 can be understood as the aforementioned stub.
[0036] Resistor module 20 is an electronic component or assembly whose core function is to provide a specific resistance value to limit current in a circuit or adjust voltage distribution. Resistor module 20 is installed on the communication line between bus 10 and device 200, and can be connected in parallel or series with device 200. Resistor module 20 includes a variable resistor 21, such as a sliding rheostat, potentiometer, or adjustable resistor. The resistance value output by variable resistor 21 can be changed, allowing the resistance module 20 to alter the resistance of the communication line (i.e., the total resistance of the entire line).
[0037] Temperature sensor 30 is a device that can sense temperature and convert it into a usable output signal. Temperature sensor 30 is in contact with resistor module 20, for example, temperature sensor 30 can be in close contact with the corresponding resistor module 20, so as to detect the current temperature of resistor module 20 using temperature sensor 30.
[0038] The controller 40 is the core component of the communication system 100. It receives input signals from sensors or systems, processes and analyzes these signals according to preset algorithms, rules or programs, and then outputs corresponding control signals to drive the actuator to move, thereby realizing the control of the controlled object and making the system operate according to the predetermined requirements.
[0039] The controller 40 can determine the effect of temperature on the resistor module 20 in advance and determine the actual resistance value of the resistor module 20 at different temperatures. Then, the controller 40 determines the actual resistance value of the resistor module 20 at the current moment, i.e., the current resistance value, based on the temperature detected by the temperature sensor 30. Then, based on the current resistance value of the resistor module 20 and the resistance value of the bus 10 (usually 120Ω), the controller 40 adjusts the resistance value of the variable resistor 21 to compensate for the difference between the current resistance value of the resistor module 20 and the resistance value of the bus 10, so that the resistance of the bus 10 is consistent with the resistance of the communication line. The consistency between the resistance of the bus 10 and the resistance of the communication line includes both complete consistency and approximate consistency.
[0040] It should be noted that the communication system 100 is typically connected to at least two devices 200, enabling multiple devices 200 to communicate via the bus 10. In this case, each device 200 and the bus 10 has a corresponding resistor module 20 on its communication line, and each resistor module 20 has a corresponding temperature sensor 30.
[0041] Thus, under the action of the variable resistor 21, the resistance of the bus 10 and the resistance of the communication line can be made consistent, achieving impedance matching to avoid signal oscillation on the bus 10 and the communication line, thereby improving the communication reliability of the communication system 100. Therefore, this application can solve the problem of impedance mismatch between branches of the CAN bus communication system 100 when the ambient temperature changes significantly, which affects the communication between devices 200.
[0042] The communication system 100 of this application embodiment includes a resistor module 20 and a temperature sensor 30. The resistor module 20 is disposed on the communication line between the bus 10 and the device 200, and the resistor module 20 includes a variable resistor 21 to facilitate changing the resistance of the communication line. The controller 40 can determine the current resistance value of the resistor module 20 based on the current temperature detected by the temperature sensor 30, and then adjust the resistance value of the variable resistor 21 to make the resistance of the bus 10 and the resistance of the communication line consistent. In this way, the communication system 100 of this application can automatically adjust the resistance value of the variable resistor 21 according to the change of ambient temperature to achieve impedance matching, thereby avoiding signal oscillation in the bus 10 and the communication line, thus improving the communication reliability of the communication system 100 and ensuring the normal operation of the communication system 100.
[0043] Please see Figure 1 In some embodiments, the bus 10 includes a high-order data line 11 and a low-order data line 12. The two ends of the device 200 are connected to the high-order data line 11 and the low-order data line 12 respectively. The two ends of the resistor module 20 are connected to the high-order data line 11 and the low-order data line 12 respectively, and the resistor module 20 is also connected in series with the device 200.
[0044] Specifically, bus 10 includes high-level data line 11 and low-level data line 12. High-level data line 11 typically transmits high-level signals, and low-level data line 12 typically transmits low-level signals. The CAN bus 10 uses the voltage difference (rather than absolute voltage) between high-level data line 11 and low-level data line 12 to represent logic states, effectively suppressing common-mode noise (such as electromagnetic interference). Device 200 is connected to high-level data line 11 and low-level data line 12 at both ends. The communication lines between bus 10 and device 200 include the lines between high-level data line 11 and device 200, and the lines between low-level data line 12 and device 200.
[0045] The two ends of the resistor module 20 are connected to the high-order data line 11 and the low-order data line 12 respectively, and the resistor module 20 is also connected in series with the device 200, so that the resistor module 20 can change the resistance of the communication line corresponding to the connected device 200, so as to make the resistance of the bus 10 and the resistance of the communication line consistent.
[0046] Thus, at least two devices 200 are connected in parallel between the high-order data line 11 and the low-order data line 12, and at least two resistor modules 20 are connected in parallel between the high-order data line 11 and the low-order data line 12. Each device 200 is provided with a corresponding resistor module 20 to ensure that the resistance value of the communication line corresponding to each device 200 can be adjusted by the resistor module 20 to be consistent with the resistance value of the bus 10, thereby ensuring that the communication of each device 200 can proceed normally.
[0047] Please see Figure 1 and Figure 2 In some embodiments, the controller 40 includes a first control module 41 and a second control module 42, which are connected via data frame communication. The first control module 41 is used to acquire the temperature of the temperature sensor 30 and write a target data frame based on the temperature to transmit the target data frame to the second control module 42. The second control module 42 is located in the resistor module 20 and is used to control the resistance value of the variable resistor 21 based on the target data frame.
[0048] Specifically, the controller 40 includes a first control module 41 and a second control module 42, which are connected via data frame communication. The temperature sensor 30 is communicatively connected to the first control module 41. After detecting a temperature, the temperature sensor 30 sends the detected temperature to the first control module 41. The first control module 41 then writes a target data frame based on the acquired temperature and sends it to the second control module 42. The second control module 42 is located within the resistor module 20 and can be considered a dedicated control module for controlling the resistance value of the variable resistor 21. The second control module 42 can then control the resistance value of the variable resistor 21 based on the temperature-related information carried in the target data frame.
[0049] In some embodiments, the first control module 41 is the master control module (MCM) of the communication system 100. The master control module (MCM) is the core hardware / software unit responsible for coordinating, managing, and monitoring the operation of the entire system, typically acting as the "brain" of the system to centrally handle critical decisions and resource allocation. Specifically, the first control module 41 is also used to control the operation of devices in the communication system 100 other than the resistor module 20, such as controlling the connection and disconnection between the device 200 and the bus 10, or controlling the baud rate and bit period of the communication system 100. In other embodiments, the first control module 41 may be a controller 40 used only to acquire the temperature of the temperature sensor 30, thereby achieving functional decoupling and improving system reliability.
[0050] Thus, the first control module 41 and the second control module 42 can work together to ensure that the resistance value of the variable resistor 21 can be accurately adjusted according to the temperature detected by the temperature detector, thereby ensuring that the resistance of the communication line between the bus 10 and the device 200 is consistent with the resistance of the bus 10. The controller 40 is divided into two control modules with different functions, which enables functional decoupling, improves system reliability, and prevents the second control module 42 from being directly affected by a failure of the temperature sensor 30 (and vice versa), avoiding a single point of failure leading to a global system failure. At the same time, data frames typically contain check fields (such as CRC and parity checks), so the first control module 41 and the second control module 42 communicate via data frames, which can detect noise interference or data corruption during transmission and avoid erroneous operations. If the check fails, a retransmission can be requested to ensure data integrity.
[0051] In other embodiments, the controller 40 is not divided into multiple control modules. The controller 40 itself can acquire the temperature detected by the temperature sensor 30, store the mapping relationship between different temperatures and corresponding control actions, and execute the corresponding control actions. Thus, the controller can also adjust the resistance value of the variable resistor 21 based on the acquired temperature, and perform functions such as adjusting the baud rate of the communication system 100, extending the bit cycle of the communication system 100, and disconnecting the device 200 from the bus 10. Therefore, multiple functions can be integrated into a single controller 40 to improve real-time performance and response speed.
[0052] Please see Figure 1 and Figure 2 In some embodiments, the controller 40 determines the current resistance value of the resistor module 20 based on the temperature detected by the temperature sensor 30, in order to adjust the resistance value of the variable resistor 21, including:
[0053] The controller 40 determines the current resistance value of the variable resistor 21 based on the temperature detected by the temperature sensor 30 and the first temperature-resistance mapping relationship corresponding to the variable resistor 21, so as to adjust the resistance value of the variable resistor 21 based on the current resistance value.
[0054] The resistance value of resistor module 20 is based on the resistance value of the communication line when it is consistent with the resistance value of bus 10.
[0055] Specifically, the variable resistor 21 is typically marked with multiple nominal resistance values, and the controller 40 adjusts the output resistance of the variable resistor 21 by selecting a nominal resistance value. The nominal resistance value is the "ideal value" marked by the manufacturer, usually based on measurements at room temperature (25°C). The actual resistance value of the variable resistor 21 is usually affected by the ambient temperature. Therefore, when controlling the output of the variable resistor 21 based on a certain nominal resistance value, the actual output resistance of the variable resistor 21 may not be equal to the nominal resistance value.
[0056] The controller 40 can obtain the actual resistance values of each nominal resistance value of the variable resistor 21 at different temperatures in advance to obtain the first temperature-resistance mapping relationship of the variable resistor 21. The first temperature-resistance mapping relationship can be in the form of a curve, which can be obtained by fitting the curve based on the actual resistance values corresponding to each nominal resistance value of the variable resistor 21 at different temperatures. The first temperature-resistance mapping relationship can also be in the form of a table.
[0057] When the resistor module 20 only includes the variable resistor 21, the controller 40 can determine the current resistance value of the variable resistor 21 based on the temperature detected by the temperature sensor 30 and the first temperature-resistance mapping relationship corresponding to the variable resistor 21. That is, it determines the actual resistance value corresponding to different nominal resistance values of the variable resistor 21 at the current temperature. Then, based on the current resistance value of the variable resistor 21, the target nominal resistance value of the variable resistor 21 is determined, and the resistance value of the variable resistor 21 is adjusted according to the target nominal resistance value so that the resistance value of the communication line is the same as the resistance value of the bus 10.
[0058] For example, the nominal resistance A of variable resistor 21 is 30Ω, and the actual resistance of nominal resistance A at a certain temperature is 25Ω. Therefore, when variable resistor 21 needs to output 25Ω, the target nominal resistance is nominal resistance A. Controller 40 can control the output of variable resistor 21 based on nominal resistance A. If variable resistor 21 is a sliding resistor, the slider of variable resistor 21 can be slid to the position corresponding to nominal resistance A, so that the output resistance of variable resistor 21 is 25Ω.
[0059] Thus, when the resistor module 20 only includes the variable resistor 21, the controller 40 can determine the actual resistance value corresponding to different nominal resistance values of the variable resistor 21 at the current temperature based on the first temperature-resistance mapping relationship and the temperature detected by the temperature sensor 30, so as to adjust the resistance value of the variable resistor 21 and ensure that the resistance value of the communication line after adjustment is consistent with the resistance value of the bus 10, thereby ensuring the communication reliability of the communication system 100.
[0060] See also Figures 1 to 3 In some embodiments, the resistor module 20 further includes a fixed resistor 22 connected in series with the variable resistor 21. The controller 40 determines the current resistance value of the resistor module 20 based on the temperature detected by the temperature sensor 30, and adjusts the resistance value of the variable resistor 21 accordingly, including:
[0061] The controller 40 determines the current resistance of the fixed resistor 22 and the variable resistor 21 based on the temperature detected by the temperature sensor 30, the first temperature-resistance mapping relationship corresponding to the variable resistor 21, and the second temperature-resistance mapping relationship corresponding to the fixed resistor 22, so as to adjust the resistance value of the variable resistor 21 based on the current resistance of the fixed resistor 22 and the variable resistor 21.
[0062] Specifically, the fixed resistor 22 is a resistor with a non-adjustable resistance value, but the resistance value of the fixed resistor 22 will change with the ambient temperature. The resistor module 20 can also set the fixed resistor 22. In addition to the first temperature-mapping relationship, the controller 40 can pre-obtain the actual resistance value of the fixed resistor 22 at different temperatures to obtain a second temperature-resistance mapping relationship for the fixed resistor 22. The second temperature-resistance mapping relationship can be in the form of a curve, which can be fitted based on the actual resistance value of the fixed resistor 22 at different temperatures. The second temperature-resistance mapping relationship can also be in the form of a table.
[0063] When the resistor module 20 includes a variable resistor 21 and a fixed resistor 22, the controller 40 can determine the current resistance value of the fixed resistor 22 based on the temperature detected by the temperature sensor 30 and the second temperature-resistance mapping relationship corresponding to the fixed resistor 22, that is, determine the true resistance value of the fixed resistor 22 at the current temperature, and determine the current resistance value of the variable resistor 21 based on the temperature detected by the temperature sensor 30 and the first temperature-resistance mapping relationship corresponding to the variable resistor 21, that is, determine the true resistance value corresponding to different nominal resistance values of the variable resistor 21 at the current temperature.
[0064] Then, the target resistance value of the variable resistor 21 can be determined based on the difference between the current resistance value of the fixed resistor 22 and the reference resistance value. Next, the nominal resistance value corresponding to the target resistance value is determined as the target nominal resistance value, and the resistance value of the variable resistor 21 is adjusted according to the target nominal resistance value so that the resistance value of the communication line is the same as the resistance value of the bus 10.
[0065] It should be noted that the resistance value of the fixed resistor 22 can be increased or decreased as the ambient temperature changes. Therefore, the resistance value of the fixed resistor 22 can be set to be relatively small, and the adjustment range of the variable resistor 21 can be set to be relatively large. This ensures that when the actual resistance value of the fixed resistor 22 increases or decreases, the resistance value of the communication line can be made consistent with the resistance value of the bus 10 by adjusting the resistance value of the variable resistor 21.
[0066] Thus, the resistor module 20 may also include a fixed resistor 22. The fixed resistor 22 can limit the minimum resistance on the communication line to protect the circuit, and can also share power, reducing the power consumption of the variable resistor to protect it. Furthermore, with the fixed resistor 22 in place, the controller 40 can still ensure that the resistance value of the communication line matches the resistance value of the bus 10, thus ensuring the communication reliability of the communication system 100. Simultaneously, under constant temperature conditions, the resistance value of the fixed resistor 22 remains constant, meaning that the controller 40 only controls the resistance value of the variable resistor 21 when there are occasional temperature changes. This extends the lifespan of the variable resistor 21 while ensuring the communication reliability of the communication system 100.
[0067] Please see Figure 1 and Figure 2 In some embodiments, the temperature compensation state characterizes the degree of deviation between the current resistance value of the resistor module 20 and the reference resistance value. The controller 40 determines the current resistance value of the resistor module 20 based on the temperature detected by the temperature sensor 30, in order to adjust the resistance value of the variable resistor 21, including:
[0068] When the temperature compensation state of the communication system 100 is such that the deviation rate between the current resistance value of the resistor module 20 and the reference resistance value is greater than the first preset deviation rate and less than the second preset deviation rate, the controller 40 adjusts the resistance value of the variable resistor 21 based on the temperature detected by the temperature sensor 30.
[0069] The temperature compensation state characterizes the degree of deviation between the current resistance value of resistor module 20 and the reference resistance value. Controller 40 can determine the corresponding action by determining the degree of deviation between the current resistance value of resistor module 20 and the reference resistance value. The degree of deviation can be represented by the deviation rate and the corresponding deviation rate threshold.
[0070] The formula for calculating the deviation rate between the current resistance value and the reference resistance value of resistor module 20 is as follows: △ Z = |Z - Z0| / Z0 × 100%, where △Z is the deviation rate, Z is the current resistance value, and Z0 is the reference resistance value.
[0071] The first preset deviation rate threshold is the maximum deviation rate when the deviation rate between the current resistance value of the resistor module 20 and the reference resistance value does not affect the communication reliability of the communication system 100, for example, 3%.
[0072] The second preset deviation rate is the deviation rate between the current resistance value and the reference resistance value of the resistor module 20, which has a significant impact on the communication reliability of the communication system 100. The minimum deviation rate when the communication reliability cannot be quickly improved by adjusting the variable resistor 21 alone is, for example, 8%. The first preset deviation rate is less than the second preset deviation rate.
[0073] Specifically, if the deviation rate between the current resistance value of resistor module 20 and the reference resistance value is greater than a first preset deviation rate, it can be considered that the communication reliability is affected, and the communication reliability can be quickly improved simply by adjusting the variable resistor 21. At this time, the controller 40 can adjust the resistance value of the variable resistor 21 based on the temperature detected by the temperature sensor 30, so that the resistance of the bus 10 is consistent with the resistance of the communication line, thereby quickly improving the communication reliability.
[0074] Please see Figure 1 and Figure 2 In some embodiments, when the temperature compensation state of the communication system 100 is such that the deviation rate between the current resistance value of the resistor module 20 and the reference resistance value is less than a first preset deviation rate, the controller 40 maintains the resistance value of the variable resistor 21 unchanged.
[0075] Specifically, if the deviation rate between the current resistance value of resistor module 20 and the reference resistance value is less than the first preset deviation rate, it can be considered that the communication reliability of communication system 100 is still relatively high. Controller 40 maintains the resistance value of variable resistor 21 unchanged in order to reduce the number of adjustments to variable resistor 21, thereby reducing the failure risk of variable resistor 21 and extending the life of variable resistor 21.
[0076] Please see Figure 1 and Figure 2 When the temperature compensation state of the communication system 100 is such that the deviation rate between the current resistance value of the resistor module 20 and the reference resistance value is greater than the second preset deviation rate, the controller 40 adjusts the resistance value of the variable resistor 21 based on the temperature detected by the temperature sensor 30, and the controller 40 also reduces the baud rate of the communication system 100 and / or extends the bit period of the communication system 100.
[0077] Baud rate represents the number of symbols transmitted per second (Symbols / second), which is the rate at which the signal state changes in the communication channel. Lower baud rates result in lower signal frequencies, less attenuation, and better fault tolerance in communication.
[0078] The bit period is the time required to transmit 1 bit of data, measured in seconds (s) or microseconds (μs). A longer bit period results in better communication fault tolerance and a lower probability of communication errors.
[0079] Specifically, if the deviation rate between the current resistance value of resistor module 20 and the reference resistance value is greater than a second preset deviation rate, the communication reliability is considered poor, and adjusting the variable resistor 21 alone cannot effectively improve the communication reliability. In this case, in addition to adjusting the resistance value of the variable resistor 21 based on the temperature detected by temperature sensor 30, controller 40 can also reduce the baud rate of communication system 100, for example, by reducing the baud rate based on a preset adjustment ratio, where the preset adjustment ratio is the baud rate adjustment ratio that can effectively improve communication fault tolerance, for example, 1 / 4. Alternatively, the bit period of communication system 100 can be extended, for example, by extending the bit period of communication system 100 based on a preset bit period, where the preset bit period is the bit period that can effectively improve communication fault tolerance, for example, 4μs. Alternatively, the baud rate of communication system 100 can be reduced while the bit period of communication system 100 is extended. It should be noted that during normal operation, the bit period is usually 1μs.
[0080] Thus, when the deviation rate between the current resistance value of resistor module 20 and the reference resistance value is greater than the second preset deviation rate, in addition to adjusting the resistance value of variable resistor 21, controller 40 can also adjust at least one of the bit period and baud rate to improve communication fault tolerance, provide a wider timing window for signal transmission, and significantly improve system robustness under complex operating conditions while ensuring basic communication functions, thereby facilitating improved communication reliability.
[0081] Please see Figure 1 and Figure 2 In some embodiments, when the temperature compensation state of the communication system 100 is such that the deviation rate between the current resistance value and the reference resistance value of the resistor module 20 is greater than the second preset deviation rate for a duration greater than a preset duration, the controller 40 disconnects the connection between the device 200 corresponding to the resistor module 20 and the bus 10.
[0082] The preset duration is used to determine whether the abnormal state of the resistor module 20 lasts for a sufficient period of time to trigger a protection action (such as disconnecting the device 200 from the bus 10). For example, the preset duration is 30 seconds.
[0083] Specifically, if the duration for which the deviation rate between the current resistance value and the reference resistance value of resistor module 20 exceeds the second preset deviation rate is greater than a preset duration, it can be considered that even after adjusting the resistance value, bit period, and baud rate of variable resistor 21 for a considerable period, the communication reliability remains low and the communication quality is poor. For ease of description, the resistor module 20 in which the duration for which the deviation rate between the current resistance value and the reference resistance value exceeds the second preset deviation rate is referred to as the target resistor module. At this time, controller 40 can disconnect the device 200 corresponding to the target resistor module from bus 10 to completely avoid communication errors of the device 200 corresponding to the target resistor module. Furthermore, since the connection between device 200 and bus 10 is disconnected at this time, controller 40 does not need to perform any other operations, such as adjusting the resistance value of variable resistor 21 in the target resistor module, nor adjusting the bit period and baud rate.
[0084] If the duration for which the deviation rate between the current resistance value and the reference resistance value of the resistor module 20 is greater than the second preset deviation rate is less than the preset duration, the controller 40 adjusts the resistance value of the variable resistor 21 and adjusts at least one of the bit period and baud rate to ensure the communication reliability of the communication system 100.
[0085] Please see Figures 1 to 3 In some embodiments, the data frame of the communication system 100 includes a target flag bit adjusted by the variable resistor 21, the data of which is used to characterize the temperature compensation state; the first control module 41 writes the data corresponding to the target flag bit based on the deviation rate between the current resistance value of the resistor module 20 and the reference resistance value to generate a target data frame, and the first control module 41 is also used to send the target data frame; the second control module 42 is used to receive the target data frame to determine the temperature compensation state according to the data of the target flag bit, so as to facilitate operation according to the temperature compensation state.
[0086] Specifically, a target flag bit can be added to the data frame of the communication system 100. The data of the target flag bit is used to characterize the temperature compensation status. Different data in the target flag bit correspond to different temperature compensation statuses.
[0087] For example, when the deviation rate between the current resistance value of resistor module 20 and the reference resistance value is less than a first preset deviation rate in the temperature compensation state, the target flag bit is 00. When the deviation rate between the current resistance value of resistor module 20 and the reference resistance value is greater than the first preset deviation rate but less than a second preset deviation rate in the temperature compensation state, the target flag bit is 01. When the duration for which the deviation rate between the current resistance value of resistor module 20 and the reference resistance value is greater than the second preset deviation rate is less than a preset duration, the target flag bit is 10. When the duration for which the deviation rate between the current resistance value of resistor module 20 and the reference resistance value is greater than the second preset deviation rate in the temperature compensation state is greater than a preset duration, the target flag bit is 11.
[0088] The first control module 41 can calculate the deviation rate between the current resistance value of the resistor module 20 and the reference resistance value. Then, based on the relative relationship between the deviation rate and the first preset deviation rate and the second preset deviation rate, as well as the duration, it determines the temperature compensation state and writes the target flag data based on the temperature compensation state to form a target data frame. Then, the first control module 41 can send the target data frame to the second control module 42.
[0089] The second control module 42 can receive the target data frame and extract the target flag data. Then, the second control module 42 determines the temperature compensation state based on the target flag data, so as to operate according to the temperature compensation state. When the control action corresponding to the temperature compensation state is related to the resistance value of the variable resistor 21, the second control module 42 can control the resistance value of the variable resistor 21 according to the temperature compensation state. For example, when the target flag data is 00, the second control module 42 maintains the resistance value of the variable resistor 21 unchanged. When the target flag data is 01 or 10, the second control module 42 can calculate the deviation rate between the current resistance value of the resistor module 20 and the reference resistance value, and then adjust the resistance value of the variable resistor 21 according to the relative relationship between the deviation rate and the first preset deviation rate and the second preset deviation rate.
[0090] In some embodiments, if the first control module 41 is the main control module of the communication system 100, the first control module 41 itself can also perform corresponding actions after determining the temperature compensation state. For example, when the control action corresponding to the temperature compensation state only involves controlling the resistance value of the variable resistor 21, the first control module 41 only needs to send a data frame to the second control module 42 and does not need to perform other actions. For example, when the data of the target flag bit is 00 or 01, the first control module 41 only sends a data frame to the second control module 42. When the control action corresponding to the temperature compensation state involves actions other than controlling the resistance value of the variable resistor 21, such as extending the bit period of the communication system 100, the first control module 41 can also perform the other actions. For example, when the data of the current target flag bit is 10, the first control module 41 can reduce the baud rate of the communication system 100 and extend the bit period of the communication system 100. When the data of the current target flag bit is 11, the first control module 41 can disconnect the connection between the device 200 corresponding to the resistor module 20 and the bus 10.
[0091] In other embodiments, if the first control module 41 is only used to acquire the temperature detected by the temperature sensor 30 and determine the temperature compensation state, then the control actions corresponding to the temperature compensation state, other than controlling the resistance value of the variable resistor 21, are handled by other control modules. In this case, the first control module 41 can also be used to send a target data frame to the other control module, which will execute the corresponding control action upon receiving the target data frame.
[0092] Taking the four temperature compensation states mentioned above as examples, assuming the first preset deviation rate is 3%, the second preset deviation rate is 8%, and the preset duration is 30 seconds, the target flag data, compensation mode, and control action corresponding to each temperature compensation state are shown in Table 1 below. The TCM value in Table 1 refers to the target flag data.
[0093] Table (1)
[0094]
[0095] Thus, the first control module 41 and the second control module 42 can achieve physical layer impedance compensation and data link layer coordinated control through the target data frame.
[0096] Please see Figure 2 In some implementations, the target flag bit is located in a reserved bit field of the data frame.
[0097] Specifically, the data frame can be a CAN standard data frame. CAN standard data frames themselves have reserved bit fields for editing, and the target flag can be set in these reserved bit fields. For example, there are four temperature compensation states mentioned above; in this case, only two bits are needed for the target flag, so the 5th and 6th bits after the Data Length Code (DLC) can be used as the target flag. The data frame is as follows: Figure 4 As shown, TCM corresponds to the target flag bit. Setting the target flag bit in the reserved bit field of the data frame ensures that the target flag bit is added to the data frame without affecting the functionality of the data frame, thereby ensuring that the controller 40 can accurately execute the corresponding control strategy through the target flag bit.
[0098] Please see Figure 1 and Figure 2 In some implementations, the device 200 includes multiple devices, each of which has a corresponding resistor module 20. The controller 40 sorts the deviation rates between the current resistance value and the reference resistance value of the resistor module 20 corresponding to each device 200, and adjusts the priority of each device 200 in the arbitration strategy of the communication system 100 based on the sorting results, wherein the larger the deviation rate, the higher the priority.
[0099] The arbitration strategy of the communication system 100 refers to the mechanism for determining which node has priority to occupy the bus 10 when multiple nodes transmit data simultaneously. The CAN bus 10 adopts a non-destructive bitwise arbitration strategy to ensure that high-priority messages can be transmitted without conflict, while low-priority messages are automatically delayed in transmission.
[0100] Specifically, the bus 10 connects to multiple devices 200. The controller 40 can calculate the deviation rate between the current resistance value and the reference resistance value of the resistor module 20 corresponding to all devices 200, then sort the deviation rates between the current resistance value and the reference resistance value of the resistor module 20 corresponding to each device 200, and adjust the priority of each device 200 in the arbitration strategy of the communication system 100 based on the sorting results. The larger the deviation rate, the lower the communication quality of the device 200, so the larger the deviation rate, the higher the priority.
[0101] Nodes with poor signal strength are more likely to lose access to Bus 10 during arbitration due to delays or interference. Increasing priority gives them an advantage in competing for Bus 10, ensuring timely transmission of critical messages and reducing the probability of communication failures caused by repeated retries. Simultaneously, high-priority nodes can complete transmissions quickly, reducing the signal's exposure time on Bus 10 and thus lowering the probability of noise interference.
[0102] Thus, the device 200 with a larger deviation rate has a higher priority in the arbitration strategy, which can reduce the risk of message loss, shorten the exposure time to interference, and thus improve the communication reliability of the communication system 100.
[0103] Please see Figure 1 and Figure 2 This application provides a communication device 1000, which includes a device 200 and a communication system 100 as described in any of the above embodiments, with a bus 10 connected to the device 200.
[0104] Specifically, after the device 200 is connected to the bus 10 of the communication system 100, the controller 40 can determine the current resistance value of the resistor module 20 based on the temperature detected by the temperature sensor 30. Then, based on the difference between the current resistance value of the resistor module 20 and the resistance value of the bus 10, the controller 40 adjusts the resistance value of the variable resistor 21. The variable resistor 21 is used to compensate for the difference between the current resistance value of the resistor module 20 and the resistance value of the bus 10, so that the resistance of the bus 10 is consistent with the resistance of the communication line. The consistency between the resistance of the bus 10 and the resistance of the communication line includes both complete consistency and approximate consistency, to ensure the communication reliability of the communication system 100, thereby ensuring that communication between devices 200 can proceed normally.
[0105] The communication system 100 in the communication device 1000 of this application embodiment includes a resistor module 20 and a temperature sensor 30. The resistor module 20 is disposed on the communication line between the bus 10 and the device 200, and the resistor module 20 includes a variable resistor 21 to facilitate changing the resistance of the communication line. The controller 40 can determine the current resistance value of the resistor module 20 based on the current temperature detected by the temperature sensor 30, and then adjust the resistance value of the variable resistor 21 to make the resistance of the bus 10 and the resistance of the communication line consistent. In this way, the communication system 100 of this application can automatically adjust the resistance value of the variable resistor 21 according to the change of ambient temperature to achieve impedance matching, thereby avoiding signal oscillation in the bus 10 and the communication line, thereby improving the communication reliability of the communication system 100 and ensuring the normal operation of the communication system 100.
[0106] In the description of this specification, the references to terms such as "some embodiments," "in one example," "exemplarily," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0107] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application belong.
[0108] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A communication system, characterized in that, include: Bus, the bus connecting devices; A resistor module is disposed on the communication line between the bus and the device, and the resistor module includes a variable resistor; A temperature sensor, used to detect the temperature of the resistor module; The controller determines the current resistance value of the resistor module based on the temperature detected by the temperature sensor, and adjusts the resistance value of the variable resistor so that the resistance of the bus and the resistance of the communication line are consistent.
2. The communication system according to claim 1, characterized in that, The bus includes a high-order data line and a low-order data line. The two ends of the device are connected to the high-order data line and the low-order data line, respectively. The two ends of the resistor module are connected to the high-order data line and the low-order data line, respectively. The resistor module is also connected in series with the device.
3. The communication system according to claim 1, characterized in that, The controller includes a first control module and a second control module, which are connected via data frame communication. The first control module is used to acquire the temperature of the temperature sensor and write a target data frame based on the temperature, so as to transmit the target data frame to the second control module. The second control module is located in the resistor module and is used to control the resistance value of the variable resistor based on the target data frame.
4. The communication system according to claim 1, characterized in that, The controller determines the current resistance value of the resistor module based on the temperature detected by the temperature sensor, and adjusts the resistance value of the variable resistor, including: The controller determines the current resistance value of the variable resistor based on the temperature detected by the temperature sensor and the first temperature-resistance mapping relationship corresponding to the variable resistor, and adjusts the resistance value of the variable resistor based on the current resistance value.
5. The communication system according to claim 1, characterized in that, The resistor module further includes a fixed resistor connected in series with the variable resistor. The controller determines the current resistance value of the resistor module based on the temperature detected by the temperature sensor, and adjusts the resistance value of the variable resistor, including: The controller determines the current resistance of the fixed resistor and the variable resistor based on the temperature detected by the temperature sensor, the first temperature-resistance mapping relationship corresponding to the variable resistor, and the second temperature-resistance mapping relationship corresponding to the fixed resistor, so as to adjust the resistance value of the variable resistor based on the current resistance of the fixed resistor and the variable resistor.
6. The communication system according to claim 1, characterized in that, The temperature compensation status characterizes the degree of deviation between the current resistance value of the resistor module and the reference resistance value, and the degree of deviation is reflected by the deviation rate and the corresponding deviation rate threshold. The controller determines the current resistance value of the resistor module based on the temperature detected by the temperature sensor, and adjusts the resistance value of the variable resistor, including: When the temperature compensation state of the communication system is such that the deviation rate between the current resistance value of the resistor module and the reference resistance value is greater than a first preset deviation rate and less than a second preset deviation rate, the controller adjusts the resistance value of the variable resistor based on the temperature detected by the temperature sensor, wherein the first preset deviation rate is less than the second preset deviation rate.
7. The communication system according to claim 6, characterized in that, When the temperature compensation state of the communication system is such that the deviation rate between the current resistance value of the resistor module and the reference resistance value is less than a first preset deviation rate, the controller maintains the resistance value of the variable resistor unchanged.
8. The communication system according to claim 6, characterized in that, When the temperature compensation state of the communication system is such that the deviation rate between the current resistance value of the resistor module and the reference resistance value is greater than a second preset deviation rate, the controller adjusts the resistance value of the variable resistor based on the temperature detected by the temperature sensor, and the controller also reduces the baud rate of the communication system and / or extends the bit period of the communication system.
9. The communication system according to claim 8, characterized in that, When the temperature compensation state of the communication system is such that the deviation rate between the current resistance value of the resistor module and the reference resistance value is greater than the second preset deviation rate for a duration greater than a preset duration, the controller disconnects the connection between the device corresponding to the resistor module and the bus.
10. The communication system according to any one of claims 6-9, characterized in that, The controller includes a first control module and a second control module. The first control module and the second control module are connected via data frame communication. The data frame of the communication system includes a target flag bit corresponding to the adjustment of a variable resistor. The data of the target flag bit is used to characterize the temperature compensation state. The first control module writes the data corresponding to the target flag bit based on the deviation rate between the current resistance value of the resistor module and the reference resistance value to generate a target data frame. The first control module is also used to send the target data frame. The second control module is used to receive the target data frame and determine the temperature compensation state according to the data of the target flag bit, so as to control the resistance value of the variable resistor according to the temperature compensation state.
11. The communication system according to claim 10, characterized in that, The target flag is located in the reserved bit segment of the data frame.
12. The communication system according to claim 1, characterized in that, The device includes multiple devices, each of which has a corresponding resistor module. The controller sorts the deviation rates between the current resistance value and the reference resistance value of the resistor module corresponding to each device, and adjusts the priority of each device in the arbitration strategy of the communication system based on the sorting results, wherein the larger the deviation rate, the higher the priority.
13. A communication device, characterized in that, include: equipment; The communication system according to any one of claims 1 to 12, wherein the bus is connected to the device.
14. The communication device according to claim 13, characterized in that, The communication device includes vehicles and / or energy storage devices.
Citation Information
Cited By
Communication method, device and system
CN121530793A