Composite stage cost function construction method and system
Patent Information
- Application Number
- CN202611279270.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-10-20
AI Technical Summary
[0004]核心技术问题:传统目标函数多基于固定的温度跟踪误差、执行器能耗及变化率构建,在复杂冬季工况下存在多种弊端
本发明改变了固定目标的阶跃控制方式,使得冷启动初期控制动作与热系统的固有热传递传热速率相匹配,杜绝了PTC在时域起点的全功率过饱和动作,大幅节能,实现平滑启动匹配惯性。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of thermal management control technology for new energy vehicles, and in particular to a method and system for constructing composite stage cost functions. Background Technology
[0002] In vehicle thermal management using Model Predictive Control (MPC) for new energy vehicles, traditional objective functions are often constructed based on fixed temperature tracking errors, actuator energy consumption, and rates of change. This design has significant drawbacks under complex winter conditions: First, the large temperature difference during the initial cold start phase can easily cause the heating actuators to oversaturate and operate at full capacity, ignoring the inherent heating inertia and heat transfer rate of the thermal system. Second, the traditional symmetrical quadratic temperature difference penalty treats both "below" and "above" warm-up trajectories equally, failing to specifically mitigate the system limitations and lifespan degradation risks caused by unilateral battery under-temperature penalties. Third, the lack of constraints on the system's physical topology and fluid pathways can easily lead to inefficient countermeasures such as simultaneous operation of electric heating and compressor cooling, actuator mismatch, and blind energy consumption without temperature difference during the solution process. Furthermore, once the thermal state enters a stable holding range, traditional penalty mechanisms cannot effectively prevent the degradation of lifespan caused by frequent small actuator movements. Summary of the Invention
[0003] The purpose of this invention is to provide a method and system for constructing a composite stage cost function, thereby solving at least one of a number of technical problems.
[0004] Core technical challenges: Traditional objective functions are often constructed based on fixed temperature tracking errors, actuator energy consumption, and rates of change, which have various drawbacks under complex winter operating conditions. The challenge is to enable the controller to respect the system's thermal inertia while simultaneously penalizing unilateral battery under-temperature and actively capturing waste heat path benefits in the prediction time domain. Furthermore, it is crucial to unify the complex physical topology constraints and scene semantics, such as thermal conflicts, cooling matching, ineffective pump consumption, and suppression of actions to maintain operating conditions, into a single, continuously solvable, and efficient optimization objective with no integer constraints.
[0005] This invention provides the following solution: According to a first aspect of the present invention, a method for constructing a composite stage cost function, based on vehicle thermal management, is provided, comprising: C1. Construct the first layer of cost: Generate a time-varying exponential approximation reference trajectory, construct the state tracking cost and terminal cost based on the deviation between the predicted state and the reference trajectory; construct the actuator physical path cost by combining the actuator bias trajectory, and construct the actuator cost by combining the control input bias and the actuator change rate. C2. Constructing the second layer of cost: Extracting the one-sided under-temperature deviation between the battery temperature and the battery coolant inlet temperature being lower than the reference trajectory, and imposing an additional high penalty on it to form an asymmetric under-temperature thermal debt penalty term; setting soft constraint boundaries for all thermal states and independently decoupling the electric drive high temperature risk. C3. Construct the third layer of costs: including at least waste heat reuse reward items, heating and cooling conflict penalty items, cooling actuator matching penalty items, water pump invalid action penalty items, and state maintenance action penalty items; all reward and penalty items are continuously differentiable algebraic expressions; C4. The costs of each layer above are weighted and summed to obtain the total composite cost function, which is then used for rolling optimization through a continuous optimization solver.
[0006] Furthermore, including: In step C1, the time-varying exponential approximation reference trajectory starts with the predicted initial value and converges smoothly to the target state through an exponential function. The time constant matches the thermal inertia of the system, making it suitable for both heating and cooling scenarios.
[0007] Furthermore, including: In step C2, 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, this penalty term is 0.
[0008] Furthermore, including: In step C2, the risk of high temperature in electric drive is handled separately through an independent soft constraint upper limit and a dedicated amplification factor.
[0009] Furthermore, including: In step C3, 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 reward intensity increases with the increase of available temperature difference, water pump speed, and valve connectivity.
[0010] Furthermore, including: In step C3, the heating and cooling conflict penalty term is constructed by multiplying the battery-side PTC heating power and the compressor power to characterize the degree of heat and cold conflict.
[0011] Furthermore, including: In step C3, the penalty for ineffective pump operation increases with the increase of pump speed when the effective heat exchange temperature difference in the loop is lower than the set threshold, thus penalizing blind pump consumption under conditions of no temperature difference.
[0012] Furthermore, including: In step C3, the penalty term for maintaining the state action is dynamically amplified with the penalty weight of the actuator change rate as the upper-level maintain the state score increases.
[0013] Furthermore, including: The total cost function can be solved using a convex quadratic programming solver, an interior-point method solver, or a sequential quadratic programming solver.
[0014] According to a second aspect of the present invention, a composite stage cost function construction system based on vehicle thermal management is provided, comprising: The first-layer construction module is used for basic tracking and actuator costs, generates time-varying exponential approximation reference trajectories, and constructs state tracking costs and terminal costs based on the deviation between the predicted state and the reference trajectory. The physical path cost of the actuator is constructed by combining the actuator bias trajectory, and the actuator cost is constructed by combining the control input bias and the actuator rate of change. The second-layer construction module is used for differentiated thermal safety penalty costs. It extracts the unilateral under-temperature deviation between the battery temperature and the battery coolant inlet temperature, which is lower than the reference trajectory, and applies an additional high penalty to it, forming an asymmetric under-temperature thermal debt penalty term. It sets soft constraint boundaries for all thermal states and independently decouples the electric drive high temperature risk. The third-layer construction module is used for physical path and scene semantic reward and penalty costs, including at least waste heat reuse reward items, heating and cooling conflict penalty items, cooling actuator matching penalty items, water pump invalid action penalty items, and state maintenance action penalty items; all reward and penalty items are continuously differentiable algebraic expressions; The cost-weighted summation module, the first-layer construction module, the second-layer construction module, and the third-layer construction module are used to sum the costs to obtain the total composite cost function, which is then optimized through a continuous optimization solver.
[0015] The above solution achieves the following beneficial technical effects: This invention changes the step control method for fixed targets, so that the control action in the early stage of cold start matches the inherent heat transfer rate of the thermal system, eliminates the full-power oversaturation action of PTC at the beginning of the time domain, saves energy significantly, and achieves smooth start matching inertia.
[0016] This invention uses asymmetric battery under-temperature penalty to allow for moderately advanced heating or reasonable waste heat storage, but imposes a high cost to block "under-temperature behavior" that lags behind the warm-up rate. This eliminates the speculative strategy of the controller to "sacrifice battery temperature to create a low-temperature deficit" in exchange for superficial energy saving, and achieves unilateral guidance to prevent false energy saving.
[0017] This invention couples the available temperature difference driving waste heat, pump speed, and multi-way valve connectivity into negative-cost reward terms. This enables the MPC to proactively select pump and valve connectivity paths even when facing action penalties, making waste heat reuse an explicit optimization objective and transforming waste heat reuse from a response into an explicit benefit.
[0018] This invention transforms unreasonable combinations of thermodynamics and hydraulics, such as thermal antagonism, fan mismatch, and blind pump consumption without temperature difference, into optimizable continuous cost terms. It eliminates the need to introduce mixed integer programming (MIP), ensuring extremely high solution efficiency of MPC in high-dimensional states and realizing the elimination of antagonism and inefficient actions that do not conform to physical topology.
[0019] This invention introduces a state-holding action penalty, which effectively solves the problems of decreased smoothness and shortened service life caused by small and frequent actuator movements after the hot state enters the stable range. The strategy is easier to calibrate in real vehicle engineering and achieves scene semantic suppression of stable range actions. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of a composite cost function construction process provided in a specific embodiment of the present invention.
[0021] Figure 2 This is a schematic diagram showing a comparison between a time-varying exponential warm-up trajectory and a fixed target trajectory, provided by a specific embodiment of the present invention.
[0022] Figure 3 This is a schematic diagram of an asymmetric under-temperature penalty provided in a specific embodiment of the present invention.
[0023] Figure 4 This is a schematic diagram of a waste heat reuse reward path provided in a specific embodiment of the present invention.
[0024] Figure 5 This is a flowchart of a composite stage cost function construction method provided by one or more embodiments of the present invention.
[0025] Figure 6 This is a structural diagram of a composite stage cost function construction system provided by one or more embodiments of the present invention. Detailed Implementation
[0026] 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.
[0027] Figure 5 This is a flowchart of a composite stage cost function construction method provided by one or more embodiments of the present invention.
[0028] Example 1, such as Figure 5The method shown is a composite stage cost function construction method based on vehicle thermal management model predictive control. It constructs a three-layer progressive stage cost and weights it to form a total cost function, which is used for MPC rolling time-domain optimization solution, including: C1. Construct the first layer of basic tracking and actuator costs: Generate a time-varying exponential approximation reference trajectory, construct the state tracking cost and terminal cost based on the deviation between the predicted state and the reference trajectory; construct the actuator bias cost by combining the actuator bias trajectory, and construct the actuator rate of change cost by combining the difference in control quantities between adjacent steps. C2. Construct a second layer of differentiated thermal safety penalty cost: Extract the unilateral under-temperature deviation between the battery temperature and the battery coolant inlet temperature, which is lower than the reference trajectory, and impose an additional high penalty on it to form an asymmetric under-temperature thermal debt penalty term; set soft constraint boundaries for all thermal states and independently decouple the electric drive high temperature risk. C3. Construct the third-layer physical path and scene semantic reward and penalty cost: at least include waste heat reuse reward item, heating and cooling conflict penalty item, cooling actuator matching penalty item, water pump invalid action penalty item and state maintenance action penalty item; all reward and penalty items are continuously differentiable algebraic expressions with no integer logical variables; C4. The costs of each layer above are weighted and summed to obtain the total composite cost function, which is then optimized using a continuous optimization solver. Among them, the asymmetric under-temperature thermal debt penalty only applies to deviations in battery temperature and battery coolant inlet temperature from the corresponding time-varying reference trajectory; the waste heat reuse reward only applies when the electric drive temperature is higher than the battery coolant inlet temperature and the preset temperature difference margin, pump operating conditions, and valve passage connection conditions are met, so that each reward and penalty item corresponds to verifiable thermal safety characteristics and physical heat flow paths.
[0029] In this embodiment, step C1 includes: the time-varying exponential approximation reference trajectory starts from the predicted initial value and converges smoothly to the target state through an exponential function. The time constant matches the thermal inertia of the system and is applicable to both heating and cooling scenarios.
[0030] In this embodiment, step C2 includes: the asymmetric under-temperature thermal debt penalty term only applies to the battery temperature and the battery coolant inlet temperature, while the crew cabin temperature and electric drive temperature are not included in the calculation of this term; when the state is higher than the reference trajectory, this penalty term is 0.
[0031] In this embodiment, step C2 includes: the risk of high temperature in electric drive is handled separately by an independent soft constraint upper limit and a dedicated amplification factor, without being intertwined with the battery under-temperature penalty.
[0032] In this embodiment, step C3 includes: the waste heat reuse reward is a negative cost, which 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 reward intensity increases with the increase of available temperature difference, water pump speed and valve connectivity.
[0033] In this embodiment, step C3 includes the following: the heating and cooling conflict penalty term is constructed by multiplying the battery-side PTC heating power and the compressor power to characterize the degree of heat and cold conflict.
[0034] In this embodiment, step C3 includes: when the effective heat exchange temperature difference in the circuit is lower than a set threshold, the penalty for invalid pump operation increases with the increase of pump speed, thus penalizing blind pump consumption under conditions of no temperature difference.
[0035] In this embodiment, step C3 includes: the hold-state action penalty term dynamically amplifies the actuator change rate penalty weight with the upper-level hold-state score to suppress small and frequent actuator movements under thermal steady state.
[0036] In this embodiment, the total cost function can be solved by a convex quadratic programming solver, an interior-point method solver, or a sequential quadratic programming solver.
[0037] 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).
[0038] 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 feature 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.
[0039] 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.
[0040] 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.
[0041] 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.
[0042] 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.
[0043] 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.
[0044] 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.
[0045] 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.
[0046] 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.
[0047] In this embodiment, the convex solution link and acceptance mechanism in step T4 specifically includes: calling the inlined 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.
[0048] 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.
[0049] 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.
[0050] 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.
[0051] Figure 6 This is a structural diagram of a composite stage cost function construction system provided by one or more embodiments of the present invention.
[0052] Example 3, as Figure 6 The composite stage cost function construction system shown includes: The first-layer construction module is used for basic tracking and actuator costs, generates time-varying exponential approximation reference trajectories, and constructs state tracking costs and terminal costs based on the deviation between the predicted state and the reference trajectory. The actuator bias cost is constructed by combining the actuator bias trajectory, and the actuator rate of change cost is constructed by combining the control quantity difference between adjacent steps. The second-layer construction module is used for differentiated thermal safety penalty costs. It extracts the unilateral under-temperature deviation between the battery temperature and the battery coolant inlet temperature, which is lower than the reference trajectory, and applies an additional high penalty to it, forming an asymmetric under-temperature thermal debt penalty term. It sets soft constraint boundaries for all thermal states and independently decouples the electric drive high temperature risk. The third-layer construction module is used for physical path and scene semantic reward and penalty costs, including at least waste heat reuse reward items, heating and cooling conflict penalty items, cooling actuator matching penalty items, water pump invalid action penalty items, and state maintenance action penalty items; all reward and penalty items are continuously differentiable algebraic expressions with no integer logical variables. The cost-weighted summation module, the first-layer construction module, the second-layer construction module, and the third-layer construction module are used to sum the costs to obtain the total composite cost function, which is then optimized through a continuous optimization solver.
[0053] 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.
[0054] Example 4, in a specific embodiment, discloses a method for designing a vehicle thermal management MPC cost function containing time-varying exponential trajectories, asymmetric penalties, and physical path costs. The core lies in constructing a stage cost consisting of three layers of costs, summarizing them into a total cost function for rolling optimization solution, including (such as...) Figure 1 (as shown) S1, Prediction Time Domain Data Acquisition and Definition: In each control cycle, the MPC prediction time domain length is N_p and the sampling period is T_s.
[0055] Predicted state sequence: X(k) = [T_bat(k), T_bat_in(k), T_cab(k), T_drive(k)]^T T_bat battery temperature, T_bat_in battery coolant inlet temperature, T_cab passenger compartment temperature, and T_drive electric drive temperature.
[0056] The control input sequence, U(k), includes at least the battery-side PTC heating power P_ptc2, the crew compartment PTC heating power, the normalized speed of the water pump pump, the front-end fan opening degree fan, the compressor power P_comp, the drive waste heat valve opening degree valve3, the battery circuit valve opening degree valve4_1, and the circuit connectivity valve state valve4_2.
[0057] Obtain the control input u_prev from the previous moment, the basic state reference trajectory x_ref(k), the actuator bias trajectory u_bias(k) that guides the search direction, and various mode scores (waste heat reuse score reuse_score, precool score precool_score, and hold state score hold_score) from the upper-level predictive planning input.
[0058] S2, First Layer: Cost of Time-Varying Exponential Reference Trajectory Generation and Tracking (e.g.) Figure 2 (as shown) To eliminate the step-like full-power heating during the initial cold start, this invention uses the current predicted initial value x0_pred as a starting point and smoothly approaches the upper reference target x_ref_k at the k-th step using an exponential approximation method: ; ; In the formula: k is the prediction step number, ranging from 0 to Np-1; Ts is the MPC sampling period; τ is the thermal transition time constant, in seconds, characterizing the equivalent thermal inertia of the battery, coolant, and electric drive system; αk is the trajectory approximation coefficient for the k-th step, monotonically increasing with each prediction step; x0_pred is the thermal state vector at the starting point of the prediction time domain; x_ref,k is the target thermal state given by the upper layer in the k-th step; x_traj(k) is the time-varying reference state actually used for MPC tracking in the k-th step. max(τ,Ts) is used to avoid numerical anomalies caused by excessively small or zero time constants.
[0059] Where τ is the thermal transition time constant of the system's heating inertia. The trajectory direction is adaptively determined by the sign of (x_ref_k-x0_pred), ensuring smooth reach regardless of whether it's a cold start heating or a pre-cooling cooling. Based on this, the basic tracking cost and terminal cost are constructed: ; ; ; In the formula: X(k+1) is the (k+1)th step thermal state vector predicted by ROM or vehicle thermal model; e_x(k) is the tracking error of the predicted state relative to the time-varying reference trajectory; Q is the stage state weight matrix; Qf is the terminal state weight matrix; Np is the prediction time domain length. J_track is used to constrain the state tracking error in the prediction time domain, and J_terminal is used to enhance the degree of closeness to the reference trajectory at the end of the prediction time domain.
[0060] By combining the control input bias u_bias(k) and the actuator rate of change, the actuator cost is constructed: ; ; In the formula: U(k) is the control vector of the thermal management actuator in the k-th step, which includes at least PTC2, PTC1, water pump, fan, compressor, and valve opening; u_bias(k) is the actuator bias trajectory obtained from the upper-level heat flow target allocation, used to express the desired action direction rather than the final control quantity; R is the actuator energy consumption or bias deviation weight matrix; S is the actuator rate of change weight matrix; U(k-1) is the control input of the previous prediction step, which can be replaced by the actual control quantity u_prev of the previous control cycle in the first step. J_u is used to constrain the degree of deviation of the control quantity from the recommended bias, and J_du is used to suppress high-frequency jumps in the actuator.
[0061] S3, Second Layer: Asymmetric Heat Debt Penalty (e.g., ...) Figure 3 (as shown) To address the high-risk characteristic of one-sided under-temperature penalty for both battery temperature T_bat and battery coolant inlet temperature T_bat_in, an asymmetric cost term is established. A max operator is introduced to generate a one-sided penalty: ; For the passenger cabin comfort T_cab and the electric drive overheating state T_drive, set their one-sided deviation to zero in this item: e_below_T_cab(k)=0, e_below_T_drive(k)=0.
[0062] ; In the formula: e_below(k) is the one-sided undertemperature deviation vector, which takes a positive value only when the time-varying reference trajectory is higher than the predicted state, otherwise it is zero; ρ_below_ref is the asymmetric undertemperature penalty coefficient; diag(Q) is the diagonal element of the state weight matrix Q, used to keep the undertemperature penalty and the basic state weights having the same dimensions. This one-sided deviation is only retained for the battery temperature T_bat and the battery coolant inlet temperature T_bat_in, while the passenger compartment temperature T_cab and the electric drive temperature T_drive are set to zero, thereby avoiding the mixing of comfort deviations or electric drive overheating problems into the battery low-temperature thermal debt penalty.
[0063] This implements asymmetric guidance: a high additional penalty ρ_below_ref is imposed when the battery-related temperature lags behind the time-varying warm-up trajectory; while the penalty is 0 when the temperature is slightly higher than the warm-up trajectory due to waste heat reuse or other reasons. The risk of high-temperature overheating of the electric drive system is handled separately through an independent soft constraint upper limit and its amplification factor ρ_drive_overheat.
[0064] S4 state soft constraint cost: To ensure state boundary safety (prevent boundary violations), soft constraints are set: ; ; For the high-temperature side of the electric drive temperature, amplification processing is performed independently: v_hi_T_drive(k)=ρ_drive_overheat·v_hi_T_drive(k).
[0065] ; In the formula: v_lo(k) is the state violation amount below the soft lower limit; v_hi(k) is the state violation amount above the soft upper limit; x_min_soft and x_max_soft are the soft lower limit and soft upper limit for each thermal state, respectively; ρ_soft is the state soft constraint penalty coefficient; ρ_drive_overheat is the violation amplification coefficient on the high-temperature side of the electric drive. This soft constraint term differs from J_below: J_below is used to guide the warm-up rate, while J_soft is used to prevent state out-of-bounds violations and handle the safety risks of high-temperature electric drive.
[0066] S5, Layer 3: Rewards / penalties for thermal management physical paths and scene semantics (e.g.) Figure 4 (as shown) This invention transforms the complex physical topology mismatch of fluid loops and the softening of upper-level mode scoring into continuous algebraic expressions, specifically the following five items: Waste heat reuse incentive: ; In the formula: J_reuse is the waste heat reuse reward item, with a negative sign; w_reuse is the reward weight; reuse_score is the waste heat reuse score given by the upper-level predictive planning; T_drive is the electric drive temperature; T_bat_in is the battery coolant inlet temperature; margin is the waste heat usable temperature difference margin; pump is the normalized speed of the water pump; valve4_2 is the valve opening degree of the drive waste heat path; valve3 and valve4_1 are the valve opening degrees related to the battery circuit; k_min is the minimum connectivity protection item; a and b are the valve connectivity weights. This item only encourages MPC to select the waste heat path when the actual temperature difference and pump valve connectivity conditions are met.
[0067] When the waste heat from the electric drive is higher than the battery inlet water temperature and the pump valve passage is open, the waste heat reuse is strongly and explicitly encouraged through a negative cost mechanism to overcome the inhibition of basic operation penalties.
[0068] Heating and cooling conflict penalty: ; In the formula: J_conflict is the heating and cooling conflict penalty; w_conflict is the conflict penalty weight; c0 is the basic conflict coefficient; precool_score is the precooling score; P_ptc2 is the battery-side PTC heating power; and P_comp is the compressor power. This term expresses the degree of physical antagonism between "simultaneous heating and cooling at the same time" through the product of P_ptc2 and P_comp.
[0069] Suppress the vicious conflict and energy cancellation between the battery-side PTC2 electric heating and the compressor cooling within the same time step.
[0070] Refrigeration actuator matching penalty: ; In the formula: J_cool_mismatch is the refrigeration actuator matching penalty; w_cool is the matching penalty weight; fan_min is the minimum fan opening required for the compressor to start; fan is the actual opening of the front-end fan; P_comp is the compressor power. When the compressor is working but the fan opening is insufficient, this term increases with the square of the insufficient fan opening to suppress inefficient refrigeration combinations.
[0071] This penalizes the unreasonable topology action of starting the compressor but not opening the front cooling fan wide enough, thus preventing the cooling efficiency from deteriorating due to obstructed condensation heat release.
[0072] Penalty for pump malfunction: ; In the formula: J_pump_ineff is the penalty for ineffective pump operation; w_pump is the weight of ineffective pump operation; pump is the normalized speed of the pump; ΔT_floor is the minimum temperature difference required to determine effective heat transfer; ΔT_useful is the available temperature difference in the current loop, which can be determined by the effective value among the battery-inlet temperature difference, electric drive-inlet temperature difference, or waste heat available temperature difference. This item increases the penalty when the pump is running but there is a lack of a temperature difference that can transfer heat.
[0073] Punish inefficient and blind pump consumption behavior that results in "multi-way valves and water pumps being turned on and running, but lacking an effective heat exchange temperature difference at both ends of the circuit (such as between the battery and the inlet, or between the electric drive and the inlet)".
[0074] Penalty for maintaining the state: ; In the formula: J_hold is the penalty for holding state actions; w_hold is the weight of the holding mode; hold_score is the holding score identified by the upper layer; ΔU(k) is the actuator change between adjacent control steps. This term amplifies the cost of action changes when the thermal state is close to the target and no significant preheating, precooling or waste heat reuse is required, thereby reducing small and frequent actions of valves, pumps and compressors.
[0075] When the system enters the thermal stability range, the penalty for the rate of change of actuator action is amplified to prevent small and frequent micro-movements of pumps, valves, and compressors.
[0076] S6, Summary and Rolling Solution: The cost functions of each layer mentioned above are summed and combined to form the full composite objective function J in the prediction time domain: ; Online optimization is performed in each control cycle using a continuous convex optimization solver with no integer variables or a sampling optimization solver: ; In the formula: J is the overall objective function in the prediction time domain; J_track, J_terminal, J_below, J_u, J_du, J_soft, J_reuse, J_conflict, J_cool_mismatch, J_pump_ineff, and J_hold correspond to state tracking, terminal tracking, asymmetric undertemperature, actuator bias, rate of change of action, soft state constraint, waste heat reuse reward, cold and heat conflict, refrigeration matching, pump ineffective action, and hold action suppression, respectively. U_opt is the optimal actuator control sequence obtained by solving; the constraints include actuator upper and lower limits, rate of change limit, state prediction model, and necessary thermal safety boundaries.
[0077] The first step of the optimal control sequence, U_opt(1), is executed, and this process is repeated in the next control cycle.
[0078] The core of this embodiment lies in: 1. Dynamic generation architecture for time-varying exponential approximation of reference trajectory: The traditional step target is dynamically softened into a first-order or multi-order exponential decay curve that conforms to the physical inertia of heat conduction, thereby preventing the controller from generating oversaturated heating / cooling actions at the starting point of the prediction time domain.
[0079] 2. Multi-channel asymmetric one-sided "under-temperature thermal debt" penalty mechanism: Extract and isolate the one-sided deviation values of battery temperature and battery coolant inlet temperature that are "lower" than the time-varying reference trajectory, and apply a high additional penalty weight to them. When the temperature is slightly higher than the trajectory due to waste heat utilization or other reasons, the penalty is 0, thereby establishing asymmetric guidance within the cost function and preventing the controller from using a short-term strategy of minimizing surface energy consumption by reducing battery heating.
[0080] 3. Algebraic Representation of "Waste Heat Reuse Reward" Based on Physical Path and Multi-Way Valve Connectivity: This design explicitly incentivizes waste heat reuse through a "negative cost" mechanism. It couples the waste heat score from the upper-level planning, the available temperature difference between the electric drive and battery sides, the normalized pump speed, and the opening / connectivity of the drive waste heat valve and battery circuit valve across domains. By constructing a continuously varying negative cost through algebraic multiplication, the MPC can proactively overcome baseline action penalties and capture the explicit benefits brought by the waste heat path.
[0081] 4. Physical topology mismatch and conflict continuity softening penalty without integer variables: The protection method transforms complex system topology hard rules (such as thermal conflict, fan opening and compressor power mismatch, and blind pump consumption without temperature difference in the loop) into a construction method of continuously differentiable algebraic terms. Specifically, it includes: using a direct product of heating and cooling power to punish thermal conflict; using the square of the difference between compressor power and minimum fan opening to punish cooling mismatch; and using the square of the difference between pump speed and useful temperature difference in the loop to punish ineffective pump consumption.
[0082] 5. "Maintaining operational condition action suppression" based on dynamically amplifying the rate of change of scene semantics: The protection mechanism dynamically adjusts the weight of the quadratic term of the control input change rate based on the "state maintenance score" input from the upper layer. Once the thermal state enters the stable maintenance range, this term amplifies the cost of actuator action changes, strongly suppressing and eliminating unnecessary small and frequent micro-movements of valves, pumps, or compressors near the equilibrium point, thereby extending the service life of components.
[0083] 6. Decoupled and independent processing architecture for the risk of high temperature overheating in the drive system: The protection against the high-temperature overheating risk of the electric drive system is achieved through a separate decoupling process using independent soft-constraint high-temperature upper limit default values and independent soft-constraint amplification factors. This prevents the protection from intertwining with the asymmetric battery under-temperature penalty, ensuring that the high-temperature safety protection and the unilateral under-temperature penalty guidance are logically independent and do not interfere with each other within the same cost function.
[0084] This embodiment also includes: 1. Superordinate replacement of time-varying trajectory generation function: The trajectory generation method can be equivalently replaced by: piecewise hyperbolic tangent function (tanh), sigmoid curve, multi-order critical damping response curve, or discrete iterative difference equation based on first-order inertial filtering.
[0085] 2. Equivalent mapping of logical operators in waste heat reward and topology penalty terms: The mapping is replaced by: arctan function, soft plus function, Gaussian function (RBF) or higher-order polynomial smoothing curve fitting.
[0086] 3. Decoupling and adaptation of semantic scoring sources and solvers in application scenarios: The scoring can be provided not only by the upper-level "slope prediction hierarchical global planner", but also by cloud big data prediction input based on navigation high-precision maps, output of intelligent scene classifier based on vehicle user habit learning, or by scalar coefficients generated by traditional vehicle finite state machine (State Machine) based on direct mapping between vehicle speed and SOC.
[0087] 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 method for constructing a composite stage cost function, based on vehicle thermal management, characterized in that, include: C1. Construct the first layer of cost: Generate a time-varying exponential approximation reference trajectory, and construct the state tracking cost and terminal cost based on the deviation between the predicted state and the reference trajectory. The physical path cost of the actuator is constructed by combining the actuator bias trajectory, and the actuator cost is constructed by combining the control input bias and the actuator rate of change. C2. Constructing the second layer of cost: Extracting the one-sided under-temperature deviation between the battery temperature and the battery coolant inlet temperature being lower than the reference trajectory, and imposing an additional high penalty on it to form an asymmetric under-temperature thermal debt penalty term; setting soft constraint boundaries for all thermal states and independently decoupling the electric drive high temperature risk. C3. Construct the third layer of costs: including at least waste heat reuse reward items, heating and cooling conflict penalty items, cooling actuator matching penalty items, water pump invalid action penalty items, and state maintenance action penalty items; all reward and penalty items are continuously differentiable algebraic expressions; C4. The costs of each layer above are weighted and summed to obtain the total composite cost function, which is then used for rolling optimization through a continuous optimization solver.
2. The method for constructing the composite stage cost function according to claim 1, characterized in that, include: In step C1, the time-varying exponential approximation reference trajectory starts from the predicted initial value and converges smoothly to the target state through an exponential function. The time constant matches the thermal inertia of the system and is suitable for both heating and cooling scenarios.
3. The method for constructing the composite stage cost function according to claim 1, characterized in that, include: In step C2, 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, this penalty is 0.
4. The method for constructing the composite stage cost function according to claim 1, characterized in that, include: In step C2, the risk of high temperature in electric drive is handled separately through an independent soft constraint upper limit and a dedicated amplification factor.
5. The method for constructing the composite stage cost function according to claim 1, characterized in that, include: In step C3, the waste heat reuse reward is a negative cost, which 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 reward intensity increases with the increase of available temperature difference, water pump speed and valve connectivity.
6. The method for constructing the composite stage cost function according to claim 1, characterized in that, include: In step C3, the heating and cooling conflict penalty term is constructed by multiplying the battery-side PTC heating power and the compressor power to characterize the degree of heat and cold conflict.
7. The method for constructing the composite stage cost function according to claim 1, characterized in that, include: In step C3, the penalty for ineffective pump operation increases with the increase of pump speed when the effective heat exchange temperature difference in the circuit is lower than the set threshold, thus penalizing blind pump consumption under conditions of no temperature difference.
8. The method for constructing the composite stage cost function according to claim 1, characterized in that, include: In step C3, the penalty term for maintaining the state action is dynamically amplified with the penalty weight of the actuator change rate as the upper-level maintaining state score changes.
9. The method for constructing a composite stage cost function according to claim 1, characterized in that, include: The total cost function can be solved using a convex quadratic programming solver, an interior-point method solver, or a sequential quadratic programming solver.
10. A composite stage cost function construction system, based on vehicle thermal management, characterized in that, include: The first-layer construction module is used for basic tracking and actuator costs, generates time-varying exponential approximation reference trajectories, and constructs state tracking costs and terminal costs based on the deviation between the predicted state and the reference trajectory. The physical path cost of the actuator is constructed by combining the actuator bias trajectory, and the actuator cost is constructed by combining the control input bias and the actuator rate of change. The second-layer construction module is used for differentiated thermal safety penalty costs. It extracts the unilateral under-temperature deviation between the battery temperature and the battery coolant inlet temperature, which is lower than the reference trajectory, and applies an additional high penalty to it, forming an asymmetric under-temperature thermal debt penalty term. It sets soft constraint boundaries for all thermal states and independently decouples the electric drive high temperature risk. The third-layer construction module is used for physical path and scene semantic reward and penalty costs, including at least waste heat reuse reward items, heating and cooling conflict penalty items, cooling actuator matching penalty items, water pump invalid action penalty items, and state maintenance action penalty items; all reward and penalty items are continuously differentiable algebraic expressions; The cost-weighted summation module, the first-layer construction module, the second-layer construction module, and the third-layer construction module are used to sum the costs to obtain the total composite cost function, which is then optimized through a continuous optimization solver.