Modelica language-based large model driven automobile model modeling method
By using a domain-knowledge-enhanced BERT-CRF model and graph neural network optimization to optimize topology connections, combined with a reinforcement learning framework, the problem of multi-physics coupling modeling in new energy vehicle systems was solved. Natural language-driven intelligent modeling was achieved, generating simulation code that conforms to physical constraints, thus improving modeling efficiency and accuracy.
Patent Information
- Application Number
- CN202510937540.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-10-28
AI Technical Summary
Existing Modelica modeling methods for new energy vehicle systems suffer from difficulties in multi-physics coupling modeling, insufficient accuracy in cross-domain interactive simulation, and the need for repeated debugging and correction of models. Furthermore, the vehicle control code generated by directly applying large language models often violates physical laws and is difficult to handle multi-scale coupling relationships.
Semantic understanding is achieved using a domain-knowledge-enhanced BERT-CRF multi-task model. Combined with graph neural networks and symbolic mathematical derivation, topological connections are optimized through graph attention networks. A multi-objective optimization algorithm and reinforcement learning framework are constructed to generate simulation code that conforms to physical constraints.
It enables intelligent conversion of natural language requirements into Modelica code, lowers the technical threshold for modeling, ensures the physical consistency and engineering reliability of the model, and improves the modeling efficiency and simulation accuracy of complex systems.
Smart Images

Figure CN120850747A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent modeling and automotive simulation technology, specifically to an intelligent automotive system modeling method based on a large language model and Modelica modeling language, applicable to scenarios such as new energy vehicle development and intelligent driving system simulation. Background Technology
[0002] As the automotive industry accelerates its transformation towards electrification and intelligence, the need for multi-domain collaborative modeling of complex electromechanical systems is becoming increasingly urgent. Traditional automotive modeling methods have long relied on tools such as MATLAB / Simulink and Amesim for domain-specific modeling. While these methods have accumulated rich experience in the simulation analysis of single systems (such as engine control and suspension dynamics), they reveal core problems such as difficulties in multi-physics coupling modeling and insufficient accuracy in cross-domain interactive simulation when facing highly integrated technical architectures such as new energy vehicle electric drive systems and intelligent chassis.
[0003] Modelica, as an open standard for unified modeling across multiple domains, offers a new technical approach to automotive system modeling due to its non-causal modeling characteristics and ability to express physical equations. Existing research indicates that Modelica-based hybrid system modeling can improve the coupling efficiency of models from different domains by 40%. However, current Modelica modeling practices still face significant bottlenecks: First, complex system modeling requires engineers to have a deep understanding of Modelica syntax rules and domain knowledge; a complete new energy vehicle power domain model requires writing a large amount of equation code. Second, the physical consistency of cross-domain interfaces is insufficient. For example, when building an electric drive system, the torque transmission equations between the motor electromagnetic model and the gearbox mechanical model are prone to problems such as unit mismatch and missing energy conservation, leading to repeated debugging and correction of the model.
[0004] Currently, artificial intelligence technology offers new insights into overcoming these bottlenecks. Breakthroughs in code generation and knowledge reasoning using Large Language Models (LLMs) have made natural language-driven intelligent modeling possible. However, directly applying general-purpose LLMs to automotive system modeling faces key challenges: generated models often violate physical laws, lack domain knowledge guidance, and struggle to handle multi-scale coupling relationships. Existing research shows that the failure probability of automotive control code generated by the unoptimized GPT-4 model under dynamic conditions is as high as 63%. Therefore, there is an urgent need to construct a dedicated technical framework that integrates domain knowledge, physical constraints, and the capabilities of large models to achieve highly reliable intelligent automotive modeling. Summary of the Invention
[0005] This invention provides a large-model-driven automotive modeling method based on the Modelica language, constructing a fully automated modeling system encompassing requirement understanding, component matching, parameter optimization, and topology generation. The method first employs a domain-knowledge-enhanced BERT-CRF multi-task model to accurately parse natural language requirements into structured triples; it then uses a graph neural network-driven multi-objective optimization algorithm to match optimal component combinations, combining symbolic mathematical derivation and machine learning to collaboratively predict cross-disciplinary parameter feasible regions; innovatively, it utilizes graph attention networks to optimize the topology connection matrix, and integrates template engines and syntax tree analysis techniques to achieve intelligent generation and dynamic verification of simulation code; finally, it constructs a multi-objective reward function to optimize the control strategy through reinforcement learning and establishes a closed-loop knowledge iteration mechanism. This invention combines a large language model with the Modelica multi-domain physical modeling language to construct an intelligent modeling framework for automotive systems, significantly reducing the technical threshold for automotive system modeling while maintaining the rigor of physical modeling. To achieve this modeling process, this invention adopts the following technical solutions:
[0006] A large-model-driven car modeling method based on the Modelica language includes the following steps:
[0007] Step 1: Fine-tune the BERT model using domain knowledge to perform semantic understanding of natural language input, transforming the natural language input into modeling instructions in the form of structured triples. Further, the specific method for fine-tuning the BERT model using domain knowledge is as follows:
[0008] 1. Data Preparation and Labeling: Extract natural language sentences from domain requirement documents (such as product specifications and design reports), and manually label them as structured triples, with the specific format being {"subject": entity or system name,"predicate": relation type,"object": attribute value or constraint}; expand the training data through synonym replacement and sentence transformation to improve the robustness of the model.
[0009] 2. Model architecture adjustment: A CRF (Conditional Random Field) layer is superimposed on the BERT output for entity boundary recognition; a multi-task classification layer is added to the [CLS] tag output of BERT to predict the implicit relation type in the sentence.
[0010] 3. Loss function design: The total loss is the weighted sum of sequence labeling loss (negative log-likelihood of CRF) and relation classification loss (cross-entropy).
[0011] 4. Training strategy: First, pre-train on a large-scale general text (Wikipedia), then train on a medium-scale domain corpus, and finally fine-tune on a small-scale labeled data.
[0012] Step 2: Based on the high-dimensional vector representation of the requirement parameters, retrieve a candidate set of components that meet the functional constraints from the component library. Construct a component interaction graph and use a graph neural network to calculate the compatibility score between nodes, which is expressed as:
[0013]
[0014] Among them, Compatibility(C i C j () indicates the compatibility score, C i C j These represent two nodes, where F is a component's functional attribute and E is... ij For interface characteristics, F Ci 、F Cj They represent C respectively i C j The node features of GNN(E) ij The expression represents the compatibility information of the interfaces between nodes calculated through a graph neural network, where α and β are weighting coefficients. A Pareto front search is performed on performance, cost, and weight using a multi-objective optimization algorithm to output the optimal component combination.
[0015] Step 3: Directly bind explicit requirement parameters to component attributes, and establish a symbolic mathematical model for implicit parameters (such as undefined variables in the dynamic equation). The solver automatically derives closed-loop solutions. Gradient optimization and machine learning models are used in conjunction to predict the feasible region of parameters, ensuring that cross-disciplinary constraints (such as stress limits and thermal stability) are met simultaneously. Furthermore, the specific method for predicting the feasible region of parameters is as follows: Based on the symbolic mathematical model, firstly, the gradient change trend of the objective function and constraints with respect to each parameter is calculated mathematically to generate the gradient field of the parameter space. A constraint-aware gradient descent algorithm is then used to search for local optima along feasible directions. Simultaneously, a multilayer perceptron is used to extensively explore the parameter space, identifying conflicting parameter combinations. Physically based constraints are then introduced to train the generative model, allowing it to learn the parameter distribution patterns under multi-disciplinary constraints. Ultimately, a parameter combination that satisfies all requirements (such as strength, cost, and efficiency) and operates stably is obtained.
[0016] Step 4: Generate an initial topology based on the component connection rule base, optimize the connection path weights using a graph attention network, and output a node-edge relationship matrix. Perform standardized verification on mechanical, electrical, and other interfaces, and generate a pass rate quantification report.
[0017] Step 5: Map parameters and topology to executable simulation code using a template engine, automatically adding physical unit annotations and modular encapsulation. Specifically, firstly, the template engine automatically populates parameter values and component connection relationships into a predefined code framework, adding physical unit annotations to each parameter, and encapsulating functional modules as independent functions to ensure code reusability. Then, abstract syntax tree analysis technology is used to scan the generated code, identifying complex equations (such as multi-level nested differential equations), breaking them down into multiple sub-functions, and optimizing the calculation order to improve efficiency. Finally, static checks ensure unique variable names and type matching, and dynamic verification runs the code and compares it with expected results to ensure the model is correct in both mathematical logic and physical laws.
[0018] Step 6: Embed predefined constraints into the simulation model, including static rules (such as parameter ranges) and dynamic assertions (such as the law of conservation of energy). Verify the exception handling logic through fault injection testing to ensure that the model triggers safety mechanisms in scenarios such as parameter out-of-bounds errors and hardware failures.
[0019] Step 7: Construct a Markov decision process in the simulation environment, using system performance indicators as the reward function, and optimize the control strategy through a deep reinforcement learning algorithm. Specifically, the multi-objective balanced reward function can be expressed as:
[0020] R = λ p ·R 性能 +λ e ·R 效率 -λ c ·C 代价
[0021] Among them, R 性能 As a positive incentive, it quantifies the achievement of core objectives, and is calculated using the following formula: k p Here, x is the normalization factor, and x is the actual value of the performance index. 目标 τ is the target value for the performance index, and τ is the sensitivity parameter.
[0022] R 效率 For resource optimization items, measuring energy consumption, time, or cost, the calculation formula is: E 基准 and E 实际 These represent the design target value and the actual value of resource consumption, respectively, k e The coefficient that maximizes the efficiency score;
[0023] C 代价 This is an additional cost item, including long-term influencing factors such as hardware depreciation and maintenance frequency. The calculation formula is as follows: k c ω is the cost scaling factor, N is the total number of risk event types, and ω is the cost scaling factor. iThe loss weight for a single event i, n i This represents the cumulative number of risk events of type i.
[0024] λ p , λ e , λ c The weighting coefficients of the three indicators mentioned above are adjusted accordingly. The optimized parameters, topology, and validation results are then fed back into the knowledge base to update component compatibility rules and case feature vectors, achieving closed-loop iteration.
[0025] The beneficial effects of this invention are:
[0026] 1. Leveraging domain knowledge to fine-tune the BERT model for semantic understanding of natural language input, the system transforms natural language input into modeling instructions in the form of structured triples, achieving end-to-end intelligent conversion from natural language requirements to Modelica code. Users only need to input natural language instructions, and the system can generate complete model code in a short time, significantly reducing reliance on professional modeling knowledge.
[0027] 2. Based on a three-stage reinforcement learning verification framework, a multi-dimensional quality assurance mechanism is constructed, encompassing grammatical compliance, dynamic simulation characteristics, and engineering performance indicators. Through a bottom-up, progressive optimization strategy, multi-level verification is implemented simultaneously during model generation to ensure that the output model meets both programming standards and engineering practicality, forming a closed-loop verification system from code generation to performance achievement.
[0028] 3. An innovative physical constraint guidance mechanism is introduced, which automatically embeds cross-domain physical law verification equations during the code generation stage, enabling the model to self-verify. This method breaks through the limitations of the traditional separation of modeling and physical verification. By verifying core physical rules such as energy transfer and mechanical equilibrium in real time, it fundamentally ensures the consistency between the model and the real physical world, and significantly improves the engineering reliability of digital twin models of complex systems. Attached Figure Description
[0029] Figure 1 This is the overall flowchart of the large model-driven car model modeling method based on the Modelica language of this invention.
[0030] Figure 2 This is a schematic diagram illustrating the specific implementation process of the modeling method of the present invention. Detailed Implementation
[0031] This invention provides a large-model-driven automotive modeling method based on the Modelica language. It constructs a domain knowledge graph containing a library of automotive components, a library of physical constraints, and a library of topological relationships. A retrieval-enhanced generation mechanism is used to convert natural language requirements into Modelica model code. A three-stage reinforcement learning approach is employed to optimize the model generation process, including syntax verification, simulation verification, and performance verification. An innovative physical constraint guidance mechanism is introduced, automatically embedding verification equations such as energy conservation and torque balance during the code generation stage.
[0032] The automobile modeling method of the present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0033] As attached Figure 1 As shown. The large-model-driven car modeling method based on the Modelica language of this invention is mainly implemented through the following steps.
[0034] The following example, using the development of a 6-speed automatic transmission model, provides a more concrete implementation. Assume the modeling goal is "to develop a 6-speed automatic transmission that supports both sport and economy mode shifting logic," as follows: Figure 2 As shown, the specific implementation steps of the method provided by this invention are as follows:
[0035] Step 1: Parse the requirement text using a BERT model fine-tuned with domain knowledge. The specific method is as follows:
[0036] 1. Data Preparation and Labeling: Extract natural language sentences from domain requirement documents (such as product specifications and design reports), and manually label them as structured triples, with the specific format being {"subject": entity or system name,"predicate": relation type,"object": attribute value or constraint}; expand the training data through synonym replacement and sentence transformation to improve the robustness of the model.
[0037] 2. Model architecture adjustment: A CRF (Conditional Random Field) layer is superimposed on the BERT output for entity boundary recognition; a multi-task classification layer is added to the [CLS] tag output of BERT to predict the implicit relation type in the sentence.
[0038] 3. Loss function design: The total loss is the weighted sum of sequence labeling loss (negative log-likelihood of CRF) and relation classification loss (cross-entropy).
[0039] 4. Training strategy: First, pre-train on a large-scale general text (Wikipedia), then train on a medium-scale domain corpus, and finally fine-tune on a small-scale labeled data.
[0040] Structured parameters (6-speed gears, shift mode definition, shift time <200ms, efficiency ≥92%) are extracted from the fine-tuned model to obtain triplet data {"subject":"automatic transmission","predicate":"number of gears","object":"6-speed"}. The "automatic transmission" is mapped to a planetary gear architecture standard template by combining the knowledge base, and the shift speed threshold is preset for the logical association of sport / economy modes.
[0041] Step 2: In the Python environment, candidate gear sets, clutches, and hydraulic control valve bodies are retrieved from the component library based on the transmission ratio range and input torque. A topological graph of the gear-clutch-shaft system is constructed, node compatibility is calculated using GNN, and the NSGA-II algorithm is used to optimize the component combination. The objective function covers shift smoothness, total cost, and system weight (≤60kg). The specific implementation is as follows:
[0042] 1. Topology Graph Construction: Create a graph-based transmission system model where each physical component (planetary gear set, multi-plate wet clutch, output shaft) is an independent node, and node attributes include engineering parameters:
[0043] (1) Gears: module, number of teeth, transmission ratio range, axial dimension
[0044] (2) Clutch: Number of friction plates, maximum torque transmission capacity, hydraulic response time
[0045] (3) Shaft system: spline specifications, heat treatment grade, maximum bending stiffness
[0046] 2. Graph Neural Network Architecture: A 3-layer graph convolutional network is used to process heterogeneous topological relationships.
[0047] (1) Input layer: node feature vectors;
[0048] (2) Convolutional layer: computes the physical interaction between nodes;
[0049] (3) Output layer: Generate system-level compatibility score S C ∈[0,1], when S C A rematch is triggered when the value is less than 0.85.
[0050] 3. NSGA-II Multi-Objective Optimization Process:
[0051] (1) Generate 300 initial schemes, each scheme including gear set topology (planetary / parallel shaft), clutch configuration parameters (hydraulic / electric type), shaft support structure (3-point / 5-point support).
[0052] (2) Definition of multi-objective function:
[0053] ① Shift smoothness target F1 (maximize):
[0054]
[0055] Where ω is the angular velocity of the output shaft, and T S This is the shift cycle.
[0056] ②Total cost objective F2 (minimization):
[0057]
[0058] Where K is the number of component types. Let C be the raw material cost of part k, with a processing cost coefficient of 1.5. machining This represents the total processing cost.
[0059] ③ Weight constraint G1 (hard constraint)
[0060] G1=∑m i -60≤0
[0061] Where m i Let ∑m be the actual mass of the i-th part. i The total weight of the transmission system is capped at 60kg.
[0062] Step 3: In explicit parameter processing, directly determinable parameters such as gear teeth and shaft diameter are bound according to the rigid constraints of the system architecture. For example, in a planetary gear set, the sun gear has a fixed number of 28 teeth (using the ISO 53 tooth profile standard), while the number of planet gear teeth is dynamically generated according to a proportional formula. This ensures that the first gear ratio is locked at 4.82 to meet the rapid acceleration requirements in Sport mode, while the fifth gear overdrive ratio is compressed to 0.63 to achieve fuel saving during high-speed cruising in Economy mode. This strategy improves acceleration performance by 0.5 seconds while reducing fuel consumption by 7.2%.
[0063] Implicit parameter optimization is achieved by constructing a physical equation network of the transmission's dynamic behavior. The core algorithm establishes a gradient response field based on the shift time equation and the heat loss model, with the specific equations as follows:
[0064] Shift time equation:
[0065]
[0066] Where τ shift Let be the shift time (ms), k be the system constant (value 0.021), and J be the total inertia of the rotating component (kg·m). 2 ), Δω is the speed difference between the primary and driven plates (rad / s), P is the clutch oil pressure (MPa), and μ is the friction coefficient (0.12~0.15).
[0067] The heat power loss equation is as follows:
[0068] P loss =C μ ·μ·P·A f ·△ω
[0069] Among them, P loss C represents the heat loss power (kW). μ denoted as the friction material characteristic coefficient (0.85–1.15), μ as the friction coefficient (0.12–0.15), P as the clutch oil pressure (MPa), and A as the friction coefficient. f Effective friction area (cm²) 2 ), where Δω is the difference in rotational speed between the master and slave plates (rad / s).
[0070] When the gear ratio is increased by 3 gears to improve power, the system detects in real time that the gear contact stress is approaching the critical value of 1180MPa (exceeding the ISO 6336 standard by 8%), and immediately triggers constraint protection. The gradient optimizer moves along the dual-constraint hyperplane of "shift time <200ms, efficiency ≥92%", and by coordinating the hydraulic oil circuit orifice diameter (increasing from 5.5mm to 6.2mm) and the number of clutch plates, the pressure response delay is compressed from 230ms to 187ms, while maintaining a transmission efficiency of 93.5%.
[0071] To address the parameter conflicts between Sport and Eco modes, a three-layer perceptron was used for in-depth screening. After inputting 12-dimensional operating condition features into the network, two critical conflicts were accurately identified: a 6000rpm shift speed in Sport mode caused a 14°C excess temperature rise on the 3rd gear tooth surface, and a 1800rpm low-speed shift in Eco mode caused a 15% excess hydraulic delay. The conflict resolution module used the ISO6336 contact fatigue equation to reshape the parameters. By increasing the tooth profile modification by 5μm, the peak stress was reduced from 1180MPa to 1072MPa. Simultaneously, the hydraulic pressure curve was redistributed according to the fluid dynamics equation, ensuring that the delay remained within acceptable limits even when the shift speed in Eco mode increased to 1900rpm.
[0072] Step 4: Generate an initial topology (sun gear → planet carrier → ring gear) based on planetary gear architecture rules. Optimize the clutch placement using a GNN to shorten the hydraulic circuit path and reduce latency. Specifically, the planet carrier is set as the origin, and components such as the sun gear, clutch, and hydraulic valves are transformed into spatial nodes. Each node contains attributes such as three-dimensional coordinates, dimensions, and interface type. The GNN automatically adjusts the clutch coordinates through three iterative layers.
[0073] First layer: Detects the risk of collision with the planetary gears (generates a coordinate offset signal if the distance is <3mm);
[0074] Second layer: Calculate the efficiency of oil circuit bending (each reduction of a 90° bend increases the response speed by 15ms);
[0075] Third layer: Evaluate thermal management effectiveness (temperature can be reduced by 8-12℃ near the gear ring);
[0076] Interface verification covers mechanical, electrical, and hydraulic interfaces, and outputs a connection matrix:
[0077] Input axis → Planetary gear set (sun gear)
[0078] Clutch C1 → Planetary Carrier (Mode Switching)
[0079] Hydraulic valve → Clutch pressure control
[0080] Step 5: Map the parameters and topology to the Modelica simulation model using the template engine, and automatically add physical unit annotations and modular encapsulation.
[0081] First, a template engine automatically populates parameter values (gear ratios, shift time thresholds) and topological relationships (connection between planetary gear sets and clutches) into a predefined code framework, adding physical unit comments to each parameter. Simultaneously, functional modules are encapsulated as independent functions to ensure code reusability. Next, abstract syntax tree analysis is used to scan the generated code, identifying complex equations (including multi-layered nested differential equations), breaking them down into multiple sub-functions, and optimizing the calculation order to improve efficiency. Finally, static checking ensures unique variable names and type matching, and dynamic verification runs the code, comparing it with expected results to ensure the model is correct in both mathematical logic and physical laws.
[0082] Taking the generation of planetary gear set modules as an example:
[0083] (1) Template framework: The Modelica class is predefined and contains the transmission ratio equation and the inertia calculation interface;
[0084] (2) Parameter injection: The feasible parameter set output in step 3 is automatically filled in, and strict unit comments are added:
[0085] parameter Real gearRatio_1 = 4.82 "gear ratio (dimensionless)";
[0086] parameter SI.Inertia J_sun=0.12" Sun gear inertia (kg·m) 2 )"; / / Note: SI stands for Standard Unit Library
[0087] (3) Topology instantiation: Based on the connection matrix in step 4, the planetary group component connection logic is automatically generated:
[0088] Planetary Gear Set PG1 (
[0089] sun.connect(inputShaft), / / Input axis → sun wheel
[0090] carrier.connect(C1.output), / / Clutch C1 → Planetary Carrier
[0091] ring.connect(outputShaft) );
[0093] Step 6: Static check to ensure unit consistency (e.g., engine speed unit rpm → rad / s), dynamic assertion embedding shift time constraints:
[0094] equation
[0095] assert(time_shift<0.2,"shift timeout");
[0096] The fault injection test simulates clutch slippage to verify whether the hydraulic system triggers redundant pressurization.
[0097] Step 7: Achieve autonomous evolution of the shifting strategy by constructing a dedicated reinforcement learning virtual environment. This environment is based on a deeply customized Carmaker simulation platform, integrating vehicle dynamics models and real-time traffic scenarios, and supports 200x acceleration simulation. The state space is precisely divided into three dimensions: vehicle speed (5km / h step), throttle opening (10% segments), and battery SOC (5% gradient). Throttle change rate is also embedded as a hidden state to identify rapid acceleration intentions, resulting in a total of 72,000 discrete states. The action space includes 18 operation commands: 6 gear hold, 6 upshifts, 6 downshifts, and coasting mode. Downshifts automatically trigger motor torque compensation, and upshifts are linked to a smooth clutch pressure transition.
[0098] The training employs a dual-path DQN (Deep Reinforcement Learning) architecture. The main network extracts state features through convolutional layers, while LSTM layers memorize the trends in operating conditions. The output layer maps the action value function. The reward function optimizes three core metrics: a penalty coefficient of 0.6 for shift time deviating from the 150ms baseline, a weight of 0.3 for fuel consumption per 100km, and a weight of 0.1 for impact exponential decay reward. In typical WLTC loop training, the agent learns key strategies: when the SOC is below 20% and the throttle opening exceeds 85%, it actively downshifts to 4th gear to improve charging efficiency and energy recovery rate; while during high-speed cruising (vehicle speed > 80km / h), it employs a delayed upshift strategy to reduce the number of shifts, thereby balancing power demand and fuel economy.
[0099] After training convergence, the neural network strategy is transformed into an executable rule base using decision tree distillation. For example, when the throttle opening increases from 30% to 80% within 300ms, a 2→3 downshift command is forcibly triggered, and hydraulic pressure is pre-charged to 12.8MPa. These rules, along with updates to hydraulic control parameters, are fed back to the central knowledge base, adding the case of "6-speed planetary gearbox_2025". In the physical verification phase, the reinforcement learning strategy is reproduced on a chassis dynamometer. The measured shift shock is small, and the fuel consumption data has a small error compared to the simulation, confirming the high fidelity of the virtual training environment.
[0100] This invention provides a large-model-driven automotive modeling approach based on the Modelica language. This includes the establishment of a domain knowledge graph comprising an automotive component library, a physical constraint library, and a topological relation library. A three-stage reinforcement learning approach is employed to optimize the model generation process, and a physical constraint guidance mechanism is introduced. By combining a large language model with the Modelica multi-domain physical modeling language, an intelligent modeling framework for automotive systems is constructed, significantly reducing the technical threshold for automotive system modeling while maintaining the rigor of physical modeling.
[0101] The detailed descriptions listed above are merely specific descriptions of feasible embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. All equivalent methods or modifications that do not depart from the technology of the present invention should be included within the scope of protection of the present invention.
Claims
1. A large-model-driven vehicle modeling method based on the Modelica language, characterized in that, First, a domain-knowledge-enhanced BERT-CRF multi-task model is adopted to parse natural language requirements into structured triples. Then, a multi-objective optimization algorithm driven by a graph neural network is used to match the optimal combination of automotive components. Symbolic mathematical derivation and machine learning are combined to predict the feasible domain of cross-disciplinary parameters. A graph attention network is used to optimize the topology connection matrix. Template engine and syntax tree analysis techniques are integrated to realize the intelligent generation and dynamic verification of Modelica simulation code. Finally, a multi-objective reward function is constructed through reinforcement learning to optimize the control strategy and a closed-loop knowledge iteration mechanism is established.
2. The large model-driven vehicle modeling method based on Modelica language according to claim 1, characterized in that, The method includes the following steps: Step 1: Fine-tune the BERT model using domain knowledge, perform semantic understanding on natural language input, and transform the natural language input into modeling instructions in the form of structured triples; Step 2: Based on the high-dimensional vector representation of the requirement parameters, retrieve a candidate set of components that meet the functional constraints from the component library, construct a component interaction graph, and use a graph neural network to calculate the compatibility score between nodes. The formula is as follows: Where F represents the component's functional attributes, E ij For interface features, α and β are weighting coefficients; The Pareto front search is performed on the performance, cost, and weight objectives using a multi-objective optimization algorithm to output the optimal component combination; Step 3: Bind explicit requirement parameters directly to component properties, establish symbolic mathematical models for implicit parameters, automatically derive closed-loop solutions through solvers, and use gradient optimization and machine learning models to predict the feasible domain of parameters in a collaborative manner to ensure that cross-disciplinary constraints are met simultaneously. Step 4: Generate an initial topology based on the component connection rule base, optimize the connection path weights using a graph attention network, output a node-edge relationship matrix, perform standardized verification on mechanical, electrical, and other interfaces, and generate a pass rate quantification report. Step 5: Map parameters and topology to Modelica executable simulation model code using a template engine, automatically adding physical unit annotations and modular encapsulation; Step 6: Embed predefined constraints into the simulation model, including static rules and dynamic assertions. Verify the exception handling logic through fault injection testing to ensure that the model triggers the safety mechanism in scenarios such as parameter out-of-bounds errors and hardware failures. Step 7: Construct a Markov decision process for the simulation environment, using system performance indicators as the reward function, and construct a multi-objective reward function to optimize the control strategy through deep reinforcement learning algorithms; feed the optimized parameters, topology, and verification results back into the knowledge base, update component compatibility rules and case feature vectors, and achieve closed-loop iteration.
3. The large model-driven vehicle modeling method based on Modelica language according to claim 2, characterized in that, The implementation of step 1 includes the following: Step 1.1, Data Preparation and Labeling: Extract natural language sentences from the domain requirements document and manually label them as structured triples, specifically in the format {"subject": entity or system name,"predicate": relation type,"object": attribute value or constraint}; expand the training data through synonym replacement and sentence transformation to improve the robustness of the model; Step 1.2, Model Architecture Adjustment: Add a Conditional Random Field (CRF) layer to the BERT output for entity boundary recognition; add a multi-task classification layer to the [CLS] tag output of BERT to predict the implicit relation type in the sentence; Step 1.3, Loss Function Design: The total loss is the weighted sum of the sequence labeling loss and the relation classification loss; Step 1.4, Training strategy design: First, pre-train on a large-scale general text, then train on a medium-sized domain corpus, and finally fine-tune on a small-scale labeled data.
4. The large model-driven vehicle modeling method based on Modelica language according to claim 2, characterized in that, In step 3, the specific method for predicting the feasible region of the parameters is as follows: Based on a symbolic mathematical model, the gradient trends of the objective function and constraints with respect to each parameter are first calculated using mathematical methods to generate a gradient field in the parameter space. A constraint-aware gradient descent algorithm is then used to search for local optima along feasible directions. Simultaneously, a multilayer perceptron is used to extensively explore the parameter space, identify conflicting parameter combinations, and introduce constraints based on physical rules to train the generative model, enabling it to learn the parameter distribution patterns under multidisciplinary constraints. Ultimately, a parameter combination that satisfies all requirements (such as strength, cost, and efficiency) and can operate stably is obtained.
5. The large model-driven vehicle modeling method based on Modelica language according to claim 2, characterized in that, In step 4, the graph attention network (GNN) automatically adjusts the clutch coordinates through three iterative layers: First layer: Detects the risk of collision with the planetary gears; if the distance is less than 3mm, a coordinate offset signal is generated. Second layer: Calculate the efficiency of oil circuit bending, and increase the response speed by 15ms for each 90° bend reduced; Third layer: Evaluate thermal management efficiency, reduce temperature by 8-12℃ near the gear ring.
6. The large model-driven vehicle modeling method based on Modelica language according to claim 2, characterized in that, Step 5 is implemented as follows: Step 5.1: First, the template engine automatically populates the parameter values and component connection relationships into the predefined code framework, adds physical unit comments to each parameter, and encapsulates the functional modules into independent functions to ensure code reusability. Step 5.2: Use abstract syntax tree analysis technology to scan the generated code, identify complex equations such as multi-level nested differential equations, break them down into multiple sub-functions, and optimize the calculation order to improve efficiency; Step 5.3: Static checks are used to ensure that variable names are unique and types match. Then, dynamic verification is used to run the code and compare the results with the expected results to ensure that the model is correct in both mathematical logic and physical laws.
7. The large model-driven vehicle modeling method based on Modelica language according to claim 2, characterized in that, In step 6, the static rule refers to the parameter range, and the dynamic assertion refers to the law of conservation of energy.
8. The large model-driven vehicle modeling method based on Modelica language according to claim 2, characterized in that, In step 7, the multi-objective reward function R is as follows: R=λ p ·R 性能 +λ e ·R 效率 -l c ·C 代价 Among them, R 性能 As a positive incentive, it quantifies the achievement of core objectives; R 效率 For resource optimization items, measure energy consumption, time, or cost; C 代价 This is an additional cost item, including long-term influencing factors such as hardware depreciation and maintenance frequency.
9. The large model-driven vehicle modeling method based on Modelica language according to claim 2 or 8, characterized in that, In step 7, a dual-path DQN (Deep Reinforcement Learning) architecture is used for training. The main network extracts state features through convolutional layers, the LSTM layer remembers the trend of working conditions, and the output layer maps the action value function. The reward function is optimized with three core indicators as the optimization targets: a penalty coefficient of 0.6 for shift time deviating from the benchmark of 150ms, a weight of 0.3 for fuel consumption per 100 kilometers, and a weight of 0.1 for impact exponential decay reward. In typical WLTC loop training, the agent learns the key strategy: when the SOC is below 20% and the throttle opening exceeds 85%, it actively downshifts to improve charging efficiency and energy recovery rate. During high-speed cruising, a delayed upshift strategy is adopted to reduce the number of gear shifts, thereby balancing power demand and fuel economy. After training converges, the neural network policy is transformed into an executable rule base using decision tree distillation.
Citation Information
Cited By
Single pump modeling and pump set collaborative optimization method and system of pump station system
CN121162508A
Knowledge enhancement-based power grid new energy operation fault discrimination method and system
CN121456770A
Data-driven chassis safety filtering control method and end-to-end motion control architecture with safety guarantee
CN121763735A
Modelica-based automobile single quality system modeling and adaptive parameter optimization method
CN121980690A
