PSI5 bus modulation and demodulation communication method and system
By collecting and updating the reference current in the PSI5 bus system and dynamically adjusting the Manchester encoded signal, the decoding failure and bit error rate increase caused by abnormal current in the sensor network are solved, and communication stability and decoding rate are improved.
Patent Information
- Application Number
- CN202411237543.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-09-05
AI Technical Summary
PSI5 bus communication is likely to lead to decoding failure and paralysis and increased bit error rate when the sensor network is in the face of abnormal current and disconnection.
By collecting the reference current of the sensor network in the PSI5 bus system, converting it to Manchester encoded signal, and determining the communication baud rate based on the captured signal pulse width, decoding the bit data; after completing the data frame decoding, the reference current is re-acquisition and update, dynamic Adjust the comparison current of the current comparator to deal with current fluctuations.
It improves communication stability and decoding rate, ensures that Manchester encoded signals can be adjusted in time when abnormalities occur in sensor networks, and ensures the accuracy of data transmission and the stability of the system.
Smart Images

Figure CN118764136B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of PSI5 communications, and in particular to a PSI5 bus modulation and demodulation communication method and system. Background Art
[0002] With the rapid development of the automotive industry, especially the continuous improvement of intelligence and electrification, sensors are increasingly used in automotive systems. As an important component for automobiles to perceive the external environment and monitor vehicle status, the efficiency and reliability of their data transmission are directly related to the overall performance and safety of the automotive system. Therefore, how to optimize the communication method between ECU and sensors has become an important topic in automotive technology research and development.
[0003] Among automotive sensor communication protocols, the PSI5 (Peripheral Sensor Interface 5) protocol is widely used in various sensors such as speed, position, and angle because of its high efficiency, reliability, and easy implementation and deployment. The PSI5 protocol uses twisted pair cables to realize power supply and data transmission between the ECU (Engine Control Unit) and the sensor, and uses the Manchester encoding format to transmit data in the form of current, ensuring the stability and accuracy of data transmission. However, the PSI5 bus often supports a fixed-rate sensor networking communication. Although the PSI5 protocol has many advantages in sensor communication, it still faces some challenges in practical applications. For example, with the increasing complexity of automotive systems, the increase in the number and types of sensors, and the increase in sensor differentiation, current fluctuations may occur when the sensor is disconnected or interfered by external factors, resulting in increased bit error rate of PSI5 bus communication and communication decoding failure and paralysis. Summary of the invention
[0004] The embodiments of the present application provide a PSI5 bus modulation and demodulation communication method and system to solve the problem of decoding failure and paralysis caused by abnormal current and disconnection in the sensor network.
[0005] On the one hand, the present application provides a PSI5 bus modulation and demodulation communication method, the method comprising:
[0006] In response to a frame synchronization period arriving at the PSI5 bus system, a reference current of the sensor network is collected, and a current signal output by the sensor network during a data transmission period is converted into a Manchester coded signal based on the reference current;
[0007] Determine the communication baud rate according to the captured signal pulse width of Manchester coded signal, and decode the bit data of each signal pulse width;
[0008] In response to completing the decoding length of a complete data frame, the reference current of the sensor network is re-collected and updated, and the comparison current of the current comparator is updated based on the reference current; the Manchester encoding signal is generated based on the pulse signal value of the input current comparator and the comparison current.
[0009] Specifically, determining the communication baud rate according to the captured signal pulse width of the Manchester coded signal includes:
[0010] Capture and determine the signal pulse width based on system interruption;
[0011] In response to the signal pulse width satisfying the set pulse width range, a guide bit is determined according to the level value of the corresponding pulse width signal, and the communication baud rate of the current frame data is extracted according to the guide bit.
[0012] Specifically, after determining the signal pulse width, the method further includes:
[0013] When the signal pulse width is lower than the set pulse width range and the pulse width signal is not a guide bit, it is determined that the corresponding pulse width signal contains a noise signal; the pulse widths at both ends of the burr signal are filtered and superimposed, and the interrupt is continuously captured;
[0014] When the pulse width signal does not contain a noise signal, bit data of each signal pulse width is decoded.
[0015] Specifically, the decoding of the bit data of each signal pulse width includes:
[0016] Determine the duration of high level and low level in the captured pulse width signal;
[0017] When the level duration is the duration of a single half-bit of data, the corresponding half-bit of data is determined according to the pulse type of the pulse signal;
[0018] When the level duration is equal to the duration of two half-bit data, the corresponding two half-bit data are determined according to the pulse type of the pulse signal;
[0019] Convert the continuous half-bit data level signals to obtain decoded bit data.
[0020] Specifically, when the level duration is the duration of a single half-bit data, and the current pulse signal is a rising edge pulse, the corresponding half-bit data is a low level 0; when the level duration is the duration of a single half-bit data, and the current pulse signal is a falling edge pulse, the corresponding half-bit data is a high level 1;
[0021] When the level duration is two and a half bit data durations and the current pulse signal is a rising edge pulse, the corresponding two and a half bit data are continuous low levels 00; when the level duration is two and a half bit data durations and the current pulse signal is a falling edge pulse, the corresponding two and a half bit data are continuous high levels 11.
[0022] Specifically, after decoding the bit data of each signal pulse width, the method further includes:
[0023] Storing continuous half-bit data / decoded bit data into a FIFO buffer queue and calculating the queue depth of the FIFO;
[0024] In response to the queue depth of the FIFO reaching the decoding length of the complete data frame, the cached FIFO data is verified and decoded, and the reference current of the sensor network is re-collected and updated after the verification is successful;
[0025] In response to the queue depth of the FIFO not reaching the decoded length of the complete data frame, the interrupt is continuously captured and the pulse width detection is performed.
[0026] Specifically, the re-collecting and updating the reference current of the sensor network, and updating the comparison current of the current comparator based on the reference current, includes:
[0027] When the PSI5 bus system enters a communication idle period, the reference current value output by the sensor network is recollected; the reference current value is equal to the low current signal value of Manchester encoding;
[0028] When the collected reference current value becomes smaller, the pulse width duration of the high level and the low level of the Manchester coded signal is obtained and the duty cycle is calculated, and the comparison current of the current comparator is reduced according to the duty cycle;
[0029] When the collected reference current value becomes larger, the pulse width durations of the high level and the low level of the Manchester coded signal are obtained and the duty cycle is calculated, and the comparison current of the current comparator is increased according to the duty cycle.
[0030] On the other hand, the present application provides a PSI5 bus modulation and demodulation communication system, the system comprising an ECU chip, a sensor network and a peripheral control circuit; the sensor network is connected to a synchronization voltage and a reference voltage, and outputs a level signal;
[0031] The peripheral control circuit includes a comparator circuit, the level signal output by the sensor network is input to the ECU chip and one input of the comparator circuit, and the other input of the one input of the comparator circuit is the comparison current output by the ECU chip; the comparison current is determined according to the basic current signal collected by the PSI5 bus system during the frame synchronization cycle and the communication idle period, and is used to compare and convert with the level signal output by the sensor network to generate a Manchester coded signal.
[0032] On the other hand, the present application provides a PSI5 bus modem communication device, the device comprising:
[0033] A signal acquisition module, for acquiring a reference current of the sensor network in response to a frame synchronization period arriving at the PSI5 bus system, and converting a current signal output by the sensor network during a data transmission period into a Manchester coded signal based on the reference current;
[0034] A decoding module, used for determining the communication baud rate according to the captured signal pulse width of the Manchester coded signal, and decoding the bit data of each signal pulse width;
[0035] The updating module is used to re-collect and update the reference current of the sensor network in response to completing the decoding length of a complete data frame, and update the comparison current of the current comparator based on the reference current; the Manchester encoding signal is generated based on the pulse signal value of the input current comparator and the comparison current.
[0036] On the other hand, the present application provides a computer device, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the PSI5 bus modulation and demodulation communication method described in the above aspect.
[0037] On the other hand, the present application provides a computer-readable storage medium, which stores at least one instruction, at least one program, code set or instruction set. The at least one instruction, the at least one program, the code set or instruction set is loaded and executed by a processor to implement the PSI5 bus modulation and demodulation communication method mentioned in the above aspect.
[0038] The beneficial effects brought about by the technical solution provided by the embodiment of the present application include at least: the present application determines whether there is a disconnected device or abnormal fluctuation in the sensor network by reading the reference current output by the sensor network during the communication idle period and the synchronization period. When an abnormal fluctuation occurs, the collected current signal will inevitably change, and the comparative current converted into Manchester code is adjusted according to the change, so that the system can stably output accurate Manchester code signals, and perform baud rate analysis and data decoding on the Manchester code signals, thereby improving the communication stability of the system and improving the communication decoding rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a structural diagram of a PSI5 bus modulation and demodulation communication system provided in an embodiment of the present application;
[0040] Figure 2 is a flow chart of a PSI5 bus modulation and demodulation communication method provided in an embodiment of the present application;
[0041] Figure 3 Shows a communication schematic diagram of the PSI5 bus;
[0042] Figure 4 It is a schematic diagram of Manchester coded level signal;
[0043] Figure 5 A schematic diagram of generating Manchester code according to comparison current conversion is shown;
[0044] Figure 6 It is an algorithm flow chart of the PSI5 bus modulation and demodulation communication method provided in the embodiment of the present application;
[0045] Figure 7 It is a local schematic diagram of Manchester encoding;
[0046] Figure 8 It is a structural block diagram of a PSI5 bus modem communication device provided by the present application. DETAILED DESCRIPTION
[0047] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0048] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0049] Figure 1It is a structural schematic diagram of the PSI5 bus modulation and demodulation communication system provided by the embodiment of the present application, and the system includes an ECU chip, a sensor network and a peripheral control circuit. The sensor network is connected to the synchronization voltage and the reference voltage, and outputs a level signal. The peripheral control circuit includes a comparator circuit, and the level signal output by the sensor network is input to the ECU chip and one input of the comparator circuit, and the other input of one input of the comparator circuit is the comparison current output by the ECU chip. The comparison current is determined according to the basic current signal collected by the PSI5 bus system during the frame synchronization cycle and the communication idle period, and is used to compare and convert the level signal output by the sensor network to generate a Manchester coded signal.
[0050] As a central control unit, the ECU outputs a pulse waveform through GPIO1 and modulates the frame synchronization signal SYNC to the PSI5 bus through voltage modulation.
[0051] The PSI5 bus is provided with two voltage input synchronization voltage Vdd_SYNC and reference voltage Vdd_Base. Vdd_Base is input through diode D1 and drives the sensor network. Vdd_SYNC is connected to diode D2 through MOS tube Q1 (Vdd_SYNC is connected to Q1 source input and drain output), and is input through diode D2 and drives the sensor network.
[0052] A frame synchronization signal sync ctrl is output at the GPIO1 pin of the ECU. Sync ctrl is connected to the gate of the MOS tube Q2. The source and gate of Q2 are connected through a resistor R3, and the source is grounded. The drain of Q2 is connected to one end of the resistor R2, and the other end of R2 is respectively connected to the resistor R1 and the gate of Q1, and the other end of the resistor R1 is connected to the source of Q1.
[0053] Optionally, a filtering circuit may be connected to the bus of PSI5, that is, a resistor R4 and a capacitor C1 are connected between the sensor network and the two diodes, and the other ends of the resistor R4 and the capacitor C1 are grounded to filter the clutter signal of the system.
[0054] In this system, there is a voltage difference of 4~5V between Vdd_SYNC and Vdd_Base, and the voltage modulation signal is realized by controlling the on-off of MOS tubes Q1 and Q2 to control the sensor network to output a waveform signal.
[0055] The sensor network contains several parallel sensor devices. When a sensor device is disconnected or fails, the output voltage waveform will change. For system stability and data processing, an amplifier circuit can also be added to the peripheral circuit to amplify the total current directly output by the sensor network to a certain extent. The present application connects a sampling resistor R5 in series at the output of the sensor network to collect the output current, and uses an amplifier circuit to amplify the signal. The signal amplification circuit includes an op amp U1, resistors R6 and R7. The collected current is input to the positive pole of the op amp U1, one end of the resistor R7 is input to the negative pole, and the other end is grounded; resistor R6 is a feedback resistor, and the two ends are respectively connected between the output terminal and the negative input terminal of the op amp U1, and the output terminal of the op amp U1 is the level signal after the sensor network is amplified.
[0056] In the traditional technical scheme, the level signal after the sensor network amplification is directly used as a reference signal for operation, and it is directly converted into a Manchester coded signal. When a disconnected device appears in the sensor network, the signal at the output end of the op amp U1 will inevitably change. If it is still in a fixed conversion format at this time, it will cause communication failure or a higher bit error rate. Therefore, this application introduces a current comparator with a variable comparison threshold, and the current comparator includes a comparator U2, resistors R8 and R9. The output end of the op amp U1 is input to the positive pole of the comparator U2 and the ADC-AIN1 pin of the ECU, and the output end of the comparator U2 is the converted Manchester coded signal, and is input to the GPIO2 pin of the ECU. The DAC-AOUT1 pin of the ECU outputs a comparison current signal Isink_comp, which is input to the negative pole of the comparator U2 after passing through the resistor R8, and the output of the resistor R8 is connected to R9 and grounded.
[0057] The system circuit diagram uses the amplified current I and inputs it into the ECU, dynamically modulating Isink_comp according to the signal waveform, so that the converted Manchester encoded signal can be dynamically adjusted and decoded for communication when the output current of the sensor network fluctuates.
[0058] Figure 2 is a flow chart of a PSI5 bus modulation and demodulation communication method provided in an embodiment of the present application, for Figure 1 ECU, specifically including the following steps:
[0059] S1, in response to the frame synchronization period or communication idle period of the PSI5 bus system, collecting the reference current of the sensor network, and converting the current signal output by the sensor network during the data transmission period into a Manchester coded signal based on the reference current.
[0060] Figure 3 The communication diagram of the PSI5 bus is shown. The PSI5 bus protocol stipulates that after a complete data frame transmission is completed, synchronization is performed through the SYNC synchronization signal. Figure 3 The period between two high-level SYNCs is a data frame transmission cycle, and this cycle is divided into several ( Figure 3 There are 6 Slots in the transmission period, and there is an idle interval between each transmission period. In this state, the total current output by the sensor network is the reference current Ibase. The reference current is the current value when the sensor network does not output a valid level signal. In a Slot cycle, the ECU will collect the level signal of the output current of the sensor network and obtain the Manchester coded signal through conversion, that is, Figure 3 Schematic diagram of the level signal of the S1-P stage in the figure, in which the low level signal is the reference current Ibase, and for digital representation, the present application represents the low level with "0" and the high level with "1".
[0061] Because the sensor network contains many sensor devices, when one or more sensors go offline, the reference current Ibase will inevitably change. Therefore, the updated reference current Ibase should be collected as soon as possible during the idle period to reconvert the Manchester code to prevent errors in the later collection and identification at a fixed communication frequency.
[0062] S2, determining the communication baud rate according to the captured signal pulse width of the Manchester coded signal, and decoding the bit data of each signal pulse width;
[0063] The premise of Manchester encoding is to determine the communication baud rate and use it to decode the signal. Figure 3 In each Slot data transmission period, a fixed number of pulse widths are included according to the protocol. The first two pulse widths S1 and S2 represent the guide bits. In the initial stage, the communication baud rate needs to be determined based on the guide bit signal and decoded according to this frequency.
[0064] Manchester coding, also known as split phase code, synchronization code, and phase coding, is a coding method that uses level jumps to represent 1 or 0. Its change rule is very simple, that is, each code element is represented by two level signals with different phases, which is a periodic square wave, but the phases of 0 code and 1 code are exactly opposite.
[0065] Figure 4This is a schematic diagram of the Manchester-encoded level signal. Any bit of data needs to be represented by a level jump. For example, if three consecutive bits are data 001, the level signal of Bit 0 (data 0) jumps from a low level to a high level, while Bit 1 is still data 0. Its level must be restored to a low level through a falling edge and jump from a low level to a high level again. The level signal of Bit 2 (data 1) jumps from a high level to a low level based on a high level. Within a complete bit data time TBit, it can be further divided into two half-bit data, that is, two half-bit data constitute a complete bit data used to describe the Manchester-encoded signal value. The process of this step is to identify the level signal and decode it into accurate and continuous Manchester-encoded signal data.
[0066] S3, in response to completing the decoding length of a complete data frame, re-collecting and updating the reference current of the sensor network, and updating the comparison current of the current comparator based on the reference current.
[0067] This application uses a comparator circuit to convert and generate Manchester coded signals, such as Figure 5 The schematic diagram of generating Manchester code based on comparison current conversion is shown. The level signal output from the sensor network is a periodic signal, and the Manchester code signal is a signal that meets specific rules, so a comparator circuit is used for judgment and conversion generation. Figure 5 It can be seen that when the level signal is higher than the comparison current of the comparator circuit, the converted Manchester code outputs a high level, and when the level signal is lower than the comparison current of the comparator circuit, the converted Manchester code outputs a low level. When there is a disconnected device in the sensor network, the actual output current must be reduced, and other disturbances will also cause the signal to fluctuate. Assuming that fluctuations occur during the transmission period, the ECU can obtain the abnormal waveform at the first time, and after the system enters the communication idle period, it can read the updated reference current, so that the comparison current of the comparator (circuit) can be adjusted to ensure that the adjustment is completed before the next transmission, maintaining the stability of the system and the accuracy of communication decoding.
[0068] To summarize, the present application determines whether there are offline devices or abnormal fluctuations in the sensor network by reading the reference current output by the sensor network during the communication idle period and the synchronization period. When abnormal fluctuations occur, the collected current signal will inevitably change, and the comparison current converted into Manchester code is adjusted according to the change, so that the system can stably output accurate Manchester code signals, and perform baud rate analysis and data decoding on the Manchester code signals, thereby improving the communication stability of the system and improving the communication decoding rate.
[0069] Even if filtering components are introduced into the PSI5 bus, it is still not guaranteed that the waveform output by the sensor network will not be disturbed, for example Figure 3 The glitch signal sequence contained in indicates that the glitch signal may affect the decoding after being converted into Manchester code, so a certain recognition mechanism is required.
[0070] Figure 6 It is an algorithm flow chart of the PSI5 bus modulation and demodulation communication method provided by the embodiment of the present application. After the system is powered on and initialized, the timing interrupt is configured according to the protocol, and the GPIO2 interface PWM upper and lower edge pulse width input capture mechanism is turned on. Thereafter, the guide bit and signal filtering are determined according to the interrupt. The communication baud rate is mainly determined in the S1 and S2 stages of data transmission, because these two stages will carry the communication baud rate. When the system captures the interrupt, the signal pulse width is first determined to determine whether the signal pulse width meets the set pulse width range, and the guide bit S1 is determined according to the level value of the corresponding pulse width signal, and the communication baud rate of the current frame data is extracted according to the guide bit. At the beginning of a data transmission cycle, after the communication baud rate is obtained, subsequent analysis can be performed according to the communication frequency. When the communication baud rate has been obtained, or the pulse width setting is not met, the capture interrupt is directly determined to be not the guide bit S1.
[0071] For the case of non-guide bits, it indicates that it is a real sensor data signal, which is then filtered and analyzed to determine whether there is a glitch signal based on the pulse width. When the signal pulse width is lower than the set pulse width range and the pulse width signal is not a guide bit, it is determined that the corresponding pulse width signal contains a noise (glitch) signal; the pulse widths at both ends of the glitch signal are filtered and superimposed, and the interrupt is continued to be captured; when the pulse width signal does not contain a noise signal, the bit data of each signal pulse width is decoded. The superposition of the pulse width filters at both ends means ignoring the abnormal level change, which is equivalent to straightening the signals on both sides of the glitch.
[0072] When it is determined that the captured pulse width does not contain a glitch signal, each bit of data is analyzed one by one. This application uses a half-bit signal as a unit for analysis, which specifically includes the following:
[0073] 1. Determine the duration of high and low levels in the captured pulse width signal;
[0074] Figure 7 This is a partial schematic diagram of Manchester encoding, where the two red highlighted lines above and below represent two continuous captured pulse width signals. The pulse width signal is determined by the rising edge and the falling edge, and does not have the same width. The pulse width signal above represents the duration of the high level, and the pulse width signal above represents the duration of the low level.
[0075] 2. When the level duration is the duration of a single half-bit of data, the corresponding half-bit of data is determined according to the pulse type of the pulse signal;
[0076] 3. When the level duration is equal to the duration of two half-bit data, the corresponding two half-bit data are determined according to the pulse type of the pulse signal;
[0077] 4. Convert the continuous half-bit data level signal to obtain decoded bit data.
[0078] by Figure 7 For example, the high level indicated by the red line contains two half-bit data half bit durations, and the low level indicated by the red line contains only a single half-bit data half bit duration. When the level duration is the duration of a single half-bit data, and the current pulse signal is a rising edge pulse, the corresponding half-bit data is a low level 0; when the level duration is the duration of a single half-bit data, and the current pulse signal is a falling edge pulse, the corresponding half-bit data is a high level 1.
[0079] When the level duration is two and a half bit data durations and the current pulse signal is a rising edge pulse, the corresponding two and a half bit data are continuous low levels 00; when the level duration is two and a half bit data durations and the current pulse signal is a falling edge pulse, the corresponding two and a half bit data are continuous high levels 11.
[0080] For example, Figure 7 In the complete bit pulse width composed of the second half cycle of S2 and the first half cycle of D0, it corresponds to the falling edge of the first half cycle of D0, so the two half-bit data are "11". Continuing, the second half cycle of D0 is a single half-bit data, which corresponds to the rising edge of the first half cycle of D1 after D0, so the single half-bit data is "0", and so on.
[0081] After parsing a pulse width data, all the continuous half bit data or decoded bit data are stored in the FIFO buffer, and the queue depth of the FIFO is counted;
[0082] When the cached data in the FIFO does not reach the decoding length of the complete data frame, it means that a slot transmission has not been completed, and the capture interrupt will continue in a loop. When the queue depth of the FIFO reaches the decoding length of the complete data frame, the cached FIFO data will be verified and decoded, and the reference current of the sensor network will be re-collected and updated after the verification is successful. The verification process corresponds to the P cycle data in the signal sequence, and the verification has been successful.
[0083] After decoding is successful, it enters the communication idle period or synchronization cycle (VDD_SYNC). When the PSI5 bus system enters the communication idle period, the reference current value output by the sensor network is re-collected. Figure 3 The medium reference current value is designed to be equal to the low current signal value of the Manchester encoding.
[0084] When the collected reference current value becomes smaller, the pulse width duration of the high level and low level of the Manchester coded signal is obtained and the duty cycle is calculated; the comparison current of the current comparator is reduced according to the duty cycle; when the collected reference current value becomes larger, the pulse width duration of the high level and low level of the Manchester coded signal is obtained and the duty cycle is calculated; the comparison current of the current comparator is increased according to the duty cycle. In some embodiments, the size of the comparison current can be determined according to the high and low duty cycle design. For example, if the design target duty cycle is 50%, after the new reference current is collected, the current threshold of the output comparator is adjusted according to the target, so that the Manchester coded signal converted in the subsequent slot stage is still a signal that meets the requirements, and the accuracy of decoding is also ensured.
[0085] Figure 8 : is a structural block diagram of a PSI5 bus modulation and demodulation communication device provided by the present application, the device comprising:
[0086] The signal acquisition module 810 is used to acquire a reference current of the sensor network in response to a frame synchronization period reaching the PSI5 bus system, and convert the current signal output by the sensor network during the data transmission period into a Manchester coded signal based on the reference current;
[0087] A decoding module 820, used to determine the communication baud rate according to the captured signal pulse width of the Manchester coded signal, and decode the bit data of each signal pulse width;
[0088] The updating module 830 is used to re-collect and update the reference current of the sensor network in response to completing the decoding length of a complete data frame, and update the comparison current of the current comparator based on the reference current; the Manchester encoding signal is generated based on the pulse signal value of the input current comparator and the comparison current.
[0089] Furthermore, the present application also provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the PSI5 bus modulation and demodulation communication method described in any of the above embodiments.
[0090] Furthermore, the present application also provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the PSI5 bus modulation and demodulation communication method described in any of the above embodiments.
[0091] This specific embodiment is merely an explanation of the present invention and is not a limitation of the present invention. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed. However, as long as they are within the scope of the claims of the present invention, they are protected by the patent law.
Claims
1. A PSI5 bus modulation and demodulation communication method, characterized in that: The method comprises: In response to a frame synchronization period arriving at the PSI5 bus system, a reference current of the sensor network is collected, and a current signal output by the sensor network during a data transmission period is converted into a Manchester coded signal based on the reference current; Determine the communication baud rate according to the captured signal pulse width of Manchester coded signal, and decode the bit data of each signal pulse width; In response to completing the decoding length of a complete data frame, re-collecting and updating the reference current of the sensor network, updating the comparison current of the current comparator based on the reference current, and generating the Manchester coded signal based on the level signal value of the input current comparator and the comparison current; specifically comprising: when the PSI5 bus system enters a communication idle period, re-collecting the reference current value output by the sensor network; the reference current value is equal to the Manchester coded low current signal value; When the collected reference current value becomes smaller, the pulse width duration of the high level and low level of the Manchester coded signal is obtained and the duty cycle is calculated, and the comparison current of the current comparator is reduced according to the duty cycle; when the collected reference current value becomes larger, the comparison current of the current comparator is increased according to the duty cycle.
2. The method according to claim 1, characterized in that Determining the communication baud rate according to the captured signal pulse width of the Manchester coded signal comprises: Capture and determine the signal pulse width based on system interruption; In response to the signal pulse width satisfying the set pulse width range, a guide bit is determined according to the level value of the corresponding pulse width signal, and the communication baud rate of the current frame data is extracted according to the guide bit.
3. The method according to claim 2, characterized in that After determining the signal pulse width, the method further includes: When the signal pulse width is lower than the set pulse width range and the pulse width signal is not a guide bit, it is determined that the corresponding pulse width signal contains a noise signal; the pulse widths at both ends of the burr signal are filtered and superimposed, and the interrupt is continuously captured; When the pulse width signal does not contain a noise signal, bit data of each signal pulse width is decoded.
4. The method according to any one of claims 1 to 3, characterized in that: The decoding of the bit data of each signal pulse width comprises: Determine the duration of high level and low level in the captured pulse width signal; When the level duration is the duration of a single half-bit of data, the corresponding half-bit of data is determined according to the pulse type of the pulse signal; When the level duration is equal to the duration of two half-bit data, the corresponding two half-bit data are determined according to the pulse type of the pulse signal; Convert the continuous half-bit data level signals to obtain decoded bit data.
5. The method according to claim 4, characterized in that When the level duration is the duration of a single half-bit data and the current pulse signal is a rising edge pulse, the corresponding half-bit data is a low level 0; when the level duration is the duration of a single half-bit data and the current pulse signal is a falling edge pulse, the corresponding half-bit data is a high level 1; When the level duration is two and a half bit data durations and the current pulse signal is a rising edge pulse, the corresponding two and a half bit data are continuous low levels 00; when the level duration is two and a half bit data durations and the current pulse signal is a falling edge pulse, the corresponding two and a half bit data are continuous high levels 11.
6. The method according to claim 4, characterized in that After decoding the bit data of each signal pulse width, the method further includes: Storing continuous half-bit data / decoded bit data into a FIFO buffer queue and calculating the queue depth of the FIFO; In response to the queue depth of the FIFO reaching the decoding length of the complete data frame, the cached FIFO data is verified and decoded, and the reference current of the sensor network is re-collected and updated after the verification is successful; In response to the queue depth of the FIFO not reaching the decoded length of the complete data frame, the interrupt is continuously captured and the pulse width detection is performed.
7. A PSI5 bus modem communication system, characterized in that: The system is used for the PSI5 bus modulation and demodulation communication method described in any one of claims 1 to 6, and the system includes an ECU chip, a sensor network and a peripheral control circuit; the sensor network is connected to a synchronization voltage and a reference voltage, and outputs a level signal; The peripheral control circuit includes a comparator circuit, the level signal output by the sensor network is input to the ECU chip and one input of the comparator circuit, and the other input of the comparator circuit is the comparison current output by the ECU chip; the comparison current is determined based on the basic current signal collected by the PSI5 bus system during the frame synchronization cycle and the communication idle period, and is used to compare and convert with the level signal output by the sensor network to generate a Manchester coded signal.
8. A PSI5 bus modem communication device, characterized in that: The device comprises: A signal acquisition module, for acquiring a reference current of the sensor network in response to a frame synchronization period arriving at the PSI5 bus system, and converting a current signal output by the sensor network during a data transmission period into a Manchester coded signal based on the reference current; A decoding module, used for determining the communication baud rate according to the captured signal pulse width of the Manchester coded signal, and decoding the bit data of each signal pulse width; An updating module, for re-collecting and updating a reference current of the sensor network in response to completing the decoding length of a complete data frame, and updating the comparison current of the current comparator based on the reference current, wherein the Manchester coded signal is generated based on the level signal value of the input current comparator and the comparison current; specifically comprising: re-collecting a reference current value output by the sensor network when the PSI5 bus system enters a communication idle period; the reference current value is equal to a Manchester coded low current signal value; When the collected reference current value becomes smaller, the pulse width duration of the high level and low level of the Manchester coded signal is obtained and the duty cycle is calculated, and the comparison current of the current comparator is reduced according to the duty cycle; when the collected reference current value becomes larger, the comparison current of the current comparator is increased according to the duty cycle.
9. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the PSI5 bus modulation and demodulation communication method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the PSI5 bus modulation and demodulation communication method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Current modulation circuit
CN105094197A
Signal decoding method and device of PSI5 interface, equipment and storage medium
CN117200939A