A multi-node long-distance field bus configuration method for a ship fuel oil transfer system
By optimizing the CAN bus baud rate, filter capacitors, and interrupt handling procedures, the problems of high communication failure rate, high latency, and signal distortion in the ship fuel transfer system were solved, achieving high reliability and security of bus communication and ensuring the stable operation of the fuel transfer system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN HAIYI SCI & TECH CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-19
AI Technical Summary
In existing technologies, the multi-node long-distance CAN bus communication of marine fuel transfer systems is prone to high fault code rate, high latency, and signal distortion, resulting in insufficient system reliability and security, and failing to meet relevant regulatory requirements.
The CAN bus baud rate is optimized by setting a sampling point association strategy, the interface filter capacitor is adjusted by combining frequency response testing, and the interrupt handler is scientifically configured to ensure the stability and reliability of bus communication.
It significantly reduces the bus fault alarm rate, improves communication stability and reliability, ensures timely response to fuel transfer commands, enhances adaptability to complex interference environments, reduces system maintenance costs, and avoids safety hazards.
Smart Images

Figure CN122247789A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of marine fuel transfer system technology, specifically to a communication optimization and improvement configuration method adapted to the multi-node long-distance fieldbus of the marine fuel automatic transfer system. Background Technology
[0002] Currently, the CAN bus is widely used in ship engine room equipment and fuel transfer systems due to its advantages such as flexible configuration, simple wiring, and strong anti-interference capabilities. As a core component of ship power supply, the ship fuel transfer system requires its fieldbus to connect multiple communication nodes such as fuel tanks, fuel pumps, filters, valves, and monitoring instruments. These nodes are distributed in different areas of the ship, resulting in long bus transmission distances (typically 100-500 meters), which is a typical multi-node long-distance bus application scenario.
[0003] The ship's engine room environment is complex, with numerous and varied sources of interference, including electromagnetic interference from engine room equipment operation, poor wiring connections caused by hull vibration, and line losses due to seawater corrosion. These factors can easily lead to common-mode interference and a decrease in signal integrity on the CAN bus. Based on past experience with CAN communication on ships, for systems like ship fuel transfer where network timeliness requirements are not high, the industry standard practice is to use a low baud rate to reduce the number of data frames on the bus for long-distance data transmission, thereby minimizing signal attenuation and interference.
[0004] However, in practical applications with complex nodes (≥20 nodes), simply reducing the baud rate still presents numerous problems: the fault code rate on the bus remains high, easily leading to data loss and bit errors; excessive bus communication latency causes delayed response to fuel transfer commands, affecting system scheduling efficiency; simultaneously, signal distortion and untimely interruption responses reduce the reliability of the fuel transfer system, and may even cause safety hazards such as fuel leaks and supply interruptions due to communication failures, failing to meet the requirements for safe operation of marine fuel systems in relevant regulations. Therefore, there is an urgent need for a communication optimization and improvement configuration method for multi-node long-distance fieldbuses that can solve the above problems. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a multi-node long-distance fieldbus configuration method for a ship fuel transfer system, which can effectively improve the long-distance fieldbus communication capability of complex nodes in the ship's automatic fuel transfer system and ensure the system's reliability and safety.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for configuring a multi-node long-distance fieldbus for a ship fuel transfer system mainly includes the following steps: Step S1: Sampling point association setting strategy. Based on the characteristics of the CAN communication nodes of the ship's automatic fuel transfer system configured on the actual ship, the bus baud rate of the CAN bus network is optimally matched with the sampling points by using the listing and comparison method through the CAN baud rate calculation formula. Step S2, frequency response test and interface filter capacitor adjustment: observe the attenuation of the CAN bus output through frequency response test, analyze the jitter amplitude and clock deviation of the captured bus signal, and adjust the interface filter capacitor in the CAN bus transceiver module to reduce signal distortion on the bus. Step S3: Interrupt handler configuration and debugging. Process the CAN bus transceiver module interrupt handler according to the bus communication process, set the priority parameters of special events and temporary external requests on the bus, and configure the interrupt debugging strategy. Step S4, System integration and verification: Perform integration testing on the configured CAN bus, optimize parameters based on test results until the preset communication requirements are met.
[0007] Furthermore, in step S1, the CAN baud rate calculation formula is: baud rate = 1 / (synchronization segment SS + propagation time period PTS + phase buffer segment 1PBS1 + phase buffer segment 2PBS2); wherein, the synchronization segment SS, propagation time period PTS, phase buffer segment 1PBS1, and phase buffer segment 2PBS2 are all composed of a preset number of minimum time units Tq.
[0008] Furthermore, in step S1, when the bus baud rate is <500K, the matching range of the sampling points is 75%-87.5%, and the optimal matching parameters are a bus baud rate of 100K and 85% sampling points.
[0009] Furthermore, in step S2, the frequency response test uses an oscilloscope in conjunction with a function generator to sweep the frequency in the range of 1MHz-400MHz, with a dwell time of ≥1s at each frequency point, injecting a sine wave signal into the CAN bus, and observing the signal attenuation at the bus output.
[0010] Furthermore, in step S2, the jitter amplitude is controlled to be ≤50ns, the clock deviation is controlled to be ≤1%; and the adjustment of the interface filter capacitor in the CAN bus transceiver module includes: adjusting the interface filter capacitor from the conventional 1nF to 22pF.
[0011] Furthermore, in step S3, the interrupt types of the CAN bus transceiver module include: receive interrupt, transmit interrupt, error interrupt, special event interrupt, and temporary external request interrupt; The special event interruptions include fuel leak alarm interruptions and transfer pump failure interruptions; the temporary external request interruptions include manual transfer command interruptions.
[0012] Furthermore, in step S3, the priority parameters are arranged from high to low as follows: special event interruption, temporary external request interruption, error interruption, receive interruption, and send interruption.
[0013] Furthermore, in step S3, the interrupt debugging strategy includes: 1) Interrupt nesting settings: prevent low-priority interrupts from interrupting high-priority interrupts; 2) Interrupt response time test to ensure that the response time of high-priority interrupts is ≤10ms; 3) Self-recovery mechanism for fault interruption: When a communication error is detected, the interrupt program is automatically restarted to restore the communication connection.
[0014] Furthermore, in step S4, the preset communication requirements specifically include: total number of fault frames ≤ 10 frames / hour, bit error rate ≤ 0.01%, communication delay ≤ 50ms, and differential signal amplitude maintained at 1.5V-3V.
[0015] A ship fuel transfer system employs the multi-node long-distance fieldbus configuration method for ship fuel transfer systems described above.
[0016] Compared with the prior art, the present invention has the following main advantages: 1. This invention effectively solves the core problems of high fault code rate, high delay, and signal distortion in multi-node long-distance fieldbus communication of marine fuel transfer systems by optimizing the matching of sampling points and baud rate, combining frequency response testing to optimize interface filter capacitors, and reasonably configuring interrupt handling programs. Compared with existing conventional low baud rate configuration methods, the bus fault alarm rate is significantly reduced, and the stability and reliability of bus communication are significantly improved, ensuring timely response to fuel transfer commands and accurate data transmission.
[0017] 2. Through the scientific division of interrupt priorities and the optimization of debugging strategies, this invention ensures priority response to special safety events and improves the emergency handling capability of the ship's fuel transfer system. At the same time, the optimized design of sampling points and filter capacitors enhances the bus's adaptability to the complex interference environment of the ship's engine room, extends the bus's service life, and reduces system maintenance costs, demonstrating significant practicality and economic benefits.
[0018] 3. The configuration method of the present invention can be adapted to the fuel transfer system of ships of different sizes and types. It has strong compatibility, low implementation cost, clear configuration process and strong operability, which is convenient for on-site technicians to deploy and debug. It can effectively avoid safety hazards such as fuel leakage and supply interruption caused by communication failure, and ensure the safe and stable operation of the ship's power system. Attached Figure Description
[0019] Figure 1This is a schematic diagram of the overall process of the fieldbus configuration method in an embodiment of the present invention; Figure 2 This is a schematic diagram of the baud rate and sampling point association matching enumeration matrix comparison verification network in an embodiment of the present invention; Figure 3 This is a schematic diagram of the CAN transceiver module filter capacitor adjustment in an embodiment of the present invention; Figure 4 This is a schematic diagram of the communication waveform on the CAN bus network before the filter capacitor of the CAN transceiver module is adjusted in an embodiment of the present invention (the rising and falling edges of the communication waveform are slow). Figure 5 This is a schematic diagram of the communication waveform on the CAN bus network after the filter capacitor of the CAN transceiver module is adjusted in an embodiment of the present invention (the rising and falling edges of the communication waveform are regular).
[0020] Figure 6 This is a statistical diagram illustrating the occurrence of fault frames on the CAN bus network before optimized configuration in this embodiment of the invention. Figure 7 This is a schematic diagram illustrating the statistical occurrence of fault frames on the CAN bus network after optimization in this embodiment of the invention. Detailed Implementation To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0021] It should be noted that, depending on the implementation needs, the various steps / components described in this application can be broken down into more steps / components, or two or more steps / components or parts of the operation of steps / components can be combined into new steps / components to achieve the purpose of this invention.
[0022] In this invention, unless otherwise expressly specified and limited, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise expressly and specifically limited.
[0023] Example 1: This example provides a multi-node long-distance fieldbus configuration method for a ship fuel transfer system, such as... Figure 1 As shown, the main steps include the following: Step S1, Sampling point association setting strategy First, conduct a comprehensive investigation of the specific details of the CAN communication nodes of the ship's automatic fuel transfer system, including the number of nodes, node layout (distribution location and spacing), communication load of each node (data transmission frequency and data volume), and bus transmission distance. Combined with the functional requirements of the ship's fuel transfer system (transfer command response time and data transmission accuracy), determine the selectable range of CAN bus baud rate.
[0024] Then, according to the CAN baud rate calculation formula (baud rate = 1 / (synchronization segment SS + propagation time period PTS + phase buffer segment 1PBS1 + phase buffer segment 2PBS2), where each segment consists of several minimum time units Tq), a matching matrix between baud rate and sampling points is constructed using a list comparison method. This allows for optimal matching of the CAN bus network's bus baud rate with the sampling points, such as... Figure 2 As shown.
[0025] In this example, based on the CAN baud rate and sampling rate selection rules, when the bus baud rate is <500K, the recommended range for sampling points is 75%-87.5%. Considering the node layout on the fuel automatic transfer system bus, within the bus baud rate range that meets real-time requirements (usually 50K-250K), the bus communication performance under different baud rates and different sampling point combinations is tested one by one. By listing and comparing the matrix, the number of fault frames, communication delay, bit error rate and other indicators under each combination are recorded. It is verified that the system has the best communication stability and the fewest fault frames on the bus when the bus baud rate is 100K and the sampling point is set to 85%, which can be used as the optimal matching parameter.
[0026] Step S2, Frequency Response Test and Interface Filter Capacitor Adjustment Set up a CAN bus frequency response test platform. Using an oscilloscope (bandwidth ≥ 1 GHz) and a function generator, sweep the frequency in the range of 1 MHz-400 MHz (focusing on the 10 MHz-100 MHz harness resonance high frequency band) with a step size of 1% and a dwell time of ≥ 1 s at each frequency point. Inject a sine wave signal into the CAN bus and observe the signal attenuation at the bus output.
[0027] By capturing the bus signal waveform with an oscilloscope, the jitter amplitude and clock deviation of the signal are analyzed. The jitter amplitude should be controlled within ≤50ns and the clock deviation within ≤1%. If the signal jitter amplitude exceeds the threshold or the clock deviation is too large, it indicates that there is a signal distortion problem in the CAN bus. The main reason is that the single-node capacitance of the CAN transceiver module is large. After multiple nodes are connected in parallel, the total capacitance of the CAN bus becomes too large, which makes the rising and falling edges of the CAN communication waveform slow, thus causing bit sampling errors.
[0028] To address the aforementioned issues, this application reduces signal distortion on the CAN bus by adjusting the parameters of the interface filter capacitor in the CAN bus transceiver module. After multiple tests and verifications, adjusting the interface filter capacitor from the conventional 1nF to 22pF resulted in a more regular CAN message waveform, further reduced bus communication fault alarms, and effectively alleviated signal distortion. This ensures that the bus signal integrity meets relevant standard requirements (differential signal amplitude maintained at 1.5V-3V). Figures 3-5 As shown.
[0029] Step S3, Interrupt handler configuration and debugging Based on the bus communication process of the ship's fuel transfer system, the interrupt types of the CAN bus transceiver module are determined, including: receive interrupt, transmit interrupt, error interrupt, special event interrupt (such as fuel leak alarm, transfer pump failure) and temporary external request interrupt (such as manual transfer command).
[0030] The priority parameters for various interrupts on the bus are set using a hierarchical priority setting method: the first priority is for special event interrupts (involving ship fuel safety, requiring priority response); the second priority is for temporary external request interrupts (manual operation commands, ensuring operational flexibility); the third priority is for error interrupts (timely handling of communication failures to prevent the failure from escalating); and the fourth priority is for receive interrupts and transmit interrupts (normal data transmission, ensuring communication continuity).
[0031] Configure interrupt debugging strategies, including interrupt nesting settings (preventing low-priority interrupts from interrupting high-priority interrupts), interrupt response time testing (ensuring high-priority interrupt response time ≤ 10ms), and a self-recovery mechanism for fault interrupts (automatically restarting the interrupt routine and restoring the communication connection when a communication error is detected). By simulating various interrupt scenarios, test the stability and response efficiency of the interrupt handler, optimize interrupt parameters, ensure a smooth interrupt handling process, and avoid communication lag and data loss caused by interrupt conflicts.
[0032] Step S4, System Integration and Verification After completing the above three configuration steps, conduct joint debugging tests on the CAN bus of the ship's automatic fuel transfer system, simulating the actual ship operating environment (including electromagnetic interference and ship vibration scenarios), and run continuously for 72 hours, recording indicators such as the number of fault frames, bit error rate, and communication latency of the bus communication.
[0033] If the test indicators do not meet the preset requirements (total number of fault frames ≤ 10 frames / hour, bit error rate ≤ 0.01%, communication latency ≤ 50ms), return to the corresponding steps to re-optimize the parameters. Specifically, if there are too many fault frames, readjust the matching parameters of sampling points and baud rate or the filter capacitor parameters; if the communication latency is too high, optimize the interrupt priority settings; if the signal distortion is severe, further adjust the filter capacitor or check the bus wiring.
[0034] The configuration of the multi-node long-distance fieldbus of the entire ship fuel transfer system was completed until all the joint testing indicators met the preset requirements.
[0035] like Figures 6-7 As shown, after optimizing the sampling point association setting strategy, interface filter capacitor design, and interrupt handling process in the above steps, the fault frame occurrence rate on the bus is approximately 0.0026%. Compared to before the optimization and improvement, the fault frame occurrence rate on the CAN communication network bus has decreased from 0.3% to 0.0026%, a reduction of 99.1%. This achieves high reliability and extremely low bit error rate in communication bus transmission, effectively ensuring the safety and reliability of the automatic fuel transfer system.
[0036] Example 2: This example provides a multi-node long-distance fieldbus configuration method for a marine fuel transfer system. The baud rate of the CAN bus network is matched and the sampling points are associated in real time. The filter capacitor of the CAN transceiver module interface is adjusted through frequency response testing. At the same time, priority parameters for special events and temporary external requests on the bus are set and an interrupt debugging strategy is configured.
[0037] Specifically, by comparing the CAN baud rate and sampling rate enumeration matrix, the optimal match between the CAN bus network baud rate and sampling points is achieved.
[0038] Furthermore, by analyzing the jitter amplitude and clock deviation of the CAN communication network bus signal captured by the ship's automatic fuel transfer system, the signal distortion can be mitigated by adjusting the interface filter capacitor in the CAN bus transceiver module.
[0039] Furthermore, through frequency domain response testing, using an oscilloscope and function generator, sinusoidal signals were injected into the CAN bus at different frequencies to observe the output attenuation and analyze the jitter amplitude and clock deviation of the bus signal. This was then analyzed through calculation.
[0040] Furthermore, the interrupt handler for the CAN bus transceiver module is processed according to the bus communication process, and priority parameters for special events and temporary external requests on the bus are set, and the interrupt debugging strategy is configured.
[0041] By performing the above configuration operations, based on the conventional configuration methods used in the industry, the overall failure alarm rate of bus communication can be significantly optimized, effectively solving the problem of high fault frame occurrence rate in the long-distance communication of complex nodes in the automatic fuel transfer system of ships.
[0042] Furthermore, all parts of this application that are not described in detail are the same as or implemented using existing technology.
[0043] In summary: 1. This invention effectively solves the core problems of high fault code rate, high delay, and signal distortion in multi-node long-distance fieldbus communication of marine fuel transfer systems by optimizing the matching of sampling points and baud rate, combining frequency response testing to optimize interface filter capacitors, and reasonably configuring interrupt handling programs. Compared with existing conventional low baud rate configuration methods, the bus fault alarm rate is significantly reduced, and the stability and reliability of bus communication are significantly improved, ensuring timely response to fuel transfer commands and accurate data transmission.
[0044] 2. Through the scientific division of interrupt priorities and the optimization of debugging strategies, this invention ensures priority response to special safety events and improves the emergency handling capability of the ship's fuel transfer system. At the same time, the optimized design of sampling points and filter capacitors enhances the bus's adaptability to the complex interference environment of the ship's engine room, extends the bus's service life, and reduces system maintenance costs, demonstrating significant practicality and economic benefits.
[0045] 3. The configuration method of the present invention can be adapted to the fuel transfer system of ships of different sizes and types. It has strong compatibility, low implementation cost, clear configuration process and strong operability, which is convenient for on-site technicians to deploy and debug. It can effectively avoid safety hazards such as fuel leakage and supply interruption caused by communication failure, and ensure the safe and stable operation of the ship's power system.
[0046] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0047] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0048] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A multi-node long-distance fieldbus configuration method for a ship fuel transfer system, characterized in that, Includes the following steps: S1, Sampling point association setting strategy: Based on the characteristics of the CAN communication nodes of the ship's automatic fuel transfer system configured on the actual ship, the bus baud rate of the CAN bus network is optimally matched with the sampling points by using the listing and comparison method through the CAN baud rate calculation formula. S2, Frequency response test and interface filter capacitor adjustment: Observe the attenuation of the CAN bus output through frequency response test, analyze the jitter amplitude and clock deviation of the captured bus signal, and adjust the interface filter capacitor in the CAN bus transceiver module to reduce signal distortion on the bus. S3, Interrupt handler configuration and debugging, handles the CAN bus transceiver module interrupt handler according to the bus communication process, sets priority parameters for special events and temporary external requests on the bus and configures the interrupt debugging strategy. S4, System Integration and Verification: Perform integration testing on the configured CAN bus, optimize parameters based on test results until the preset communication requirements are met.
2. The multi-node long-distance fieldbus configuration method for a ship fuel transfer system according to claim 1, characterized in that... In step S1, the CAN baud rate calculation formula is: baud rate = 1 / (synchronization segment SS + propagation time period PTS + phase buffer segment 1PBS1 + phase buffer segment 2PBS2); wherein, the synchronization segment SS, propagation time period PTS, phase buffer segment 1PBS1, and phase buffer segment 2PBS2 are all composed of a preset number of minimum time units Tq.
3. The multi-node long-distance fieldbus configuration method for a ship fuel transfer system according to claim 2, characterized in that... In step S1, when the bus baud rate is <500K, the matching range of the sampling points is 75%-87.5%, and the optimal matching parameters are a bus baud rate of 100K and 85% sampling points.
4. The multi-node long-distance fieldbus configuration method for a ship fuel transfer system according to claim 1, characterized in that... In step S2, the frequency response test uses an oscilloscope and a function generator to sweep the frequency in the range of 1MHz-400MHz, with a dwell time of ≥1s at each frequency point, injecting a sine wave signal into the CAN bus, and observing the signal attenuation at the bus output.
5. A multi-node long-distance fieldbus configuration method for a ship fuel transfer system according to claim 4, characterized in that... In step S2, the jitter amplitude is controlled to be ≤50ns, and the clock deviation is controlled to be ≤1%. Furthermore, the adjustment of the interface filter capacitor in the CAN bus transceiver module includes: adjusting the interface filter capacitor from the conventional 1nF to 22pF.
6. A multi-node long-distance fieldbus configuration method for a ship fuel transfer system according to claim 1, characterized in that... In step S3, the interrupt types of the CAN bus transceiver module include: receive interrupt, transmit interrupt, error interrupt, special event interrupt, and temporary external request interrupt; The special event interruptions include fuel leak alarm interruptions and transfer pump failure interruptions; the temporary external request interruptions include manual transfer command interruptions.
7. A multi-node long-distance fieldbus configuration method for a ship fuel transfer system according to claim 6, characterized in that... In step S3, the priority parameters are arranged from high to low as follows: special event interruption, temporary external request interruption, error interruption, receive interruption, and send interruption.
8. A multi-node long-distance fieldbus configuration method for a ship fuel transfer system according to claim 7, characterized in that... In step S3, the interrupt debugging strategy includes: 1) Interrupt nesting settings: prevent low-priority interrupts from interrupting high-priority interrupts; 2) Interrupt response time test to ensure that the response time of high-priority interrupts is ≤10ms; 3) Self-recovery mechanism for fault interruption: When a communication error is detected, the interrupt program is automatically restarted to restore the communication connection.
9. A multi-node long-distance fieldbus configuration method for a ship fuel transfer system according to claim 1, characterized in that... In step S4, the preset communication requirements specifically include: total number of fault frames ≤ 10 frames / hour, bit error rate ≤ 0.01%, communication delay ≤ 50ms, and differential signal amplitude maintained at 1.5V-3V.
10. A ship fuel transfer system, characterized in that, The multi-node long-distance fieldbus configuration method for the ship fuel transfer system as described in any one of claims 1 to 9 is adopted.