Real-time predictive model predictive control method and system

CN122902265APending Publication Date: 2026-10-13FAW JIEFANG AUTOMOTIVE CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611279289.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

由于车辆热管理系统具有其特有的温度大迟滞效应、软约束违反惩罚、执行器动作剧烈度限制(变化率约束)以及极度复杂的真实非线性热启动特性,若直接硬套通用的SQP,极易因非线性代价二次近似不可靠、数值噪声引发长尾耗时或阻尼升级,导致控制效果严重偏离原始优化目标或出现实时性崩溃

Benefits of technology

本发明通过在预测轨迹上进行线性时变(LTV)近似,并引入状态凝聚消元,将全空间大规模非线性优化问题转化为控制空间内极小规模的稠密凸二次规划(QP)子问题,大幅削减了重型非线性rollout的调用频次。基线NLP求解方法离线单步耗时高达1499s且常伴随欠收敛,而应用本发明方案后,全量测试工况的单步平均求解时间骤降至0.44s,最大耗时限制在2.5s以内,完美契合5s的车辆控制周期要求,实现单步求解实现数千倍提速,达到车载软实时部署要求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122902265A_ABST
    Figure CN122902265A_ABST
Patent Text Reader

Abstract

The application discloses a real-time predictability model predictive control method and system, relates to the technical field of new energy vehicle thermal management control, and comprises the following steps: acquiring a current thermal state vector, an actuator control quantity at a previous time, and a predicted disturbance sequence in a future prediction time domain; shifting the optimal control sequence of a previous control period to the left by one step, complementing the tail part through zero-order holding, and constructing an initial control sequence of a current period; filling with a calibration reference control quantity during cold starting; calling a physical constraint grey-box reduced-order thermal model, performing forward rolling prediction on the current control sequence in a full prediction time domain, obtaining a state trajectory, and calculating a real cost based on an original nonlinear thermal management composite cost function; and the application introduces state condensation elimination by performing linear time-varying approximation on a prediction trajectory, converts a full-space large-scale nonlinear optimization problem into a minimum-scale dense convex quadratic programming sub-problem in a control space, and greatly reduces the calling frequency of a heavy nonlinear rollout.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of thermal management control technology for new energy vehicles, and in particular to a real-time predictive model control method and a real-time predictive model control system. Background Technology

[0002] The thermal management systems of new energy vehicles (especially heavy-duty commercial vehicles and pure electric heavy trucks) are highly coupled, exhibit strong nonlinear characteristics, and require stringent dynamic response. These systems typically need to simultaneously regulate multiple key controlled states, including battery temperature, battery inlet coolant temperature, cab temperature, and electric drive assembly temperature. Through thermal management actuators such as PTC heaters, refrigeration compressors, electric water pumps, front-end cooling fans, and multiple electronic proportional control valves, complex energy coupling and rational heat distribution occur between the battery circuit, electric drive circuit, and passenger compartment air conditioning circuit. For dynamic heavy-load conditions such as long-distance operation, mountainous terrain, and extreme low temperatures, future road gradients, vehicle speeds, ambient temperatures, and power losses in the drive system (such as motor / inverter heating) will significantly and drastically affect the overall vehicle thermal load. In such cases, conventional PID control methods based solely on current temperature feedback are prone to severe control lag, excessive energy consumption of accessories, or insufficient thermal safety margins for core components. Therefore, introducing Model Predictive Control (MPC) methods to utilize forward-looking information about future operating conditions for proactive scheduling has significant engineering value.

[0003] However, in the practical engineering implementation of vehicle-mounted deployments (embedded controller deployments), existing technologies face an irreconcilable contradiction between real-time performance and accuracy: 1. The overhead of inner-layer nonlinear programming (NLP) is too heavy to be deployed in vehicles: The multi-loop thermal management objects of new energy vehicles usually have high-dimensional state spaces and control inputs from multiple actuators. If general nonlinear programming (such as direct rollout combined with finite difference gradient estimation) is performed directly based on the full-order physical model or conventional nonlinear reduced-order thermal model, the single-step solution time usually reaches minutes or even longer. However, the typical sampling period of the vehicle thermal management controller is generally required to be within 5 seconds, which makes it impossible for the complex nonlinear MPC algorithm to output control quantities in real time within the vehicle sampling period.

[0004] 2. The abstract algorithm is disconnected from the specific constraints of the real thermal management object: Some existing fast solution algorithms (such as Sequential Quadratic Programming (SQP), Linear Time-Varying Dynamics-MPC, and Convex Quadratic Programming Condensed Solution) mainly target abstract pure mathematical optimization problems or intelligent connected vehicle dynamics control (such as vehicle speed planning and trajectory tracking). Due to the unique temperature hysteresis effect, soft constraint violation penalties, actuator action drastic limitations (rate of change constraints), and extremely complex real nonlinear hot start characteristics of vehicle thermal management systems, directly applying the general SQP algorithm is prone to problems such as unreliable quadratic approximation due to nonlinear costs, long-tail time consumption caused by numerical noise, or damping escalation, resulting in a serious deviation of the control effect from the original optimization objective or real-time failure.

[0005] 3. Shortcomings of the closest existing technology: The closest existing technology typically employs a combined framework of "nonlinear programming solver + path gradient / vehicle speed prediction information". This approach does not fully exploit the "warm-start" characteristic of the extremely similar optimal solutions in adjacent control cycles of the MPC rolling time domain. The solver needs to repeatedly perform heavy global nonlinear rollout iterations, with baseline offline single-step solution taking up to approximately 1499 seconds, which cannot meet the soft real-time control requirements of onboard controllers (such as VCUs or dedicated temperature control units). Therefore, how to transform the nonlinear full optimization problem of multi-loop thermal management in new energy vehicles into a structured subproblem that can be assembled and stably solved within milliseconds within the control cycle without sacrificing the simulation accuracy of the original nonlinear thermal model and the semantics of the real thermal management cost function, while ensuring that the control performance does not deviate from the original thermal management objective, is a critical pain point that current technology urgently needs to address. Summary of the Invention

[0006] The purpose of this invention is to provide a real-time predictive model control method and a real-time predictive model control system, which solves at least one of a number of technical problems.

[0007] The core technical challenge is how to transform the nonlinear full-scale optimization problem of multi-loop thermal management for new energy vehicles into a structured subproblem that can be assembled and stably solved within milliseconds during the control cycle without sacrificing the simulation accuracy of the original nonlinear thermal model and the semantics of the real thermal management cost function, while ensuring that the control performance does not deviate from the original thermal management objective.

[0008] This invention provides the following solution: According to a first aspect of the present invention, a real-time predictive model control method is provided, comprising: D1. Obtain the current thermal state, the optimal control sequence of the previous cycle, and the predicted disturbance sequence in the future prediction time domain; D2. Generate the initial control sequence for the current cycle's hot start: Shift the optimal sequence of the previous cycle to the left by one step, and complete the tail with zero-order padding to construct the initial control sequence for the current cycle; use the calibration reference control quantity to fill during cold start; D3. Call the physical constraint gray box reduced-order thermal model, combine the initial control sequence and the predicted disturbance sequence, and recursively advance in the entire prediction time domain to obtain the predicted state trajectory. Substitute it into the composite stage cost function to calculate the nonlinear cost value. D4. Calculate the state Jacobian matrix and control Jacobian matrix step by step along the current predicted state trajectory, and establish a linear time-varying approximate model of the control correction increment. D5. Based on the linear time-varying approximation model, all state variables in the optimization problem are eliminated by time-series cascaded recursion. The original nonlinear rolling optimization problem is compressed into a standard convex quadratic programming subproblem with only the control correction as the only decision variable. D6. Solve the convex quadratic programming subproblem using a hot-start method to obtain the control correction direction; D7. Using the control correction direction as the search direction, the physical constraint gray box reduced-order thermal model and the actual cost are called again through backtracking search to verify the cost reduction condition. The control sequence is then updated after the cost reduction condition is met. D8. Output the first step control quantity of the optimal sequence to the thermal management actuator, and use the remaining control sequence as the thermal start reference for the next cycle.

[0009] Furthermore, in step D3, the physical constraint gray-box reduced-order thermal model is implemented with inline code that has a fixed physical connection order and a single function entry point, eliminating runtime dynamic resolution overhead.

[0010] Furthermore, in step D4, the Jacobian matrix is ​​calculated using the structured central finite difference method or the analytical derivative formula.

[0011] Furthermore, in step D5, a dense prediction matrix is ​​constructed by time-series recursive product, and the state deviation in the entire prediction time domain is expressed as an explicit algebraic mapping between the initial state deviation and the control correction.

[0012] Furthermore, this includes: in step D6, using the effective set method to solve the convex quadratic programming problem, and using the solution from the previous iteration or cycle as the initial value for hot start; configuring the interior point method or sparse solver as alternative fallbacks.

[0013] Furthermore, in step D7, the line search uses the Armijo descent criterion as an acceptance criterion to ensure that each update reduces the true nonlinear cost.

[0014] Furthermore, it also includes: setting up a multi-level safety backoff mechanism: when the line search fails, damping factor correction, trust region shrinking, and output shifting of the previous cycle control sequence are used in sequence to ensure that there is still a safe and feasible control output under extreme conditions.

[0015] Furthermore, it also includes: the physical constraint gray box reduced-order thermal model includes: a set of state variables, including four core thermal states: battery temperature, battery coolant inlet temperature, crew compartment temperature and electric drive temperature, as the output objects of forward recursion; The physical heat flow characteristic matrix constructed in each state corresponds to the characteristic terms of five types of heat transfer channels: active heating, driven waste heat coupling, environmental heat dissipation, loop heat exchange and battery internal resistance heating. These are used to characterize the heat transfer mechanism of each thermal state and support the state recursive calculation. The physical sign constraint rule for channel coefficients stipulates that the channel coefficients for active heating, driven waste heat coupling, and battery internal resistance heating are non-negative, the channel coefficients for environmental heat dissipation are non-negative, and the channel coefficients for loop heat transfer are non-negative. This is used to constrain the state recursion process to conform to thermodynamic laws. The calibration parameter set, including the equivalent heat capacity and heat transfer coefficient of each channel determined by traversing the equivalent heat capacity range, identifying with signed constraints, and selecting the best values ​​from multi-step rolling simulation errors, is used for numerical calculation of the heat flow characteristic matrix.

[0016] According to a second aspect of the present invention, a real-time predictive model control system is provided, comprising: The data acquisition module is used to acquire the current thermal state, the optimal control sequence of the previous period, and the predicted disturbance sequence in the future prediction time domain; The hot start initial sequence generation module is used to generate the initial control sequence for the current cycle: the optimal sequence of the previous cycle is shifted to the left by one step, and the tail is filled with zero-order to construct the initial control sequence for the current cycle; during cold start, the calibration reference control quantity is used for filling. The nonlinear forward prediction and true cost calculation module is used to call the physical constraint gray box reduced-order thermal model, combine the initial control sequence and the predicted disturbance sequence, and forward recursively calculate the predicted state trajectory in the entire prediction time domain. The predicted state trajectory is then substituted into the composite stage cost function to calculate the nonlinear cost. The linear time-varying approximation module along the trajectory is used to calculate the state Jacobian matrix and the control Jacobian matrix step by step along the current predicted state trajectory, and to establish a linear time-varying approximation model of the control correction increment. The State Condensation Elimination and Quadratic Programming Assembly Module is used to eliminate all state variables in the optimization problem based on a linear time-varying approximation model through time-series cascaded recursion. The original nonlinear rolling optimization problem is compressed into a standard convex quadratic programming subproblem with only the control correction as the sole decision variable. The hot-start convex quadratic programming solution module is used to solve convex quadratic programming subproblems using a hot-start approach and obtain the control correction direction. The real cost line search and acceptance module is used to search in the direction of control correction, and to verify the physical constraint gray box reduced-order thermal model and the real cost again by searching the backline. The control sequence is updated after the cost reduction condition is met. The rolling output module is used to output the first step control quantity of the optimal sequence to the thermal management actuator, and the remaining control sequence is used as the thermal start reference for the next cycle.

[0017] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; The memory stores a computer program, which, when executed by a processor, causes the processor to perform steps such as those of a real-time predictive model predictive control method.

[0018] The above solution achieves the following beneficial technical effects: This invention transforms a large-scale nonlinear optimization problem across the entire space into a small-scale dense convex quadratic programming (QP) subproblem within the control space by performing a linear time-varying (LTV) approximation on the predicted trajectory and introducing state condensation elimination. This significantly reduces the frequency of heavy nonlinear rollout calls. Baseline NLP solution methods have an offline single-step time as high as 1499s and are often accompanied by underconvergence. However, after applying the solution of this invention, the average single-step solution time for all test conditions is drastically reduced to 0.44s, with the maximum time limited to within 2.5s. This perfectly meets the 5s vehicle control cycle requirement, achieving a speedup of thousands of times for single-step solutions and meeting the requirements for in-vehicle soft real-time deployment.

[0019] In this invention, the correction direction generated by the local QP is not directly executed, but must undergo a rigorous backtracking search and acceptance process between the original nonlinear thermal model Rollout and the actual thermal management cost function (a comprehensive objective encompassing tracking, energy consumption, soft constraints, and path coordination). This fundamentally eliminates the risk of control variation or constraint violation caused by local quadratic approximations deviating from the true nonlinear semantics. Offline comparisons show that the actual objective function value not only did not degrade, but was further optimized from approximately 42302 to approximately 37750, achieving a dual increase in speed and overall temperature control / energy saving effect. This avoids performance degradation caused by "approximate decline" and achieves global high-precision temperature control and optimization of economic indicators.

[0020] This invention's inline reduced-order hot model drastically reduces the time for a single full rollout from 106ms to 7ms. Combined with the warm-start guard, feasible solutions are directly accepted when adjacent solutions are close, preventing invalid QP re-solutions induced by numerical noise. This reduces the average time for the most difficult rolling window from 1210ms to 195ms, and the P90 time from 2941ms to 194ms. The number of closed-loop iteration backtrackings is directly reduced to zero, ensuring that no computational overflow occurs on the embedded platform. This eliminates the long tail of computational resources, making the algorithm extremely robust. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the overall closed-loop control flow of the real-time predictive MPC control method provided in a specific embodiment of the present invention.

[0022] Figure 2 This is a schematic diagram of the single-cycle inner loop iterative solution process of the core SQP-LTV-MPC vehicle-mounted algorithm provided in a specific embodiment of the present invention.

[0023] Figure 3 This is a schematic diagram of the overall hardware and topology of an on-board thermal management system provided in a specific embodiment of the present invention.

[0024] Figure 4 This is a schematic diagram illustrating the comparison of single-step solution efficiency under a typical rolling time window, provided by a specific embodiment of the present invention.

[0025] Figure 5 This is a flowchart of a real-time predictive model control method provided by one or more embodiments of the present invention.

[0026] Figure 6 This is a structural diagram of a real-time predictive model predictive control system provided by one or more embodiments of the present invention. Detailed Implementation

[0027] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] Figure 5 This is a flowchart of a real-time predictive model control method provided by one or more embodiments of the present invention.

[0029] Example 1, as Figure 5The real-time predictive model control method based on thermal management for new energy vehicles, as shown, constructs a closed-loop solution chain of "nonlinear prediction - linear approximation - convex optimization solution - nonlinear acceptance" to achieve sub-second real-time solution on-board, including: D1. Data Acquisition: Acquire the current thermal state vector, the actuator control quantity at the previous moment, and the predicted disturbance sequence in the future prediction time domain; D2. Initial control sequence generation for hot start: The optimal control sequence of the previous control cycle is shifted to the left by one step, and the tail is filled by zero-order hold to construct the initial control sequence for the current cycle; during cold start, the calibration reference control quantity is used for filling. D3. Nonlinear forward prediction and actual cost calculation: Call the physical constraint gray box reduced-order thermal model to perform full-prediction time-domain forward rolling prediction of the current control sequence to obtain the state trajectory, and calculate the actual cost based on the original nonlinear thermal management composite cost function. D4. Linear time-varying approximation along the trajectory: Calculate the state Jacobian matrix and the control Jacobian matrix step by step along the current state trajectory to establish a linear time-varying approximation model in the incremental space of the control correction. D5. State Condensation Elimination and Quadratic Programming Assembly: By eliminating all state variables through cascaded recursion, the original nonlinear optimization problem in the state-control hybrid space is compressed into a standard convex quadratic programming subproblem with only the control correction variable as the sole decision variable. D6. Hot-start convex quadratic programming solution: Solve the convex quadratic programming subproblem using the hot-start method to obtain the control correction direction; D7. Acceptance of the true cost line search: Using the control correction direction as the search direction, the nonlinear reduced-order thermal model and the original true cost function are called again for verification through backtracking line search. After the cost reduction condition is met, the updated control sequence is accepted. D8. Rolling output: Outputs the first control quantity of the optimal control sequence to the thermal management actuator, and the remaining control sequence serves as the thermal start reference for the next control cycle; It also includes: D9, which checks the remaining computational budget before each recalculation step such as linearization, quadratic programming solution or true cost line search; if the remaining budget is less than the reserved time for the recalculation step, the step is not started, the currently verified feasible control sequence is directly output, and the time budget exit reason is recorded.

[0030] In this embodiment, step D3 includes the following: the physical constraint gray box reduced-order thermal model is implemented with inline code that has a fixed physical connection order and a single function entry point, thereby eliminating runtime dynamic parsing overhead.

[0031] In this embodiment, step D4 includes calculating the Jacobian matrix using the structured central finite difference method or the analytical derivative formula.

[0032] In this embodiment, step D5 includes: state condensation constructs a dense prediction matrix through temporal recursive product, and represents the state deviation in the entire prediction time domain as an explicit algebraic mapping between the initial state deviation and the control correction.

[0033] In this embodiment, step D6 includes: using the effective set method to solve the convex quadratic programming problem, and using the solution from the previous iteration or the previous cycle as the initial value for hot start; configuring the interior point method or sparse solver as a fallback option.

[0034] In this embodiment, step D7 includes the following: the line search uses the Armijo descent criterion as the acceptance criterion to ensure that each update reduces the true nonlinear cost.

[0035] In this embodiment, the following is included: setting a near-optimal convergence guard: when the infinite norm of the control correction is lower than a set threshold and the change in the actual cost satisfies the near-optimal margin, the iteration is terminated directly to suppress invalid resolutions and long-tail time consumption caused by numerical noise.

[0036] In this embodiment, a multi-level safety backoff mechanism is set up: when the line search fails, the damping factor is corrected, the trust region shrinks, and the output of the control sequence of the previous cycle is shifted in sequence to ensure that there is still a safe and feasible control output under extreme conditions.

[0037] In this embodiment, the following features are included: controlling the sampling period to be 5s, predicting the time domain to cover more than 200s, and the average solution time per step to be less than 0.5s.

[0038] Specifically, in Example 2, a predictive control method for a new energy vehicle's anticipatory thermal management model is disclosed. This method is used for forward-looking coordinated control of a multi-loop coupled thermal management system that includes a battery temperature control loop, an electric drive waste heat loop, and a passenger compartment air conditioning loop. The method includes the following steps: T1. Construct a physical constraint gray box reduced-order thermal model (gray box reduced-order thermal model, nonlinear reduced-order thermal model) for winter operating conditions. The model should include at least four types of state variables: battery temperature, battery coolant inlet temperature, passenger compartment temperature, and electric drive temperature, which will serve as the prediction engine for model predictive control. T2. Obtain the predicted disturbance sequence (predicted sequence) of road slope, driving loss, vehicle speed and ambient temperature in the future prediction time domain. Generate multi-dimensional scene semantic score (four types of continuous scene score) through hierarchical look-ahead planning and map it to obtain the actuator bias trajectory (actuator control trajectory). T3. Construct a multi-layered composite stage cost function. The cost function should integrate at least the time-varying reference trajectory tracking term, the asymmetric under-temperature thermal debt penalty term (asymmetric thermal safety penalty term), the physical path and scene semantic reward and penalty term (physical path topology reward and penalty term), and the actuator action constraint term as the optimization objective. T4. Using the convexity solution link of linear time-varying approximation along the trajectory and state condensation elimination, combined with the real nonlinear cost line search acceptance mechanism and rolling hot start mechanism, the optimal actuator control sequence is obtained; T5. The first step control quantity of the optimal control sequence is extracted and output to the thermal management actuator. In the next control cycle, the current thermal state and the predicted disturbance sequence are updated. Steps T2 to T4 are repeated to form rolling time-domain closed-loop control (rolling closed-loop control).

[0039] In this embodiment, the method for constructing the physically constrained gray-box reduced-order thermal model in step T1 specifically includes: constructing a corresponding physical heat flux characteristic matrix for each state variable, such that the rate of change of state temperature satisfies... ;in This is the physical heat flux characteristic matrix. For the channel coefficients to be identified, The equivalent heat capacity is used; each heat flow characteristic corresponds to at least one type of heat transfer channel with a clear physical meaning, including active heating, driven waste heat coupling, environmental heat dissipation, cooling circuit heat exchange, and battery internal resistance heating; physical sign constraints are applied to the coefficients of each channel: the coefficients of active heating channels are constrained to be non-negative, the coefficients of active cooling channels are constrained to be non-positive, and the coefficients of temperature difference driven heat exchange channels are constrained to be non-negative, with the heat exchange direction determined autonomously by the sign of the temperature difference; the candidate equivalent heat capacities are traversed within the preset heat capacity search interval, and the channel coefficients are solved by regularized least squares with sign constraints. The final model parameters are determined based on the criterion of minimizing the temperature prediction RMSE of single-state multi-step rolling simulation.

[0040] In this embodiment, the heat flow characteristics corresponding to the battery coolant inlet temperature include the drive waste heat coupling characteristics. The characteristics are constructed by multiplying the drive loss square root linear compression with a softplus soft gating function, water pump speed, and loop allocation coefficient. The softplus soft gating function only takes effect when the electric drive temperature is higher than the battery coolant inlet temperature and exceeds a set margin.

[0041] In this embodiment, the heat exchange characteristics between the battery and the coolant, and between the electric drive and the coolant, are all constructed using a bidirectional linear heat exchange form based on the actual temperature difference, with the heat exchange direction adaptively switching according to the sign of the temperature difference.

[0042] In this embodiment, the hierarchical look-ahead planning process in step T2 specifically includes: applying exponential decay weights to the predicted disturbance sequence for sliding window weighted calculation to generate semantic scores for four scenarios: waste heat recovery, preheating, precooling, and maintenance; based on the semantic scores of the four scenarios and the current thermal state, generating a five-dimensional semantic heat flow target vector containing the battery active heating heat power, the heat power of driving waste heat to the battery, the heat power of driving waste heat to the passenger compartment, the heat power of battery active cooling, and the heat power of front-end active heat dissipation; combining the capacity constraints of each heat flow path, mapping the heat flow target vector to the actuator bias trajectory, which serves as both the actuator reference term in the cost function in step T3 and the initial value for hot start optimization in step T4.

[0043] In this embodiment, the preheating score has a built-in waste heat recovery suppression term. When the waste heat recovery score increases, the preheating score automatically decreases, forming a mutually exclusive control logic that prioritizes waste heat. The uphill score is calculated using a dual mechanism that takes the maximum value of the continuous weak slope weighting term and the short-term strong slope extreme value term. An event proximity score is also introduced to amplify the gain of the near-end uphill scenario.

[0044] In this embodiment, the five-dimensional semantic heat flow target vector is smoothed by a first-order low-pass filter and then mapped to the actuator bias trajectory. Furthermore, the actuator trajectory generation incorporates a heating and cooling path conflict (heating-cooling conflict) suppression mechanism.

[0045] In this embodiment, the multi-layer composite stage cost function in step T3 specifically includes a three-layer progressive structure: The first layer is the basic tracking and actuator cost: generating a time-varying exponential approximation reference trajectory starting from the current state, constructing state tracking cost and terminal cost; constructing actuator bias cost by combining actuator bias trajectory, and constructing actuator rate of change cost by combining control quantity difference between adjacent steps; The second layer is the thermal safety differential penalty cost: extracting the unilateral under-temperature deviation of battery temperature and battery coolant inlet temperature below the reference trajectory, applying additional high penalty, forming an asymmetric under-temperature thermal debt penalty term; setting state soft constraint boundaries for all thermal states, and independently decoupling the electric drive high temperature risk; The third layer is the physical path and scene semantic reward and punishment cost: including at least waste heat reuse reward term, heating and cooling conflict penalty term, cooling actuator matching penalty term, water pump invalid action penalty term, and state maintenance action penalty term, all reward and punishment terms are continuously differentiable algebraic expressions.

[0046] In this embodiment, the asymmetric under-temperature thermal debt penalty term only applies to the battery temperature and the battery coolant inlet temperature. When the state is higher than the reference trajectory, the penalty term is 0. The electric drive high temperature risk is handled separately through an independent soft constraint upper limit and a dedicated amplification factor, and is not intertwined with the battery under-temperature penalty.

[0047] In this embodiment, the waste heat reuse reward is a negative cost, and it only takes effect when the electric drive temperature is higher than the battery coolant inlet temperature and the margin is met, and the water pump and the corresponding valve passage are connected; the heating and cooling conflict penalty is constructed by multiplying the battery-side PTC heating power and the compressor power; the hold-state action penalty dynamically amplifies the actuator change rate penalty weight according to the hold-state score.

[0048] In this embodiment, the convex solution link and acceptance mechanism in step T4 specifically includes: calling the physical constraint gray box reduced-order thermal model (inlined nonlinear reduced-order thermal model) to perform forward rolling prediction in the full prediction time domain of the current candidate control sequence to obtain the state trajectory, and calculating the true nonlinear cost based on the composite stage cost function; calculating the state Jacobian matrix and control Jacobian matrix step by step along the current state trajectory to establish a linear time-varying approximate model in the control correction increment space; eliminating all state variables through cascaded recursion to compress the original nonlinear optimization problem in the state-control hybrid space into a standard convex quadratic programming subproblem with only the control correction as the sole decision variable; solving the convex quadratic programming subproblem using a hot-start method to obtain the control correction direction, using the control correction direction as the search direction, and accepting the updated control sequence by combining backtracking search with the true nonlinear cost.

[0049] In this embodiment, a near-optimal convergence guard is set: when the infinite norm of the control correction is lower than a set threshold and the actual cost change satisfies the near-optimal margin, the iteration is terminated directly; a multi-level safety backoff mechanism is set: when the line search fails, damping factor correction, trust region shrinking, and output shift of the control sequence of the previous cycle are used in sequence.

[0050] In this embodiment, the inlined physical constraint gray-box reduced-order thermal model is implemented with inline code that has a fixed physical connection order and a single function entry point, eliminating runtime dynamic parsing overhead; the line search uses the Armijo descent criterion as the acceptance criterion.

[0051] In this embodiment, the rolling hot start mechanism in step T4 is as follows: the optimal control sequence of the previous control cycle is shifted to the left by one step, and the tail is filled by zero-order maintenance as the initial control sequence of the current control cycle; during cold start, the calibration reference control quantity is used for filling.

[0052] Specifically: 1. Physically constrained gray box reduced-order thermal model: classified according to "modeling mechanism + constraint method"; The core definition comes from the model's construction logic and parameter rules: Mechanistic properties: gray box modeling, preserving the physical structure of heat transfer, and identifying parameters from data; Core innovation: Applying thermodynamic symbol constraints during the parameter identification stage eliminates antimatter interpretation; Order attribute: Reduces the order of lumped parameters, compressing them into a small number of core states. It answers the questions: How was this model built, and what are the rules governing the parameters?

[0053] 2. Inlined nonlinear reduced-order thermal model: classified according to "deployment integration method + mathematical properties"; The core definition stems from the code integration format and equation characteristics: Inline: This is a deployment dimension concept, as opposed to "outline / external call". It refers to the direct compilation and embedding of model code into the MPC solver iteration logic. Each iteration does not require calling external simulation software / interfaces, resulting in low computational latency. It is a common engineering implementation method for real-time control. Nonlinearity: This is a mathematical property, referring to the presence of nonlinear terms in the model (such as softplus gating, heat transfer coefficient varying with rotational speed, square root compression term, etc.), which distinguishes it from a purely linear RC network; Lowering the order: Similar to the former, it refers to lower-order lumped parameters. It answers the question: How should this model be implemented in the controller, and is it mathematically linear or nonlinear?

[0054] Figure 6 This is a structural diagram of a real-time predictive model predictive control system provided by one or more embodiments of the present invention.

[0055] Example 3, as Figure 6 The real-time predictive model control system shown includes: The data acquisition module is used to acquire the current thermal state vector, the actuator control quantity at the previous moment, and the predicted disturbance sequence in the future prediction time domain; The hot start initial sequence generation module is used to shift the optimal control sequence of the previous control cycle to the left by one step, and complete the tail by zero-order hold to construct the initial control sequence of the current cycle; during cold start, the calibration reference control quantity is used for filling. The nonlinear forward prediction and true cost calculation module is used to call the physical constraint gray box reduced-order thermal model to perform full-prediction time-domain forward rolling prediction of the current control sequence, obtain the state trajectory, and calculate the true cost based on the original nonlinear thermal management composite cost function. The linear time-varying approximation module along the trajectory is used to calculate the state Jacobian matrix and the control Jacobian matrix step by step along the current state trajectory, and to establish a linear time-varying approximation model in the incremental space of the control correction. The State Condensation Elimination and Quadratic Programming Assembly Module is used to eliminate all state variables through cascaded recursion, compressing the original nonlinear optimization problem in the state-control hybrid space into a standard convex quadratic programming subproblem with only the control correction variable as the sole decision variable. The hot-start convex quadratic programming solution module is used to solve convex quadratic programming subproblems using a hot-start approach and obtain the control correction direction. The true cost line search and acceptance module is used to search in the direction of control correction, and to verify the nonlinear reduced-order thermal model and the original true cost function again by searching the backline. After the cost reduction condition is met, the updated control sequence is accepted. The rolling output module is used to output the first control quantity of the optimal control sequence to the thermal management actuator, and the remaining control sequence serves as the thermal start reference for the next control cycle.

[0056] It is worth noting that although this system / device only discloses the above-mentioned modules / units, it does not mean that this system / device is limited to the above-mentioned basic functional modules. On the contrary, what this invention intends to express is that, based on the above-mentioned basic functional modules, those skilled in the art can add one or more functional modules in combination with the prior art to form an infinite number of embodiments or technical solutions. That is to say, this system is open rather than closed. It cannot be assumed that the scope of protection of the claims of this invention is limited to the above-disclosed basic functional modules just because this embodiment only discloses a few basic functional modules.

[0057] Example 4, in a specific embodiment, discloses a real-time predictive MPC control method for thermal management of new energy vehicles. By constructing a structured and efficient closed-loop solution chain in the inner layer of the on-board controller, namely "reduced-order thermal model prediction - linear time-varying approximation - control correction variable elimination and condensation - convex quadratic programming solution - real cost line search and acceptance - closed-loop hot start", sub-second high-precision soft real-time temperature control and energy efficiency optimization collaborative solution are achieved.

[0058] In this embodiment, the real-time predictive MPC control method for thermal management of new energy vehicles operates in the on-board control unit of a new energy pure electric commercial vehicle (heavy-duty pure electric truck). The four core temperature state variables of the controlled object form a state vector x=[T_bat,T_bat_in,T_cab,T_drive]^T, which represent the average temperature of the power battery pack, the battery inlet coolant temperature, the passenger compartment temperature, and the drive motor assembly temperature, respectively.

[0059] The control actuator vector is defined as follows: ; It unfolds in the order of actuators, including the power of the first PTC heater, the power of the second PTC heater, the speed of the refrigeration compressor, the flow rate of the electronic water pump, the speed of the front-end cooling fan, and the opening degree of multiple multi-way proportional regulating electronic valves.

[0060] The predicted disturbance vector is defined as d=[θ_slope,T_env,v_veh,P_loss]^T, which includes the future road slope angle, ambient air temperature, expected vehicle speed, and transient heat power loss of the drive system due to high power load.

[0061] The system's control period (sampling period) is set to T_s=5s, the prediction time domain is set to N_p=40 steps (covering the driving trajectory for the previous 200s), the control time domain is set to N_c=20 steps, and the end of the control time domain (from N_c to N_p) adopts zero-order hold or tail weight coverage to ensure that the control variables can completely cover the entire prediction range.

[0062] like Figure 1 As shown, the specific closed-loop iterative solution steps of the real-time predictive MPC control method in this embodiment within each sampling period are as follows: S1: Obtain the current state and full prediction of perturbations: In the current period t, the controller collects the current measured values ​​of four temperature states through the vehicle CAN bus and the high-precision map / vehicle-side network module, and assembles them into the current initial state vector x_0∈ ^4, simultaneously recording the actual output control quantity u_prev of the actuator at the previous moment. The controller synchronously reads and aligns the full road gradient, vehicle speed planning, and thermal load disturbance of the preceding N_p steps according to the predicted step size T_s, forming a time-domain disturbance matrix: ; Parameter meanings: D is the prediction time-domain perturbation matrix; d_k is the perturbation vector of the k-th prediction step; N_p is the number of prediction steps; 4 represents the four types of predicted perturbations: slope, ambient temperature, vehicle speed, and drive loss.

[0063] This provides complete and detailed dynamic boundary conditions for future operating conditions for subsequent reduced-order thermal model state integration and trajectory look-ahead prediction.

[0064] S2: Generate the initial control sequence for hot start through translation and shifting: To maximize the use of the time-recursive similarity of MPC rolling time-domain optimization, the controller maintains a warm-start guard mechanism. If the previous control cycle (t-1 step) successfully calculated and output the optimal control sequence U^ _t-1=[u^ _0,u^ _1,…,u^ If _N_c-1]^T, then the current step shifts the optimal sequence to the left by one prediction step size (i.e., prunes the already executed first step), and at the end of the control time domain, it fills in the tail control quantity through zero-order hold (i.e., lets u_new,N_c-1=u^T). (_N_c-1), thus constructing the initial candidate control sequence for the current period: ; Parameter meanings: U_0 is the current cycle hot start control sequence; u_0,k is the actuator vector of the k-th control step; m is the number of actuators; N_c is the control time domain length.

[0065] If the current cycle is a cold start (such as when the vehicle has just been powered on or the thermal management function has just been activated), then the initial control sequence is constructed by directly filling the entire length based on the calibration reference control quantity of the whole system (such as the rated opening degree or static power consumption point). When this hot start sequence U_0 is generated, the action is hard-truncated to make it naturally satisfy the physical upper and lower limit constraints (u_min≤u_k≤u_max) and the abrupt action change rate constraints (Δu_min≤u_k-u_k-1≤Δu_max).

[0066] S3: Trajectory Rollout and Actual Cost Calculation Based on Nonlinear Reduced-Order Thermal Model: The controller takes the initial state x_0, the predicted disturbance matrix D, and the current candidate control sequence U_j (j is the inner SQP iteration exponent, initially j=0) as input, and calls the vehicle's nonlinear reduced-order thermal model (ROM) to perform full-state forward rollout prediction in the rolling time domain. The single-step calculation of the reduced-order thermal model is represented by the following second-order Runge-Kutta (RK2) numerical integration function: ; Where: x_k is the four temperature states at step k; u_k is the actuator control quantity at step k; d_k is the predicted disturbance at step k; and f_ROM is the single-step state update function of the reduced-order thermal model.

[0067] To support the soft real-time requirements of the controller under high-frequency iterations, the calculation of the state change rate and intrinsic electro-thermal and fluid-thermal properties of this nonlinear reduced-order thermal model is implemented at the code level using a single function entry point written inline with a fixed physical connection and signal transmission order. This completely eliminates the heavy latency overhead caused by the frequent creation of anonymous functions, complex dynamic structure field parsing, overloading, and namemapping in general feature constructors for offline modeling. While maintaining complete equivalence between physical and mathematical semantic values, the time taken for a single full prediction rollout is drastically reduced from 106ms on the offline benchmark to 7ms. The state trajectory in the full prediction time domain is obtained after the rollout ends. ; Where: X_j is the predicted temperature trajectory obtained by the j-th SQP iteration; x_j,k is the state at step k of the j-th iteration; 4 corresponds to the battery, battery inlet water temperature, cabin temperature, and electric drive temperature.

[0068] Subsequently, the controller substitutes X_j and U_j into the original real nonlinear thermal management cost function, which maintains the same semantics, weights, and penalty terms as the offline full baseline MPC, to calculate the real cost J_{real}(U_j) of the current trajectory: ; Where: J_real is the cost of real nonlinear thermal management; x_ref,k is the reference temperature trajectory; Qtm, Ree, Scr, and Wsoft are the weight matrices for temperature tracking, actuator energy consumption, control rate of change, and soft constraint, respectively.

[0069] Each weight matrix precisely maps to a temperature tracking term (battery and passenger compartment comfort), an actuator energy consumption minimization term (vehicle accessory energy saving target), a control action change rate penalty term (to prevent severe wear of proportional valves or compressors during gear shifting), and a highly rigid state soft constraint violation term. This real cost will serve as the sole core criterion for the actual acceptance of the online search.

[0070] S4: Perform a linear time-varying (LTV) analytical approximation along the predicted trajectory: The controller utilizes the efficient inline function established by S3 to perform a step-by-step linear time-varying partial derivative expansion of the nonlinear algebraic-differential dynamics equations along the current operating point state trajectory X_j and the operating control sequence U_j. At each time-domain prediction point k, the system state Jacobian matrix A_k and the control Jacobian matrix B_k are calculated: ; Parameter meanings: A_k is the state Jacobian matrix at step k; B_k is the control Jacobian matrix at step k; both are calculated at the current predicted trajectory operating point and are used to construct the LTV approximation model.

[0071] In engineering, partial derivatives can be obtained through high-frequency calculations using the structured central finite difference method (based on the S3 inline extreme velocity model) or analytical derivative formulas. Therefore, the linear time-varying recursive local model of the perturbation increment near the current rollout trajectory is: ; Where: x_j,k and u_j,k are the operating points; x_k and u_k are the candidate states and control variables, respectively.

[0072] This step, without compromising or simplifying the physical accuracy of the original model, abstracts a locally high-fidelity linear time-varying surrogate model for constructing inner-layer convex optimization problems.

[0073] S5: Condensing the assembly state elimination recursive matrix: To significantly compress the dimension of optimization variables and completely eliminate state variables from the optimization space of the inner solver, this invention introduces a control correction variable (control increment space independent variable) δuk=uk-uj,k, and a state deviation variable δxk=xk-xj,k. Based on the linear time-varying incremental equation constructed in S4, cascaded algebraic elimination recursion is performed from k=0 towards the end of the prediction time domain: ; Where: δxk is the state deviation at step k; δuk is the control correction at step k; this formula represents the recursive deduction of the state deviation at step one. The state condensation recursive process is as follows: ; Similarly, the condensed representation of the full-time state increment concatenation vector δX=[δx1,δx2,…,δxNp]^T can be expressed as an explicit algebraic mapping relationship between the initial state deviation δx0 (the current sampling period is usually known and is generally set to zero after alignment) and the full-time control correction concatenation increment vector δU=[δu0,δu1,…,δuNc-1]^T, as follows: Figure 3 As shown: ; δX is the cascaded vector of state deviation in the full prediction time domain; Sx and Su are prediction matrices assembled from the time series of Ak and Bk; δU is the cascaded vector of control correction.

[0074] Wherein, the dense prediction matrix S_x∈ 4Np×4 and S_u∈ Each block of 4N_p×mNc is rigorously assembled from the time-domain recursive product of linear time-varying Jacobian matrix sequences Ak and Bk. This step completes the key transformation of the original system from "state-control full-space programming" to "pure control correction compact space programming".

[0075] S6: Assembly-structured compact convex quadratic programming (QP) subproblem: The controller substitutes the state-cohesive variable relationship described in formula (2) into the local quadratic cost approximation of the Gauss-Newton Taylor quadratic expansion around the current rollout trajectory. Through matrix multiplication and linear algebraic recombination, all state search variables are eliminated, and the following is assembled using only the control correction δU∈ The standard convex quadratic programming (QP) subproblem with ^m·N_c as the unique decision variable: ; ; Where: δU is the QP decision variable; H is the local quadratic approximation Hessian matrix; f is the first-order gradient vector; this formula is the objective function of condensed QP. lb and ub are the upper and lower bounds of the control correction; A_ineq and b_ineq are the actuator upper and lower limits and linear constraints such as the rate of change.

[0076] Wherein, the dense positive semi-definite Hessian matrix H∈ (mN_c)×(mN_c) is obtained by algebraically assembling equal-weight matrices SuTQtmSu+Ree+Scr. To cope with possible abnormal values, a small damping term can be selectively injected into the diagonal to ensure its strict positive definiteness. f is a vector of partial derivatives reflecting the direction of the current first-order gradient. The linear inequality constraint matrices Aineq,bineq and the physical boundaries lb,ub will carry out accurate first-order Taylor translation mapping transformation in the working neighborhood of the linearized point to restrict the physical upper and lower limits of each pump, valve and fan in the thermal management system and to constrain the rate of change of actuators due to mechanical inertia or electronic control limitations.

[0077] S7: Efficient solution to the hot-start convex quadratic programming subproblem: The controller inputs the compact QP data, obtained from the high-frequency assembly in step S6, into the underlying embedded quadratic programming solver. This invention employs the active-set method for solving the problem. During the solution invocation, the controller passes the optimal solution sequence of the control increment from the previous iteration or cycle as the warm-start initial value for the active set. Since the similarity of the active set constraint boundaries between adjacent optimization steps in the rolling time domain is typically higher than 95%, the warm-start enables the active-set method to converge rapidly within a very small number (usually 1-5) basis decomposition iterations, providing an extremely accurate local control correction direction δUqp. If the active-set method fails to solve the numerical problem due to extreme abrupt disturbances or constraint hardening, the controller immediately activates the interior-point method solver or the OSQP sparse solver as alternatives to force a feasible and stable numerical solution output, thereby preventing the entire vehicle system from crashing due to a lack of control direction.

[0078] S8: Line search acceptance based on the original true nonlinear thermal management cost function: Since the QP subproblem assembled in S6 is only a local linear / quadratic approximation around the current working trajectory, directly and blindly accepting and fully updating δUqp is prone to overshoot divergence due to strong nonlinearity, resulting in "the approximate problem objective decreases, but the real physical objective deteriorates significantly." Therefore, this invention introduces a strong acceptance mechanism: the controller constructs candidate control sequences: ; Where: Utry is the candidate control sequence for the line search; is the line search backtracking coefficient, whose initial value is set to 1.0, and is gradually reduced in a geometric progression according to a fixed backtracking attenuation coefficient (e.g., β=0.5) (i.e., =1.0, 0.5, 0.25, ...); δUqp is the control correction direction obtained by QP.

[0079] ; This formula is the real cost Armijo acceptance condition; c is the descent coefficient; ΔJqp is the QP predicted descent amount; the candidate control sequence is accepted only when this formula is satisfied.

[0080] S9: Convergence judgment, warm-start near-optimal convergence guard and abnormal fallback processing: In the judgment of the outer SQP iteration, when any of the following conventional convergence indicators is met, the controller immediately stops the optimization iteration of the current cycle: the real cost descent amount is less than the threshold (Jreal(Uj)-J_real(Uj+1)<tolJ), the maximum absolute value of the control correction amount is lower than the threshold (‖α·δUqp‖_∞<tolu), or the set maximum upper limit of SQP iterations for the vehicle-mounted platform is reached (e.g., jmax≤5 times is limited). In particular, in order to cope with the engineering reality of limited computing power resources of the microprocessor on the vehicle-mounted embedded platform, and completely prevent frequent inner damping upgrades and invalid QP re-solutions caused by weak numerical calculation noise, the present invention specially designs a warm-start near-optimal convergence mechanism (Warm-start near-optimal convergence mechanism) at the convergence judgment layer: in the initial stage of iteration, if the current optimized control sequence has already undergone high-quality translation preview in the previous control cycle, and the infinite norm of the control correction direction solved by the current inner QP is already lower than a strict near-optimal threshold (i.e., satisfying ‖α·δUqp‖∞≤toldu), and the real cost change verified by the current Rollout is within the engineering near-optimal margin, the near-optimal guard directly forcibly triggers the convergence state, forcibly accepts the current feasible control sequence as a whole, and does not enter the step damping upgrade and line search re-solution process. If in the outer iteration or backtracking line search, due to extremely harsh working conditions, a solution satisfying the Armijo descent still cannot be found within the specified minimum step limit, the controller sequentially triggers the following safety fallback guarantee mechanisms: 1. Introduce the Levenberg damping factor to perform diagonal matrix remodeling penalty on the Hessian matrix; 2. Reduce the radius of the outer trust region to limit the optimization solution space of the control increment; 3. Alternative Mechanism: If the above algorithm still fails the real-world acceptance test, the current cycle iteration is terminated directly, and the safe and feasible control sequence for the corresponding time step calculated in the previous control cycle is maintained and advanced (i.e., the safe rollback baseline is executed). This ensures that the vehicle controller can stably and continuously send physically safe temperature control commands to downstream actuators under any extreme failure state. After applying this near-optimal convergence guard and rollback strategy, the average time of the most difficult rolling window is significantly reduced from 1210ms to 195ms, the P90 long-tail time is drastically reduced from 2941ms to 194ms, and the number of closed-loop abnormal rollbacks is completely reduced from 90 times on the offline baseline to zero.

[0081] S10: Initial control output and rolling time domain forward shift recursion: Once the outer iteration converges or is safely terminated by the near-optimal mechanism, the controller extracts the first element of the optimal control sequence, which has been verified through the actual online search: ; in: This represents the first optimal actuator control quantity actually output in the current cycle; each component corresponds to actuators such as PTC, compressor, water pump, fan, and valve opening.

[0082] The data is directly transmitted via the vehicle's underlying driver (such as PWM duty cycle signals or CAN bus control words) to the first / second PTC heater, air conditioning circuit refrigeration compressor, electronic water pumps of each circuit, front-end condenser fan, and multi-channel proportional control valve of the new energy commercial vehicle, driving the thermal management hardware to execute a closed-loop physical temperature control response. At the same time, the controller shifts the optimal control sequence to the left by one time step, retaining it as the reference initial value for the hot start of the next control cycle (time t+1), completing a complete rolling time-domain MPC cycle of cyclical hard closed-loop calculation chain.

[0083] Quantitative evaluation data shows that, under the same high-fidelity nonlinear reduced-order thermal model, the same set of predicted perturbation input scenarios, and the same semantic and weighted true cost objective function constraints: The conventional baseline approach using a general nonlinear programming solver (NLP direct full-space optimization) takes an average of 1499 seconds per step to solve, and frequently suffers from computational divergence or under-convergence in multiple large dynamic heavy-load gradient change windows, making it unsuitable for real-vehicle deployment. After adopting the complete on-board real-time solution chain constructed in this embodiment, which includes "reduced-order thermal model Rollout + trajectory time-varying linearization + control correction state elimination and condensation + real nonlinear cost line search backtracking confirmation + Warm-start near-optimal mechanism", the average single-step solution time under all 40 typical long-term verification windows is only 0.44s, the maximum long-tail solution time is less than 2.5s, which is significantly lower than the 5s control cycle, and perfectly realizes the on-board online real-time deployment of the controller. Furthermore, thanks to the guarantee of the true nonlinear cost backtracking acceptance criteria, the rapid solution of this invention does not come at the expense of control accuracy and energy saving effect. The final converged true nonlinear objective function value is further optimized and reduced from 42302 of the NLP baseline to 37750 in the representative offline rolling window, demonstrating extremely high comprehensive energy efficiency and power saving gain in commercial vehicle operation.

[0084] The key core of this embodiment lies in: 1. Controller end-to-end topology architecture layer protection: In the multi-loop predictive thermal management model predictive control (MPC) of new energy vehicles, a complete, end-to-end onboard soft real-time optimization control solution chain has been established, consisting of "predictive disturbance driving—forward rollout of the reduced-order thermal model—linear time-varying (LTV) approximation along the current predicted working trajectory—state elimination and condensation of the decision space control correction quantity—warm-start convex quadratic programming (QP) solution—line search and backtracking confirmation of the original true nonlinear thermal management cost function—rolling time-domain translation warm-start closed loop". This differs from general solutions that merely provide a background physical thermal model, obtain road prediction information, or simply replace the nonlinear optimizer with a conventional quadratic planner. Its core technological advantage is that it compresses the single-step solution of the complex multi-loop temperature control object of new energy commercial vehicles from the minute level (approximately 1499s) to the sub-second level (average approximately 0.44s) within the onboard sampling period, making the real-time online deployment of complex nonlinear path predictive thermal management on the onboard controller possible.

[0085] Second, model approximation and protection of the local time-varying subproblem construction layer: Along the predicted working point trajectory obtained from the current iteration, a method is used to perform linear time-varying (LTV) linearization on the nonlinear reduced-order thermal model to extract the linearized state Jacobian matrix Ak and control Jacobian matrix Bk that change in real time with future prediction steps and time-varying operating conditions. Specifically, instead of directly using the full absolute control sequence or the full state-control sequence as the optimization independent variable, the inner-layer independent variable to be solved is specifically limited to the "control correction amount (control increment vector δU)" space within the neighborhood of the current rollout working trajectory. Its core technical effect is a significant reduction in the mathematical computational complexity of finite difference or partial derivative estimation during each local optimization, providing a high-fidelity, low-time-consuming local proxy framework for the rapid conversion of subproblems to convex optimization forms.

[0086] Third, optimization problems involving mathematical algebraic transformations and variable compression layer protection: In the predictive thermal management MPC of new energy vehicles, a state condensation method is used by recursive elimination in state space. Specifically, this involves constructing dense prediction relation matrices Sx and Su using the cascaded product of progressively extracted time-varying matrices Ak and Bk. This mathematically eliminates the future temperature state variables (battery temperature, battery inlet coolant temperature, cab temperature, and electric drive temperature trajectory) across the entire prediction time domain, transforming them into a fully algebraic mapping function between the current initial state deviation and the control correction vector δU. Furthermore, within each control sampling cycle, the original large-scale nonlinear programming problem, containing hundreds or thousands of mixed state / control dimensions, is directly compressed and assembled in the controller memory into a small-scale, dense convex quadratic programming (QP) standard subproblem containing only the control correction δU as the sole optimization variable. This enables the effective set method, interior point method, or dedicated embedded microcontroller QP solvers to achieve ultra-fast fixed-length solutions at the microsecond to millisecond level.

[0087] Fourth, nonlinear real acceptance layer protection in the inner convex solution direction: The vehicle thermal management MPC introduces a two-layer verification mechanism: "local QP direction calculation + original real nonlinear thermal management cost function line search backtracking acceptance". Specifically, the control correction direction δUqp calculated by the inner time-varying condensed QP solver is not directly adopted by the controller in its entirety. Instead, it is used as the search direction. A candidate control sequence containing the backtracking attenuation coefficient α is constructed, and the original complete nonlinear reduced-order thermal model is forcibly invoked again to perform rollout prediction. It must undergo strict Armijo descent or descent judgment acceptance through the real nonlinear thermal management cost function with the same weights and penalty semantics as the offline full MPC (comprehensively considering the real four-loop temperature control tracking, actuator energy loss, rate of change constraints, and state soft constraint violation penalties). Only when it passes the real acceptance criteria is the control trajectory updated and the line search exited. The distinctive feature of this mechanism lies in the two-layer closed loop of "approximate problems are responsible for high-frequency acceleration generation direction, and real problems are responsible for checkpoint acceptance". Its core technical effect is to completely avoid the systematic divergence risk of control quantity overshoot, deviation from the real temperature control target, or deterioration of accessory power consumption caused by simply relying on linear approximation. It ensures that while the solution speed increases by thousands of times, the real objective function value is further optimized and reduced (from about 42302 to about 37750).

[0088] Fifth, closed-loop iterative protection against long tails and soft real-time safeguards: The on-board temperature control MPC introduces a warm-start near-optimal convergence guard mechanism and a safety fallback mechanism. Specifically, the controller uses the optimal control sequence from the previous cycle to shift and prune the tail segment in the rolling time domain to provide a high-dynamic neighborhood initial value for the warm-start of the inner SQP iteration in the current cycle. In the outer iteration or inner QP solution, once it is identified that the infinite norm of the currently calculated control correction δUqp is lower than the set near-optimal tolerance threshold toldu, and the corresponding real nonlinear cost change meets the engineering near-optimal acceptance limit, the solver guard directly cuts off the inner loop, terminates the iteration, and fully accepts the current solution to exit, thereby blocking the ineffective damping upgrade, frequent step shrinking of the trust region, and long-tail re-solution time consumption caused by high-frequency numerical noise. Furthermore, in the extreme case where the online search completely fails, a safety fallback mechanism is triggered, directly forcibly shifting and outputting the corresponding step safety control sequence saved in the previous control cycle. Its core technological effect is to drastically reduce the P90 long-tail time of the most difficult calculation window of rolling optimization from 2941ms to 194ms, and reduce the number of software and hardware rollbacks during algorithm operation to 0, thus eliminating the serious engineering hidden danger of vehicle controller reset and crash caused by long-tail calculation overflow of embedded processor.

[0089] This embodiment also includes: 1. Replacement of Convex Quadratic Programming (QP) Solvers: The effective set method described in the specification and embodiments can be equivalently replaced by the interior-point method, operator-split quadratic programming algorithms (such as embedded low-power OSQP solvers), non-conjugate gradient convex optimization solvers, or other robust dense / sparse QP solvers suitable for deployment on microcontrollers. As long as the data received by these solvers is the standard form of the convex quadratic programming subproblem containing only the control correction δU, obtained through state condensation elimination in this embodiment, and is still subject to the line search acceptance of the outer real nonlinear thermal management cost function, it belongs to an equivalent implementation of this embodiment.

[0090] 2. Improvement of the linearization (LTV partial derivative extraction) method: The partial derivative extraction method described in the embodiment is not limited to the structured central finite difference method, but can be equivalently improved by: directly embedding the analytical Jacobian partial derivative matrix formula within the inline code, introducing an in-vehicle embedded automatic differentiation (Algorithmic Differentiation) component, using forward unidirectional difference, or directly calculating Ak and Bk based on multivariate semi-analytical algebraic relations. These local fine-tuning of derivative extraction methods do not change the core invention of this embodiment: "extracting the time-varying matrix along the current rollout working trajectory and assembling the control incremental convex part accordingly."

[0091] 3. Extension of the Line Search Real Acceptance Conditions: The Armijo descent condition used in this embodiment can be further extended or equivalently replaced by: the Goldstein criterion, the Wolfe strict two-way criterion, the actual-over-predicted reduction ratio (ACR) determination method, the condition determination based on the absolute near-optimal envelope of the real cost, or a logical multiple combination of these criteria and the infinite norm of the control increment. As long as its core control idea adheres to the principle that "the outer candidate sequence must be integrated by calling the inline nonlinear thermal model and the checkpoint must be finally confirmed by the original thermal management objective function," it belongs to the improvement scheme of this embodiment.

[0092] 4. Expansion of Thermal Management Controlled Objects and Physical Loops: The four temperature states (battery, battery inlet, passenger compartment, electric drive) and six typical actuators given in this embodiment can be arbitrarily expanded or tailored according to the hardware topology of different vehicle models. For example, it can add multi-segment temperatures inside the battery pack, the comprehensive temperature of the hydrogen fuel cell stack, the refrigerant (refrigerant loop pressure, superheat) states in multiple loops, or add more electronic three-way / four-way proportional flow control valves, multi-stage series PTCs, condenser grille louver openings, etc. As long as the controller still adopts a closed-loop MPC architecture based on anticipating disturbances, rapid prediction of inline models, LTV approximation along the trajectory, state condensation reduction variables, and real acceptance for the expanded multi-loop thermal management system, it is fully within the protection scope of this embodiment.

[0093] 5. Expanded Sources of Anticipatory Disturbance Information: The methods for acquiring anticipatory information such as slope, vehicle speed, environment, and drive thermal load as described in the specification can be derived from physical hardware or software sources such as: in-vehicle high-precision 3D maps, in-vehicle forward environment perception binocular cameras / LiDAR, V2X cloud-based commercial fleet collaborative dispatch center, in-vehicle navigation (ADASIS protocol, etc.), or advanced prediction of the driver's future operating intentions and the transient heat loss power of the drive system based on in-vehicle long short-term memory neural networks (LSTM). The diversification of disturbance input sources or the evolution of their accuracy does not change the real-time protection characteristics of the real-time decoupling and convexity solution closed loop built inside the controller in this embodiment.

[0094] Example 5, in another specific embodiment, discloses a new energy vehicle, including a thermal management actuator, a sensor, and a controller; the controller is configured to execute the real-time predictive model predictive control method in the above embodiment, and send the first step control quantity of the control sequence verified by real cost to the thermal management actuator.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A real-time predictive model control method, characterized in that, include: D1. Obtain the current thermal state, the optimal control sequence of the previous cycle, and the predicted disturbance sequence in the future prediction time domain; D2. Generate the initial control sequence for the current cycle's hot start: Shift the optimal sequence of the previous cycle to the left by one step, and complete the tail with zero-order padding to construct the initial control sequence for the current cycle; use the calibration reference control quantity to fill during cold start; D3. Call the physical constraint gray box reduced-order thermal model, combine the initial control sequence and the predicted disturbance sequence, and recursively advance in the entire prediction time domain to obtain the predicted state trajectory. Substitute it into the composite stage cost function to calculate the nonlinear cost value. D4. Calculate the state Jacobian matrix and control Jacobian matrix step by step along the current predicted state trajectory, and establish a linear time-varying approximate model of the control correction increment. D5. Based on the linear time-varying approximation model, all state variables in the optimization problem are eliminated by time-series cascaded recursion. The original nonlinear rolling optimization problem is compressed into a standard convex quadratic programming subproblem where only the control correction is the only decision variable. D6. Solve the convex quadratic programming subproblem using a hot-start method to obtain the control correction direction; D7. Using the control correction direction as the search direction, the physical constraint gray box reduced-order thermal model and the actual cost are called again through backtracking search to verify the cost reduction condition. The control sequence is then updated after the cost reduction condition is met. D8. Output the first step control quantity of the optimal sequence to the thermal management actuator, and use the remaining control sequence as the thermal start reference for the next cycle.

2. The real-time predictive model control method according to claim 1, characterized in that, include: In step D3, the physical constraint gray box reduced-order thermal model is implemented with inline code that has a fixed physical connection order and a single function entry point, eliminating runtime dynamic parsing overhead.

3. The real-time predictive model control method according to claim 1, characterized in that, include: In step D4, the Jacobian matrix is ​​calculated using the structured central finite difference method or the analytical derivative formula.

4. The real-time predictive model control method according to claim 1, characterized in that, include: In step D5, a dense prediction matrix is ​​constructed through time-series recursive product, and the state deviation of the entire prediction time domain is expressed as an explicit algebraic mapping between the initial state deviation and the control correction.

5. The real-time predictive model control method according to claim 1, characterized in that, include: In step D6, the effective set method is used to solve the convex quadratic programming problem, and the solution of the previous iteration or the previous cycle is used as the initial value for hot start. Configure interior point method or sparse solver as an alternative fallback.

6. The real-time predictive model control method according to claim 1, characterized in that, include: In step D7, the line search uses the Armijo descent criterion as the acceptance criterion to ensure that each update reduces the true nonlinear cost.

7. The real-time predictive model control method according to claim 1, characterized in that, Also includes: A multi-level safety backoff mechanism is set up: when the line search fails, the damping factor is corrected, the trust region is shortened, and the output of the control sequence of the previous period is shifted in turn to ensure that there is still a safe and feasible control output under extreme conditions.

8. The real-time predictive model control method according to claim 1, characterized in that, Also includes: The physical constraint gray box reduced-order thermal model includes: a set of state variables, including four core thermal states: battery temperature, battery coolant inlet temperature, crew compartment temperature and electric drive temperature, which serve as the output objects for forward recursion; The physical heat flow characteristic matrix constructed in each state corresponds to the characteristic terms of five types of heat transfer channels: active heating, driven waste heat coupling, environmental heat dissipation, loop heat exchange and battery internal resistance heating. These are used to characterize the heat transfer mechanism of each thermal state and support the state recursive calculation. The physical sign constraint rule for channel coefficients stipulates that the channel coefficients for active heating, driven waste heat coupling, and battery internal resistance heating are non-negative, the channel coefficients for environmental heat dissipation are non-negative, and the channel coefficients for loop heat transfer are non-negative. This is used to constrain the state recursion process to conform to thermodynamic laws. The calibration parameter set, including the equivalent heat capacity and heat transfer coefficient of each channel determined by traversing the equivalent heat capacity range, identifying with signed constraints, and selecting the best values ​​from multi-step rolling simulation errors, is used for numerical calculation of the heat flow characteristic matrix.

9. A real-time predictive model control system, characterized in that, include: The data acquisition module is used to acquire the current thermal state, the optimal control sequence of the previous period, and the predicted disturbance sequence in the future prediction time domain; The hot start initial sequence generation module is used to generate the initial control sequence for the current cycle: the optimal sequence of the previous cycle is shifted to the left by one step, and the tail is filled with zero-order to construct the initial control sequence for the current cycle; during cold start, the calibration reference control quantity is used for filling. The nonlinear forward prediction and true cost calculation module is used to call the physical constraint gray box reduced-order thermal model, combine the initial control sequence and the predicted disturbance sequence, and forward recursively calculate the predicted state trajectory in the entire prediction time domain. The predicted state trajectory is then substituted into the composite stage cost function to calculate the nonlinear cost. The linear time-varying approximation module along the trajectory is used to calculate the state Jacobian matrix and the control Jacobian matrix step by step along the current predicted state trajectory, and to establish a linear time-varying approximation model of the control correction increment. The State Condensation Elimination and Quadratic Programming Assembly Module is used to eliminate all state variables in the optimization problem based on the linear time-varying approximation model through time-series cascaded recursion, compressing the original nonlinear rolling optimization problem into a standard convex quadratic programming subproblem with only the control correction as the sole decision variable. The hot-start convex quadratic programming solution module is used to solve convex quadratic programming subproblems using a hot-start approach and obtain the control correction direction. The real cost line search and acceptance module is used to search in the direction of control correction, and to verify the physical constraint gray box reduced-order thermal model and the real cost again by searching the backline. The control sequence is updated after the cost reduction condition is met. The rolling output module is used to output the first step control quantity of the optimal sequence to the thermal management actuator, and the remaining control sequence is used as the thermal start reference for the next cycle.

10. An electronic device, characterized in that, include: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. The memory stores a computer program that, when executed by a processor, causes the processor to perform the steps of the real-time predictive model predictive control method as described in any one of claims 1 to 8.