Dynamic self-adaptive method for intelligent start-stop and power dynamic distribution of diesel generator based on Java
By optimizing the diesel generator start-stop strategy through a dynamic adaptive algorithm, the problem of frequent start-stop caused by load and photovoltaic fluctuations was solved. This enabled intelligent start-stop and dynamic power allocation of the diesel generator, improving power supply reliability and equipment lifespan, while reducing fuel consumption.
Patent Information
- Application Number
- CN202511606240.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2026-03-17
AI Technical Summary
Existing traditional diesel generator control methods fail to effectively cope with load and photovoltaic fluctuations, resulting in frequent start-stop cycles, low fuel efficiency, shortened equipment lifespan, and untimely recovery of energy storage SOC, posing a risk of power outages.
By employing a dynamic adaptive algorithm combined with a multi-parameter coupled adaptive threshold model, a dynamic gap calculation model is established through real-time calculation of the photovoltaic-load power gap. A time window start-stop algorithm and a SOC dynamic compensation mechanism are also implemented to achieve intelligent start-stop and dynamic power allocation of the diesel generator.
It reduces diesel engine start-stop frequency by 60%, improves power supply reliability by 45%, reduces fuel consumption by 22%, and extends equipment life by 30%.
Smart Images

Figure CN121688816A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of hybrid energy management, and relates to a dynamic cooperative control method and system of a diesel generator and an energy storage system, which is suitable for micro-grid, off-grid power supply and the like, and in particular to a dynamic self-adaptive method for intelligent start-stop and power dynamic distribution of a diesel generator based on Java. BACKGROUND
[0002] The existing traditional diesel generator control adopts fixed threshold start-stop, and does not consider load fluctuation and photovoltaic fluctuation characteristics, resulting in low fuel efficiency (<40% rated power, fuel consumption increases sharply), and the diesel generator is usually started when the energy storage SOC drops to the minimum threshold, causing power supply interruption risk. Under this traditional control strategy, the diesel generator is frequently started and stopped (>10 times / day), which shortens the service life of the equipment, and the energy storage SOC is not recovered in time during photovoltaic fluctuation, which requires manual intervention.
[0003] The patent innovatively introduces a dynamic self-adaptive algorithm, dynamically fuses parameters such as battery health state (SOH), environmental temperature, and charge-discharge cycle number by introducing a self-adaptive threshold model coupled with multiple parameters, and realizes real-time optimization of protection thresholds. SUMMARY
[0004] The application provides a dynamic self-adaptive method for intelligent start-stop and power dynamic distribution of a diesel generator based on Java, which realizes intelligent start-stop and power dynamic distribution of the diesel generator by real-time calculation of photovoltaic-load power gap, establishment of a dynamic gap calculation model, time window start-stop algorithm, SOC dynamic compensation mechanism, and dynamic protection threshold.
[0005] A dynamic self-adaptive method for intelligent start-stop and power dynamic distribution of a diesel generator based on Java, and the specific steps are as follows: S1, import the predicted data of photovoltaic data and load data, and process them to the same granularity; S2, establish a dynamic power gap calculation model, based on the predicted data of photovoltaic data and load data, to simulate the change trajectory of the energy storage SOC in a future period of time in real time and rolling manner, so as to accurately predict the real power gap that cannot be made up by the energy storage system, and provide accurate data basis for the intervention of the diesel generator; S3, start the time window fusion intelligent decision algorithm, analyze the time sequence characteristics of the power gap, and set a time fusion threshold; if adjacent power gaps are very close in time, they are combined into a continuous diesel generator power supply window; replace multiple short-time start-stops with a single long-time operation, and improve the load rate of each operation; S4, through the total energy-based start-stop time reverse derivation mechanism to derive results, first determine the time when the diesel needs to stop power supply, and then according to the total energy gap and the rated power of the diesel within the window, reversely calculate the latest starting time, to ensure that the running time of the diesel is accurately matched with the actual energy demand.
[0006] Further, step S1 specifically includes setting corresponding data and assigning initial values, including date, battery capacity, set soc maximum value, set soc minimum value, and diesel power. The data is processed and the storage list is initialized.
[0007] Further, step S2 calculates the photovoltaic-load power gap in real time, combines the SOC state machine and the time window algorithm, realizes the intelligent start-stop and power dynamic distribution of the diesel engine, and the key judgment of the power gap calculation model is as follows: Start threshold = f(SOC_historical, Load_current, PV_forecast, SOC, Temp, Cycle_count) Stop threshold = g(SOC_historical, Load_current, PV_forecast, SOC, Temp, Cycle_count), f and g are coupled functions obtained by system optimization training and parameter setting; The specific power calculation method is as follows: If there is a photovoltaic surplus in the system, charge the energy storage. The charging amount Charge(i) = min(-Gap(i), (SOC_max - SOC_current) * Battery_Capacity, Charge_Power_Limit);
[0008] If there is a power shortage in the system, discharge the energy storage. The discharge amount Discharge(i) = min(Gap(i), (SOC_current - SOC_min) * Battery_Capacity, Discharge_Power_Limit).
[0009] Update SOC state: SOC_current += Charge(i) / Battery_Capacity - Discharge(i) / Battery_Capacity, and clamp SOC_current in the interval [SOC_min, SOC_max].
[0010] Further, step S3 specifically includes, Determine the real diesel gap: when the SOC_current in the simulation calculation reaches the set minimum threshold SOC_min, the Gap(i) at this time is the real power gap Gap_diesel(i) that needs to be made up by the diesel generator, and it is recorded in the gap mapping table Gap_Map<T_i, Gap_diesel(i)>; The time window fusion of the gap event and the diesel start-stop point decision are the core innovative points of the present application, which aims to fuse the discrete and frequent start-stop signals into a continuous and efficient start-stop time window. Identify the SOC recovery point: traverse the SOC sequence, identify all time points rising from SOC_min, these points mark the time when the energy storage system ends discharging and starts charging, and constitute the potential diesel stop time point set {T_stop_candidate}; Event fusion based on time threshold: time series analysis is performed on the continuous SOC recovery points; the time interval Δt of adjacent recovery points is calculated, and a time fusion threshold T_threshold is preset. If Δt < T_threshold, it is considered that the two gap events are highly related in time and belong to the same power shortage period, in order to avoid frequent start-stop of the diesel in a short time, the two events should be fused into a continuous diesel running window; the start time of the window is determined by the characteristics of the first gap event, and the stop time is the recovery point of the second gap event. If Δt >= T_threshold, it is considered as two independent power events, and the diesel running window should be planned for them respectively.
[0011] Further, step S4 specifically comprises, Determine the final start-stop time pair: according to the fused results, generate the final diesel start-stop time pair set {(T_start_1, T_stop_1), (T_start_2, T_stop_2),...}; For each determined stop time T_stop_j and the total energy gap E_gap_j in the time window, according to the rated power P_diesel of the diesel generator, the required start time T_start_j is reversely calculated; The calculation formula is: T_start_j = T_stop_j - (E_gap_j / P_diesel), and the control system sends a start command at T_start_j and a stop command at T_stop_j.
[0012] A Java-based dynamic adaptive system for intelligent start-stop and power dynamic distribution of diesel engines, characterized by comprising A data processing module for importing photovoltaic data and load data and processing to the same granularity; A power gap calculation module based on the predicted data of photovoltaic and load, which simulates the change trajectory of energy storage SOC in a future period of time in real time and rolling, and establishes a dynamic power gap calculation model; A fusion decision module that starts a time window fusion intelligent decision algorithm, analyzes the time sequence characteristics of the power gap, solves the frequent start-stop problem, and replaces multiple short-time start-stop with a single long-time operation; A result export module that exports results through a total energy-based start-stop time reverse deduction mechanism, first determines the time when the diesel engine needs to stop power supply, and then reversely calculates the latest start time according to the total energy gap and the rated power of the diesel engine in the window.
[0013] An electronic device comprising a memory and a processor, the memory and the processor being communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the prediction method of any one of the above.
[0014] A computer-readable storage medium having computer instructions stored thereon, the computer instructions running to perform the prediction method of any one of the above.
[0015] The advantages and positive effects of the present application are: 1. Diesel engine start-stop times: through time window aggregation, the start-stop frequency is reduced by 60% in typical scenarios.
[0016] 2. Improve power supply reliability: the SOC compensation mechanism reduces the risk of sudden power failure by 45%.
[0017] 3. Economic efficiency is improved: fuel consumption is reduced by 22%, and equipment life is extended by 30%. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 is a flowchart of the embodiment. DETAILED DESCRIPTION
[0019] In order for those skilled in the art to better understand the technical solutions in the specification, the technical solutions in the specification will be described clearly and completely in conjunction with the drawings in the specification. Obviously, the described embodiments are only part of the embodiments of the present application, not all embodiments.
[0020] A Java-based dynamic adaptive method for intelligent start-stop and power dynamic distribution of diesel engines, the flow of the method is as follows Figure 1As shown, the specific steps are as follows: S1, import photovoltaic data and load data and process them to the same granularity; Set the corresponding data and assign initial values, including: date, battery capacity, set maximum SOC value, set minimum SOC value, and generator power. Process the data and initialize the storage list. S2 establishes a dynamic power gap calculation model, which no longer only looks at the current SOC, but simulates the change trajectory of energy storage SOC in real time and on a rolling basis based on the predicted data of photovoltaic and load. This accurately predicts the real power gap that the energy storage system cannot make up, providing accurate data basis for diesel generator intervention and realizing the transformation from "passive response" to "active prevention". By calculating the photovoltaic-load power gap in real time and combining the SOC state machine with the time window algorithm, intelligent start-up and shutdown and dynamic power allocation of the diesel generator are realized.
[0021] The key criteria for the dynamic power gap calculation model are as follows: Startup threshold = f(SOC_historical, Load_current, PV_forecast, SOC, Temp, Cycle_count) Stop threshold = g(SOC_historical, Load_current, PV_forecast, SOC, Temp, Cycle_count) f and g are coupling functions obtained through system optimization training and parameter setting; The specific power calculation method is as follows: If the system has a photovoltaic surplus, the energy storage is charged. Charge(i) = min(-Gap(i),(SOC_max - SOC_current) * Battery_Capacity, Charge_Power_Limit).
[0022] If the system has a power deficit, the energy storage will discharge. Discharge amount Discharge(i) = min( Gap(i),(SOC_current - SOC_min) * Battery_Capacity, Discharge_Power_Limit ).
[0023] Update the SOC state: SOC_current += Charge(i) / Battery_Capacity - Discharge(i) / Battery_Capacity, and clamp SOC_current within the range of [SOC_min, SOC_max].
[0024] S3 initiates a time window fusion intelligent decision-making algorithm to analyze the time series characteristics of power shortages and set a time fusion threshold. If adjacent power shortages are very close in time, they are merged into a continuous diesel generator power supply window. This solves the problem of frequent start-stop cycles. Replacing multiple short-term start-stop cycles with a single long-duration operation greatly extends equipment life and improves the load rate of each operation.
[0025] Determining the actual power gap: When the SOC_current in the simulation reaches the set minimum threshold SOC_min, the Gap(i) at this time is the actual power gap Gap_diesel(i) that needs to be filled by the diesel generator, and it is recorded in the gap mapping table Gap_Map.<T_i, Gap_diesel(i)> middle.
[0026] The core innovation of this invention lies in the fusion of time windows for gap events and the decision-making of diesel generator start-stop points, which aims to fuse discrete and frequent start-stop signals into continuous and efficient start-stop time windows.
[0027] Identify SOC recovery points: Traverse the SOC sequence and identify all time points that start rising from SOC_min. These points mark the moment when the energy storage system ends discharging and begins charging, forming a potential set of diesel generator stop time points {T_stop_candidate}.
[0028] Event fusion based on time threshold: Time series analysis is performed on consecutive SOC recovery points. The time interval Δt between adjacent recovery points is calculated. A preset time fusion threshold T_threshold (e.g., 3 hours) is used.
[0029] If Δt < T_threshold, then the two power shortage events are considered to be highly correlated in time and belong to the same period of power shortage. To avoid frequent start-ups and shutdowns of the diesel generator in a short period of time, these two events should be merged into a continuous diesel generator operation window. The start time of this window is determined by the characteristics of the first power shortage event, and the stop time is the recovery point of the second power shortage event.
[0030] If Δt >= T_threshold, then they are considered as two independent power consumption events, and separate diesel generator operation windows should be planned for them.
[0031] S4 derives the result through a reverse derivation mechanism based on the start-stop time of total energy. First, it determines the time when the diesel generator needs to stop supplying power, and then calculates the latest start time in reverse based on the total energy gap and the rated power of the diesel generator within the window.
[0032] Determine the final start-stop time pairs: Based on the fusion results, generate the final set of diesel generator start-stop time pairs {(T_start_1, T_stop_1), (T_start_2, T_stop_2), ...}.
[0033] For each defined stop time T_stop_j and the total energy gap E_gap_j within that time window, the required start time T_start_j is calculated in reverse based on the rated power P_diesel of the diesel generator.
[0034] The calculation formula is: T_start_j = T_stop_j - (E_gap_j / P_diesel). The control system issues a start command at time T_start_j and a stop command at time T_stop_j.
[0035] Ensure that the operating time of the diesel generator is precisely matched with the actual energy demand to avoid fuel waste and achieve high efficiency and economy in the operation process.
[0036] The present invention also provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform any of the methods described above.
[0037] The present invention also provides a computer storage medium having computer instructions stored thereon, the computer instructions being used to cause a computer to perform any of the methods described above.
[0038] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented in various computer languages, such as the object-oriented programming language Python and the interpreted scripting language JavaScript.
[0039] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A dynamic self-adaptive method for Java-based intelligent start-stop and power dynamic distribution of diesel engine, characterized in that, The specific steps are as follows: S1, import photovoltaic data and predicted data of load data, and process to the same granularity; S2, establish a dynamic power gap calculation model, based on photovoltaic data and predicted data of load data, simulate the change trajectory of energy storage SOC in a future period of time in real time and rolling manner, so as to accurately predict the real power gap that cannot be made up by energy storage system, and provide accurate data basis for diesel generator intervention; S3, start the time window fusion intelligent decision algorithm, analyze the time sequence characteristics of power gap, set a time fusion threshold; if the adjacent power gaps are very close in time, they will be combined into a continuous diesel generator power supply window; replace multiple short-time starts and stops with a single long-time operation, and improve the load rate of each operation; S4, derive the result through the total energy-based start-stop time reverse deduction mechanism, first determine the time when the diesel generator needs to stop power supply, then according to the total energy gap and the rated power of the diesel generator in the window, reversely calculate the latest start time, and ensure that the running time of the diesel generator is accurately matched with the actual energy demand.
2. The dynamic self-adaptive method for Java-based intelligent start-stop and power dynamic distribution of a diesel engine according to claim 1, characterized in that, Step S1 specifically includes: setting corresponding data and assigning initial values, including: date, battery capacity, set soc maximum value, set soc minimum value, diesel generator power, processing data, and initializing storage list.
3. The dynamic self-adaptive method for Java-based intelligent start-stop and power dynamic distribution of a diesel engine according to claim 1, characterized in that, Step S2 realizes the intelligent start-stop and power dynamic distribution of diesel generator by real-time calculation of photovoltaic-load power gap, combination of SOC state machine and time window algorithm, the key judgments of power gap calculation model are as follows: Start threshold = f(SOC_historical, Load_current, PV_forecast, SOC, Temp, Cycle_count), Stop threshold = g(SOC_historical, Load_current, PV_forecast, SOC, Temp, Cycle_count), f and g are coupling functions obtained by system optimization training and parameter setting; The specific power calculation method is as follows: If there is photovoltaic surplus in the system, charge the energy storage, the charging amount Charge(i) = min(-Gap(i), (SOC_max - SOC_current) * Battery_Capacity, Charge_Power_Limit); If there is power shortage in the system, discharge the energy storage. Discharge amount Discharge(i) = min(Gap(i), (SOC_current - SOC_min) * Battery_Capacity, Discharge_Power_Limit); Update SOC state: SOC_current += Charge(i) / Battery_Capacity - Discharge(i) / Battery_Capacity, and clamp SOC_current in the interval [SOC_min, SOC_max].
4. The dynamic self-adaptive method for Java-based intelligent start-stop and power dynamic distribution of a diesel engine according to claim 1, characterized in that, Step S3 specifically comprises, Determine the real diesel gap: when SOC_current in the simulation calculation reaches the set minimum threshold SOC_min, Gap(i) at this time is the real power gap Gap_diesel(i) that needs to be made up by the diesel generator, and is recorded in the gap mapping table Gap_Map<T_i, Gap_diesel(i)>; The time window fusion of the gap event and the diesel start-stop point decision are the core innovative points of the present application, which aims to fuse the discrete and frequent start-stop signals into a continuous and efficient start-stop time window; Identify the SOC recovery point: traverse the SOC sequence to identify all time points that start to rise from SOC_min. These points mark the time when the energy storage system ends discharging and starts charging, and constitute a set of potential diesel stop time points {T_stop_candidate}; Event fusion based on time threshold: perform time series analysis on the continuous SOC recovery points; calculate the time interval Δt of adjacent recovery points, and preset a time fusion threshold T_threshold; If Δt < T_threshold, it is considered that the two gap events are highly correlated in time and belong to the same power consumption period. To avoid frequent start-stop of the diesel generator in a short time, the two events should be fused into a continuous diesel running window. The start time of the window is determined by the characteristics of the first gap event, and the stop time is the recovery point of the second gap event. If Δt >= T_threshold, it is considered as two independent power consumption events, and the diesel running window should be planned for them respectively.
5. The dynamic self-adaptive method for Java-based intelligent start-stop and power dynamic distribution of a diesel engine according to claim 1, characterized in that, Step S4 specifically comprises, Determine the final start-stop time pair: according to the fused results, generate the final diesel start-stop time pair set {(T_start_1, T_stop_1), (T_start_2, T_stop_2),...}; For each determined stop time T_stop_j and the total energy gap E_gap_j in the time window, according to the rated power P_diesel of the diesel generator, the required start time T_start_j is calculated reversely; The calculation formula is: T_start_j = T_stop_j - (E_gap_j / P_diesel), and the control system sends a start command at T_start_j and a stop command at T_stop_j.
6. A dynamic self-adaptive system for Java-based intelligent start-stop and power dynamic distribution of diesel engines, characterized by, Comprise The data processing module is used for importing photovoltaic data and load data and processing to the same granularity; The power gap calculation module simulates the change trajectory of the energy storage SOC in a future period of time in real time and rolling based on the predicted data of the photovoltaic and the load, and establishes a dynamic power gap calculation model; The fusion decision module starts a time window fusion intelligent decision algorithm, analyzes the time sequence characteristics of the power gap, solves the frequent start-stop problem, and replaces multiple short-time start-stop with a single long-time operation; The result export module exports the result through a total energy-based start-stop time reverse deduction mechanism, determines the time when the diesel generator needs to stop power supply, and then reversely calculates the latest start time according to the total energy gap and the rated power of the diesel generator in the window.
7. An electronic device, comprising: It comprises: A memory and a processor, which are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform any one of the methods in claims 1-5.
8. A computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions perform any one of the methods in claims 1-5.
