Data transmission method and system based on signal modulation
By using signal modulation method on the CAN bus, the carrier signal is generated and data embedding and demodulation is performed, the problems of information security and identity authentication in CAN bus communication are solved, and the legality verification and legality authentication of data transmission are realized, avoiding bandwidth occupation and delay increase.
Patent Information
- Application Number
- CN202311827961.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-07-04
AI Technical Summary
In the CAN bus communication between automotive ECUs, there are problems such as lack of information security, insufficient source identity authentication, and encryption processing will occupy bandwidth and increase delay.
The signal modulation method is used to generate a carrier signal and set its amplitude within the preset voltage range, with a frequency greater than the CAN clock frequency. Data is transmitted on the CAN bus through the modulator and the demodulator, and data is embedded and demodulated by the frequency changes of the carrier signal to realize the transmission and verification of identity information.
Without occupying the bus message bandwidth and not increasing the bus delay, verification and legality authentication of the source of CAN messages is realized, avoiding the additional encryption and decryption burden.
Smart Images

Figure CN120263582A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle communication, and particularly to a data transmission method and system based on signal modulation. Background Art
[0002] An automotive electronic system is composed of numerous electronic components ECU (Electronic Control Unit). Currently, most of the ECUs inside an automobile communicate messages through a CAN bus. The CAN bus features high real-time performance, but lacks information security. The CAN bus is a broadcast mode and lacks identification of the message source. Traditional methods adopt attaching encryption digest information such as HMAC in the message. However, this method has certain defects. Directly attaching the encrypted information in the message will transmit excessive redundant security information, occupying the bus bandwidth, and generally, vehicle ECUs do not have the ability to calculate encryption and decryption. Additional calculation of encryption and decryption will increase the delay of bus data transmission and reception. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a data transmission method and system based on signal modulation, which can realize the transmission of verification data on the CAN bus without occupying the bandwidth of the bus message and without increasing the bus delay.
[0004] To solve the above technical problem, the technical solution adopted by the present invention is: A data transmission method based on signal modulation, including:
[0005] Generating a carrier signal, the amplitude of the carrier signal being within a preset voltage range and the frequency being greater than a preset multiple of the CAN clock frequency;
[0006] Converting the data to be transmitted into a binary data format, and sequentially obtaining one digit from the data to be transmitted as the current digit according to the baud rate of the CAN bus;
[0007] If the current digit is a preset digit, modulating both the original high-level signal and the original low-level signal output by the sending node according to the carrier signal, and sending the modulated high-level signal and low-level signal to the receiving node through the CAN bus; otherwise, sending the original high-level signal and the original low-level signal output by the sending node to the receiving node through the CAN bus;
[0008] Performing pulse detection on the high-level signal or low-level signal received by the receiving node according to the baud rate of the CAN bus, and sequentially determining each digit in the data to be transmitted according to the detected pulse frequency.
[0009] The present invention also proposes a data transmission system based on signal modulation, including a modulator, a modulation switch, and a demodulator, and the number of the modulators is two;
[0010] The CAN transceivers of the sending nodes are respectively connected to the high-level line and the low-level line of the CAN bus through the two modulators; the two modulators are respectively connected to the first end of the modulation switch, the second end of the modulation switch is connected to a preset carrier signal, and the amplitude of the carrier signal is within a preset voltage range and the frequency is greater than a preset multiple of the CAN clock frequency; the third end of the modulation switch is grounded; the demodulator accesses the high-level signal or the low-level signal received by the CAN transceiver of the receiving node;
[0011] The modulation switch is used to control the conduction between the first end and the second end when a digit obtained sequentially from the data to be transmitted according to the baud rate of the CAN bus is a preset digit, so that the carrier signal is respectively connected to the two modulators, otherwise it controls the conduction between the first end and the third end;
[0012] The two modulators are used to modulate the original high-level signal and the original low-level signal output by the sending node according to the carrier signal when receiving the carrier signal, and send the modulated high-level signal and low-level signal to the receiving node through the CAN bus;
[0013] The demodulator is used to perform pulse detection on the high-level signal or the low-level signal received by the receiving node according to the baud rate of the CAN bus, and sequentially determine the digits in the data to be transmitted according to the frequency of the detected pulses.
[0014] The beneficial effects of the present invention are as follows: by modulating the carrier signal into the original level signal according to the data to be transmitted when sending a signal, information embedding is realized; since the amplitude of the carrier signal is within a preset voltage range, when receiving the signal, the level signal can directly pass through the CAN transceiver of the receiving node, without affecting the reception and parsing of the original level signal. At the same time, since the frequency of the carrier signal is greater than the CAN clock frequency, the data to be transmitted can be restored by detecting the frequency of the pulses of the rising edge and falling edge in the level signal.
[0015] The present invention can be used to realize the transmission of the sender identifier on the CAN bus, so as to realize the verification of the source of the CAN message, ensure the legality of the message, effectively realize the bus message authentication, and do not occupy the bandwidth of the bus message, do not bring an additional encryption and decryption burden to the ECU, and do not increase the bus delay. Description of the Drawings
[0016] Figure 1 It is a flowchart of a data transmission method based on signal modulation according to the present invention;
[0017] Figure 2 It is a schematic diagram of the signal sending end of the data transmission system according to the first embodiment of the present invention;
[0018] Figure 3 Schematic diagram of the signal receiving end of the data transmission system according to the first embodiment of the present invention;
[0019] Figure 4 Schematic diagram of the original level signal before modulation in the first embodiment of the present invention;
[0020] Figure 5 Schematic diagram of the level signal after modulation in the first embodiment of the present invention. Detailed implementation manner
[0021] To describe in detail the technical content, achieved objectives and effects of the present invention, the following is a detailed description in combination with the embodiments and accompanied by the drawings.
[0022] Please refer to Figure 1 , a data transmission method based on signal modulation, including:
[0023] Generate a carrier signal, the amplitude of the carrier signal is within a preset voltage range and the frequency is greater than a preset multiple of the CAN clock frequency;
[0024] Convert the data to be transmitted into a binary data format, and sequentially obtain one digit from the data to be transmitted as the current digit according to the baud rate of the CAN bus;
[0025] If the current digit is a preset digit, modulate both the original high-level signal and the original low-level signal output by the sending node according to the carrier signal, and send the modulated high-level signal and low-level signal to the receiving node through the CAN bus, otherwise send the original high-level signal and the original low-level signal output by the sending node to the receiving node through the CAN bus;
[0026] According to the baud rate of the CAN bus, perform pulse detection on the high-level signal or low-level signal received by the receiving node, and sequentially determine each digit in the data to be transmitted according to the frequency of the detected pulse.
[0027] As can be seen from the above description, the beneficial effect of the present invention is that it can realize the transmission of verification data on the CAN bus without occupying the bandwidth of the bus message, without bringing an additional encryption and decryption burden to the ECU, and without increasing the bus delay.
[0028] Further, the carrier signal is a square wave, the preset voltage range is [-0.25V, 0.25V]; the preset multiple is greater than or equal to 5.
[0029] From the above description, it can be seen that by setting the amplitude of the carrier signal within a certain range, the modulated level signal is not easy to affect the communication link layer; by setting the frequency of the carrier signal to be greater than a certain multiple of the CAN clock frequency, it is convenient for the demodulator at the receiving node to demodulate the data to be transmitted from the modulated level signal.
[0030] Further, the original high level signal and the original low level signal output by the sending node are modulated simultaneously according to the carrier signal, specifically:
[0031] When the carrier signal is at a rising edge, the original high level signal and the original low level signal output by the sending node are boosted simultaneously according to the amplitude of the carrier signal;
[0032] When the carrier signal is at a falling edge, the original high level signal and the original low level signal output by the sending node are simultaneously reduced in voltage according to the amplitude of the carrier signal.
[0033] It can be seen from the above description that since the high-level signal and the low-level signal are increased or decreased at the same time, the level after differentiation will not be affected, and the bus communication will not be affected.
[0034] Further, according to the baud rate of the CAN bus, pulse detection is performed on the high level signal or low level signal received by the receiving node, and the digits in the data to be transmitted are determined in sequence according to the frequency of the detected pulses, specifically:
[0035] According to the baud rate of the CAN bus, the high level signal or low level signal received by the receiving node is pulse-detected at the rising and falling edges;
[0036] If the frequency of the detected pulse is greater than the preset multiple of the CAN clock frequency, it is determined that the current bit digit in the received data to be transmitted is a preset digit, otherwise it is another digit in the binary digit.
[0037] From the above description, it can be seen that, during signal modulation, the original high-level signal and the original low-level signal are increased or decreased at the same time according to the carrier signal, and the frequency of the carrier signal is greater than the CAN clock frequency, the data to be transmitted can be demodulated from the level signal by detecting the frequency of the pulses of the rising and falling edges in the level signal.
[0038] Furthermore, the data to be transmitted is identity information of a sending node;
[0039] After performing pulse detection on the high level signal or the low level signal received by the receiving node according to the baud rate of the CAN bus and sequentially determining each digit in the data to be transmitted according to the frequency of the detected pulse, the method further comprises:
[0040] The receiving node authenticates the sending node according to the identity information of the sending node.
[0041] As can be seen from the above description, the transmission of the sender identifier on the CAN bus can be realized, so as to realize the verification of the source of the CAN message, ensure the legality of the message, and effectively realize the bus message authentication.
[0042] The present invention also proposes a data transmission system based on signal modulation, which includes a modulator, a modulation switch and a demodulator, and the number of the modulators is two;
[0043] The CAN transceivers of the sending node are respectively connected to the high-level line and the low-level line of the CAN bus through the two modulators; the two modulators are respectively connected to the first end of the modulation switch, the second end of the modulation switch accesses a preset carrier signal, and the amplitude of the carrier signal is within a preset voltage range and the frequency is greater than a preset multiple of the CAN clock frequency; the third end of the modulation switch is grounded; the demodulator accesses the high-level signal or the low-level signal received by the CAN transceiver of the receiving node;
[0044] The modulation switch is used to control the conduction of the first end and the second end when a digit obtained sequentially from the data to be transmitted according to the baud rate of the CAN bus is a preset digit, so that the carrier signal is respectively connected to the two modulators, otherwise it controls the conduction of the first end and the third end;
[0045] The two modulators are used to modulate the original high-level signal and the original low-level signal output by the sending node simultaneously according to the carrier signal when receiving the carrier signal, and send the modulated high-level signal and low-level signal to the receiving node through the CAN bus;
[0046] The demodulator is used to perform pulse detection on the high-level signal or the low-level signal received by the receiving node according to the baud rate of the CAN bus, and sequentially determine the digits in the data to be transmitted according to the frequency of the detected pulses.
[0047] Further, the carrier signal is a square wave, and the preset voltage range is [-0.25V, 0.25V]; the preset multiple is greater than or equal to 5.
[0048] Further, the modulator is a level increasing and level decreasing circuit; specifically, the two modulators are used to increase the pressure on the original high-level signal and the original low-level signal output by the sending node simultaneously according to the amplitude of the carrier signal when the carrier signal is a rising edge; when the carrier signal is a falling edge, the pressure on the original high-level signal and the original low-level signal output by the sending node is decreased simultaneously according to the amplitude of the carrier signal.
[0049] Further, the demodulator is a pulse counter; specifically, the demodulator is used to detect the rising and falling edges of the high-level signal or low-level signal received by the receiving node according to the baud rate of the CAN bus; if the frequency of the detected pulse is greater than a preset multiple of the CAN clock frequency, it is determined that the current digit in the to-be-transmitted data received is a preset digit, otherwise it is the other digit in the binary code.
[0050] Further, the to-be-transmitted data is the identity information of the sending node; the receiving node authenticates the sending node according to the identity information of the sending node.
[0051] Embodiment 1
[0052] Please refer to Figures 2 - 5 , Embodiment 1 of the present invention is: A data transmission method based on signal modulation, which can be applied to an automotive electronic system.
[0053] In this embodiment, the to-be-transmitted data is the identity information of the sending node (i.e., the sending-end ECU), that is, when the sending-end ECU sends a message to the receiving node (i.e., the receiving-end ECU), the identity information of the sending-end ECU is transmitted to the receiving-end ECU by means of signal modulation at the same time.
[0054] Since the signal level of the CAN bus message has a certain range of fault tolerance space, according to the ISO11898 standard, when the CAN bus needs to output a dominant level, the typical level of CAN_H is 3.5V, the minimum allowable value is 2.75V, and the maximum allowable value is 4.5V; the typical level of CAN_L is 1.5V, the minimum allowable value is 0.5V, and the maximum allowable value is 2.25V; when the CAN bus needs to output a recessive level, the typical levels of CAN_H and CAN_L are 2.5V, the minimum allowable value is 2.0V, and the maximum allowable value is 3.0V; the voltage difference between CAN_H and CAN_L, the allowable range for the dominant level is 1.5V - 3.0V, and the allowable range for the recessive level is -0.5V - 0.05V. This embodiment utilizes this level tolerance characteristic of the CAN signal line to design a method for transmitting the sender identifier on the CAN bus.
[0055] The method of this embodiment is implemented through a data transmission system based on signal modulation, and this data transmission system is arranged in the CAN bus system. Specifically, as Figures 2 - 3 shown, it includes a modulator, a modulation switch and a demodulator, and the number of modulators is two.
[0056] As Figure 2As shown, the CAN transceiver of the sending node is connected to the high level line and the low level line of the CAN bus through two modulators respectively, that is, the CAN_H pin of the CAN transceiver of the sending node is connected to the CAN_H line of the CAN bus through one modulator, and the CAN_L pin of the CAN transceiver of the sending node is connected to the CAN_L line of the CAN bus through another modulator.
[0057] The two modulators are respectively connected to the first end of the modulation switch, the second end of the modulation switch is connected to the preset carrier signal, and the third end of the modulation switch is grounded. In this embodiment, the carrier signal is a square wave, whose amplitude is within ±0.25V and whose frequency is greater than at least 5 times the CAN clock frequency (the CAN clock is derived from the system clock divided by the frequency, which is a known quantity for an ECU).
[0058] The modulation switch is switched according to the identity information of the sending node (pre-converted into binary data format), and the baud rate of the identity information is the same as the baud rate of the CAN bus. Specifically, a digit is obtained from the identity information in sequence. If it is a preset digit (for example, 1), the first end and the second end of the modulation switch are controlled to be connected, that is, the modulation switch is switched to access the carrier signal, and then the carrier signal is respectively connected to the two modulators, and the carrier signal is modulated into the original level signal through the modulator. If the number obtained from the identity information is another digit in the binary digit (for example, 0), or there is no identity information to be modulated, the first end and the third end of the modulation switch are controlled to be connected, that is, the modulation switch is switched to ground. At this time, no carrier signal is output from the modulation switch to the modulator, and the original level signal will not be modulated.
[0059] Among them, the modulator is a level increase and level reduction circuit. When the carrier signal is on the rising edge, the two modulators increase the voltage of the original high-level signal (CAN_H) and the original low-level signal (CAN_L) output by the sending node according to the amplitude of the carrier signal; when the carrier signal is on the falling edge, the original high-level signal (CAN_H) and the original low-level signal (CAN_L) output by the sending node are reduced according to the amplitude of the carrier signal. The modulated high-level signal (M_CAN_H) and low-level signal (M_CAN_L) are then connected to the vehicle CAN bus.
[0060] like Figure 4 and Figure 5 As shown, Figure 4 is part of the original level signal before modulation, Figure 5It is the partial level signal after modulation. Since the high-level signal and the low-level signal are increased or decreased simultaneously, it will not affect the level after differentiation and will not affect the bus communication. Moreover, since the amplitude of the carrier signal is within the range of ±0.25V and within the level tolerance range, it is not easy to affect the communication link layer.
[0061] As Figure 3 shown, the demodulator accesses the high-level signal or the low-level signal received by the CAN transceiver of the receiving node. That is, at the receiving-end ECU, the CAN transceiver directly receives the modulated level signals (M_CAN_H and M_CAN_L). Since the level fluctuation is within the allowable range, the bus data can be directly read without affecting the data reading of the CAN transceiver. At the same time, any one of the modulated signals is connected to the demodulator. The demodulator is a pulse counter for rising and falling edges. When receiving continuous rising and falling edge pulses and the pulse frequency is more than 5 times higher than the CAN clock frequency, it is considered that a preset digit (such as 1) is received; otherwise, it is considered that another digit in the binary code is received (such as 0). Since the baud rate of the identity information is the same as that of the CAN bus, the digits in the identity information can be sequentially obtained, so that the identity information of the sending-end ECU can be restored from the bus level and the identity information can be verified, thereby realizing the identity authentication of the message source. Among them, it can be known whether the data to be transmitted is obtained through some conventional coding methods, such as having specific message headers and message tails at the beginning and end, and the message contains message length, check bits, etc.
[0062] This embodiment utilizes the level tolerance characteristic of the CAN signal line to design a method for transmitting the sender identifier on the CAN bus based on the signal modulation method, to verify the source of the CAN message, thereby judging the legality of the message, without occupying the bandwidth of the bus message, without bringing an additional encryption and decryption burden to the ECU, and without increasing the bus delay.
[0063] In summary, a data transmission method and system based on signal modulation provided by the present invention realizes the embedding of information by modulating a carrier signal into an original level signal according to the data to be transmitted when sending a signal; since the amplitude of the carrier signal is within a preset voltage range, when receiving the signal, the level signal can directly pass through the CAN transceiver of the receiving node without affecting the reception and parsing of the original level signal. At the same time, since the frequency of the carrier signal is greater than the CAN clock frequency, the data to be transmitted can be restored by detecting the frequency of the rising and falling edge pulses in the level signal.
[0064] The present invention can achieve the transmission of the sender identifier on the CAN bus, thereby realizing the verification of the source of CAN messages, ensuring the legality of the messages, effectively implementing bus message authentication, without occupying the bandwidth of bus messages, without bringing an additional encryption and decryption burden to the ECU, and without increasing the bus delay.
[0065] The above are only embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in related technical fields, shall be similarly included in the patent protection scope of the present invention.
Claims
1. A data transmission method based on signal modulation, characterized in that Including: Generating a carrier signal, the amplitude of the carrier signal being within a preset voltage range and the frequency being greater than a preset multiple of the CAN clock frequency; Converting the data to be transmitted into a binary data format, and sequentially obtaining one digit from the data to be transmitted as the current digit according to the baud rate of the CAN bus; If the current digit is a preset digit, then modulating the original high-level signal and the original low-level signal output by the sending node simultaneously according to the carrier signal, and sending the modulated high-level signal and low-level signal to the receiving node through the CAN bus, otherwise sending the original high-level signal and the original low-level signal output by the sending node to the receiving node through the CAN bus; Performing pulse detection on the high-level signal or low-level signal received by the receiving node according to the baud rate of the CAN bus, and sequentially determining each digit in the data to be transmitted according to the frequency of the detected pulse.
2. The data transmission method based on signal modulation according to claim 1, wherein The carrier signal is a square wave, the preset voltage range is [-0.25V, 0.25V]; the preset multiple is greater than or equal to 5.
3. The data transmission method based on signal modulation according to claim 1, characterized in that The modulating the original high-level signal and the original low-level signal output by the sending node simultaneously according to the carrier signal is specifically: When the carrier signal is at the rising edge, then boosting the original high-level signal and the original low-level signal output by the sending node simultaneously according to the amplitude of the carrier signal; When the carrier signal is at the falling edge, then reducing the original high-level signal and the original low-level signal output by the sending node simultaneously according to the amplitude of the carrier signal.
4. The data transmission method based on signal modulation according to claim 3, wherein The performing pulse detection on the high-level signal or low-level signal received by the receiving node according to the baud rate of the CAN bus, and sequentially determining each digit in the data to be transmitted according to the frequency of the detected pulse is specifically: Performing rising-edge and falling-edge pulse detection on the high-level signal or low-level signal received by the receiving node according to the baud rate of the CAN bus; If the frequency of the detected pulse is greater than a preset multiple of the CAN clock frequency, then determining that the current digit in the data to be transmitted received is the preset digit, otherwise it is the other digit in the binary number.
5. The data transmission method based on signal modulation according to claim 1, characterized in that The data to be transmitted is the identity information of the sending node; After the performing pulse detection on the high-level signal or low-level signal received by the receiving node according to the baud rate of the CAN bus, and sequentially determining each digit in the data to be transmitted according to the frequency of the detected pulse, it further includes: The receiving node authenticates the sending node according to the identity information of the sending node.
6. A data transmission system based on signal modulation, characterized in that, Including a modulator, a modulation switch and a demodulator, the number of the modulators is two; The CAN transceivers of the sending node are respectively connected to the high-level line and the low-level line of the CAN bus through the two modulators; the two modulators are respectively connected to the first end of the modulation switch, the second end of the modulation switch accesses a preset carrier signal, the amplitude of the carrier signal is within a preset voltage range and the frequency is greater than a preset multiple of the CAN clock frequency; the third end of the modulation switch is grounded; the demodulator accesses the high-level signal or the low-level signal received by the CAN transceiver of the receiving node. The modulation switch is used to control the conduction between the first end and the second end to make the carrier signal access the two modulators respectively when a digit obtained sequentially from the data to be transmitted according to the baud rate of the CAN bus is a preset digit, otherwise control the conduction between the first end and the third end. The two modulators are used to modulate the original high-level signal and the original low-level signal output by the sending node simultaneously according to the carrier signal when receiving the carrier signal, and send the modulated high-level signal and low-level signal to the receiving node through the CAN bus. The demodulator is used to perform pulse detection on the high-level signal or the low-level signal received by the receiving node according to the baud rate of the CAN bus, and sequentially determine each digit in the data to be transmitted according to the frequency of the detected pulse.
7. The data transmission system based on signal modulation according to claim 6, characterized in that, The carrier signal is a square wave, and the preset voltage range is [-0.25V, 0.25V]; the preset multiple is greater than or equal to 5.
8. The data transmission system based on signal modulation according to claim 6, characterized in that, The modulator is a level increasing and level decreasing circuit; specifically, the two modulators are used to boost the original high-level signal and the original low-level signal output by the sending node simultaneously according to the amplitude of the carrier signal when the carrier signal is at the rising edge; and reduce the original high-level signal and the original low-level signal output by the sending node simultaneously according to the amplitude of the carrier signal when the carrier signal is at the falling edge.
9. The data transmission system based on signal modulation according to claim 8, wherein The demodulator is a pulse counter; specifically, the demodulator is used to perform rising edge and falling edge pulse detection on the high-level signal or the low-level signal received by the receiving node according to the baud rate of the CAN bus; if the frequency of the detected pulse is greater than a preset multiple of the CAN clock frequency, it is determined that the current digit in the data to be transmitted received is a preset digit, otherwise it is the other digit in the binary code.
10. The data transmission system based on signal modulation according to claim 6, characterized in that, The data to be transmitted is the identity information of the sending node; the receiving node performs identity authentication on the sending node according to the identity information of the sending node.