Dual-fuel inert gas generator automatic switching and anti-blocking control method and system

CN122902319APending Publication Date: 2026-10-13南通亚泰工程技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610901718.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-22
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

而现有技术中,停机前的燃料切换(即从重油模式切换回轻油模式)主要依赖船员人工判断和手动操作,船员在卸货收尾阶段易因忙于其他作业而遗忘切换

Benefits of technology

在本申请中,本方法实现双燃料惰气发生器从开机到停机的全流程自动控制。系统响应开机指令自动以轻油模式启动,检测到重油准备就绪后自动切换至重油模式,在重油运行期间根据卸货工况数据自动预判卸货结束时间,当剩余时间达到设定阈值时自动切换回轻油模式并进行吹扫,最后响应卸货完成信号自动停机。整个过程中无需人工干预燃料切换和停机操作,避免了船员因遗忘切换导致的重油管路堵塞问题,同时减少了人工值守需求;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122902319A_ABST
    Figure CN122902319A_ABST
Patent Text Reader

Abstract

The application relates to a dual-fuel inert gas generator automatic switching and anti-blocking control method and system, and belongs to the technical field of dual-fuel inert gas generator control, wherein the method comprises the following steps: in response to a start-up instruction, controlling the dual-fuel inert gas generator to operate in a light oil mode; when it is detected that a heavy oil preparation ready condition is met, performing a first switching operation of switching the dual-fuel inert gas generator from the light oil mode to the heavy oil mode; during operation of the dual-fuel inert gas generator in the heavy oil mode, acquiring real-time working condition data of ship unloading operation, and predicting the remaining time of unloading end based on the real-time working condition data; when the remaining time reaches a preset advance switching threshold, performing a second switching operation of switching the dual-fuel inert gas generator from the heavy oil mode to the light oil mode; and in response to an unloading operation completion signal, controlling the dual-fuel inert gas generator to stop. The application has the effects of improving the reliability of system operation, preventing pipeline blockage and reducing manual dependence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of dual-fuel inert gas generator control technology, and in particular to a method and system for automatic switching and anti-clogging control of a dual-fuel inert gas generator. Background Technology

[0002] A dual-fuel inert gas generator (IGG) is a key piece of equipment in ship unloading operations. It is used to fill cargo holds with inert gas to reduce oxygen concentration and prevent explosions caused by oil evaporation. These devices typically have two fuel modes: light fuel (easy ignition, stable combustion) is used during startup, and then switched to heavy fuel (better fuel economy) once the system is running stably. The generator is shut down after unloading is completed.

[0003] After unloading operations are completed, the IGG system needs to be shut down. However, in current technology, the fuel switch before shutdown (i.e., switching from heavy fuel oil mode back to light fuel oil mode) mainly relies on manual judgment and operation by the crew. Crew members are prone to forgetting to switch during the final stages of unloading due to other tasks. If heavy fuel oil remains in the fuel lines during shutdown, it will solidify and clog the lines, valves, and burners as the system cools, leading to ignition failure and system inability to start normally upon restart, thus affecting the efficiency of ship unloading operations. Therefore, improvements are needed. Summary of the Invention

[0004] To improve the reliability of system operation, prevent pipeline blockage, and reduce reliance on manual labor, this application provides an automatic switching and anti-blockage control method and system for a dual-fuel inert gas generator.

[0005] In a first aspect, this application provides an automatic switching and anti-clogging control method for a dual-fuel inert gas generator, applicable to ship unloading operations. The dual-fuel inert gas generator has switchable light oil mode and heavy oil mode. The method includes: In response to the power-on command, the dual-fuel inert gas generator is controlled to operate in light oil mode; when the heavy oil preparation ready condition is detected, the first switching operation is performed to switch the dual-fuel inert gas generator from light oil mode to heavy oil mode. During the operation of the dual-fuel inert gas generator in heavy oil mode, real-time operating data of the ship's unloading operation is acquired, and the remaining time for the unloading to end is predicted based on the real-time operating data; when the remaining time reaches a preset early switching threshold, a second switching operation is performed to switch the dual-fuel inert gas generator from heavy oil mode to light oil mode. In response to the unloading operation completion signal, the dual-fuel inert gas generator is controlled to shut down.

[0006] By adopting the above technical solution, this method achieves fully automated control of the dual-fuel inert gas generator from start-up to shutdown. The system automatically starts in light fuel mode upon receiving the start-up command, automatically switches to heavy fuel mode upon detecting that heavy fuel is ready, and automatically predicts the unloading end time based on unloading data during heavy fuel operation. When the remaining time reaches a set threshold, it automatically switches back to light fuel mode and performs purging. Finally, it automatically shuts down upon receiving the unloading completion signal. The entire process requires no manual intervention for fuel switching and shutdown operations, avoiding heavy fuel pipeline blockage caused by crew forgetting to switch fuels, and reducing the need for manual monitoring.

[0007] Optionally, the method further includes: During the operation of the dual-fuel inert gas generator, the operating parameters involved in the first switching operation and / or the second switching operation are continuously monitored; Based on the monitored operating parameters, identify whether there are any preset abnormal operating conditions; When an abnormal operating condition is detected, the emergency handling operation corresponding to the abnormal operating condition is automatically executed.

[0008] By adopting the above technical solution, this method continuously monitors various operating parameters involved in switching operations during system operation. Based on the monitoring data, it automatically identifies abnormal operating conditions such as valve sticking, precursors to pipeline blockage, insufficient heating, and poor ignition, and automatically executes corresponding emergency handling operations when an abnormality is detected. Through real-time diagnosis and automatic response, protective measures can be taken before a fault occurs or in its early stages to prevent the fault from escalating and improve the safety and reliability of system operation.

[0009] Optionally, the step of predicting the remaining time for unloading based on the real-time operating data includes: Acquire at least two signals from the real-time operating data, the signals including unloading pump speed and cargo tank level signal; The remaining time for unloading is calculated based on different signals to obtain at least two independent baseline remaining time estimates, and the deviation between the baseline remaining time estimates is calculated. When the deviation is not greater than the first preset deviation threshold, the estimated values ​​of each basic remaining time are fused and calculated to obtain the final remaining time; When the deviation is greater than the first preset deviation threshold and not greater than the second preset deviation threshold, the remaining time is calculated by weighting and correcting each basic remaining time estimate according to the changing trend of the unloading pump speed, and then merging the calculations to obtain the final remaining time. When the deviation is greater than the second preset deviation threshold, it is determined that there is an abnormal data source in the real-time operating data, an alarm is triggered, and a final remaining time is selected from each basic remaining time estimate according to the preset priority.

[0010] By adopting the above technical solution, this method uses multi-signal fusion to predict the remaining time after unloading. It simultaneously collects the unloading pump speed signal and the cargo tank level signal to calculate independent baseline remaining time estimates. Different fusion strategies are applied based on the degree of deviation between the two estimates. For small deviations, the average value is directly fused. For moderate deviations, a weighted correction is applied based on the unloading pump speed change trend before fusion. For large deviations, a data source anomaly is identified, an alarm is triggered, and a single signal is selected as the final result according to priority. This method effectively avoids misjudgments caused by single sensor failures and improves the accuracy of remaining time prediction.

[0011] Optionally, the method further includes: Historical unloading operation data of ships are obtained, and the operation modes are classified according to unloading rate, cargo hold capacity and cargo type. An optimized switching parameter set corresponding to different operation modes is established. The optimized switching parameter set includes at least the optimized advance switching threshold. At the start of the current unloading operation, the current operation mode is identified, and an advance switching threshold that matches the current operation mode is selected from the set of optimized switching parameters. This threshold is used as the advance switching threshold for comparison with the remaining time in this unloading operation. During and after the current unloading operation, the actual time difference between triggering the second switching operation and actually receiving the unloading operation completion signal is recorded. Based on the error between the actual time difference recorded multiple times and the advance switching threshold used in this operation, the advance switching threshold corresponding to the current operation mode in the optimized switching parameter set is dynamically updated for subsequent unloading operations of the same type of operation mode.

[0012] By adopting the above technical solution, this method classifies operation modes based on historical unloading operation data and establishes and optimizes advance switching thresholds for different modes. At the start of each unloading operation, the current operation mode is automatically identified and the corresponding threshold is matched. After the operation is completed, the error between the actual time difference and the threshold is recorded, and the threshold corresponding to that mode is dynamically updated using historical error sequences. As the number of operations accumulates, the threshold gradually converges to the optimal value for that type of operation, enabling the system to achieve an adaptive balance between anti-congestion effectiveness and economy, becoming more accurate with repeated use.

[0013] Optionally, the second switching operation includes: Obtain the characteristic parameters of the fuel pipeline of the dual-fuel inert gas generator, wherein the characteristic parameters of the fuel pipeline include at least the pipeline length and the internal volume of the pipeline; Based on the fuel pipeline characteristic parameters, a gradual switching curve is determined, which defines the fuel transition relationship during the switch from heavy oil mode to light oil mode. By executing the aforementioned gradual switching curve, the supply of heavy fuel oil is gradually reduced while the supply of light fuel oil is increased simultaneously, maintaining a constant total fuel supply. When the heavy oil supply drops to a preset lower limit, the heavy oil valve is completely closed, and light oil is supplied independently and the system continues to operate for a preset purging time; the preset lower limit is 0.

[0014] By adopting the above technical solution, this method employs a gradual switching approach when switching from heavy oil mode to light oil mode. Based on the characteristic parameters of the fuel pipeline, a gradual switching curve is determined. During execution, the supply of heavy oil is gradually reduced while the supply of light oil is increased simultaneously, maintaining a constant total fuel supply. Once the heavy oil supply drops to zero, light oil is supplied independently for purging. Compared to the traditional step-by-step switching, gradual switching avoids fuel supply interruptions or drastic fluctuations, effectively preventing flameout and unstable combustion during the switching process.

[0015] Optionally, the gradual switching curve is a non-linear transition curve, with a smaller slope in the initial stage of switching, a larger slope in the middle stage of switching, and a smaller slope again in the final stage of switching, forming an S-shaped transition shape. The total duration of the gradual switching curve is dynamically calculated based on the pipeline length and internal volume in the fuel pipeline characteristic parameters, so as to maintain a positive flow velocity in the fuel pipeline. During the execution of the gradual switching curve, the flame stability parameter is monitored in real time. When the flame stability parameter is lower than a preset threshold, the execution speed of the gradual switching curve is automatically slowed down, and execution continues after the flame recovers and stabilizes.

[0016] By adopting the above technical solutions, this method further optimizes the gradual switching process by employing an S-shaped nonlinear transition curve with a gradually changing slope. This ensures smooth changes at the beginning and end of the switching phases, with faster changes in the middle phase, allowing the flame to gradually adapt to the changes in fuel composition. The total switching time is dynamically calculated based on the pipeline length and internal volume to ensure a sustained positive flow velocity within the pipeline and prevent heavy oil adhesion. Flame stability is monitored in real time during the switching process, and the switching speed is automatically reduced to allow the flame to recover if it becomes unstable. These optimizations achieve a balance between preventing blockage and ensuring stable combustion, improving the safety and success rate of the switching process.

[0017] Optionally, when the remaining time reaches a preset early switching threshold, a second switching operation is performed to switch the dual-fuel inert gas generator from heavy oil mode to light oil mode, including: Obtain multi-dimensional status parameters of the current system, including at least two of the following: unloading progress parameters, heavy oil system status parameters, blockage risk assessment parameters, and switching reliability parameters; Based on the multi-dimensional state parameters, a comprehensive handover cost assessment value is calculated. The comprehensive handover cost assessment value is used to quantify the comprehensive cost required to perform the second handover operation at the current moment. The comprehensive cost includes at least the congestion risk cost and the economic loss cost. The overall switching cost assessment value is compared with a preset trigger condition; when the trigger condition is met, the second switching operation is executed.

[0018] By adopting the above technical solution, this method does not immediately execute the switchover when the remaining time reaches the early switchover threshold. Instead, it first acquires multi-dimensional parameters such as unloading progress, heavy oil system status, congestion risk, and switchover reliability to calculate a comprehensive switchover cost assessment value. The switchover is only executed when the cost meets the triggering conditions. This decision-making mechanism comprehensively considers multiple factors such as congestion risk, economic loss, and switchover failure risk, avoiding economic losses caused by blindly switching when the heavy oil system is operating at high efficiency. At the same time, it ensures the anti-congestion effect by switching early when the congestion risk is high, thus achieving optimal decision-making on the switchover timing.

[0019] Secondly, this application provides an automatic switching and anti-clogging control system for a dual-fuel inert gas generator, including: The start-up light oil module is used to control the dual-fuel inert gas generator to operate in light oil mode in response to the start-up command; The heavy oil switching interlock control module is used to perform a first switching operation to switch the dual-fuel inert gas generator from light oil mode to heavy oil mode when the heavy oil preparation ready condition is detected. The unloading condition linkage prediction module is used to acquire real-time operating condition data of the ship's unloading operation during the operation of the dual-fuel inert gas generator in heavy oil mode, and predict the remaining time for the end of unloading based on the real-time operating condition data; when the remaining time reaches the preset early switching threshold, a second switching operation is performed to switch the dual-fuel inert gas generator from heavy oil mode to light oil mode. An automatic shutdown control module is used to control the dual-fuel inert gas generator to shut down in response to a signal indicating that the unloading operation is complete.

[0020] Thirdly, this application provides an automatic switching and anti-clogging control device for a dual-fuel inert gas generator, including a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed as described in any of the first aspects.

[0021] Fourthly, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and executed as described in any of the first aspects.

[0022] In summary, this application includes at least one of the following beneficial technical effects: In this application, the method achieves fully automated control of a dual-fuel inert gas generator from start-up to shutdown. The system automatically starts in light fuel mode upon receiving a start-up command, automatically switches to heavy fuel mode upon detecting that heavy fuel is ready, automatically predicts the unloading end time based on unloading data during heavy fuel operation, and automatically switches back to light fuel mode and performs purging when the remaining time reaches a set threshold. Finally, it automatically shuts down upon receiving an unloading completion signal. The entire process requires no manual intervention for fuel switching and shutdown, avoiding heavy fuel pipeline blockage caused by crew forgetting to switch fuels, and reducing the need for manual monitoring. Furthermore, this method continuously monitors various operating parameters involved in switching operations during system operation. Based on the monitoring data, it automatically identifies abnormal operating conditions such as valve sticking, precursors to pipeline blockage, insufficient heating, and poor ignition, and automatically executes corresponding emergency handling operations when an anomaly is detected. Through real-time diagnosis and automatic response, protective measures can be taken before a fault occurs or in its early stages to prevent the fault from escalating and improve the safety and reliability of system operation. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a schematic flowchart of an automatic switching and anti-clogging control method for a dual-fuel inert gas generator disclosed in an embodiment of this application.

[0025] Figure 2 This is a structural block diagram of an automatic switching and anti-clogging control system for a dual-fuel inert gas generator disclosed in an embodiment of this application.

[0026] Explanation of reference numerals in the attached diagram: 201, Light oil start-up module; 202, Heavy oil switching interlock control module; 203, Unloading condition linkage prediction module; 204, Automatic shutdown control module. Detailed Implementation

[0027] The following is in conjunction with the appendix Figure 1-2 This application will be described in further detail.

[0028] This application discloses an automatic switching and anti-clogging control method for a dual-fuel inert gas generator (hereinafter referred to as the control method), the execution subject of which is an automatic switching and anti-clogging control system for a dual-fuel inert gas generator (hereinafter referred to as the control system). The following will be combined with... Figure 1This document details the execution process of the control method by the control system. The PLC models, sensor ranges, and specific values ​​described in the following embodiments are merely illustrative and do not constitute a limitation on the scope of protection of this application.

[0029] S101, in response to the start-up command, controls the dual-fuel inert gas generator to operate in light oil mode; when the heavy oil preparation ready condition is detected, the first switching operation is performed to switch the dual-fuel inert gas generator from light oil mode to heavy oil mode. S102: During the operation of the dual-fuel inert gas generator in heavy oil mode, real-time operating data of the ship's unloading operation is acquired, and the remaining time for the unloading to end is predicted based on the real-time operating data; when the remaining time reaches the preset early switching threshold, the second switching operation of switching the dual-fuel inert gas generator from heavy oil mode to light oil mode is executed. S103, in response to the unloading operation completion signal, controls the dual-fuel inert gas generator to shut down.

[0030] S301, during the operation of the dual-fuel inert gas generator, continuously monitor the operating parameters involved in the first switching operation and / or the second switching operation; S302, based on the monitored operating parameters, identify whether there are preset abnormal operating conditions; S303: When an abnormal operating condition is detected, the emergency handling operation corresponding to the abnormal operating condition is automatically executed.

[0031] In implementation, the control system is deployed in the ship's engine room control room. Its core is a programmable logic controller (PLC), specifically a Siemens S7-1500 series PLC. This PLC establishes signal connections with field devices through the following physical methods: Analog input modules (such as 6ES7531-7KF00-0AB0) connect to temperature and pressure sensors installed in the heavy oil pipeline to collect heavy oil temperature and pressure signals; digital input modules connect to the auxiliary contacts of the heavy oil circulation pump, the operating status contacts of the unloading pump, and the cargo tank level switch to collect the on / off operating status signals of each device; digital output modules connect to the actuators of the light oil valve, heavy oil valve, and ignition device to issue switching commands; and an RS485 serial port connects to the host computer of the unloading monitoring system to obtain real-time speed data of the unloading pump. Communication between the control system and each sensor and actuator uses a 4-20mA current loop signal or a 24V DC switching signal, with a sampling frequency of no less than 1 time / second.

[0032] The dual-fuel inert gas generator has independent light oil and heavy oil lines, which converge at the same fuel inlet before entering the burner. The light oil line transports light oil (such as diesel), characterized by low viscosity, fluidity at room temperature, and easy ignition. The heavy oil line transports heavy oil (such as marine fuel oil), characterized by high viscosity and the need to be heated to above 80°C to achieve a combustible flow state. A light oil valve is installed on the light oil line to control the flow of light oil. The heavy oil line is equipped with a heavy oil circulation pump, a heater, a temperature sensor, a pressure sensor, and a heavy oil valve. After the heavy oil circulation pump starts, the heavy oil circulates between the heavy oil tank and the heater. The heater continuously heats the heavy oil. The temperature and pressure sensors monitor the real-time temperature and pressure of the heavy oil, respectively, while the heavy oil valve controls whether the heavy oil enters the burner for combustion.

[0033] For S101, the specific implementation is as follows: When the ship begins unloading operations, the crew presses the "System Start" button through the operation panel in the engine room control room. After the button is pressed, its normally open contact closes, sending a 24V DC high-frequency signal to the digital input module of the PLC. The CPU of the PLC polls the status of the input port in each scan cycle (for example, each scan cycle is 50 milliseconds). When it detects that the level of the port changes from low to high, it is recognized as receiving the power-on command.

[0034] In response to the start-up command, the control system automatically executes the light oil ignition start-up process. First, the PLC sends an opening command (outputting 24V DC voltage) to the actuator of the light oil valve via its digital output module, connecting the light oil supply pipeline; simultaneously, it sends an ignition command to the ignition device (outputting a 24V DC pulse lasting 3 seconds), and the ignition device generates an electric spark to ignite the light oil. While the ignition command is being issued, the PLC continuously collects flame signals via a flame detector (e.g., an ultraviolet phototube flame detector). The flame detector is installed at the burner observation port; when it detects ultraviolet light in the flame, its internal phototube conducts, outputting a 24V DC switching signal to the PLC's digital input module.

[0035] The PLC determines whether the flame has been successfully established by continuously monitoring the switch signal input to the flame detector within a specified time (e.g., 5 seconds) after the ignition command is issued. If the signal is continuously received within 5 seconds (i.e., the signal remains high without interruption), the flame is considered to have been stably established; if no signal is received at the end of 5 seconds, or if the signal is interrupted, the ignition is considered to have failed. If the ignition fails, the control system automatically re-executes the ignition process. If three consecutive ignition attempts fail, the PLC triggers an audible and visual alarm through the digital output module and cuts off the output of the light oil valve and the ignition device, putting the system into a safety lockout state.

[0036] After the flame is successfully established, the control system starts a software timer with a timer duration of 10 minutes (this duration is fixed in the PLC program and cannot be modified by the operator) and begins the light oil stabilization test. During this 10-minute stabilization period, the PLC continuously monitors the flame detector signal. If the flame signal is interrupted for more than 1 second, the above ignition start-up process is immediately re-executed.

[0037] During the light oil stable combustion period, the control system simultaneously begins preparing for the heavy oil switching conditions. Specifically, upon receiving the start command, the PLC sends a start command to the contactor of the heavy oil circulation pump through the digital output module, starting the heavy oil circulation pump. After the heavy oil circulation pump starts, the heavy oil circulates between the heavy oil day-use cabinet and the heater, and is gradually heated to the combustible temperature by the heater.

[0038] When the light oil stabilization timer reaches 10 minutes, the control system automatically enters the heavy oil switching condition judgment process. The PLC performs a condition judgment every 1 minute (i.e. every 60 scan cycles). The judgment logic is: simultaneously read the real-time values ​​of the three core interlocking parameters.

[0039] The first core interlock parameter is the heavy oil temperature. The PLC reads a 4-20mA current signal from a temperature sensor via an analog input module. This sensor has a range of 0℃ to 150℃, and its output current has a linear relationship with the measured temperature, with a proportionality coefficient of: (150℃−0℃) / (20mA−4mA) = 9.375℃ / mA. This proportionality coefficient is internally stored in the PLC's CPU. The acquired current value I (in mA) is converted into the actual temperature value T (in °C) using the following linear formula: T = (I−4mA) × 9.375℃ / mA. For example, when a 12mA current is acquired, T = (12−4) × 9.375 = 75℃ is calculated. Then, it is determined whether this temperature value is within the range of 80℃ to 120℃ (inclusive).

[0040] The second core interlock parameter is the heavy oil pressure. The PLC reads the 4-20mA current signal from the pressure sensor via the analog input module. This sensor has a range of 0MPa to 1.0MPa, and its output current has a linear relationship with the measured pressure, with a proportionality coefficient of: (1.0MPa−0MPa) / (20mA−4mA) = 0.0625MPa / mA. This proportionality coefficient is internally stored in the PLC's CPU, and the acquired current value I (in mA) is converted to the actual pressure value P (in MPa) using the following linear formula: P = (I−4mA)×0.0625MPa / mA. For example, when a 10mA current is acquired, P = (10−4)×0.0625 = 0.375MPa is calculated. Then, it is determined whether this pressure value is within the preset normal range of 0.3 to 0.5MPa.

[0041] The third core interlocking parameter is the operating status of the heavy oil circulating pump. The PLC reads the auxiliary contact signal of the heavy oil circulating pump contactor through the digital input module. When the contactor is engaged and the heavy oil circulating pump is operating normally, the auxiliary contact closes, providing a 24V DC high-level signal to the PLC input port; when the heavy oil circulating pump stops or malfunctions, the auxiliary contact opens, and the input port is at a low level. The PLC determines whether this high-level signal persists for more than 30 seconds without interruption during this period, in order to consider the heavy oil circulating pump to be in a stable operating state.

[0042] The PNC determines that the heavy oil preparation conditions are met only when all three conditions are simultaneously satisfied: the heavy oil temperature is between 80℃ and 120℃, the heavy oil pressure is between 0.3 and 0.5 MPa, and the heavy oil circulation pump operation signal remains uninterrupted for 30 seconds. If any condition is not met, the PLC immediately locks the heavy oil valve, prohibits switching operations, continues to maintain stable combustion of light oil, and repeats the judgment every 1 minute until all conditions are met.

[0043] When the heavy oil preparation conditions are met, the control system executes the first switching operation. Specifically, the PLC first sends a closing command to the actuator of the light oil valve via the digital output module (output voltage drops from 24V to 0V), and the light oil valve begins to close. 500 milliseconds after issuing the light oil valve closing command (i.e., the preset first delay), the PLC sends an opening command to the actuator of the heavy oil valve via the digital output module (output voltage rises from 0V to 24V), and the heavy oil valve begins to open. It takes approximately 300 milliseconds for the light oil valve to fully close after receiving the closing command, and approximately 300 milliseconds for the heavy oil valve to fully open after receiving the opening command. Therefore, both valves are in a partially open state simultaneously within a time window of approximately 200 milliseconds, achieving seamless fuel connection. The entire switching process, from issuing the first command to the heavy oil valve fully opening, lasts 3 to 5 seconds. During and after the switching process, the PLC continuously monitors the flame detector signal. If the flame signal is interrupted for more than 1 second, a switchback operation is immediately performed: the heavy oil valve is closed and the light oil valve is reopened, so that the system returns to the light oil safety mode and determines whether the heavy oil preparation conditions are met again after the light oil stable burning time is reached.

[0044] For S102, the specific implementation plan is as follows: During the period when the control system successfully switches to heavy oil mode and operates stably, the PLC continuously executes the unloading condition monitoring and prediction logic. The PLC acquires real-time operating condition data of the ship's unloading operation in the following three ways: First, connect the host computer of the unloading monitoring system via RS485 serial cable, and read the unloading pump operation status register (a value of 1 indicates running, and 0 indicates stopping) and the unloading pump frequency / speed register (unit is revolutions per minute, for example, the rated speed is 1450 revolutions per minute) once per second according to the Modbus RTU communication protocol.

[0045] Second, the analog input module reads the 4-20mA liquid level signal from the radar liquid level sensor installed on the top of the cargo hold. This sensor has a range from 0 meters to the maximum cargo hold height (e.g., 20 meters), and its output current has a linear relationship with the measured liquid level height, with a proportionality coefficient of: (maximum cargo hold height − 0 meters) / (20mA − 4mA) = 20 meters / 16mA = 1.25 meters / mA. This proportionality coefficient is internally stored in the PLC's CPU, and the acquired current value I (in mA) is converted to the actual liquid level height H (in meters) using the following linear formula: H = (I − 4mA) × 1.25 meters / mA. For example, when a 10mA current is acquired, H is calculated to be (10 − 4) × 1.25 = 7.5 meters.

[0046] Third, the PLC's built-in software algorithm uses a 5-minute time window to collect the cargo tank level value once per second and calculates the rate of level drop per unit time. The specific calculation formula is: Level drop rate = (Previous time point level value - Current time point level value) / Time interval. To eliminate the impact of instantaneous fluctuations on calculation accuracy, the system uses a moving average filtering algorithm, that is, it calculates the arithmetic mean of the level drop rate within the previous 5 minutes (a total of 300 sampling points) as the current real-time level drop rate.

[0047] The control system calculates the remaining unloading time based on the three sets of signals mentioned above. The core algorithm logic is as follows: First, the current cargo hold level value (i.e., the current liquid level height) is obtained through the aforementioned cargo hold level sensor. Then, combined with the aforementioned real-time liquid level drop rate, the basic remaining time is calculated. The calculation formula is: Basic remaining time = (Current cargo hold level value - Preset unloading completion level value) / Real-time liquid level drop rate. The preset unloading completion level value is a low threshold value preset according to the ship's cargo hold structure (e.g., the liquid level height value corresponding to 0.5 meters from the bottom of the hold). Unloading is considered complete when the current cargo hold level value drops to this low threshold value.

[0048] Meanwhile, the control system continuously monitors the speed change trend of the unloading pump via an RS485 serial port. The PLC calculates the instantaneous rate of change of the unloading pump speed every 10 seconds using the formula: Speed ​​Change Rate = (Current Speed ​​- Speed ​​10 Seconds Ago) / 10 seconds. The unit is (rpm) / second, representing the change in speed per second. To facilitate comparison with a preset threshold, the PLC converts the above speed change rate into a relative percentage change rate using the formula: Relative Percentage Change Rate = (Speed ​​Change Rate / Current Rated Speed) × 100%, in % / minute. Here, the current rated speed is the standard speed of the unloading pump under design conditions (e.g., 1450 rpm). If a negative relative percentage change rate is detected (i.e., the speed is decreasing), and its absolute value is greater than or equal to 10% / minute (e.g., the unloading pump speed decreases from 100% to below 90% of the rated speed within 1 minute), it is determined that the unloading pump speed is continuously decreasing.

[0049] After calculation and correction, when the remaining time reaches 35 minutes (or another manually calibrated threshold), the control system automatically triggers the second switching operation. The second switching operation is the opposite of the first, switching back from heavy oil mode to light oil mode. Specifically: the PLC first sends a closing command to the actuator of the heavy oil valve via the digital output module (output voltage drops from 24V to 0V), and the heavy oil valve begins to close; 500 milliseconds after issuing the heavy oil valve closing command (i.e., the second delay), the PLC sends an opening command to the actuator of the light oil valve via the digital output module (output voltage rises from 0V to 24V), and the light oil valve begins to open. Similarly, both valves are simultaneously in a partially open state within a time window of approximately 200 milliseconds, achieving a seamless transition.

[0050] After switching to light oil mode, the control system does not immediately shut down but continues to operate in light oil mode, using light oil to purge and replace the residual heavy oil in the fuel lines, burner, and valve assembly. The purge time is 20 minutes by default, which is fixed in the PLC program and starts timing from the moment the light oil valve is fully opened. During the purge, the PLC maintains flame detector monitoring to ensure stable combustion of the light oil. If the flame is accidentally extinguished during the purge, the control system immediately re-executes the light oil ignition start-up procedure until the purge timer is completed or an alarm is triggered after three consecutive ignition failures.

[0051] For S103, the specific implementation scheme is as follows: During the light oil purging mode, the PLC continuously monitors whether the unloading operation has been completed. The control system determines whether unloading is complete based on the following two conditions: First, it reads the unloading pump operation status register of the unloading monitoring system via the RS485 serial port. When the value of this register changes from 1 to 0 and remains there for more than 10 seconds, it is determined that the unloading pump has stopped running. Second, it reads the current cargo tank level value via the cargo tank level sensor. When the current cargo tank level value drops below the preset unloading completion level (e.g., 0.5 meters from the bottom of the tank), it is determined that the cargo tank has been emptied. Meeting either of these two conditions is sufficient to consider the unloading operation complete. The use of "OR" logic prevents misjudgments due to a single sensor malfunction.

[0052] In addition, the control system needs to confirm that the inert gas generator itself no longer needs to operate. The PLC collects the inert gas pressure value through a pressure sensor (installed on the inert gas delivery main). When the inert gas pressure reaches the preset shutdown pressure value (e.g., 0.5 MPa, which is preset according to the ship's inert gas requirements), it determines that the inert gas filling requirement has been met. Only after both the "unloading operation has been completed" and "the inert gas filling requirement has been met" conditions are met can the control system confirm that it is safe to shut down.

[0053] When all the above conditions are met, the control system executes an automatic shutdown command. Specifically, the PLC sends a shutdown command (output voltage drops from 24V to 0V) to the actuator of the light oil valve via the digital output module, cutting off the light oil supply. Simultaneously, it maintains monitoring with the flame detector, waiting for any remaining fuel in the pipeline to burn out. After the light oil valve closes, the PLC continuously monitors the flame detector signal. When the flame signal changes from high to low and remains low for more than 3 seconds, it determines that the flame has been completely extinguished. The PLC then sends stop commands to auxiliary equipment such as the blower and heavy oil circulation pump via the digital output module, putting the entire system into a shutdown standby state. If the flame is not extinguished within 10 seconds after the light oil valve closes, the PLC forcibly cuts off all outputs, triggers an alarm, and records the abnormal event.

[0054] In addition, during the entire operation of the dual-fuel inert gas generator from start-up to shutdown, the control system continuously executes fault diagnosis logic, which runs in parallel with the aforementioned steps without interfering with each other.

[0055] For S301, the implementation principle is as follows: The control system continuously collects various operating parameters involved in the first and second switching operations through the following methods. The sampling frequency is synchronized with the PLC's scanning cycle (default 50 milliseconds per cycle), and the collected data is cached in the PLC's data block register to form a rolling time-series database, retaining historical data from the most recent 30 minutes. The specific operating parameters collected include, but are not limited to, the following six categories: The first category is fuel temperature parameters. The temperature sensor signal on the heavy oil pipeline is read through the analog input module, and the instantaneous temperature value of the heavy oil is collected at a frequency of once every 50 milliseconds.

[0056] The second category is fuel pressure parameters. The pressure sensor signals on the light oil pipeline and heavy oil pipeline are read through the analog input module, and the instantaneous pressure values ​​of light oil and heavy oil are collected at a frequency of once every 50 milliseconds.

[0057] The third category is fuel flow parameters. The PLC reads the signals from the mass flow meter or volume flow meter installed on the fuel pipeline (i.e., light oil pipeline and heavy oil pipeline) through the analog input module. The PLC reads the 4-20mA signals sent by the light oil flow meter and the heavy oil flow meter respectively through the analog input module, and collects the instantaneous flow values ​​of light oil and heavy oil at a frequency of once every 50 milliseconds.

[0058] The fourth category is flame stability parameters. In addition to providing a digital "flame present / no flame" signal, the flame detector can also provide a 0-10V analog signal via its analog output port. The amplitude of this signal is proportional to the flame intensity (e.g., 0V corresponds to no flame, and 10V corresponds to maximum flame intensity). The PLC reads this signal through the analog input module, acquiring the instantaneous flame intensity value every 50 milliseconds, and further calculates the fluctuation range of the flame intensity. That is, within a 1-minute time window, the difference between the maximum and minimum flame intensity values ​​is divided by the average value to obtain the quantitative index of flame stability.

[0059] The fifth category is valve status parameters. Each fuel valve (light oil valve, heavy oil valve) actuator is equipped with a position feedback switch. When the fuel valve is fully open, the feedback switch is closed, providing a 24V high-level signal to the PLC's digital input module; when the fuel valve is not fully open (in a closed or intermediate state), the feedback switch is open, and the input signal is low-level. The PLC collects the position feedback signal of each valve at a frequency of once every 50 milliseconds.

[0060] The sixth category is equipment operating status parameters, including the running / stopping status of the heavy oil circulating pump (acquired through the auxiliary contacts of the contactor), the running / stopping status and speed signal of the unloading pump (read through the RS485 serial port), etc.

[0061] For S302, the implementation principle is as follows: the control system has four preset abnormal operating condition identification rules internally, and each rule corresponds to a set of judgment logic. In each scan cycle, the PLC compares the collected real-time operating parameters with these rules.

[0062] The first abnormal operating condition is valve jamming. The PLC's identification logic is as follows: When the control system issues a valve opening / closing command (for example, sending an opening command to the heavy oil valve via a digital output module), a software timer is immediately started, with a timing duration of 3 seconds. During this 3-second time window, the PLC continuously monitors the position feedback signal corresponding to the valve. If the position feedback signal has not changed by the end of the 3 seconds (i.e., the valve was closed and the feedback signal was low before the command was issued, and the feedback signal is still low within 3 seconds after the command is issued; or the valve was open and the feedback signal was high before the command was issued, and the feedback signal is still high within 3 seconds after the command is issued), then the valve is determined to be jammed.

[0063] The second abnormal operating condition is a precursor to pipeline blockage. The PLC's identification logic is as follows: During the stable operation of the dual-fuel inert gas generator in heavy oil mode (i.e., the period between the completion of the first switching operation and the triggering of the second switching operation), the PLC continuously monitors the trend of fuel flow rate changes. Specifically, it collects the instantaneous heavy oil flow rate every 50 milliseconds, using one minute as a time window, and calculates the average flow rate within that time window. Then, it compares the average flow rate of the current time window with the average flow rate of the previous time window, calculating the flow rate decrease rate using the formula: Flow rate decrease rate = (Average flow rate of the previous time window - Average flow rate of the current time window) / Average flow rate of the previous time window × 100%. Simultaneously, the PLC monitors the heavy oil pressure value and calculates the rate of change between the average pressure value of the current time window and the average pressure value of the previous time window using the formula: Pressure change rate = (Average pressure of the current time window - Average pressure of the previous time window) / Average pressure of the previous time window × 100%.

[0064] If the flow rate decreases by 5% or more per minute (i.e., the flow rate decreases by more than 5% within one minute), while the absolute value of the pressure change rate is less than 2% (i.e., there is no significant pressure change), it is considered a precursor to pipeline blockage. The principle behind this judgment is that when a blockage occurs in the pipeline, fuel flow resistance increases, and the flow rate will continue to decrease even when the pump outlet pressure remains essentially constant. By simultaneously monitoring both flow rate and pressure parameters, it is possible to accurately distinguish between blockage and other fault types such as pump malfunction (where both pressure and flow rate decrease simultaneously) or filter blockage (where pressure decreases significantly but flow rate decreases only slightly).

[0065] The third abnormal operating condition is insufficient heating. The PLC's identification logic is as follows: During operation in heavy oil mode (including the preheating stage after the heavy oil circulation pump starts before the first switching operation, and the continuous combustion stage of heavy oil after the first switching operation), the PLC continuously monitors the heavy oil temperature. If the heavy oil temperature remains below 80℃ (i.e., the lower limit of the aforementioned preset temperature range) for more than 10 minutes, it is determined to be insufficient heating. This abnormal operating condition is usually caused by heater failure, thermostat malfunction, or insufficient flow of the heavy oil circulation pump.

[0066] The fourth abnormal operating condition is ignition failure. The PLC's identification logic includes two sub-cases. Sub-case 1: When the system executes the ignition process (including light oil ignition at startup, light oil ignition after purging, and any re-ignition triggered by flame extinguishing), the PLC counts the number of consecutive ignition failures. The criterion for ignition failure is as described above: no stable flame detector signal is detected within 5 seconds after the ignition command is issued. If two consecutive ignition attempts fail, it is determined to be ignition failure. Sub-case 2: When in a stable combustion state, the PLC continuously monitors the fluctuation range of flame intensity. If, within a 1-minute time window, the fluctuation range of flame intensity (the difference between the maximum and minimum values ​​divided by the average value) exceeds 30% and lasts for more than 1 minute, it is determined to be ignition failure (unstable combustion).

[0067] For S303, when the control system detects any of the above abnormal operating conditions, the PLC immediately executes the following two emergency responses in parallel: triggering an audible and visual alarm and automatically executing the emergency handling operation corresponding to the abnormal operating condition.

[0068] The alarm triggering method can be as follows: The PLC sends a 24V DC drive signal to the audible and visual alarm installed in the engine room control room through the digital output module. The buzzer emits an intermittent "beep-beep-beep" alarm sound, while the red indicator light flashes at a frequency of 1Hz. The alarm signal will continue until the crew manually resets it by pressing the "Alarm Confirmation" button on the operation panel, or the system automatically resets after the abnormal condition is eliminated.

[0069] Emergency response procedures are differentiated according to different abnormal operating conditions as follows: When a valve is identified as stuck, the PLC's emergency response is as follows: immediately close all currently operating fuel valves (including light oil and heavy oil valves) via the digital output module, forcibly switch to light oil safety mode (i.e., keep only the light oil valve open and the heavy oil valve closed to maintain stable light oil combustion), and simultaneously record the time of the fault, the identifier of the faulty valve, and the system operating parameters at the time of the fault into the PLC's fault log memory. If the same valve is identified as stuck three times within 24 consecutive hours, the PLC will automatically execute a higher-level emergency response: stop the entire system (close all fuel valves, fans, and circulation pumps, and cut off all fuel supply), and lock the system until manual maintenance is required before manual reset can be performed by entering the engineer's password on the control panel.

[0070] When an abnormal signal indicating impending pipeline blockage is detected, the PLC's emergency response is as follows: It immediately triggers an audible and visual alarm and displays the message "Warning: Risk of fuel pipeline blockage; filter check recommended" on the human-machine interface (HMI). Simultaneously, the PLC automatically stores key diagnostic data such as the current flow rate decrease and pressure change rate in the fault log. The system does not automatically switch fuel modes but continues operating in the current heavy oil mode to avoid exacerbating blockage or causing other problems due to frequent switching. However, if three consecutive signs of impending blockage are detected within 30 minutes, the PLC automatically performs a preventative switch: closing the heavy oil valve, switching to light oil mode, and flushing the pipeline with light oil.

[0071] When insufficient heating is detected, the PLC's emergency response is as follows: trigger an audible and visual alarm, automatically lock the heavy oil valve, and prohibit the first switching operation (if the system has not yet switched to heavy oil mode) or immediately switch back from heavy oil mode to light oil mode (if the system is already in heavy oil mode). After the system switches to light oil safety mode, the PLC displays the message "Heavy oil heating fault, switched to light oil mode, please check the heating system" on the human-machine interface. The system continues to operate in light oil mode until the crew troubleshoots the heating fault and manually triggers a re-switching via the control panel.

[0072] When an ignition failure is detected, the PLC's emergency response is as follows: Depending on the specific sub-situation, the response will differ. In sub-situation one (two consecutive ignition failures), the PLC automatically performs a third ignition attempt. Before the third ignition, a furnace purging operation is performed (the blower is turned on, the fuel valve is closed, and purging for 30 seconds to remove unburned fuel gas from the furnace), and then ignition is attempted again. If the third ignition still fails, an alarm is triggered, all fuel supply is cut off, and the system stops operating. In sub-situation two (unstable combustion), the PLC first attempts to adjust combustion parameters: an adjustment signal is sent to the damper actuator via the analog output module to increase or decrease the combustion air volume (each adjustment increment is 5%), while monitoring changes in flame stability indicators. If flame stability returns to normal after adjustment (fluctuation amplitude drops below 15%), the current operation is maintained; if the flame remains unstable after three consecutive adjustments, a fuel mode switch is performed: if the current mode is heavy oil, it switches to light oil mode; if the current mode is light oil, it remains in light oil mode and triggers an alarm requesting manual inspection of the burner nozzle.

[0073] Each time an abnormal operating condition is detected, the PLC automatically stores the following information in the built-in non-volatile memory's fault log table: the system time (accurate to the second) when the abnormality occurred, the type of abnormality (valve jamming / precursor blockage / insufficient heating / poor ignition), a snapshot of key operating parameters at the time of the abnormality (including heavy oil temperature, heavy oil pressure, heavy oil flow rate, light oil flow rate, flame intensity, valve status, etc.), the emergency handling operations taken by the system (mode switching / alarm / shutdown, etc.), and the subsequent handling results of the operators (manual reset / maintenance records, etc.). This fault log can be exported via the USB interface on the operation panel for post-event analysis and maintenance tracing by crew members or shore-based technicians.

[0074] Optionally, the step of "predicting the remaining time for unloading based on the real-time operating data" in S102 specifically includes the following sub-steps: S1021, acquire at least two signals from the real-time operating data, including the unloading pump speed and cargo tank level signal; S1022, calculate the remaining time for unloading to end based on different signals, obtain at least two independent basic remaining time estimates, and calculate the deviation between the basic remaining time estimates; S1023, when the deviation is not greater than the first preset deviation threshold, the estimated values ​​of each basic remaining time are fused and calculated to obtain the final remaining time; S1024, when the deviation is greater than the first preset deviation threshold and not greater than the second preset deviation threshold, the remaining time is calculated by weighting and correcting each basic remaining time estimate according to the changing trend of the unloading pump speed and then merging the calculations to obtain the final remaining time. S1025, when the deviation is greater than the second preset deviation threshold, it is determined that there is an abnormal data source in the real-time operating data, an alarm is triggered, and a final remaining time is selected from each basic remaining time estimate according to the preset priority.

[0075] In implementation, in the aforementioned step S102, the control system predicts the remaining time for unloading based on real-time operating data. To improve prediction accuracy and avoid misjudgments caused by a single sensor failure, this embodiment provides a multi-signal fusion method for predicting the remaining time. This method, as a specific implementation of step S102, includes the following sub-steps S1021 to S1025.

[0076] For S1021, the PLC of the control system acquires the unloading operation status signals in real time through the following two independent data channels: The first signal is the unloading pump speed signal. As mentioned earlier, the PLC reads the value of the unloading pump speed register in the host computer of the unloading monitoring system once per second via an RS485 serial port, according to the Modbus RTU communication protocol. The value of this register is in revolutions per minute (rpm), representing the real-time speed of the unloading pump. For example, if the rated speed is 1450 rpm, the current reading is 1300 rpm.

[0077] The second signal is the cargo hold level signal. As mentioned earlier, the PLC reads the 4-20mA current signal from the radar level sensor installed on the top of the cargo hold via the analog input module, and converts it into a cargo hold level height value in meters using a linear conversion formula (see above). For example, the currently calculated cargo hold level height is 7.5 meters.

[0078] In this embodiment, the PLC acquires at least two of the two signals mentioned above. In practical applications, a third signal (such as the current consumption signal of the unloading pump or the flow signal of the unloading pipeline) can be added as needed. This embodiment uses two signals as an example for explanation.

[0079] For S1022, the PLC independently calculates the remaining time after unloading based on the two signals mentioned above, and obtains two basic remaining time estimates.

[0080] The method for calculating the basic remaining time estimate based on the cargo hold level signal is as follows: The PLC uses the same method as described above, with a 5-minute time window, collecting the cargo hold level value once per second, and calculating the real-time level drop rate. Let the current cargo hold level be H_current (in meters), the average level drop rate in the previous 5 minutes be R_level (in meters per minute), and the preset unloading completion level be H_end (for example, 0.5 meters from the bottom of the hold, i.e., H_end = 0.5 meters). Then, the formula for calculating the basic remaining time T_level based on the level signal is: T_level = (H_current − H_end) / R_level. For example: if the current cargo hold level is 7.5 meters, the preset unloading completion level is 0.5 meters, and the real-time level drop rate is 0.5 meters per minute, then T_level = (7.5 − 0.5) / 0.5 = 7 / 0.5 = 14 minutes.

[0081] The method for calculating the remaining time estimate based on the unloading pump signal is as follows: The PLC reads the real-time rotational speed of the unloading pump via the RS485 serial port, and simultaneously obtains the rated rotational speed of the unloading pump and the preset total unloading volume (expressed as liquid level or obtained from the unloading monitoring system). This embodiment adopts an indirect estimation method based on rotational speed: its physical principle is that, under the condition that the cross-sectional area of ​​the cargo hold is approximately constant, the unloading rate (meters / minute) is directly proportional to the rotational speed of the unloading pump (revolutions / minute). The standard unloading rate R_standard at full rotational speed is obtained by calibration from ship design parameters or historical operation data. For example, it can be obtained by fitting actual data from multiple unloading operations: when the unloading pump runs at the rated rotational speed S_rated, the average unloading rate is 0.8 meters / minute, then R_standard is taken as 0.8. Let the current rotational speed be S_current (in revolutions per minute), the rated rotational speed be S_rated (e.g., 1450 revolutions per minute), and the standard unloading rate at full rotational speed be R_standard (in meters per minute). The difference between the current cargo tank level H_current and the preset unloading completion level H_end is the remaining unloading level. Then, the formula for calculating the basic remaining time T_speed based on the rotational speed signal is: T_speed = (H_current − H_end) / (R_standard × S_current / S_rated); where S_current / S_rated is a relative rotational speed value used to correct the standard unloading rate. For example, suppose the current cargo hold level is 7.5 meters, the preset unloading completion level is 0.5 meters, the standard unloading rate is 0.8 meters / minute, the current rotation speed is 1300 rpm, and the rated rotation speed is 1450 rpm. Then the relative rotation speed is 1300 / 1450≈0.8966, and the corrected actual unloading rate is 0.8×0.8966≈0.7173 meters / minute. Therefore, T_speed=(7.5−0.5) / 0.7173≈6.98 / 0.7173≈9.76 minutes.

[0082] After the PLC calculates the two basic remaining time estimates, it calculates the absolute deviation between them. Let the deviation be ΔT, and the calculation formula is: ΔT=|T_level−T_speed|; continuing the previous example: T_level = 14 minutes, T_speed≈9.76 minutes, then ΔT=|14−9.76|=4.24 minutes.

[0083] For the S1023, the PLC has two built-in preset deviation thresholds: a first preset deviation threshold (e.g., 3 minutes) and a second preset deviation threshold (e.g., 8 minutes). These two thresholds are stored in the PLC's retention register and can be manually calibrated according to the ship's sensor accuracy and operational characteristics.

[0084] When ΔT ≤ the first preset deviation threshold (i.e., ΔT ≤ 3 minutes), it is determined that the two basic remaining time estimates are in good agreement, and both sensors are in normal working condition. At this time, the PLC performs a fusion calculation on the two estimates to obtain the final remaining time T_final. The fusion calculation uses the arithmetic mean method, and the calculation formula is: T_final = (T_level + T_speed) / 2; for example: if T_level = 14 minutes and T_speed = 13 minutes, then ΔT = 1 minute ≤ 3 minutes, T_final = (14 + 13) / 2 = 13.5 minutes.

[0085] Regarding S1024, when the first preset deviation threshold < ΔT ≤ the second preset deviation threshold (i.e., 3 minutes < ΔT ≤ 8 minutes), it is determined that there is a certain deviation between the two basic remaining time estimates, but the deviation is still within an acceptable range. At this time, the PLC determines the weight allocation of the two estimates based on the changing trend of the unloading pump speed signal. As mentioned earlier, the PLC determines the changing trend of the unloading rate by calculating the relative percentage change rate of the unloading pump speed. The judgment logic is as follows: If the unloading pump speed signal shows that the speed is continuously decreasing (i.e., the relative percentage change rate is negative and the absolute value is ≥10% / minute), it indicates that the unloading rate is increasing (a decrease in pump speed usually means a decrease in unloading resistance or an increase in the opening of the cargo hold outlet valve, and the actual unloading rate may actually increase). In this case, T_level based on the liquid level signal is more valuable than T_speed based on the speed signal, so T_level is given a higher weight.

[0086] If the unloading pump speed signal shows that the speed is stable or increasing, it indicates that the unloading rate is stable or slowing down. In this case, the two estimated values ​​are equally reliable, and equal weight fusion is adopted.

[0087] The specific calculation formula for weighted fusion is: T_final = w × T_level + (1 − w) × T_speed. Wherein, the weight coefficient w is dynamically calculated based on the magnitude of the deviation. This embodiment uses a linear weight allocation method: w = 0.5 + (ΔT − first threshold) / (second threshold − first threshold) × 0.3, meaning the value of w ranges from 0.5 to 0.8. When ΔT is close to the first threshold, w is close to 0.5 (equal weight); when ΔT is close to the second threshold, w is close to 0.8 (T_level dominates).

[0088] If the unloading pump speed is stable or increasing, it indicates that the unloading rate is stable or slowing down. In this case, the two estimates are of equal reliability, and an equal-weighted fusion is used, i.e., w = 0.5. For example: Let T_level = 14 minutes, T_speed = 9.76 minutes, ΔT = 4.24 minutes, the first threshold be 3 minutes, and the second threshold be 8 minutes. Then ΔT − first threshold = 1.24 minutes, second threshold − first threshold = 5 minutes, so w = 0.5 + (1.24 / 5) × 0.3 = 0.5 + 0.0744 = 0.5744. If the unloading pump speed signal shows a continuous decrease (α is negative and its absolute value is ≥10% / minute), then the above weighted formula is used: T_final = 0.5744 × 14 + 0.4256 × 9.76 = 8.0416 + 4.1539 = 12.1955 minutes, approximately 12.2 minutes. If the unloading pump speed is stable, then equal-weighted fusion is used: T_final = (14 + 9.76) / 2 = 11.88 minutes.

[0089] For S1025, when ΔT > the second preset deviation threshold (i.e., ΔT > 8 minutes), a serious inconsistency is determined between the two basic remaining time estimates, indicating that at least one data source (level sensor or speed signal acquisition channel) is abnormal. At this time, the PLC determines that the real-time operating data has an abnormal data source. The PLC immediately performs the following operations: First, trigger an alarm for abnormal data source. The PLC sends a drive signal to the audible and visual alarm through the digital output module, emitting an alarm sound at a different frequency than a regular alarm (e.g., 3 rapid pulses per second). At the same time, the human-machine interface on the control panel displays the message "Warning: Unloading condition data is inconsistent. Please check the level sensor and speed signal."

[0090] Second, according to the preset priority, one of the two basic remaining time estimates is selected as the final remaining time T_final. The preset priority is dynamically determined based on the historical reliability of the sensors in this operation. The default priority is: cargo tank level signal takes precedence over unloading pump speed signal, because the level signal directly reflects the actual amount of cargo remaining in the cargo tank, while the speed signal is an indirectly estimated value. That is, T_level is selected as T_final.

[0091] Third, the PLC records this data source anomaly event in the fault log, including the time of the anomaly, two basic remaining time estimates, the magnitude of the deviation, and the final selected estimate, for later maintenance and traceability. For example: if T_level = 14 minutes and T_speed = 5 minutes, then ΔT = 9 minutes > 8 minutes. The PLC determines the data source is abnormal, triggers an alarm, and selects T_level = 14 minutes as the final remaining time T_final according to priority, while marking T_speed = 5 minutes as suspicious data.

[0092] After processing through sub-steps S1021 to S1025, the PLC obtains the final remaining time T_final. Then, as described in step S102 above, the PLC compares T_final with a preset advance switching threshold (default 35 minutes). When T_final ≤ 35 minutes, a second switching operation is triggered, executing the switch from heavy oil mode to light oil mode and subsequent purging process. This multi-signal fusion prediction method, by introducing deviation grading and weighted correction mechanisms, effectively avoids misjudgments caused by single sensor failures, significantly improving the accuracy of remaining time prediction and the reliability of system operation. Even when a single sensor malfunctions, the system can still obtain a usable remaining time estimate through a priority selection mechanism, ensuring the continuity of unloading operations.

[0093] Optionally, the control method may also include the following steps: S401, acquire historical unloading operation data of the ship, classify the operation mode according to unloading rate, cargo hold capacity and cargo type, establish an optimized switching parameter set corresponding to different operation modes, and the optimized switching parameter set shall include at least the optimized advance switching threshold. S402, When the current unloading operation begins, identify the current operation mode, select an advance switching threshold that matches the current operation mode from the optimized switching parameter set, and use it as the advance switching threshold for comparison with the remaining time in this unloading operation. S403, during and after the current unloading operation, record the actual time difference between each triggering of the second switching operation and the actual receipt of the unloading operation completion signal. Based on the error between the actual time difference recorded multiple times and the advance switching threshold used in this operation, dynamically update and optimize the advance switching threshold corresponding to the current operation mode in the switching parameter set, for use in subsequent unloading operations of the same type of operation mode.

[0094] In implementation, in step S102, the control system compares a preset advance switching threshold (default 35 minutes) with the predicted remaining time. When the remaining time reaches the threshold, a second switching operation is triggered. However, different types of unloading operations (such as different cargo types, different cargo hold capacities, and different unloading rates) have different optimal values ​​for the advance switching threshold, and even the same type of operation may deviate due to various factors during actual execution. Therefore, this embodiment provides an adaptive optimization method for switching parameters. This method uses machine learning principles, namely "pattern recognition + closed-loop feedback," to enable the system to automatically optimize the value of the advance switching threshold based on historical operational experience, becoming more accurate with use. This method, as a further limitation on the "preset advance switching threshold" mentioned in step S102, includes the following sub-steps S401 to S403.

[0095] For S401, after the system is put into use for the first time or after a loading and unloading operation is completed, the control system establishes and updates the switching parameter set in the following ways.

[0096] The PLC communicates with the ship's unloading monitoring system's host computer via an RS485 serial port. Following the Modbus RTU communication protocol, it reads historical data from each unloading operation in an event-triggered manner. After each unloading operation, the host computer packages and sends the relevant data to the PLC, or the PLC actively sends a data request command to the host computer, which then returns the data. The acquired historical data includes, but is not limited to: the total duration of the unloading operation, the average speed and speed variation curve of the unloading pump, the initial and final liquid levels in the cargo hold, the cargo hold capacity, and the type of cargo transported (such as crude oil, refined oil, liquefied gas, etc.; this information can be manually entered by the crew through the human-machine interface on the control panel or automatically obtained from the host computer).

[0097] The PLC has a built-in operation mode classifier that categorizes unloading operations into different modes based on historical data. The classification is based on the following three dimensions: The first dimension is the unloading rate. The unloading rate refers to the height by which the liquid level in the cargo hold drops per unit time, measured in meters per minute (m / min). The PLC divides the unloading rate into three levels: fast unloading (unloading rate ≥ 0.6 m / min), medium-speed unloading (0.3 m / min ≤ unloading rate < 0.6 m / min), and slow unloading (unloading rate < 0.3 m / min). The aforementioned thresholds of 0.6 m / min and 0.3 m / min are preset default values ​​based on the unloading operation experience of typical large oil tankers (deadweight tonnage between 100,000 and 300,000 tons). In actual operation, the crew can manually calibrate these thresholds through the human-machine interface on the control panel according to the ship's actual unloading capacity and historical operation data to adapt to different ship types and operating conditions.

[0098] The second dimension is cargo hold capacity. Cargo hold capacity refers to the total capacity of the cargo holds involved in this unloading operation, expressed in cubic meters or liquid level. PLC divides cargo hold capacity into two categories: large cargo holds (capacity ≥ 50,000 cubic meters) and small cargo holds (capacity < 50,000 cubic meters).

[0099] The third dimension is cargo type. The cargo type is manually selected by the crew through the human-machine interface on the control panel, and includes, but is not limited to: crude oil, refined oil products (gasoline, diesel), liquefied natural gas, and liquefied petroleum gas. If the crew does not select the cargo type within 5 minutes of the start of the unloading operation, the PLC will automatically display a prompt window requiring selection; if the crew still does not respond, the system will default to "crude oil" as the cargo type for this operation. This default value can be preset in the system configuration according to the ship's main cargo types. In addition, the system can also automatically obtain cargo type information from the host computer of the unloading monitoring system via RS485 serial port (if the host computer stores this information), achieving automatic identification.

[0100] The PLC combines the three dimensions mentioned above to form different operating mode codes. For example, "fast unloading + large cargo hold + crude oil" corresponds to one operating mode, while "slow unloading + small cargo hold + refined oil" corresponds to another. Each operating mode corresponds to a record in the PLC's data block register, which stores the optimized switching parameter set for that mode.

[0101] The optimized switching parameter set includes at least the optimized advance switching threshold (denoted as T_opt) for this operating mode. When the system is first put into use and no historical data has been accumulated, the T_opt for all operating modes is initialized to a default value (e.g., 35 minutes). This optimized switching parameter set is stored in the PLC's persistent non-volatile memory (such as the standard memory card of Siemens S7-1500 series PLCs), and will not be lost even if the system is powered off. Internally, the PLC assigns a unique identifier to each operating mode (e.g., mode ID is 1, 2, 3, etc.) and stores the corresponding T_opt value through an array structure in the data block (DB block).

[0102] For S402, when a new unloading operation begins, the control system executes the current operation mode identification process simultaneously with or before executing step S101 (power-on). The PLC obtains three-dimensional parameters for this operation in the following ways: First, the human-machine interface on the control panel prompts the crew to input or confirm the type of cargo for this operation. The crew selects options such as "crude oil," "refined oil," and "liquefied gas" via the touchscreen, and the PLC stores the corresponding numerical codes in the data block register.

[0103] Second, the PLC obtains the cargo hold capacity parameters for this operation from the host computer of the unloading monitoring system. The PLC sends a Modbus command to read the cargo hold parameters via the RS485 serial port, and the host computer returns the current rated capacity value of the cargo hold (expressed in cubic meters or liquid level). The PLC stores this value in the data block register.

[0104] Third, within the first 10 minutes after the start of unloading operations, the PLC monitors the rate of decrease in the cargo tank level in real time using the aforementioned level sensor and calculates the average unloading rate over the first 10 minutes. This average rate is used as a real-time estimate of the unloading rate for the current operation to determine whether it is a fast, medium, or slow unloading operation. It's important to note that 10 minutes is chosen as the recognition window for two reasons: firstly, 10 minutes is long enough to eliminate level fluctuations caused by transient processes such as pump startup and valve opening during the initial unloading phase, resulting in a relatively stable average unloading rate; secondly, 10 minutes is also short enough to complete pattern recognition before it has a substantial impact on the unloading operation (i.e., there is still ample unloading time remaining), allowing sufficient time for subsequent switching decisions. The length of this time window can be manually calibrated via the human-machine interface on the control panel to adapt to the unloading characteristics of different vessels.

[0105] The PLC determines the mode code for this operation based on the values ​​of the three parameters mentioned above. For example, if the average unloading rate in the first 10 minutes is detected to be 0.7 meters per minute (which is considered rapid unloading), the cargo hold capacity is 60,000 cubic meters (which is considered a large cargo hold), and the cargo type is crude oil, then the mode code is "rapid + large + crude oil".

[0106] The PLC searches for the corresponding record in the data block array of the optimized switching parameter set according to the mode encoding, and reads the optimized early switching threshold T_opt stored in the record. For example, if T_opt corresponding to the "fast + large + crude oil" mode is 32 minutes, the PLC assigns this value to the early switching threshold variable (denoted as T_threshold) for this operation, which is used for the remaining time comparison in the subsequent step S102.

[0107] If the mode code for this operation does not exist in the optimization switching parameter set (for example, when encountering a new mode for the first time), the PLC will automatically create a new record for that mode and initialize T_opt to the default value of 35 minutes.

[0108] For S403, during and after the unloading operation, the control system records the actual execution effect and uses this effect data to dynamically update the optimization switching parameters, forming a closed loop of "execution-feedback-optimization". In this unloading operation, when the predicted remaining time T_final in step S102 first reaches the early switching threshold T_threshold for this operation, the PLC triggers the second switching operation (switching to light oil mode and starting purging). At the moment the second switching operation is triggered, the PLC records the system time at that time, denoted as Time_switch. Subsequently, when the control system detects the unloading operation completion signal in step S103 (the unloading pump stops running and the cargo tank level drops to the preset low threshold), the PLC records the system time at this time, denoted as Time_finish. The PLC calculates the actual time difference Δt_actual between triggering the second switching operation and the completion of the actual unloading operation. The calculation formula is: Δt_actual = Time_finish − Time_switch; for example, if Time_switch is 14:00:00 and Time_finish is 14:28:30, then Δt_actual = 28.5 minutes.

[0109] The PLC calculates the error value, Error, between the advance switching threshold T_threshold used in this operation and the actual time difference Δt_actual. The formula is: Error = Δt_actual − T_threshold. Continuing the previous example: T_threshold = 32 minutes, Δt_actual = 28.5 minutes, then Error = 28.5 − 32 = −3.5 minutes. A negative error indicates that the actual unloading completion time was 3.5 minutes earlier than expected, suggesting that the current advance switching threshold is too high (i.e., the switching is too early), and the threshold should be appropriately reduced.

[0110] The PLC combines the error value Error of the current operation with historical error data, and uses statistical analysis of historical error sequences to dynamically update and optimize the early switching threshold T_opt corresponding to the current operation mode in the switching parameter set.

[0111] The specific update method is as follows: The PLC maintains an error queue for each job mode in the data block. This queue stores the error values ​​of the most recent 10 jobs. After each job is completed, the PLC pushes the Error value of this job into the queue. If the queue length exceeds 10, the oldest record is removed. Then, the PLC calculates the weighted moving average of all error values ​​in the queue. The calculation formula is: Error_avg=(Error_1×w_1+Error_2×w_2+…+Error_n×w_n) / (w_1+w_2+…+w_n); where the error weight of the most recent job is the highest, and the weight of errors older in history is lower. This embodiment uses the exponentially weighted moving average algorithm, and its equivalent calculation formula is: Error_avg_new=α×Error_current+(1−α)×Error_avg_old. Where Error_current is the error value of the current operation, Error_avg_old is the historical cumulative average error before the current operation (i.e., the average error value updated and stored after the last operation), and Error_avg_new is the average error value updated after the current operation. α is the learning rate (or smoothing coefficient), ranging from 0 to 1. In this embodiment, α is set to 0.3, indicating that the error of the current operation accounts for 30% of the weight, and the historical cumulative error accounts for 70% of the weight. The value of α can be manually calibrated according to the ship's operation frequency and the system's sensitivity to parameter changes: the larger the value of α, the more sensitive the system is to the error of a single operation, suitable for ships with high operation frequency; the smaller the value of α, the stronger the system's resistance to random errors, suitable for ships with low operation frequency. For the first operation of a certain operation mode (i.e., there is no historical error record for this mode), the initial value of Error_avg_old is set to 0. At this time, Error_avg_new = α × Error_current, that is, the error of the first operation is directly used as the average error.

[0112] The PLC adjusts the early switching threshold T_opt corresponding to the current operation mode based on the updated average error Error_avg. The adjustment formula is: T_opt_new = T_opt_old + K × Error_avg; where K is the adjustment coefficient, which is 1.0 in this embodiment, indicating full compensation for the error. If the average error is negative (actual unloading is earlier), then T_opt_new is smaller than T_opt_old (reducing the early switching threshold and delaying the switch); if the average error is positive (actual unloading is delayed), then T_opt_new is larger than T_opt_old (increasing the early switching threshold and switching earlier). Continuing the previous example: Suppose that the current T_opt_old for the "fast + large + crude oil" mode is 32 minutes, the historical cumulative average error Error_avg_old is −2 minutes, and the current operation error Error_current is −3.5 minutes. According to the exponentially weighted moving average formula, Error_avg_new = 0.3 × (−3.5) + 0.7 × (−2) = −1.05 + (−1.4) = −2.45 minutes.

[0113] Then, according to the corrected formula, T_opt_new = 32 + 1.0 × (−2.45) = 29.55 minutes. The PLC rounds this value to one decimal place, updates it to 29.6 minutes, and stores it in the T_opt field of the "Fast + Large + Crude Oil" mode in the optimized switching parameter set.

[0114] The updated T_opt value will be used in the next unloading operation of the same type ("fast + large + crude oil"). When the next operation begins, step S402 will read this optimized threshold (29.6 minutes) as the early switch threshold for this operation. As the number of operations increases, the error queue gradually accumulates, and the T_opt value will gradually converge to the optimal value for this type of operation, so that the system achieves the best balance between "early switch to prevent congestion" and "avoiding economic losses caused by premature switchover".

[0115] If, during a given operation, the absolute value of the deviation between the actual time difference Δt_actual and the advance switching threshold T_threshold exceeds the preset maximum allowable deviation threshold (15 minutes in this embodiment, approximately 40% of the advance switching threshold of 35 minutes, effectively identifying data anomalies caused by unloading interruptions, sensor malfunctions, or human intervention), the PLC determines that the operation has an anomaly (such as an interruption during unloading, a sensor malfunction leading to severely inaccurate predictions, or manual intervention by the crew). The system automatically discards this error and does not participate in the update calculation of the optimized switching parameters. The PLC simultaneously records this anomaly in the fault log and displays a message on the HMI stating, "This unloading operation data is abnormal and has not been included in self-learning optimization. Please check the operation process." Crew members can also manually view and modify the T_opt value for any operation mode in the optimized switching parameter set through the HMI on the operation panel. When crew members find that the system's self-learning optimization results do not meet actual needs, they can manually input a new threshold. The PLC stores this value in the corresponding mode record and reinitializes the error queue for that mode, allowing the system to restart self-learning with the new parameters.

[0116] The above is the complete process of adaptively optimizing switching parameters. Based on the optimized advance switching threshold, the system can further combine gradual switching control (see subsequent embodiments) and multi-objective decision optimization (see subsequent embodiments) to achieve more refined switching control.

[0117] Optionally, the second switching operation includes: Obtain the characteristic parameters of the fuel pipeline of the dual-fuel inert gas generator. The characteristic parameters of the fuel pipeline include at least the pipeline length and the internal volume of the pipeline. Based on the characteristic parameters of the fuel pipeline, a gradual switching curve is determined, which defines the fuel transition relationship during the process of switching from heavy oil mode to light oil mode. A gradual switching curve is implemented, gradually reducing the supply of heavy fuel oil while simultaneously increasing the supply of light fuel oil to maintain a constant total fuel supply. When the heavy oil supply drops to the preset lower limit, the heavy oil valve is completely closed, and light oil is supplied independently and the system continues to operate for the preset purging time; the preset lower limit is 0.

[0118] The gradual switching curve is a non-linear transition curve. Its slope is smaller in the initial stage of switching, larger in the middle stage of switching, and smaller again in the final stage of switching, forming an S-shaped transition pattern. The total duration of the gradual switching curve is dynamically calculated based on the pipeline length and internal volume in the fuel pipeline characteristic parameters to maintain a positive flow velocity in the fuel pipeline. During the execution of the gradual switching curve, the flame stability parameters are monitored in real time. When the flame stability parameters are lower than the preset threshold, the execution speed of the gradual switching curve is automatically slowed down, and execution continues after the flame recovers and stabilizes.

[0119] In implementation, in step S102, when the remaining time T_final predicted by the control system reaches the early switching threshold T_threshold, a second switching operation is triggered, i.e., switching from heavy oil mode to light oil mode and starting purging. However, the traditional step-by-step switching (first completely closing the heavy oil valve, then completely opening the light oil valve) can cause an interruption or violent fluctuation in fuel supply at the moment of switching, which may lead to flame extinguishing or unstable combustion. Therefore, this embodiment provides a gradual switching method, the basic scheme of which includes the following steps: Before performing the second switching operation, the control system's PLC first reads the fuel line characteristic parameters pre-stored in the data block register. These parameters are entered by the engineer during the initial system installation and commissioning, or modified via the human-machine interface on the control panel during subsequent maintenance. The fuel line characteristic parameters include, but are not limited to, the following: Pipe length L_pipe: The total length of the fuel pipeline from the heavy oil valve outlet to the burner inlet, in meters. The preset value in this embodiment is 15 meters.

[0120] Pipe inner diameter D_pipe: The inner diameter of the fuel pipeline, in millimeters. The preset value in this embodiment is 20 millimeters.

[0121] The internal volume of the pipeline, V_pipe, is calculated based on the pipeline length and inner diameter. The formula is V_pipe = π × (D_pipe / 2)² × L_pipe. In this embodiment, V_pipe = 3.1416 × (0.01 m)² × 15 m ≈ 0.00471 cubic meters, or approximately 4.71 liters.

[0122] Heavy oil viscosity reference value: kinematic viscosity of heavy oil at a heating temperature of 80°C, in centistokes (cSt). The preset value in this embodiment is 150 cSt.

[0123] Among the parameters mentioned above, the pipe length L_pipe and the pipe inner diameter D_pipe are the basis for calculating the internal volume of the pipe. The internal volume of the pipe directly affects the determination of the total switching time. The larger the volume, the longer the switching time is required to ensure that there is always fuel flowing in the pipe and to prevent heavy oil from adhering to the pipe wall in a static state.

[0124] Based on the acquired fuel pipeline characteristic parameters, the PLC determines a gradual switching curve. This curve defines the relationship between the heavy fuel supply and light fuel supply over time during the switch from heavy fuel mode to light fuel mode. Specifically, the gradual switching curve is a time function. For each time point t after the start of the switch (0 ≤ t ≤ T_total, where T_total is the total switching time), this function specifies the opening percentage R_heavy(t) of the heavy fuel valve and the opening percentage R_light(t) of the light fuel valve, satisfying the following constraint: R_heavy(t) + R_light(t) = 100%. That is, at any given time, the sum of the total openings of the two valves (i.e., the heavy fuel valve and the light fuel valve) is always 100%, thereby ensuring that the total fuel supply entering the burner remains constant and preventing the flame from extinguishing due to sudden changes in the total fuel supply.

[0125] The gradual switching curve can adopt a linear transition method, that is, the opening of the heavy oil valve decreases linearly from 100% to 0%, while the opening of the light oil valve increases linearly from 0% to 100%. Let the total switching time be T_total (unit: seconds), then the mathematical expression for the linear transition is: R_heavy(t)=100%×(1−t / T_total); R_light(t) = 100% × (t / T_total); where t is the time elapsed since the start of the switch, and its value ranges from 0 to T_total.

[0126] Once the control system confirms that the switching conditions are met, the PLC begins to execute the gradual switching curve. The execution method is as follows: the PLC calculates the target values ​​of R_heavy(t) and R_light(t) based on the current time t at a frequency of once every 50 milliseconds, and then sends a 4-20mA control current signal to the actuators of the heavy oil valve and the light oil valve through the analog output module. This signal linearly corresponds to the valve opening percentage (4mA corresponds to 0% opening, and 20mA corresponds to 100% opening). For example, if the total switching time T_total = 60 seconds and the current time t = 20 seconds, then R_heavy(20) = 100% × (1 − 20 / 60) = 100% × 2 / 3 ≈ 66.7%, and R_light(20) = 100% × (20 / 60) ≈ 33.3%. The current value sent by the PLC to the heavy oil valve actuator is: 4mA + (20mA - 4mA) × 66.7% = 4mA + 16mA × 0.667 ≈ 14.67mA; the current value sent to the light oil valve actuator is: 4mA + 16mA × 33.3% ≈ 9.33mA.

[0127] The PLC continues to perform the above calculations and outputs until t reaches T_total. During this period, the supply of heavy fuel oil gradually decreases, while the supply of light fuel oil increases simultaneously, keeping the total fuel supply constant.

[0128] When the total switching time T_total is reached, R_heavy(T_total) = 0%, R_light(T_total) = 100%. At this time, the heavy oil supply has dropped to the preset lower limit (i.e., 0%). The PLC sends a complete shut-off command (output 0V or 4mA) to the heavy oil valve through the digital output module to ensure that the heavy oil valve is completely closed, while keeping the light oil valve in a fully open state (output 24V or 20mA). Then, as described in step S102 above, the control system continues to run in light oil mode for a preset purging time (default 20 minutes), using light oil to purge and replace the residual heavy oil in the fuel pipeline, burner, and valve assembly. After the purging timer is completed, the control system waits for the unloading operation completion signal to execute automatic shutdown.

[0129] Furthermore, based on the aforementioned basic scheme, this embodiment adopts an S-shaped nonlinear transition curve, whose slope is smaller in the initial stage of switching, larger in the middle stage of switching, and smaller again at the end of switching, forming a "gradual-fast-gradual" transition pattern. The physical principle and design intent of the S-shaped curve are as follows: Initial switching phase (slow): When switching begins, the flame has not yet adapted to the addition of light oil. Therefore, a slower rate of change is used to allow the flame to gradually adapt to the increase in light oil components, avoiding unstable combustion caused by the sudden addition of light oil.

[0130] Mid-stage (fast) switching: After the flame has adapted to the mixed fuel, the switching speed can be accelerated, the time of the entire switching process can be shortened, and the chance of heavy oil adhering statically in the pipeline can be reduced.

[0131] End of switch (slow): When the heavy oil is about to be completely shut off, slow down again to ensure that the flame has fully adapted to pure light oil combustion before the heavy oil valve is completely closed, and avoid the flame from going out due to the sudden interruption of heavy oil.

[0132] This embodiment uses an S-curve generation method based on the cosine function. Let the total switching time be T_total (unit: seconds), and define the normalized time parameter τ = t / T_total, where τ ranges from 0 to 1. Then, the S-curve expression for the heavy oil valve opening percentage R_heavy(t) is: R_heavy(τ)=100% ×(1−S(τ)); Where S(τ) is a sigmoid function, and the following formula is used in this embodiment: S(τ) = 0.5 × [1 − cos(π × τ)] The function S(0)=0 at τ=0 and S(1)=1 at τ=1, and its first derivative (slope) is 0 at τ=0 and τ=1, reaching its maximum value at τ=0.5. Therefore, the corresponding heavy oil valve opening curve is: R_heavy(τ)=100%×(1−0.5×[1−cos(π×τ)])=100%×0.5 ×[1+cos(π×τ)].

[0133] The percentage of light oil valve opening is R_light(τ) = 100% − R_heavy(τ) = 100% × 0.5 × [1 − cos(π × τ)].

[0134] For example, if T_total = 60 seconds, then: At τ=0.1 (t=6 seconds), cos(π×0.1)=cos(18°)=0.9511, R_heavy=100%×0.5×(1+0.9511)=97.6%, R_light=2.4%; At τ=0.5 (t=30 seconds), cos(π×0.5)=cos(90°)=0, R_heavy=100%×0.5×(1+0)=50%, R_light=50%; At τ=0.9 (t=54 seconds), cos(π×0.9)=cos(162°)=−0.9511, R_heavy =100%×0.5×(1−0.9511)=2.4%, R_light=97.6%.

[0135] It is evident that the valve opening changes slowly during the initial (0-6 seconds) and final (54-60 seconds) phases of the switching process, but rapidly during the middle (6-54 seconds). This reflects the S-shaped transition pattern of "slow-fast-slow".

[0136] However, this embodiment is further optimized: T_total is not a fixed value, but is dynamically calculated based on the pipeline length and internal volume in the fuel pipeline characteristic parameters. The purpose is to ensure that a positive flow velocity is maintained within the fuel pipeline throughout the entire switching process, preventing heavy oil from adhering to the pipe wall in a static state. The physical meaning of positive flow velocity is that the fuel in the pipeline always flows in the direction from the fuel valve to the burner, without stagnation or backflow. Maintaining a positive flow velocity prevents heavy components in the heavy oil from depositing on the pipe wall, thereby fundamentally eliminating blockages.

[0137] The formula for calculating the total switching time T_total is: T_total = V_pipe / Q_min; where V_pipe is the internal volume of the pipeline (in liters), and Q_min is the minimum volumetric flow rate required to maintain forward flow (in liters per second). The value of Q_min is determined based on the viscosity of the heavy oil at 80°C and the pipeline diameter. In this embodiment, it is preset to 0.05 liters per second (i.e., 50 milliliters per second), which ensures that the fuel flow rate in the pipeline is not less than 0.1 meters per second. Continuing with the previous example, V_pipe ≈ 4.71 liters, Q_min = 0.05 liters per second, then T_total = 4.71 / 0.05 = 94.2 seconds. In this embodiment, it is rounded to 95 seconds.

[0138] The physical principle behind this calculation method is as follows: During the switching process, light oil enters the pipeline through the light oil valve, mixes with the existing heavy oil in the pipeline, and propels the mixed fuel forward. The total switching time determines the speed at which light oil enters the pipeline: the longer the total switching time, the slower the light oil enters, and the slower the flow rate of the mixed fuel. To ensure that there is always sufficient flow velocity in the pipeline to flush the pipe walls and prevent heavy oil from adhering, the total switching time cannot exceed V_pipe divided by the flow rate corresponding to the minimum flow velocity.

[0139] If an excessively short total switching time (e.g., 10 seconds) is used, light oil will rush into the pipeline. Although this can propel heavy oil forward, the excessively high flow rate may cause drastic fluctuations in the fuel composition within the burner, affecting flame stability. Therefore, the 95 seconds calculated in this embodiment represents a balance between "anti-clogging" and "stable combustion."

[0140] Before each second switching operation, the PLC dynamically calculates T_total based on the piping characteristic parameters of the current system configuration (which may change due to piping modifications or maintenance), instead of using a fixed value. After the calculation is completed, T_total is substituted into the S-curve formula mentioned above to generate the gradual switching curve for this switching operation.

[0141] During the execution of the gradual switching curve, the control system monitors the flame stability parameters in real time and dynamically adjusts the switching speed based on the monitoring results, forming a closed-loop feedback control. As mentioned earlier, in addition to providing a digital "flame present / no flame" signal, the flame detector also provides a 0-10V analog signal through its analog output port. The amplitude of this signal is proportional to the flame intensity (0V corresponds to no flame, and 10V corresponds to maximum flame intensity). The PLC acquires this signal every 50 milliseconds through the analog input module, denoted as F_intensity(t).

[0142] The PLC further calculates the fluctuation amplitude of the flame intensity as a quantitative indicator of the flame stability parameter. The calculation method is as follows: taking a 10-second sliding time window, the standard deviation (or the difference between the maximum value and the minimum value) of the flame intensity within the window is calculated once per second. This embodiment adopts the relative fluctuation rate as the flame stability parameter, and the calculation formula is: Stability=(F_max−F_min) / F_avg×100%; where F_max is the maximum value of the flame intensity within the 10-second time window, F_min is the minimum value, and F_avg is the average value. A smaller Stability value indicates a more stable flame; a larger Stability value indicates more intense flame fluctuation. In this embodiment, two flame stability thresholds are preset: the first threshold is 30% (instability determination threshold), and the second threshold is 50% (severe instability determination threshold). When Stability ≤ 30%, the flame is determined to be stable, and the switching is executed according to the original plan; when 30% < Stability ≤ 50%, the flame is determined to be unstable, the switching speed needs to be slowed down and adjustment is attempted; when Stability > 50%, it is determined as severe combustion instability.

[0143] When the PLC detects a Stability value greater than 30%, the control system automatically enters a "speed reduction mode." Specifically, the PLC pauses the progression of the time variable 't' according to the original S-curve, maintaining the current valve opening and waiting for the flame to stabilize. During this waiting period, the PLC continuously monitors the Stability value and attempts to make fine adjustments: if the Stability value is between 30% and 50%, the PLC sends an adjustment signal to the damper actuator via the analog output module, slightly increasing the combustion air volume (by 5% each time), and observes whether the flame stability improves. When the Stability value drops below 30%, it is determined that the flame has stabilized, and the PLC resumes the progression of the time variable 't', continuing to execute the remaining gradual switching curve. If the Stability value remains greater than 50% for more than 30 seconds, the PLC determines it as severely unstable combustion, triggers an alarm, interrupts the switching process, and performs an emergency back-switch operation: immediately closing the heavy oil valve, adjusting the light oil valve opening to 100%, restoring to pure light oil mode, and awaiting manual inspection. For example, suppose the total switching time T_total = 95 seconds, and the S-curve is currently being executed. When t=40 seconds (at which point R_heavy≈40%, R_light≈60%), the PLC detects Stability=35%, exceeding the 30% threshold. The PLC pauses time progression, freezing t at 40 seconds, maintaining the heavy oil valve opening at 40% and the light oil valve opening at 60%. Simultaneously, the PLC sends a command to the damper actuator to increase the combustion air volume by 5% (i.e., multiplied by 1.05) from the current value. After waiting 5 seconds, the Stability value is recalculated and drops to 28%. The PLC determines that the flame has stabilized, unfreezes, and continues to advance t. At this point, the switching curve continues execution from t=40 seconds until t reaches 95 seconds to complete the switching. The total time of the entire switching process may exceed the preset T_total due to speed adjustments, but this is an acceptable cost to prevent flame extinction.

[0144] The PLC records the number of speed adjustments, the time of each adjustment, the duration of each adjustment, and the effect of each adjustment during each switching process, and stores this information in the fault log. If the number of speed adjustments during a single switching process exceeds 3, or the cumulative adjustment time exceeds 50% of the total switching time, the PLC will trigger a "flame stability warning" after the switching is completed, and the crew is advised to check the burner, fuel quality, or damper actuator.

[0145] Optionally, the step S102, "when the remaining time reaches the preset early switching threshold, perform the second switching operation to switch the dual-fuel inert gas generator from heavy oil mode to light oil mode," includes the following steps: Obtain multi-dimensional status parameters of the current system. These multi-dimensional status parameters include at least two of the following: unloading progress parameters, heavy oil system status parameters, blockage risk assessment parameters, and switching reliability parameters. Based on multi-dimensional state parameters, a comprehensive handover cost assessment value is calculated. The comprehensive handover cost assessment value is used to quantify the comprehensive cost required to perform the second handover operation at the current moment. The comprehensive cost includes at least the congestion risk cost and the economic loss cost. The overall handover cost assessment value is compared with the preset trigger conditions; when the trigger conditions are met, the second handover operation is executed.

[0146] In implementation, in step S102, when the remaining time T_final predicted by the control system reaches the early switching threshold T_threshold, the second switching operation (switching from heavy oil mode to light oil mode) is triggered. However, in actual ship unloading operations, the strategy of "switching immediately upon reaching the threshold" may not be optimal: under certain conditions, although the remaining time has reached the threshold, the heavy oil system is in a state of efficient and stable combustion, and immediate switching would cause economic losses; conversely, under certain conditions, although the remaining time has not yet reached the threshold, the risk of pipeline blockage is already high, and early switching is safer. Therefore, this embodiment provides a multi-objective decision optimization method, which serves as the specific decision logic for "executing the second switching operation when the remaining time reaches the preset early switching threshold" in step S102. That is, after reaching the threshold, the switching is not executed immediately, but rather a multi-objective cost evaluation is used to determine whether to actually execute the switching. The method includes the following sub-steps: When the remaining time T_final, as predicted by the control system, first reaches the early switching threshold T_threshold, the PLC does not immediately execute the second switching operation. Instead, it enters a multi-objective decision evaluation process. The PLC first obtains the multi-dimensional state parameters of the current system through the sensor network and internal registers. These multi-dimensional state parameters include at least two of the following four categories. This embodiment uses all four categories of parameters simultaneously as an example; in practical applications, two or three categories can be selected based on the sensor configuration.

[0147] Unloading progress parameters are used to quantify the current completion status and urgency of the unloading operation, including: Remaining unloading time T_final: The final estimated remaining time (in minutes) calculated from steps S1021 to S1025 above. The smaller this value, the closer the unloading is to completion, and the higher the urgency of the switchover.

[0148] Remaining unloading percentage R_remain: The ratio of the current cargo hold level to the initial level, calculated as R_remain = H_current / H_initial × 100%. The smaller this value, the closer the unloading is to completion.

[0149] Unloading rate change trend △R: The relative percentage change rate of the unloading pump speed calculated by the aforementioned method (unit: % / minute). A negative value indicates that the unloading rate is increasing, and a positive value indicates that the unloading rate is decreasing.

[0150] Of the parameters mentioned above, T_final is read directly from the PLC's data block register; H_current is acquired in real time by the liquid level sensor; and ΔR is calculated by the PLC every 10 seconds and stored in the register.

[0151] Heavy oil system state parameters are used to quantify the current operating efficiency and economy of the heavy oil system, including: Heavy oil temperature T_heavy: Real-time data collected by a temperature sensor on the heavy oil pipeline (unit: °C). The closer the temperature is to the optimal combustion temperature (100 °C in this embodiment), the higher the combustion efficiency, and the greater the economic loss from switching.

[0152] Heavy oil pressure P_heavy: Real-time data collected by a pressure sensor on the heavy oil pipeline (unit: MPa). Switching becomes necessary when the pressure is abnormal (deviating from the range of 0.3-0.5 MPa).

[0153] The duration of continuous heavy oil operation, τ_heavy: The time elapsed from the completion of the first switching operation (i.e., the system entering pure heavy oil mode) to the current moment (unit: minutes). The larger this value, the longer the heavy oil system has been running stably, the greater the economic loss caused by a sudden switch, and the higher the cumulative risk of heavy oil adhering to the pipeline.

[0154] Current combustion efficiency η_comb: Calculated by combining parameters such as oxygen and carbon dioxide content collected by a flue gas analyzer (installed in the exhaust duct) with the fuel supply (unit: %, range 0-100%). Higher combustion efficiency results in greater economic losses from premature switching.

[0155] In this embodiment, τ_heavy is recorded by the PLC's internal software timer; η_comb is calculated by the PLC through the analog input module, reading the 4-20mA signal from the flue gas analyzer and calculating it according to the preset combustion efficiency model.

[0156] Blockage risk assessment parameters are used to quantify the current blockage risk of fuel lines, including: Fuel flow rate decline trend ΔQ: Heavy oil flow rate decline rate (unit: % / minute) calculated by the aforementioned anomaly diagnosis module (steps S301 to S303). The larger this value, the more obvious the precursor to pipeline blockage, and the higher the necessity for switching.

[0157] Pipeline pressure difference ΔP_pipe: The difference between the pressure before the heavy oil valve and the burner inlet pressure (unit: MPa), obtained by subtracting the readings of the two pressure sensors. The larger the pressure difference, the greater the resistance within the pipeline, and the higher the risk of blockage.

[0158] Heavy oil viscosity μ_heavy: Real-time data collected by a viscometer (unit: cSt). The higher the viscosity, the worse the flowability of the heavy oil, and the higher the risk of clogging.

[0159] In this embodiment, ΔQ is calculated in real time by the anomaly diagnosis module and stored in the register; ΔP_pipe is calculated by the PLC reading the values ​​of the two pressure sensors through the analog input module and calculating the difference; μ_heavy is calculated by reading the viscometer signal through the analog input module and calculating it according to the linear conversion formula.

[0160] The switching reliability parameters are used to quantify the probability of successfully performing the second switching operation, including: Valve Recent Action Success Rate R_valve: The percentage of successful responses (in %) for light oil valves and heavy oil valves in the past 10 actions. The lower this value, the higher the risk of valve jamming and the greater the risk of failure in switching operations.

[0161] Flame stability index S_fire: Calculated by converting the aforementioned flame stability parameter Stability, using the formula S_fire = 100% − Stability (unit: %). The higher the value, the more stable the flame, and the higher the probability of a successful switchover.

[0162] Purge Readiness Status F_purge: A Boolean variable (0 or 1) indicating whether a stable supply of light oil has been established in the pipeline and whether the purging medium (light oil) is sufficient. When F_purge = 1, it indicates that purging is ready and can immediately enter purging mode after a switching failure.

[0163] In this embodiment, R_valve is obtained from the PLC's statistical valve action history; S_fire is calculated in real time from the analog signal of the flame detector; and F_purge is obtained from the PLC's detection of the light oil valve status and the light oil daily use cabinet level switch.

[0164] Based on the aforementioned multi-dimensional state parameters, the PLC calculates the comprehensive handover cost assessment value C_cost. This assessment value is used to quantify the comprehensive cost required to perform the second handover operation at the current moment: the higher the cost, the less cost-effective it is to "handover now"; the lower the cost, the more reasonable it is to "handover now".

[0165] The overall cost includes at least the cost of congestion risk and the cost of economic loss. This embodiment further adds the cost of handover failure risk, forming a three-factor weighted evaluation model. The formula for calculating the overall handover cost evaluation value is as follows: C_cost = w_block × C_block + w_econ × C_econ + w_fail × C_fail; where: C_block is the blockage risk cost (range 0-100), representing the risk of pipeline blockage if not switched immediately; C_econ is the economic loss cost (range 0-100), representing the economic loss caused by abandoning heavy oil combustion if switched immediately; C_fail is the switching failure risk cost (range 0-100), representing the probability of switching failure and the severity of its consequences if switched immediately; w_block, w_econ, and w_fail are the corresponding weighting coefficients, and the sum of the three is 1. In this embodiment, w_block = 0.5, w_econ = 0.3, and w_fail = 0.2, reflecting the decision-making principle of "prioritizing blockage prevention, taking into account economy, and considering reliability". The aforementioned weighting coefficients are stored in the PLC's retention register and can be manually calibrated by engineers through the human-machine interface on the operation panel to adapt to the operating strategies of different ships (for example, for older ships, the w_block weight can be increased to prioritize blockage prevention; for ships pursuing fuel economy, the w_econ weight can be increased).

[0166] The formula for calculating the blockage risk cost C_block is: C_block=min(100,(ΔQ / ΔQ_threshold×50)+(ΔP_pipe / ΔP_threshold×30)+(μ_heavy / μ_ref×20)). Where ΔQ_threshold is the flow rate reduction warning threshold (preset to 5% / minute in this embodiment); ΔP_threshold is the pipe pressure difference warning threshold (preset to 0.05MPa in this embodiment); μ_ref is the heavy oil viscosity reference value (preset to 150cSt in this embodiment); and the coefficients (50, 30, 20) are the weights of each indicator, summing to 100. For example, assuming the current ΔQ = 4% / minute, ΔP_pipe = 0.03MPa, and μ_heavy = 120cSt, then: C_block = min(100, (4 / 5×50)+(0.03 / 0.05×30)+(120 / 150×20))=min(100, 40+18+16) =74.

[0167] The formula for calculating the economic loss cost C_econ is: C_econ=min(100,(T_heavy / T_opt×40)+(τ_heavy / τ_max×30)+(η_comb / η_ref×30)); where T_opt is the optimal combustion temperature of heavy oil (preset to 100℃ in this embodiment), and the closer the temperature is to this value, the greater the switching loss; τ_max is the recommended maximum continuous running time of heavy oil mode (preset to 480 minutes, i.e. 8 hours in this embodiment), and the switching loss will not increase after exceeding this time; η_ref is the rated combustion efficiency (preset to 95% in this embodiment); the coefficients (40, 30, 30) are the weights of each indicator, and the sum is 100. For example, assuming the current T_heavy = 95℃, τ_heavy = 120 minutes, and η_comb = 92%, then: C_econ = min(100, (95 / 100×40) + (120 / 480×30) + (92 / 95×30)) = min(100, 38 + 7.5 + 29.05) = 74.55.

[0168] The formula for calculating the switching failure risk cost C_fail is: C_fail = (1 − R_valve / 100)60 + (1 − S_fire / 100) × 40; where, when F_purge = 0 (purge not ready), C_fail is increased by an additional 20 points (maximum 100). For example, if R_valve = 95%, S_fire = 85%, and F_purge = 1 (ready), then: C_fail = (1 − 0.95) × 60 + (1 − 0.85) × 40 = 0.05 × 60 + 0.15 × 40 = 3 + 6 = 9.

[0169] Calculation of the overall handover cost assessment: Continuing with the example above: C_block=74, C_econ=74.55, C_fail=9, weighting coefficients w_block=0.5, w_econ=0.3, w_fail=0.2, then: C_cost =0.5×74+0.3×74.55+0.2×9=37+22.365+1.8=61.165.

[0170] The PLC internally has a preset trigger threshold C_trigger (60 points in this embodiment) and a forced switching threshold C_force (85 points in this embodiment). These two thresholds are stored in the PLC's retention register and can be manually calibrated by engineers through the human-machine interface on the control panel. The PLC compares the calculated comprehensive switching cost assessment value C_cost with the above thresholds, and the decision logic is as follows: Scenario 1: C_cost ≤ C_trigger (C_cost ≤ 60 points) When the overall switching cost assessment value is less than or equal to the trigger condition threshold, it is determined that the cost of performing the second switching operation at the current moment is low and worth performing immediately. The PLC immediately performs the second switching operation, switching the system from heavy oil mode to light oil mode according to the gradual switching method described in weights 5 and 6 above.

[0171] Following the example above, C_cost = 61.165 > 60, which does not meet this condition.

[0172] Scenario 2: C_trigger < C_cost < C_force (60 points < C_cost < 85 points) When the overall switching cost assessment value falls between the trigger condition threshold and the forced switching threshold, it is determined that the cost of performing the switch at the current moment is too high, but has not yet reached a dangerous level. In this case, the PLC does not immediately execute the switch, but instead initiates a "wait-reassess" loop: the PLC suspends the current decision, waits 30 seconds to reacquire the multi-dimensional state parameters, recalculates C_cost, and compares it with the threshold again. If C_cost still does not drop below C_trigger after three consecutive reassessments, the PLC forcibly executes the second switching operation (to avoid infinite waiting leading to insufficient time for switching after unloading).

[0173] Scenario 3: C_cost ≥ C_force (C_cost ≥ 85 points) When the overall switching cost assessment value is greater than or equal to the forced switching threshold, it is determined that the pipeline blockage risk has reached a dangerous level (C_block contributes significantly) or the economic loss has reached an unacceptable level. At this point, regardless of whether the remaining time is still greater than the early switching threshold, the PLC forcibly executes the second switching operation to ensure system safety and anti-blocking effectiveness.

[0174] If C_cost ≥ 85 points and C_block > 80 points is detected at the same time (i.e., the cost of blockage is dominant), the PLC will trigger a "high-risk blockage warning" alarm in addition to the switching, prompting the crew to check the fuel line and filter immediately after the unloading is completed.

[0175] Scenario 4: Emergency backup logic for remaining time In addition to the C_cost-based decision-making logic described above, the PLC also includes a fallback logic: when the remaining unloading time T_final is less than the emergency threshold T_emergency (preset to 5 minutes in this embodiment), the PLC will forcibly execute a second switching operation regardless of the C_cost value. This fallback logic ensures that even in extreme cases (such as simultaneous failure of all sensors causing abnormal C_cost calculation), the system can complete the switching before unloading is finished, preventing heavy oil residue from clogging the pipeline.

[0176] The PLC records the process data of each multi-objective decision-making process in the fault log, including: the T_final value at the time of decision, C_cost and its three components (C_block, C_econ, C_fail), snapshots of all multi-dimensional state parameters, and the decision result (immediate execution / delayed execution / forced switch / triggered by fallback logic). This data can be used by the crew to analyze the rationality of the decision afterward and to adjust weight coefficients and thresholds. The crew can manually intervene in the decision-making process through the human-machine interface on the control panel: when the PLC is in a "wait-reassessment" cycle, the crew can press the "forced switch" button to immediately execute the second switch operation; or press the "delayed switch" button to extend the suspension time of this decision to 2 minutes. The manual intervention operation record is also stored in the fault log.

[0177] This application also discloses an automatic switching and anti-clogging control system for a dual-fuel inert gas generator. (Refer to...) Figure 2 ,include: The start-up light oil module 201 is used to control the dual-fuel inert gas generator to operate in light oil mode in response to the start-up command; The heavy oil switching interlock control module 202 is used to perform a first switching operation to switch the dual-fuel inert gas generator from light oil mode to heavy oil mode when the heavy oil preparation ready condition is detected. The unloading condition linkage prediction module 203 is used to acquire real-time operating condition data of the ship unloading operation during the operation of the dual-fuel inert gas generator in heavy oil mode, and predict the remaining time for the end of unloading based on the real-time operating condition data; when the remaining time reaches the preset early switching threshold, a second switching operation is performed to switch the dual-fuel inert gas generator from heavy oil mode to light oil mode. Automatic shutdown control module 204 is used to control the dual-fuel inert gas generator to shut down in response to the unloading operation completion signal.

[0178] This application also discloses an automatic switching and anti-clogging control device for a dual-fuel inert gas generator. The device includes a memory and a processor. The memory stores a computer program that can be loaded by the processor and executed as described above for the automatic switching and anti-clogging control method for a dual-fuel inert gas generator.

[0179] This application also discloses a computer-readable storage medium that stores a computer program that can be loaded by a processor and executed as described above for the automatic switching and anti-blocking control method of a dual-fuel inert gas generator. The computer-readable storage medium includes, for example, various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0180] It should be noted that in this paper, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0181] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit the scope of protection of the application. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on these embodiments, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

Claims

1. A method for automatic switching and anti-clogging control of a dual-fuel inert gas generator, characterized in that, Applied to ship unloading operations, the dual-fuel inert gas generator has switchable light oil mode and heavy oil mode, and the method includes: In response to the power-on command, the dual-fuel inert gas generator is controlled to operate in light oil mode; when the heavy oil preparation ready condition is detected, the first switching operation is performed to switch the dual-fuel inert gas generator from light oil mode to heavy oil mode. During the operation of the dual-fuel inert gas generator in heavy oil mode, real-time operating data of the ship's unloading operation is acquired, and the remaining time for the unloading to end is predicted based on the real-time operating data; when the remaining time reaches a preset early switching threshold, a second switching operation is performed to switch the dual-fuel inert gas generator from heavy oil mode to light oil mode. In response to the unloading operation completion signal, the dual-fuel inert gas generator is controlled to shut down.

2. The automatic switching and anti-clogging control method for a dual-fuel inert gas generator according to claim 1, characterized in that, The method further includes: During the operation of the dual-fuel inert gas generator, the operating parameters involved in the first switching operation and / or the second switching operation are continuously monitored; Based on the monitored operating parameters, identify whether there are any preset abnormal operating conditions; When an abnormal operating condition is detected, the emergency handling operation corresponding to the abnormal operating condition is automatically executed.

3. The automatic switching and anti-clogging control method for a dual-fuel inert gas generator according to claim 1, characterized in that, The prediction of the remaining time for unloading completion based on the real-time operating data includes: Acquire at least two signals from the real-time operating data, the signals including unloading pump speed and cargo tank level signal; The remaining time for unloading is calculated based on different signals to obtain at least two independent baseline remaining time estimates, and the deviation between the baseline remaining time estimates is calculated. When the deviation is not greater than the first preset deviation threshold, the estimated values ​​of each basic remaining time are fused and calculated to obtain the final remaining time; When the deviation is greater than the first preset deviation threshold and not greater than the second preset deviation threshold, the remaining time is calculated by weighting and correcting each basic remaining time estimate according to the changing trend of the unloading pump speed, and then merging the calculations to obtain the final remaining time. When the deviation is greater than the second preset deviation threshold, it is determined that there is an abnormal data source in the real-time operating data, an alarm is triggered, and a final remaining time is selected from each basic remaining time estimate according to the preset priority.

4. The automatic switching and anti-clogging control method for a dual-fuel inert gas generator according to claim 1, characterized in that, The method further includes: Historical unloading operation data of ships are obtained, and the operation modes are classified according to unloading rate, cargo hold capacity and cargo type. An optimized switching parameter set corresponding to different operation modes is established. The optimized switching parameter set includes at least the optimized advance switching threshold. At the start of the current unloading operation, the current operation mode is identified, and an advance switching threshold that matches the current operation mode is selected from the set of optimized switching parameters. This threshold is used as the advance switching threshold for comparison with the remaining time in this unloading operation. During and after the current unloading operation, the actual time difference between triggering the second switching operation and actually receiving the unloading operation completion signal is recorded. Based on the error between the actual time difference recorded multiple times and the advance switching threshold used in this operation, the advance switching threshold corresponding to the current operation mode in the optimized switching parameter set is dynamically updated for subsequent unloading operations of the same type of operation mode.

5. The automatic switching and anti-clogging control method for a dual-fuel inert gas generator according to claim 1, characterized in that, The second switching operation includes: Obtain the characteristic parameters of the fuel pipeline of the dual-fuel inert gas generator, wherein the characteristic parameters of the fuel pipeline include at least the pipeline length and the internal volume of the pipeline; Based on the fuel pipeline characteristic parameters, a gradual switching curve is determined, which defines the fuel transition relationship during the switch from heavy oil mode to light oil mode. By executing the aforementioned gradual switching curve, the supply of heavy fuel oil is gradually reduced while the supply of light fuel oil is increased simultaneously, maintaining a constant total fuel supply. When the heavy oil supply drops to a preset lower limit, the heavy oil valve is completely closed, and light oil is supplied independently and the system continues to operate for a preset purging time; the preset lower limit is 0.

6. The automatic switching and anti-clogging control method for a dual-fuel inert gas generator according to claim 5, characterized in that, The gradual switching curve is a non-linear transition curve, with a smaller slope in the initial stage of switching, a larger slope in the middle stage of switching, and a smaller slope again in the final stage of switching, forming an S-shaped transition shape. The total duration of the gradual switching curve is dynamically calculated based on the pipeline length and internal volume in the fuel pipeline characteristic parameters, so as to maintain a positive flow velocity in the fuel pipeline. During the execution of the gradual switching curve, the flame stability parameter is monitored in real time. When the flame stability parameter is lower than a preset threshold, the execution speed of the gradual switching curve is automatically slowed down, and execution continues after the flame recovers and stabilizes.

7. The automatic switching and anti-clogging control method for a dual-fuel inert gas generator according to claim 1, characterized in that, When the remaining time reaches a preset early switching threshold, a second switching operation is performed to switch the dual-fuel inert gas generator from heavy oil mode to light oil mode, including: Obtain multi-dimensional status parameters of the current system, including at least two of the following: unloading progress parameters, heavy oil system status parameters, blockage risk assessment parameters, and switching reliability parameters; Based on the multi-dimensional state parameters, a comprehensive handover cost assessment value is calculated. The comprehensive handover cost assessment value is used to quantify the comprehensive cost required to perform the second handover operation at the current moment. The comprehensive cost includes at least the congestion risk cost and the economic loss cost. The overall switching cost assessment value is compared with a preset trigger condition; when the trigger condition is met, the second switching operation is executed.

8. An automatic switching and anti-clogging control system for a dual-fuel inert gas generator, characterized in that, include: The start-up light oil module (201) is used to control the dual-fuel inert gas generator to operate in light oil mode in response to the start-up command; The heavy oil switching interlock control module (202) is used to perform a first switching operation to switch the dual-fuel inert gas generator from light oil mode to heavy oil mode when the heavy oil preparation ready condition is detected. The unloading condition linkage prediction module (203) is used to acquire real-time operating condition data of the ship unloading operation during the operation of the dual-fuel inert gas generator in heavy oil mode, and predict the remaining time for the end of unloading based on the real-time operating condition data; when the remaining time reaches the preset early switching threshold, a second switching operation is performed to switch the dual-fuel inert gas generator from heavy oil mode to light oil mode. An automatic shutdown control module (204) is used to control the dual-fuel inert gas generator to shut down in response to a signal indicating completion of the unloading operation.

9. An automatic switching and anti-clogging control device for a dual-fuel inert gas generator, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer program is stored that can be loaded by a processor and executed as described in any one of claims 1 to 7.