Modelica Language-Based Engine Model Modeling Method and System

The engine model was established through the Modelica language, which solved the problem of unbalanced dynamics and thermodynamics in the existing technology, realized a comprehensive analysis of the engine's dynamic speed and torque, evaluated the economic and environmental characteristics of the engine, and provided efficient simulation tools.

CN120012279BActive Publication Date: 2025-07-04NANJING YUANSI SIMTEK CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510487767.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-07-04
Estimated Expiration
2045-04-18

AI Technical Summary

Technical Problem

The prior art is difficult to build an efficient and accurate engine model, failing to comprehensively consider dynamic and thermodynamic balance, and failing to analyze fuel consumption and emission substances.

Method used

The engine model is established using the Modelica language. By reading the ECU command information, the average effective pressure and ideal output torque of the engine are calculated, the torque output value is calculated based on the dynamic correction coefficient, and dynamic and thermodynamic balance are carried out to establish an external interactive interface to connect cooling and load components.

Benefits of technology

It realizes a comprehensive analysis of dynamic speed and torque during engine operation, can evaluate the economic and environmental characteristics of the engine, and provides efficient simulation tools.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120012279B_ABST
    Figure CN120012279B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for modeling an engine model based on the Modelica language. The method includes: reading external engine ECU instruction information; calculating the current engine mean effective pressure and the ideal output torque according to the engine power parameter characteristics and the ECU instruction information; calculating the engine external torque output value by combining the engine ideal output torque, temperature and dynamic correction coefficient; establishing an external interaction interface, and performing dynamic balance and thermodynamic balance calculations in combination with the engine external torque output value to obtain the engine model. Among them, the external interaction interface includes a thermal interface and a flange interface. The thermal interface is used for connecting the engine to the cooling components, and the flange interface is used for connecting the engine to the load components. The present invention establishes an engine model based on the Modelica language, realizes comprehensive analysis of the dynamic speed and torque conditions during the engine operation process, and simultaneously analyzes the economic, environmental protection and other characteristics of the engine during this process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automotive component simulation modeling, and particularly to a method and system for modeling an engine model based on the Modelica language. Background Art

[0002] As a core component of an automobile, the performance of the engine is importantly related to factors such as the power, efficiency, and emissions of the vehicle. During the vehicle design process, it is often necessary to model and analyze information such as the torque, fuel consumption, and emission substances of the engine to verify the overall performance of the vehicle. An efficient and accurate engine model modeling plays an intuitively important role in the reasonable analysis of the overall vehicle performance.

[0003] Patent CN118395685A discloses a method, system, and storage medium for modeling and simulating a planetary gear hybrid system. The engine model converts the engine demand torque into the engine output torque according to its own operating characteristics. However, the engine model constructed in this patent only models and analyzes the torque, only considers the dynamic model, does not process the thermodynamic equilibrium, and does not analyze the fuel consumption and emission substances. Therefore, the current simulation methods are difficult to make an efficient and accurate model. Summary of the Invention

[0004] Technical Objective: Aiming at the defects in the prior art, the present invention discloses a method and system for modeling an engine model based on the Modelica language. An engine model is established based on the Modelica language, enabling comprehensive analysis of the dynamic speed and torque conditions during the engine operation process, and simultaneously analyzing the economic and environmental protection characteristics of the engine during this process.

[0005] Technical Solution: To achieve the above technical objective, the present invention adopts the following technical solutions.

[0006] A method for modeling an engine model based on the Modelica language, the method comprising:

[0007] Reading external engine ECU instruction information;

[0008] Calculating the current engine mean effective pressure and the ideal output torque according to the engine power parameter characteristics and the ECU instruction information;

[0009] Calculating the engine external torque output value by combining the engine ideal output torque, temperature, and dynamic correction coefficient;

[0010] An external interaction interface is established to perform dynamic balance and thermodynamic balance calculations in combination with the external torque output value of the engine, thereby obtaining an engine model. Among them, the external interaction interface includes a thermal interface and a flange interface. The thermal interface is used for connecting the engine to the cooling components, and the flange interface is used for connecting the engine to the load components.

[0011] An engine model modeling system based on the Modelica language, which is used to implement the above-mentioned engine model modeling method based on the Modelica language, includes:

[0012] An instruction reading module, which is used to read the external engine ECU instruction information;

[0013] A modeling module, which is used to calculate the current engine mean effective pressure and the ideal output torque according to the engine power parameter characteristics and the ECU instruction information; calculate the external torque output value of the engine in combination with the ideal output torque, temperature and dynamic correction coefficient of the engine; establish an external interaction interface, and perform dynamic balance and thermodynamic balance calculations in combination with the external torque output value of the engine to obtain an engine model. Among them, the external interaction interface includes a thermal interface and a flange interface. The thermal interface is used for connecting the engine to the cooling components, and the flange interface is used for connecting the engine to the load components.

[0014] Beneficial effects: The Modelica language is an object-oriented, open-source, non-causal, multi-physics field modeling language that represents system behavior with equations and supports the modeling of dynamic and discrete physical systems. It is widely used in the modeling and simulation of multi-field complex physical systems and can be used for the virtual design and simulation optimization of engine models. The present invention establishes an engine model based on the Modelica language, enabling the comprehensive analysis of the dynamic speed and torque conditions during the engine operation process, and at the same time, the economic and environmental protection characteristics of the engine during this process can be analyzed. Description of the Drawings

[0015] Figure 1 It is the flowchart of the method steps of the embodiment of the present invention;

[0016] Figure 2 It is the flow block diagram of the embodiment of the present invention;

[0017] Figure 3 It is the schematic diagram of the external interface simulation framework of the embodiment of the present invention. Detailed Embodiments

[0018] To enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts shall fall within the protection scope of this application.

[0019] Embodiment

[0020] As shown in the attached Figure 1 and the attached Figure 2 A method for modeling an engine model based on Modelica language in this embodiment models a generator through Modelica language, including the following steps:

[0021] Step 1: Read external engine ECU instruction information;

[0022] Among them, the ECU instruction information varies between 0 and 1. 1 represents a full-load working instruction, 0 represents a no-load instruction, and among them, the instructions in the range of 0-1 represent partial-load working instructions.

[0023] Step 2: Calculate the current engine mean effective pressure and the ideal output torque according to the engine power parameter characteristics and the ECU instruction information; among them, the engine power parameter characteristics are represented in the form of a BMEP table, and this table is provided by the user;

[0024] Query the maximum and minimum values of the engine mean effective pressure according to the engine power parameter characteristics, and calculate the value of the current engine mean effective pressure in combination with the current ECU instruction;

[0025] Specifically, the calculation method is:

[0026] ,

[0027] Among them, , are the maximum and minimum values of the brake mean effective pressure respectively, with the unit of bar. The above variables are obtained by querying the brake mean effective pressure table, and the input information of the table is the engine speed, is the brake mean effective pressure, with the unit of bar. is the ECU instruction, that is, the ECU instruction information obtained in Step 1, and the value range is 0~1.

[0028] Calculate the ideal torque according to the current engine mean effective pressure and the engine power parameter characteristics. The specific calculation method of the ideal torque is as follows:

[0029] For a four-stroke engine:

[0030] ,

[0031] ,

[0032] For a two-stroke engine:

[0033] ,

[0034] ,

[0035] where FMEP is the friction mean effective pressure in bar, and this variable is obtained by querying the FMEP table, with the input information of the table being the engine speed and temperature information. is the ideal output torque of the engine in Nm; is the ideal friction torque of the engine in Nm; V is the engine displacement.

[0036] Step 3: Calculate the external torque output value of the engine by combining the ideal output torque, temperature, and dynamic correction coefficient of the engine;

[0037] where dynamic correction mainly considers the difference between the current environmental conditions and the obtained engine performance, and then corrects the maximum torque according to the environmental conditions. The calculation formula for the dynamic correction coefficient is:

[0038] ,

[0039] where, is the dynamic correction coefficient; is the current environmental air density in kg / m 3 ; is the reference environmental air density in kg / m 3 ; is the current environmental air temperature in K; is the reference environmental temperature in degC.

[0040] Any change in the friction mean effective pressure FMEP due to different temperature conditions will affect the torque performance of the engine. Therefore, the calculation formula for the engine torque temperature correction value is as follows:

[0041] ,

[0042] where, is the engine torque temperature correction value; is the friction torque at the reference temperature of the engine in Nm; T hotis the engine reference temperature, in degC, which is set by the user and selected according to the actual situation. After obtaining the friction torque at the engine reference temperature by referring to the engine friction mean effective pressure table, i.e., the FMEP table, it is calculated by combining the formula in Step 2. The input quantities for looking up the table are the engine speed and the engine reference temperature; is the friction torque at the current engine temperature, in Nm; Temp is the current engine temperature, in degC.

[0043] After superimposing these two correction factors of temperature and dynamic correction factor, the actual torque output is obtained, that is, the external torque output value of the engine The calculation formula is:

[0044] ,

[0045] wherein, is the ideal output torque of the engine, is the dynamic correction factor, is the engine torque temperature correction value. After calculating the external torque output value of the engine, it can be used as the input value for looking up the table in the subsequent steps.

[0046] Step 4: As shown in the appendix Figure 3 , establish an external interface, and perform dynamic balance and thermodynamic balance calculations in combination with the external torque output value of the engine to obtain an engine model. Among them, the external interface includes a thermal interface and a flange interface. The thermal interface is used for connecting the engine to the cooling components, and the flange interface, also called the power interface, is used for connecting the engine to the load components. The present invention provides an efficient and rapid engine modeling and solving method, and at the same time provides an effective simulation tool for users who have requirements in aspects of engine power and energy consumption characteristics evaluation. The specific method is as follows:

[0047] The dynamic balance includes:

[0048] Establish a standard flange interface with the rotational speed as the potential variable and the torque as the flow variable, and perform dynamic balance calculations with the external drive components. The interaction characteristics between the two are that the potential variables are equal and the sum of the flow variables is 0: The formula is as follows:

[0049] ,

[0050] ,

[0051] ,

[0052] The thermodynamic balance formula includes:

[0053] A standard thermal interface with temperature as the potential variable and heat flux as the flow variable is established for thermodynamic equilibrium calculation with the external cooling component interface. The interaction characteristic between the two is that the potential variables are equal and the sum of the flow variables is 0. The calculation formula is:

[0054] ,

[0055] ,

[0056] ,

[0057] where, is the torque of the engine power interface, is the torque of the load power interface, obtained from external modeling and coupled with the torque of the engine power interface, is the rotational speed of the engine power interface, which is a dynamic variable. After the establishment of the power interface coupling, constraints are established based on the dynamic characteristics of external modeling. The rotational acceleration or deceleration is generated according to the torque difference and the external equivalent inertia and integrated to obtain the interface rotational speed; after the establishment of the interface coupling, this variable depends on the external dynamic characteristics. is the rotational speed of the load power interface, is the heat flux rate of the engine thermal interface, is the heat flux rate of the cooling component thermal interface, is the temperature of the heat engine thermal interface, is the temperature of the cooling component thermal interface, The temperature value of varies with the characteristics of

[0058] and the cooling medium. After the establishment of the thermal interface coupling, this variable depends on the thermodynamic characteristics of the cooling medium.

[0059] During the modeling process of the present invention, state parameters are also calculated, including the true fuel consumption ratio, the mass of engine emissions, and the exhaust temperature; for use in subsequent engine model work analysis. The calculation process of the state parameters includes:

[0060] Fuel consumption calculation is carried out based on the engine fuel characteristics combined with the influence of temperature and starting coefficient;

[0061] ,

[0062] where, is the true fuel consumption ratio, with the unit of g / kwh; is the fuel consumption value read from the fuel consumption table, obtained by looking up the table using the engine rotational speed and torque information; is the excessive consumption coefficient during engine startup, defined by the user; is the low-temperature effect coefficient, defined by the user, which is an expression related to the engine temperature, i.e., f ( T engine ). This function is a function with temperature as the independent variable and serves as a multiplicative coefficient for the fuel consumption value. The calculated true fuel consumption ratio is used as a state variable in the engine model for subsequent model working analysis.

[0063] Calculate the engine emissions mass and exhaust temperature by combining the current engine operating conditions and temperature information; when the engine speed is less than the idle speed, the engine is in the startup condition, which means the engine is starting up. During the engine startup process, the speed increases from 0 to the idle speed and above. Whether the engine is in the startup condition is used to determine whether the excessive consumption coefficient during engine startup takes effect. When the engine speed is greater than or equal to the idle speed, the excessive consumption coefficient during engine startup takes the value of 1.

[0064] Among them, the calculation of the engine emissions mass includes the calculation of the engine equivalence ratio, exhaust gas mass flow rate, and pollutant emissions information. The process is as follows:

[0065] Calculate the equivalence ratio by looking up the table and combining startup and temperature corrections. The formula for the current equivalence ratio is:

[0066] ,

[0067] Among them, is the current equivalence ratio; is the value obtained by querying the engine equivalence ratio table using the engine effective pressure and speed. The engine equivalence ratio table is a table customized by the user based on engine characteristics; is the excessive consumption coefficient during engine startup, set by the user; is the low-temperature effect correction coefficient, set by the user.

[0068] Calculate the exhaust gas mass flow rate using the fuel consumption and equivalence ratio. The formula is as follows:

[0069] ,

[0070] Among them, is the exhaust gas mass flow rate, with the unit of g / s, is the stoichiometric air / fuel ratio, which is an inherent property of the fuel and is determined by the user, is the engine speed, with the unit of rev / min, is the engine idle speed, with the unit of rev / min. is the fresh air mass flow rate at idle speed, with the unit of g / s. The driving condition refers to the condition when the engine speed is greater than the load component, and the braking condition refers to the condition when the engine speed is less than or equal to the load component, also known as the back-dragging condition.

[0071] The pollutant emissions are calculated as follows:

[0072] The pollutant emissions are corrected by combining the look-up table information of torque and speed with the temperature. The calculation expression of the actual pollutant emission value is as follows:

[0073] ,

[0074] ,

[0075] ,

[0076] Among them, is the actual pollutant emission value, with the unit of g / kWh, which refers to the mass of pollutants produced per 1 kwh of energy generated. is the emission value read from the engine pollutant specific emission table, and the engine pollutant specific emission table is a table customized by the user based on the engine characteristics. is the emission correction coefficient, defined by the user. is the coefficient during engine startup enrichment, defined by the user. is the engine temperature, with the unit of degC. is the lower limit of the engine temperature threshold, with the unit of degC, defined by the user; is the upper limit of the engine temperature threshold, with the unit of degC, defined by the user; 、 are the temperature correction coefficients. When the engine temperature is between the upper and lower limits of the engine temperature threshold, linear interpolation is used for coefficient correction.

[0077] The exhaust temperature calculation process includes:

[0078] The exhaust temperature, that is, the emission gas temperature, is obtained by combining the look-up table function with the temperature correction coefficient. The calculation formula is as follows:

[0079] ,

[0080] Among them, is the actual exhaust temperature. is the exhaust temperature obtained by looking up the engine exhaust temperature table, with the unit of degC, and the input is torque and engine speed. The engine exhaust temperature table is a table customized by the user based on the engine characteristics; is the temperature effect correction coefficient, which is obtained by user definition.

[0081] The present invention also discloses an engine model modeling system based on Modelica language, which is used to implement the above-mentioned engine model modeling method based on Modelica language, and includes:

[0082] An instruction reading module, which is used to read external engine ECU instruction information;

[0083] A modeling module, which is used to calculate the current engine mean effective pressure and the ideal output torque according to the engine power parameter characteristics and the ECU instruction information; calculate the engine external torque output value by combining the engine ideal output torque, temperature and dynamic correction coefficient; establish an external interaction interface, and perform dynamic balance and thermodynamic balance calculations by combining the engine external torque output value to obtain an engine model, wherein the external interaction interface includes a thermal interface and a flange interface, and the thermal interface is used for the engine to be connected to the cooling components, and the flange interface is used for the engine to be connected to the load components.

[0084] The present invention establishes an engine model based on Modelica language, enabling comprehensive analysis of the dynamic speed and torque conditions during the engine operation process, and at the same time, the economic and environmental protection characteristics of the engine during this process can be analyzed.

[0085] In the embodiments of the present application, the "first", "second" (if any) in the names such as "first" and "second" are only used as name identifiers and do not represent the first and second in order.

[0086] The above are only the preferred embodiments of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A modeling method for an engine model based on the Modelica language, characterized in that the method Including: Reading external engine ECU command information; Calculating the current engine mean effective pressure and ideal output torque according to the engine power parameter characteristics and ECU command information; Calculating the engine external torque output value by combining the engine ideal output torque, temperature and dynamic correction coefficient; Establishing an external interaction interface, and performing dynamic balance and thermodynamic balance calculations by combining the engine external torque output value to obtain an engine model, wherein the external interaction interface includes a thermal interface and a flange interface, the thermal interface is used for connecting the engine to the cooling components, and the flange interface is used for connecting the engine to the load components; The calculation formula of the dynamic correction coefficient is: , Among them, is the dynamic correction coefficient; is the current ambient air density; is the reference ambient air density; is the current ambient air temperature; is the reference ambient temperature; The calculation formula of the engine torque temperature correction value is: , Among them, is the engine torque temperature correction value; is the friction torque at the engine reference temperature; is the friction torque at the current engine temperature.

2. The engine model modeling method based on Modelica language according to claim 1, characterized in that: External torque output value of the engine The calculation formula is as follows: , Among them, is the ideal output torque of the engine, is the dynamic correction coefficient, is the engine torque temperature correction value.

3. A method for modeling an engine model based on the Modelica language according to claim 1, characterized in that: The dynamic balance includes: establishing a standard flange interface with the rotational speed as the potential variable and the torque as the flow variable, and performing dynamic balance calculations with the external drive components. The interaction characteristics between the two are that the potential variables are equal and the sum of the flow variables is 0; The thermodynamic balance includes: establishing a standard thermal interface with the temperature as the potential variable and the heat flow rate as the flow variable, and performing thermodynamic balance calculations with the external cooling component interface. The interaction characteristics between the two are that the potential variables are equal and the sum of the flow variables is 0.

4. A method for modeling an engine model based on Modelica language according to claim 3, characterized in that: The dynamic balance formula includes: , , , Among them, is the engine power interface torque, is the load power interface torque, is the engine power interface speed, is the load power interface speed, is the engine's external torque output value.

5. A method for modeling an engine model based on Modelica language according to claim 3, characterized in that: The thermodynamic balance formula includes: , , , Among them, is the heat flow rate of the engine's thermal interface, is the heat flow rate of the cooling component's thermal interface, is the temperature of the heat engine's thermal interface, is the temperature of the cooling component's thermal interface, is the rotational speed of the engine's power interface, is the frictional torque at the current temperature of the engine.

6. A method for modeling an engine model based on Modelica language according to claim 1, characterized in that: During the modeling process of the present invention, state parameters are also calculated, including the actual fuel consumption ratio, engine emissions mass, and exhaust temperature, which are used for subsequent engine model working analysis; the calculation of the engine emissions mass includes the calculation of the engine equivalence ratio, exhaust gas mass flow rate, and pollutant emissions information. The equivalence ratio is calculated by looking up tables and combining startup and temperature corrections; the exhaust gas mass flow rate is calculated using the fuel consumption and equivalence ratio; the pollutant actual emission value is calculated by combining the torque and rotational speed lookup information with temperature corrections.

7. A method for modeling an engine model based on Modelica language according to claim 4, characterized in that: The calculation formula of the current equivalence ratio is: , Among them, is the current equivalence ratio; is the value obtained by looking up a table using the effective pressure and speed of the engine; is the excessive consumption coefficient at engine startup; is the correction coefficient for low-temperature effects; The calculation formula of the exhaust gas mass flow rate is: , wherein, is the exhaust gas mass flow rate, is the stoichiometric air / fuel ratio, is the engine speed, is the engine idle speed, is the fresh air mass flow rate at idle; is the actual fuel consumption ratio; The calculation formula of the actual pollutant emission value is: , , , Among them, is the actual pollutant emission value, is the emission value read from the table, is the emission correction coefficient, is the coefficient during engine startup enrichment, is the engine temperature, is the lower limit of the engine temperature threshold; is the upper limit of the engine temperature threshold; 、 are the temperature correction coefficients.

8. An engine model modeling system based on the Modelica language, which is used to implement an engine model modeling method based on the Modelica language as described in any one of claims 1-7, characterized in that Including: A command reading module for reading external engine ECU command information; A modeling module for calculating the current engine mean effective pressure and ideal output torque according to the engine power parameter characteristics and ECU command information; Calculating the engine external torque output value by combining the engine ideal output torque, temperature and dynamic correction coefficient; Establishing an external interaction interface, and performing dynamic balance and thermodynamic balance calculations by combining the engine external torque output value to obtain an engine model, wherein the external interaction interface includes a thermal interface and a flange interface, the thermal interface is used for connecting the engine to the cooling components, and the flange interface is used for connecting the engine to the load components.

Citation Information

Patent Citations

  • Modelica language-based engine cooling system simulation modeling method

    CN105067271A

  • Carrier rocket whole-process dynamics rapid simulation modeling method based on Modelica unified modeling language

    CN119720830A