A pre-adaptive simulation method and system for power systems based on high-precision modularization

By adopting a high-precision modular pre-adaptive simulation method in the hardware in the power system, the problems of insufficient real-time analysis of the power system model and long development cycle in the prior art are solved, and more efficient model development and hardware in-ring simulation are achieved.

CN119165772BActive Publication Date: 2025-06-06SHANDONG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411271997.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-06-06
Estimated Expiration
2044-09-11

AI Technical Summary

Technical Problem

The hardware of the existing power system has problems such as high integration, complex underlying code packaging, and difficulty in secondary development in ring testing, and lacks pre-conducting real-time model analysis and pre-adaptive research, resulting in long R&D cycles and poor real-time performance, extended development cycles, waste of resources and increased model development costs.

Method used

The pre-adaptive simulation method of the power system based on high-precision modularity is adopted. Through real-time rate prediction and offline self-adjustment of the model, it is necessary to ensure that the real-time rate requirements can still be met under variable or poor hardware conditions, hardware in-loop simulation is carried out, and the multi-objective decision model is iteratively optimized by improving the NSGA-II genetic algorithm to determine the optimal power system model.

Benefits of technology

Real-time prediction is achieved before the model is built, avoiding the problem of poor real-time rate caused by excessive complexity of the model, reducing the additional work of simplification and real-time verification after the model is built, and improving the accuracy and development efficiency of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119165772B_ABST
    Figure CN119165772B_ABST
Patent Text Reader

Abstract

The present invention discloses a pre-adaptive simulation method and system for a power system based on high-precision modularization, and belongs to the field of hardware-in-the-loop test technology. It includes: constructing a power system model based on pre-stored component modules and power system design parameters; performing real-time analysis on the power system model to obtain the real-time rate, and updating the power system model in combination with the real-time rate to meet the hardware-in-the-loop simulation requirements; constructing a multi-objective decision model with the goal of minimizing the cumulative error of pressure simulation and the cumulative error of apparent heat release rate, iteratively optimizing the multi-objective decision model through an improved NSGA‑Ⅱ genetic algorithm, and determining the optimal power system model. It can improve the real-time and accuracy of the hardware-in-the-loop simulation model, and solve the problems of long cycle, poor real-time performance and accuracy of existing engine simulation tests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of hardware-in-the-loop testing, and in particular to a pre-adaptive simulation method and system for a power system based on high-precision modularization. Background Art

[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.

[0003] With the diversified development of research on various types of power systems for ships and vehicles, the defects of traditional power system research methods have gradually become apparent.

[0004] In the early days, the research and testing methods of power systems were single, mainly conducted through bench tests. In order to obtain the expected engine performance, a large number of tests were required, and the time and manpower invested greatly prolonged the development cycle of the power system. In addition, traditional bench tests cannot meet the research needs of changes in the internal working process of the power system.

[0005] The development of computer technology has provided a new way for the research of power systems. Software simulation can greatly shorten the development cycle of power systems and make up for the deficiency of traditional bench tests that cannot study the internal processes of power systems, which greatly promotes the development process of power systems. At present, commercial simulation software is often used to build models of power systems. The built power system model is loaded into the hardware-in-the-loop (HIL) test equipment, and the real working process of the power system is simulated according to the pre-set parameters to observe the working effect of the power system. However, there are still the following shortcomings:

[0006] (1) The current commercial power system software has a high degree of integration, the underlying code encapsulation is difficult to view and the structure is complex, making secondary development difficult.

[0007] (2) HIL simulation requires real-time performance, and the model must complete calculations within a limited time. However, there is a lack of research on pre-analysis of the model's real-time performance and pre-adaptation of the model.

[0008] In the existing HIL process, the real-time rate result can only be known after the model is loaded into the in-the-loop simulation device. In the early stage of model establishment, the real-time performance cannot be estimated because the model has not been built. However, the model development and verification cycle is relatively long. If hardware-in-the-loop testing (HIL) is performed after the model is built, once the model complexity is too high and the structure is too complex, it is very easy to have a poor real-time rate or even fail to perform hardware-in-the-loop testing. At this time, the model is already complete and the model architecture is basically determined. In order to solve the real-time problem, the model can only be simplified again. This will inevitably require multiple rounds of model simplification and real-time verification and other additional work.

[0009] Therefore, the lack of technology to conduct real-time analysis of the model in advance and implement pre-offline adaptation of the model based on the real-time analysis will bring great hidden dangers to HIL simulation testing, and will cause many problems such as extended development cycle, waste of resources and increased model development costs. Summary of the invention

[0010] In order to address the deficiencies in the prior art, the present invention provides a high-precision modular based pre-adaptive simulation method, system, electronic device, computer-readable storage medium and computer program product for a power system. By predicting the real-time rate of the model and self-adjusting it offline, the real-time rate requirements can still be met under variable or poor hardware conditions, and hardware-in-the-loop simulation can be performed, while improving the accuracy of the model.

[0011] In a first aspect, the present invention provides a pre-adaptive simulation method for a power system based on high-precision modularization;

[0012] A high-precision modularized pre-adaptive simulation method for a power system, comprising:

[0013] Build a powertrain model based on pre-stored component modules and powertrain design parameters;

[0014] Performing real-time analysis on the power system model to obtain a real-time rate, and updating the power system model in combination with the real-time rate to meet hardware-in-the-loop simulation requirements;

[0015] With the goal of minimizing the cumulative error of pressure simulation and the cumulative error of apparent heat release rate, a multi-objective decision-making model is constructed. The multi-objective decision-making model is iteratively optimized through the improved NSGA-Ⅱ genetic algorithm to determine the optimal power system model.

[0016] In a second aspect, the present invention provides a high-precision modular-based pre-adaptive simulation system for a power system;

[0017] A high-precision modularized power system pre-adaptive simulation system, comprising:

[0018] The model building module is configured to: build a power system model based on pre-stored component modules and power system design parameters;

[0019] The pre-adaptive module is configured to: perform real-time analysis on the power system model to obtain a real-time rate, and update the power system model in accordance with the real-time rate to meet the hardware-in-the-loop simulation requirements;

[0020] The optimization module is configured as follows: taking the minimum cumulative error of pressure simulation and the cumulative error of apparent heat release rate as the goal, a multi-objective decision model is constructed, and the multi-objective decision model is iteratively optimized by improving the NSGA-Ⅱ genetic algorithm to determine the optimal power system model.

[0021] In a third aspect, the present invention provides an electronic device;

[0022] An electronic device comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-mentioned high-precision modular-based power system pre-adaptive simulation method.

[0023] In a fourth aspect, the present invention provides a computer-readable storage medium;

[0024] A computer-readable storage medium stores a computer program / instruction thereon, which, when executed by a processor, implements the steps of the above-mentioned high-precision modular-based power system pre-adaptive simulation method.

[0025] In a fifth aspect, the present invention provides a computer program product;

[0026] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned high-precision modularized power system pre-adaptive simulation method. Compared with the prior art, the beneficial effects of the present invention are:

[0027] 1. The technical solution provided by the present invention is a modular model building method. When developing a new power system model in the later stage, the corresponding component modules are directly called and the module parameters are modified. The new power system model can be obtained by coupling the components, which shortens the development time; it can avoid re-building the model of the new power system from the underlying principles of the components, simplify the research and development process, shorten the research and development time and save research and development costs.

[0028] 2. The technical solution provided by the present invention can predict the real-time performance of the model based on multiple factors such as simulation step size and hardware conditions before the model is built, thereby solving the problem that the real-time performance cannot be estimated in the early stage of model building because the model has not been fully built, thereby avoiding the problem of poor real-time rate or even inability to perform hardware-in-the-loop testing due to the high complexity and overly complex structure of the established model.

[0029] 3. The technical solution provided by the present invention can make a rational analysis of the real-time performance of the model under the current conditions when the on-site working conditions of the model loaded into the HIL cannot meet the working conditions at the beginning of the model design, and drive the model to make pre-offline adaptive structural adjustments based on the obtained real-time performance to meet the real-time requirements of the current situation; this method greatly reduces the additional work of simplifying the model and verifying its real-time performance after the model is built.

[0030] 4. The technical solution provided by the present invention adopts the idea of ​​simulated annealing to optimize the NSGA-Ⅱ multi-objective genetic algorithm, and uses parsim to perform parallel calculations on individuals composed of different parameters of the cell array cell, opens a parallel computing thread pool, and uses a multi-threaded parallel computing method to simulate multiple groups of optimization parameters at the same time, and processes multiple groups of optimization results to obtain parameters that characterize the isentropic index, gas constant and heat transfer process that are more in line with the reaction process of a specific power system in a shorter time. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0032] Figure 1 A schematic diagram of a process flow provided by an embodiment of the present invention;

[0033] Figure 2 A schematic diagram of an engine module provided by an embodiment of the present invention;

[0034] Figure 3 An example diagram of modular construction of an engine provided by an embodiment of the present invention;

[0035] Figure 4 A schematic diagram of an engine thermal system provided by an embodiment of the present invention;

[0036] Figure 5 A simplified example diagram of an air intake pipe module provided by an embodiment of the present invention;

[0037] Figure 6 A schematic diagram of the optimization process of the improved NSGA-Ⅱ genetic algorithm provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0038] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0039] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0040] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0041] Embodiment 1

[0042] The existing engine simulation lacks real-time analysis and pre-adaptive research on engine models, resulting in long R&D cycle, poor real-time performance and other problems; therefore, the present invention provides a high-precision modular-based power system pre-adaptive simulation method, which combines the structural composition of the power system model and the deployed hardware conditions to perform real-time analysis and pre-offline adaptation of the power system model; at the same time, the power system model is optimized using an improved genetic algorithm to improve accuracy.

[0043] Next, combine Figure 1-Figure 6 , a high-precision modularized power system pre-adaptive simulation method disclosed in this embodiment is described in detail. The high-precision modularized power system pre-adaptive simulation method comprises the following steps:

[0044] S1. Construct a power system model based on pre-stored component modules and power system design parameters.

[0045] Specifically, each component in the power system is modularized in Simulink, and in the later development of the power system model, the corresponding component module is directly called and the module parameters are modified, and then the components are coupled to obtain the power system model.

[0046] In this embodiment, the process of S1 is described in detail by taking the power system as an engine as an example.

[0047] According to the structure and parameters of the engine, the corresponding component modules are selected for coupling to obtain the engine model. Figure 2-Figure 3 , taking the compressor module in the engine as an example, a parameter input demonstration was carried out, and the designed compressor model can be obtained according to the input parameters.

[0048] S2. Perform real-time analysis on the power system model to obtain the real-time rate, and update the power system model based on the real-time rate to meet the requirements of hardware-in-the-loop simulation.

[0049] Taking the engine as an example, S2 specifically includes:

[0050] S201, calculate the real-time rate according to the structure of the engine model and the hardware conditions of the engine model operation. If the real-time rate is lower than the preset real-time rate requirement, execute S202.

[0051] In this embodiment, the real-time analysis of the engine model is an analysis of the calculation time of one working cycle of a cylinder in the engine model.

[0052] Specifically, the real-time rate of the engine model is calculated according to the number of engine working cycles per second, the number of iterations under one engine working cycle, the CPU main frequency, the number of cylinders, the number of intake and exhaust ports, and the number of turbochargers in the actual working process, as shown below:

[0053]

[0054] Where n cycle Indicates the number of engine working cycles per second during actual working process, which depends on the engine speed; n step It represents the number of iterations in one working cycle of the engine, which depends on the crankshaft angle rotated in each simulation step; n GHz Indicates the CPU main frequency, representing the hardware conditions of the engine model under a certain fixed environment; n cylinder Indicates the number of cylinders; n piping Indicates the number of intake and exhaust ducts; n turbo Indicates the number of turbochargers; m 1 、m 2 、m 3 、m 4 、m 5 、m 6 、m 7 and m 8 Represents the empirical coefficient.

[0055] Here, the empirical coefficient is determined by testing the real-time rate of the model under different engine working cycles per second during the actual working process. Specifically, the crankshaft angle / CPU main frequency / model structure of the model under a single simulation step is kept unchanged, and the real-time rate of the model running at multiple different speeds is tested. According to the test results, the real-time rate of the model running at m is listed. 1 and n 1 The system of equations, according to which m is solved 1 and n 1Similarly, for the remaining empirical parameters, the single variable is controlled, and finally m and n with different subscripts can be obtained. The final real-time rate calculation formula is as follows:

[0056]

[0057] The real-time rate calculation formula can be used to predict the real-time rate of engine models with different speeds, different hardware conditions, different single step lengths, and different structures. When the established model is used in different working environments, it can be estimated whether the actual real-time rate can meet the real-time rate required by the model operation based on different hardware conditions and the current model structure before hardware-in-the-loop simulation is performed.

[0058] Next, for ease of understanding, the real-time rate analysis idea described in this embodiment is further explained.

[0059] The real-time performance of the engine model is affected by two factors: the actual running time of one cycle of the engine and the calculation time of one cycle of the engine model on the computer. In simple terms, the real-time rate of the engine model can be quantified as follows:

[0060]

[0061] Among them, η REAL-TIEM represents the real-time rate, t actul Indicates the actual running time of one engine cycle, t calculate Indicates the computation time of one cycle on the computer.

[0062] The actual running time of one working cycle of the engine is determined by the engine speed. The expression is as follows, where n is the speed in rpm:

[0063]

[0064] When the engine speed is determined, the actual running time of a cycle is also determined. As the speed increases, the real-time rate will increase, and the higher the calculation speed requirement of the computer, the more difficult it will be to achieve real-time simulation.

[0065] The calculation time of one cycle of the engine model on the computer is affected by the computer's hardware conditions, model complexity and algorithm selection. As shown in the following table, we can see the factors that affect the model calculation speed.

[0066]

[0067]

[0068] Models are often affected by actual real-world situations. The same model can run normally when the computer hardware conditions and memory and disk resources are sufficient, and the real-time rate meets the requirements. However, it cannot run when the hardware conditions are poor or the memory and disk resources are insufficient, and the real-time rate cannot meet the HIL simulation requirements. The model itself cannot adapt to the environment according to the actual situation and improve its real-time rate to adapt to the current operating environment.

[0069] Therefore, in this embodiment, the time complexity is used to analyze the calculation time of one working cycle of the model cylinder to quantitatively evaluate the relative size of the program calculation speed. Specifically, the time complexity is used to calculate the sum of the frequencies of all simulink modules. The model contains a certain number of operation modules. Assuming that the calculation time of each module is the same, the running time of the model is proportional to the number of execution times of the modules in the model. Therefore, the real-time performance of the model can be calculated using the time complexity theory. O(fn) is used to represent the time complexity of the cylinder working cycle, where fn is the frequency of the statement with the highest frequency in the cycle, including constant order O(1), linear order O(n), square order O(n 2 ).

[0070] Specifically, in the real-time analysis of the engine model, the actual speed and simulation step size will affect the real-time performance. Combined with the module coupling in the engine model, assuming that the actual working engine speed per second is n cycle (unit: rpm), the number of calculations for one engine cylinder working cycle is n step At the same time, the actual operating conditions of the model will also affect the operating time of one working cycle of the cylinder. The CPU main frequency represents the hardware conditions for the model operation. The main frequency is n GHz (Unit: GHz). If there is no other loop inside loop A, the time complexity is O(n cycle )×O(n step )×O(n GHz ); The number of cycles of the cylinder module B is nested inside the loop A, and the number of cycles depends on the number of cylinders n cylinder , then the time complexity is O(n cycle )×O(n step )×O(n GHz )×O(n cylinder ); At the same time, there is also an intake and exhaust duct C cycle in parallel with the B cylinder module in cycle A. The number of cycles depends on the intake and exhaust pipe n piping , then the time complexity is O(n cycle )×O(n step )×O(n GHz )×{O(n cylinder )+O(n piping)}; In the cylinder module B, there is also a loop D, the number of loops depends on n cylinder , then the time complexity becomes O(n cycle )×O(n step )×O(n GHz )×O(n cylinder 2 ). Therefore, it can be concluded that the simulation cycle time expression of the engine model built by simulink is:

[0071]

[0072] In the formula, (O(n cylinder )+O(n piping )) flow Corresponding to the flow calculation part between the intake and exhaust ducts, turbocharger, and cylinder components.

[0073] Expand the above formula to quantitatively analyze the impact of different factors on the real-time rate, and use this formula to calculate the real-time rate of different operating speeds and different model structures. cycle ) is expanded to m×n cycle +n,O(n piping 2 ) can be expanded to m 1 ×n piping 2 +m 2 ×n piping +n, according to this expansion method, the above real-time rate calculation formula is obtained.

[0074] S202. Simplify the modules in the engine model according to the real-time rate requirement and the importance of the modules.

[0075] By simplifying the modules in the engine model, the real-time performance of the engine model can be improved, but the accuracy of the model will also be slightly reduced; the cylinder module is the most important module in the engine model, and its accuracy is crucial to the accuracy of the entire model. Therefore, when simplifying the modules in the engine model, the number of intake and exhaust pipes n is first considered. piping Simplification, then consider the number of turbochargers n turbo Finally, consider the simplification of the cylinder module.

[0076] For the engine model, in one four-stroke (one working cycle), the engine crankshaft angle rotates 720°. If the engine model has four cylinders, when cylinder A rotates 720°, cylinder B rotates 540°, cylinder C rotates 360°, and cylinder D rotates 180°. The crankshaft angle difference between the working states of each cylinder is (720° / total number of cylinders). In other words, the state of each cylinder is the same, but the initial phase is different, similar to the relationship between sinusoidal functions such as sin(x+90°) and sin(x+30°). The shapes are the same, but there is a certain phase difference between them. Therefore, the intake pipe module can represent the intake pipe modules corresponding to different cylinders A / B / C / D by making a certain signal delay, so the intake pipe module can be simplified, but because the future model needs to set some differential parameters for each intake pipe, it is necessary to retain as many intake pipe modules as possible.

[0077] Next, the process of S202 is described in detail:

[0078] S2021, add the total number to n piping ×n turbo n combinations piping 、n turbo For example, the real-time rate calculation formula of S201 is used for calculation to obtain different n piping 、n turbo Combined real-time rate.

[0079] S2022, in the case of n meeting the real-time rate requirement piping / n turbo Select the one with the least number of changed modules among multiple combinations, that is, n piping +n turbo The combination with the largest value n piping_best / n turbo_best , adjust the number of intake and exhaust pipes and turbochargers to n piping_best / n turbo_best , which can minimize the accuracy loss caused by simplified modules while ensuring the real-time rate of the model.

[0080] For example, assume that the engine model originally has 4 intake duct modules and 4 cylinder modules, and each intake duct module corresponds to 1 cylinder module. The input signal source in each intake duct module is controlled by two signal switches. When the number of intake duct modules is 2, the real-time rate of the model meets the requirements and the loss of accuracy is minimal. At this time, intake pipe modules 1 and 2 remain unchanged, and the delayed output signals of intake pipe modules 2 and 3 are equivalent to the output signals of intake pipes 3 and 4. This reduces the complexity of the model and ensures the number of signals output by the intake pipe module and the signal effect transmitted to the cylinder module.

[0081] S2023. Calculate the real-time rate of the simplified engine model using the real-time rate calculation formula. If the real-time rate requirement is met, the model pre-adaptive update is completed; otherwise, pre-adaptive adjustment is performed on the turbocharger module and S2024 is executed.

[0082] Here, the principle of simplifying the turbocharger module is the same as S2022 and will not be repeated here.

[0083] S2024. Calculate the real-time rate of the simplified engine model using the real-time rate calculation formula. If the real-time rate requirement is met, the model pre-adaptive update is completed; otherwise, pre-adaptive adjustment is performed on the cylinder module and S2025 is executed.

[0084] Here, the principle of simplifying the cylinder module is the same as S2022 and will not be repeated here.

[0085] S2025. Calculate the real-time rate of the simplified engine model by using the real-time rate calculation formula. If the real-time rate requirement is met, the model is pre-adaptively updated. Otherwise, calculate the number of iterations in one working cycle that can meet the real-time rate requirement according to the specified real-time rate requirement and the CPU main frequency information, and simulate the engine according to the number of iterations to meet the real-time rate requirement of the HIL hardware-in-the-loop simulation. It is expressed as follows:

[0086]

[0087] In this step, the real-time rate of the engine model is improved by adjusting the number of iterations under one working cycle of the full engine model.

[0088] S3. With the goal of minimizing the cumulative error of model simulation pressure and the cumulative error of model simulation apparent heat release rate, a multi-objective decision model is constructed, and the multi-objective decision model is iteratively optimized by improving the NSGA-Ⅱ genetic algorithm to determine the optimal engine model. Specifically, it includes:

[0089] S301. Combining the physicochemical characteristics and thermodynamic development laws of the working fluid in the engine cylinder, a multi-objective decision model is constructed with the goal of minimizing the cumulative error of model simulation pressure and the cumulative error of model simulation apparent heat release rate.

[0090] In this embodiment, the objective function is expressed as follows:

[0091] f=min{p acc_err}+min{Q acc_err )} (7)

[0092] Model simulation pressure cumulative error function p acc_err It is expressed as follows:

[0093]

[0094] In the formula, p acc_err is the cumulative error between the test value and the simulation value of the cylinder pressure in one complete working cycle of the cylinder, p exp is the test value, p sim is the simulation value.

[0095] In the optimization process of the model simulation pressure accumulation error function, the simulation calculation at each simulation step is obtained by integrating the following formula, which is expressed as:

[0096]

[0097] Where m is the mass of the working fluid in the cylinder, and V is the instantaneous working volume of the cylinder.

[0098] Here, the accuracy of the formula is limited by The impact of accuracy, It is expressed as:

[0099]

[0100] In the formula, C v is the isochoric specific heat, C p is the isobaric specific heat, the subscripts s and e represent the intake and exhaust, m is the mass flow rate, Q is the heat released by combustion, Q w Transfer heat to the cylinder, is the cylinder crankshaft angle, u is the specific internal energy ratio, and h is the specific enthalpy.

[0101] C v The calculation formula is as follows:

[0102]

[0103] The calculation formula of u is as follows:

[0104] u=C v ×T(12)

[0105] The calculation formula of h is as follows:

[0106] h=C p ×T(13)

[0107] Based on this, it can be seen that the accuracy of the above formula is affected by and impact.

[0108] The isentropic index formula is as follows:

[0109]

[0110] The ideal gas constant formula is as follows:

[0111]

[0112] In the formula, represents the isentropic index, represents the ideal gas constant, r 1 、r 2 、r 3 , k 1 , k 2 , k 3 , k 4 Indicates the amount to be optimized. Indicates the excess air coefficient.

[0113] In this embodiment, in the process of calculating the isentropic index and the ideal gas constant, the physicochemical characteristics of the working fluid in the engine cylinder are fully considered, thereby improving the calculation accuracy of the isentropic index and the ideal gas constant.

[0114] Model simulation apparent heat release rate cumulative error function Q acc_err It is expressed as follows:

[0115]

[0116] In the formula, Q acc_err is the cumulative error between the apparent heat release rate in the cylinder and the apparent heat release rate obtained from the test,

[0117] Q B_exp-w_exp is the apparent heat release rate measured experimentally taking heat transfer into account, Q B_sim is the heat released by fuel combustion during the simulation, Q w_sim Heat transfer during the simulation.

[0118] In the optimization process of the cumulative error function of the model simulation apparent heat release rate, dQ B_sim It is derived from the following formula:

[0119]

[0120] In the formula, H u Indicates the low fuel calorific value, m B0 Indicates the amount of fuel supplied per cylinder cycle.

[0121] in, It is expressed as:

[0122]

[0123] Where: SOC represents the starting point of combustion, β i It indicates the proportion of heat released in a certain combustion stage to the total heat released. Indicates the combustion duration of a certain combustion stage, m iIndicates the combustion quality coefficient at a certain combustion stage.

[0124] Therefore, in the model simulation apparent heat release rate cumulative error function, dQ w_sim The accuracy of the dQ B_sim -dQ w_sim Overall accuracy, dQ w_sim It is expressed as:

[0125]

[0126] Where: subscript i = 1, 2, 3 represents the cylinder head, piston and cylinder liner, T wi is the average temperature of the wall, A is the heat exchange area, α g is the instantaneous average heat transfer coefficient.

[0127] In order to improve the accuracy of the calculation of the instantaneous average heat transfer coefficient, the improved NSGA-Ⅱ genetic algorithm is used to iteratively optimize it. The instantaneous average heat transfer coefficient is expressed as:

[0128]

[0129] In this embodiment, considering that heat is generated by fuel combustion and dissipated outward through the cylinder wall, the heat transfer law of the cylinder is affected by various factors such as the combustion properties of the fuel. Therefore, the calculation formula of the instantaneous average heat transfer coefficient is iteratively optimized by improving the NSGA-Ⅱ genetic algorithm to avoid overestimation of the heat transfer and improve the accuracy of the heat transfer calculation.

[0130] In summary, in this embodiment, the quantity to be optimized (decision variable) is r 1 、r 2 、r 3 , k 1 , k 2 , k 3 , k 4 、m 1 、m 2 、m 3 、m 4 .

[0131] S302. The multi-objective decision-making model is iteratively optimized by improving the NSGA-Ⅱ genetic algorithm. Under the constraints of the parameter range of the isentropic index formula, the ideal gas constant formula and the instantaneous average heat transfer coefficient formula, the heat transfer cooling law of the engine cylinder material and the current combustion heat release law in the engine cylinder, the optimal isentropic index formula, the ideal gas constant formula and the instantaneous average heat transfer coefficient are determined to obtain the optimal engine model.

[0132] Specifically, during the optimization process, the individuals with different parameter combinations in the cell array cell are calculated in parallel through parsim, thereby doubling the calculation speed. At the same time, the idea of ​​simulated annealing is applied to the mutation operator in NSGA-II to enhance the local search ability of the algorithm and help avoid falling into the local optimal solution.

[0133] As an implementation method, the improved NSGA-Ⅱ genetic algorithm is used to iteratively optimize the multi-objective decision model until the optimal solution of the decision variables is obtained; the specific process is as follows:

[0134] S3021, set the NSGA-Ⅱ algorithm parameters, including the number of initial populations N, the maximum number of iterations, the crossover probability, and the mutation probability, and obtain the initial population pop nfev , nfev=1, and the fitness of the initial population is calculated by the objective function related formula in S301.

[0135] In nature, as populations continue to evolve, genes within the population become more and more stable. By introducing the idea of ​​simulated annealing into the process of gene mutation, nfev represents the current population mutation probability index, and the mutation probability of each generation is defined as shown in formula (21):

[0136]

[0137] Where, pm nfev Indicates the mutation probability of the current population; pm 0 is the mutation probability of the initial population; T nfev is the mutation probability index T of the current population nfev =max[T min ,α T ×T nfev_last ], where T min Set the minimum temperature, α T is the cooling rate, T nfev_last is the mutation probability index of the previous generation population; T 0 is the mutation probability index in the initial population.

[0138] S3022, sort the individuals non-dominatedly to obtain a non-dominated set, calculate the crowding degree of all individuals, and then obtain the offspring population pop through selection, crossover, mutation, and merging. nfev_next , wherein the engine model simulation is controlled by the process described in S301, the fitness of the offspring population after the cross compilation is completed is calculated, and the offspring population and the parent population are merged. The simulated annealing idea is introduced into the mutation process of each generation. The specific mutation process is as follows:

[0139] (1) According to formula (20), calculate the mutation probability of the current population.

[0140] (2) Perform mutation operation on each gene individual_gene(i) in each individual 'individual' in the current population, using rand and pm nfev Compare, if rand is greater than pm nfev , gene i does not mutate if it is less than pm nfev , i gene variation in individuals.

[0141] (3) In the current nfev generation, the variation range of each gene in the population is shown in formula (22);

[0142]

[0143] Where: bound(i) nfev represents the variation range of gene i in the nfev generation of simulated annealing; bound(i) high Indicates the maximum value of the initial constraint range of gene i; bound(i) low represents the minimum value of the initial constraint range of gene i; T 0 To set the initial temperature;

[0144] S3023. For the mutated gene i in the individual individual determined to be mutated in S2032, calculate the value of gene i after mutation (the mutated gene value in the individual after mutation is m_individual_gene(i)): generate a random number delta in the range [-1,1] and the change range bound(i) of gene i in the current generation. nfev Multiply them together to get the gene value m_individual(i) of the mutated individual, as shown in formula (22). If m_individual(i) is greater than bound(i) high , m_individual(i) takes bound(i) high ; If m_individual(i) is less than bound(i) low , m_individual(i) takes bound(i) low .

[0145] m_individual(i)=individual(i)+delta×bound(i) nfev (twenty three)

[0146] S3024. According to the distribution of the optimal solutions of the decision variables obtained, they are divided into the optimal solution of the cumulative simulation pressure error within a single working cycle of the cylinder and the optimal solution of the cumulative apparent heat release rate within a single working cycle of the cylinder. The required optimal solution is selected according to the accuracy required for the simulation, and the 11 parameters of the selected optimal solution are converted and brought into the formula for calculating the three thermodynamic indicators to obtain the optimal isentropic exponent formula, ideal gas constant formula and instantaneous average heat transfer coefficient, which are used to improve the simulation accuracy of the engine model that has completed pre-adaptation.

[0147] Embodiment 2

[0148] This embodiment discloses a high-precision modularized power system pre-adaptive simulation system, including:

[0149] The model building module is configured to: build a power system model based on pre-stored component modules and power system design parameters;

[0150] The pre-adaptive module is configured to: perform real-time analysis on the power system model to obtain a real-time rate, and update the power system model in accordance with the real-time rate to meet the hardware-in-the-loop simulation requirements;

[0151] The optimization module is configured as follows: taking the minimum cumulative error of pressure simulation and the cumulative error of apparent heat release rate as the goal, a multi-objective decision model is constructed, and the multi-objective decision model is iteratively optimized by improving the NSGA-Ⅱ genetic algorithm to determine the optimal power system model.

[0152] It should be noted that the above-mentioned model building module, pre-adaptive module and optimization module correspond to the steps in Embodiment 1, and the examples and application scenarios implemented by the above-mentioned modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Embodiment 1. It should be noted that the above-mentioned modules, as part of the system, can be executed in a computer system such as a set of computer executable instructions.

[0153] Embodiment 3

[0154] Embodiment 3 of the present invention provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps of the above-mentioned high-precision modular-based power system pre-adaptive simulation method are completed.

[0155] Embodiment 4

[0156] Embodiment 4 of the present invention provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the steps of the above-mentioned high-precision modular-based power system pre-adaptive simulation method are completed.

[0157] Embodiment 5

[0158] Embodiment 5 of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned high-precision modular-based power system pre-adaptive simulation method.

[0159] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0160] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0161] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0162] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0163] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A high-precision modularized power system pre-adaptive simulation method, characterized in that: include: Build a powertrain model based on pre-stored component modules and powertrain design parameters; Performing real-time analysis on the power system model to obtain a real-time rate, and updating the power system model in combination with the real-time rate to meet hardware-in-the-loop simulation requirements; Taking the minimum cumulative error of pressure simulation and the cumulative error of apparent heat release rate as the goal, a multi-objective decision model is constructed, and the multi-objective decision model is iteratively optimized by improving the NSGA-Ⅱ genetic algorithm to determine the optimal power system model; The real-time rate is expressed as: Where n cycle Indicates the number of working cycles of the power system per second during actual working process, which depends on the speed of the power system; n step It represents the number of iterations in one working cycle of the power system, which depends on the crankshaft angle rotated in each simulation step; n GHz Indicates the CPU main frequency, representing the hardware conditions of the power system model under a certain fixed environment; n cylinder Indicates the number of cylinders; n piping Indicates the number of intake and exhaust ducts; n turbo Indicates the number of turbochargers; m1, m2, m3, m4, m5, m6, m7 and m8 represent empirical coefficients.

2. The high-precision modularized pre-adaptive simulation method for a power system according to claim 1, characterized in that: The real-time analysis of the power system model to obtain the real-time rate is specifically as follows: the real-time rate is calculated according to the structure of the power system model and the hardware conditions for the operation of the power system model.

3. The high-precision modularized pre-adaptive simulation method for a power system according to claim 1, characterized in that: The updating of the power system model with the goal of meeting the hardware-in-the-loop simulation requirements is specifically as follows: if the real-time rate of the power system model is lower than the preset real-time rate requirement, the power system model is pre-adaptively adjusted by simplifying the modules in the power system model and / or adjusting the number of iterations of the power system model under a single working cycle.

4. The high-precision modularized pre-adaptive simulation method for a power system according to claim 3, characterized in that: The method of adjusting the number of iterations of the power system model in a single working cycle to pre-adaptively adjust the power system model is as follows: according to the specified real-time rate requirement and CPU main frequency information, the number of iterations in one working cycle that can meet the specified real-time rate requirement is calculated, and the engine simulation is performed according to the number of iterations.

5. The high-precision modularized pre-adaptive simulation method for a power system according to claim 1, characterized in that: The improved NSGA-II genetic algorithm performs parallel calculations on individuals with different parameter combinations in a cell array through the parsim function, combines simulated annealing with the optimization process of individuals in a population, and updates the mutation probability of individuals.

6. A high-precision modularized power system pre-adaptive simulation system, which adopts a high-precision modularized power system pre-adaptive simulation method according to any one of claims 1 to 5, characterized in that: include: The model building module is configured to: build a power system model based on pre-stored component modules and power system design parameters; The pre-adaptive module is configured to: perform real-time analysis on the power system model to obtain a real-time rate, and update the power system model in accordance with the real-time rate to meet the hardware-in-the-loop simulation requirements; The optimization module is configured to: construct a multi-objective decision model with the goal of minimizing the cumulative error of pressure simulation and the cumulative error of apparent heat release rate, iteratively optimize the multi-objective decision model through the improved NSGA-Ⅱ genetic algorithm, and determine the optimal power system model.

7. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the high-precision modular-based pre-adaptive simulation method for a power system as described in any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the steps of the high-precision modular-based pre-adaptive simulation method for a power system described in any one of claims 1 to 5 are implemented.

9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the high-precision modular-based pre-adaptive simulation method for a power system described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Engine thermodynamic simulation model calibration method based on multi-objective optimization

    CN104951628A