Controller Design for Air Conditioner of a Vehicle with Three Control Inputs Using Model Predictive Control

: Fuel consumption optimization is a critical field of research within the automotive industry to meet consumer expectations and regulatory requirements. A reduction in fuel consumption can be achieved by reducing the energy consumed by the vehicle. Several subsystems contribute to the overall energy consumption of the vehicle, including the air conditioning (A/C) system. The loads within the A/C system are mainly contributed by the compressor, condenser fan


Introduction
The most effective method for A/C system control has been continuously evolving throughout the years as the state of the art for control design has also continued to evolve.Early implementations of controllers on A/C systems include on/off, proportional integral derivative (PID), and sliding-mode controllers.Høgh and Nielsen [1] presented a new and innovative control strategy that used a compressor and an electronic expansion valve for better control of the superheat level.The system efficiency was also analyzed to find the optimal superheat setpoint, which could reduce energy consumption.The refrigerant system was modeled to allow for model-based feedback and feedforward, which improved control of the superheat level.Koo et al. [2] discussed the use of a proportional-integral (PI)-controlled cascade structure to control the relative filling and evaporation pressure of a target system.They also introduced the super-twisting-algorithm-based 2-sliding mode controller (SMC) design for the target system.The 2-SMC design was found to be more effective than the classical first-order sliding mode controller (1-SMC) in handling plant parameter uncertainty.Liu et al. have worked on a survey [3] where they provided a comprehensive overview of different automatic control techniques that had been applied in A/C systems.The authors described the characteristics of A/C systems and discussed the variables that should be controlled.They used classification of the control approaches to explain the main features of these strategies used in A/C systems.Their paper clearly showed that, with the improvement in people's living standards and the emergence of global environmental and energy problems, there were increasing requirements for more advanced A/C control strategies.The authors summarized studies of control methods presented in the paper, and analyzed the development and new trends of A/C control approaches.Additionally, the paper discussed studies of PID control applied in A/C systems, including more advanced PID control methods to improve control system performance and to make full use of PID control advantages in the multi-input-multi-output (MIMO) A/C system control, and simplify the design and operation procedure of the control strategies.The above-mentioned controller designs are typically applied to the compressor to maintain the cabin at a specific temperature.These controllers are simple to design but most do not attempt to reduce the energy consumption of the system.Cvok et al. [4] proposed a method to optimize and control an electric vehicle heating, ventilation, and air conditioning (HVAC) system for better efficiency and thermal comfort.The authors used dynamic programming to find optimal control actions based on a simplified cabin model and static HVAC maps.They also designed a hierarchical control system that used an instantaneous optimizationbased allocation algorithm and a superimposed cabin temperature controller.They verified their method by simulation for a cool-down scenario and compared it with the dynamic programming benchmark.They showed that their method could approach the benchmark by tuning the controller bandwidth and the allocation cost function.Kim et al. [5] presented the development of a mathematical dynamic model and observer-based set point control of a vapor compression cycle (VCC) system.The mean void fraction and moving boundary control volumes in a heat exchanger (HEX) were used for a lumped parameter model of an air conditioning system.A MIMO dynamic model of the VCC was presented in a nonlinear state space representation (SSR) and was reformulated into a linearized regular form for control design.A modified observer-based controller with SMC was introduced to attenuate the effects of observing approximation errors and external disturbances.The proposed control methodology ensured uniformly ultimately bounded tracking results of the desired low pressure and suction superheat.A simulation of controlling the VCC illustrated the effectiveness and performance in the presence of disturbances.Xie et al. [6] proposed an intelligent air conditioning system control strategy that can learn passengers' thermal comfort preferences.The proposed control algorithm directly and automatically decreased the cabin temperature to the passengers' preferred temperature without any manual adjustment.
More recent developments in sliding-mode controller applications show potential for energy savings related to the operation of the compressor and fans.However, these control methods still lack any consideration of vehicle drag and AGS control.For example, Huang et al. [7] presented an energy-saving controller for automotive air-conditioning/ refrigeration (A/C-R) systems.The proposed controller consisted of two different timescale layers.The outer or the slow time-scale layer, called a setpoint optimizer, is used to find the set points related to energy efficiency by using the steady-state model, whereas the inner or the fast time-scale layer is used to track the obtained set points.In the inner loop, thanks to its robustness, an SMC was utilized to track the set point of the cargo temperature.
In recent years, model predictive control applications for A/C systems have seen more research interest in academia.MPC lends itself well to A/C system control because it can directly consider constraints on inputs, states, and outputs in the control problem formulation.Liberati et al. [8] address the emerging challenge of managing smart microgrids for electric vehicle charging and various user loads while incorporating renewable energy sources and storage.Their work emphasizes the importance of advanced power systems and building automation control for real-world applications.The article introduces an economic model predictive control method that optimizes electric and heating resources in smart buildings, achieving nearly zero energy consumption and seamless participation in demand response programs.Simulation results, based on an Italian case study, showcase the approach's effectiveness in managing electric and thermal flexibility within a building.In a review by Borreggine et al. [9] on the state-of-the-art issues and solutions for MPC in power electronics, the authors reviewed the MPC techniques for power electronics and electrical drives, with a focus on finite control set MPC and explicit MPC.The paper discussed the advantages and drawbacks of both methods, such as flexibility, performance, computation effort, and steady-state error.The paper also presented several applications of MPC for different types of converters, loads, and powertrain configurations.The paper highlighted the potential of MPC for powertrain control, especially for hybrid and electric vehicles.
More recently, MPC applications have been applied to automotive A/C systems.Most of the current literature on automotive A/C system control focuses on minimizing the compressor power consumption and the tracking error of the discharge air (cooling requirement) in electric vehicles (EVs), as discussed in a review by Huang et al. [10].Wang et al. [11] proposed a nonlinear MPC control for EVs to minimize evaporator blower power consumption but did not consider the AGS in the analysis.Pereira et al. [12] proposed an energy management system (EMS) for a fuel cell (FC) hybrid electric vehicle based on nonlinear model predictive control (NMPC) and a recurrent neural network (RNN).The NMPC allowed the formulation of control objectives not allowed by a linear MPC, such as maximum efficiency point tracking of the FC, while the RNN accurately predicted the FC nonlinear dynamics.The EMS was implemented on a low-cost development board and tested in real time on a hardware-in-the-loop test bench equipped with a real 3-kW FC stack.The experimental results demonstrated that the NMPC EMS was able to meet the vehicle's energy demand and operate the FC in its most efficient region.A comparative study was performed between the proposed NMPC, a linear MPC, and hysteresis band control.The results of this comparative study demonstrated that the NMPC provided better fuel economy and could reduce FC degradation.Xie et al. [13] presented an Intelligent Model Predictive Control (IMPC) strategy for the A/C-cabin coupled system that includes the influences of vehicle speed and external environment on the heat exchange with the cabin.The IMPC strategy integrates the vehicle speed previewer and the self-adaptor for passengers' thermal comfort.The IMPC has a more dynamic response of compressor speed to the car speed change and can automatically adjust cabin temperature, making it satisfy the thermal preference of the passenger with little control error of cabin temperature.The IMPC strategy saves more energy than other control strategies researched in their paper.Glos et al. [14] presented an application of NMPC algorithms for energy-efficient control of cabin temperature and air quality in fully electric vehicles (FEVs).The authors developed simplified dynamic models of the FEV cabin and HVAC system and formulated an optimal control problem that minimized power consumption while satisfying the user's comfort and safety requirements.The NMPC algorithms were implemented on a microcontroller and tested in a Processor in the Loop simulation.The paper showed that the NMPC approach could reduce the heat losses through ventilation and improve the range of the FEV.The paper also discussed the challenges and limitations of the NMPC implementation, such as computational complexity, state estimation, and actuator constraints.Kibalama et al. [15] presented an energy management strategy for the air conditioning system of an electrified vehicle, based on MPC.The authors used a nonlinear model of the vapor compression refrigeration system and formulated a constrained optimal control problem to minimize the energy consumption while tracking a desired evaporator pressure.They proposed a novel implementation method that reduced the computation time by approximating the value function from a global optimal solution obtained by dynamic programming (DP).They showed that their MPC approach achieved near-optimal performance on different drive cycles and thermal load requirements, and validated it on real-time hardware.The paper did not address the robustness of the controller to uncertainties or disturbances, or the extension to other thermal management systems.
A recent study by Göltz and Sawodny [16] investigated tracking performance and energy consumption of the A/C system using various control schemes, including MPC.However, this work mainly focuses on battery thermal management for battery electric vehicles (BEVs).Additionally, opening the AGS increases the cooling effort supported by the front-end airflow, allowing other components, such as the compressor, to reduce their working load and still satisfy the cooling requirements of the vehicle, as shown in a study by El-Sharkawy et al. [17].This AGS airflow cooling comes at a cost.Shigarkanthi et al. [18] demonstrated that, as the AGS is opened, the drag force of the underhood vehicle airflow increases due to an increase in drag coefficient, concluding that the AGS has an impact on the fuel economy and power consumption of the vehicle.By controlling the condenser fan and AGS along with the compressor, it is expected that the energy used by the system can be further reduced but the cost of increased underhood drag must be considered.
Chen et al. [19] discuss the significance of real-time optimal control in improving the energy efficiency of cabin climate control systems in EVs.They introduced a novel lineartime-varying (LTV) MPC approach, which simplifies the optimization process and conducts a comprehensive parametric study to identify robust weighting factors.Comparative analysis reveals that the LTV-MPC outperforms rule-based and nonlinear economic MPC (NEMPC) controllers, achieving faster temperature regulation with significantly lower energy consumption while maintaining comparable computational efficiency.
Coppola et al. [20] focused on improving energy performance in platoons of autonomous connected vehicles.Their study presents an innovative Eco-Driving Control Architecture that utilizes NMPC for optimizing energy consumption while maintaining precise leader tracking.Analytical proofs of exponential stability and robust stability conditions are provided, demonstrating the effectiveness of the approach in various operational scenarios and parameter uncertainties within a Mixed Traffic Simulator (MiTraS) co-simulation platform.The results validate the architecture's ability to ensure eco-driving behavior for the entire vehicle platoon.
He et al. [21] introduced a stochastic model predictive controller (SMPC) for enhancing the energy efficiency of EV air conditioning systems.It employs a Markov-chain-based velocity predictor to anticipate future disturbances, and systematically quantifies the sensitivity of the electrified AC system to solar radiation, ambient temperature, and relative air flow speed.Comparative analysis with a rule-based controller and dynamic programming benchmark reveals that SMPC improves AC energy economy by 12%, reduces cabin temperature variation by over 50.4%, and enhances overall cabin comfort.
Huang et al. [22] presented a robust model predictive controller for enhancing temperature performance and reducing energy consumption in automotive air-conditioning/ refrigeration (A/C-R) systems with three-speed and continuously-varying compressors.It includes a discrete MPC with a carefully chosen terminal weight for robustness under various conditions.The study also presents hybrid controllers that combine on/off control and discrete MPC, as well as a continuous MPC for systems with variable components, demonstrating energy savings of up to 23% compared to conventional on/off controllers in both experimental and simulation results.
Based on the reviewed literature, the existing work on the application of MPC in A/C for commercial vehicles does not consider the impact of the AGS actuator nor the power consumption due to underhood aerodynamic drag [16].Additionally, some studies have not considered all possible control inputs in the overall design, such as missing AGS [11].Furthermore, most studies, especially in recent years, focus on EVs as energy consumption and management has a much greater role in such vehicles [12][13][14][15].This has left fossil-fueled energy management and A/C energy efficiency on the back burner in recent years.Additionally, the applications of nonlinear controllers, although more advanced and capable, require more computation and consideration compared to simpler alternatives.
Contribution: To the best of the authors' knowledge [23,24], the consideration of AGS control to reduce the overall vehicle power consumption and regulate the underhood airflow for cabin cooling has not been considered in the literature.Therefore, the work in this paper addresses a gap for non-electric vehicles, and additional control inputs and modeling enhancements not currently addressed in the literature.The starting point for this study is the modeling and control work by Zhang [25], where various control approaches were attempted for an internal-combustion-powered vehicle, with both the condenser fan and compressor clutch as actuators.Zhang [25] found that none of the approaches attempted was satisfactory and recommended MPC be attempted.In this paper, we apply MPC for the same vehicle, introduce the AGS as a new actuator into the control problem, and consider the additional underhood drag power consumption for the A/C system.
Several linear approximation MPCs have been formulated in the past, with the most popular being adaptive, as showcased by Dhar and Bhasin [26], and gain-scheduled model predictive controllers, as showcased by Hu et al. [27] for a commercial vehicle air brake system.These controller types will be discussed in more detail in Section 2.1.However, adaptive MPC is more promising for the application in this study due to its effectiveness for control designs where the structure of the optimization problem (number of states and constraints) remains the same across different operating points.Further discussions and rationales for the choice of adaptive MPC in this study are provided in Section 2.1.To address the identified gap in the literature and extend the work by Zhang [25] based on the system modeling improvements for the A/C system by the authors in [28], this paper has two main objectives: Objective 1.In addition to controlling the compressor clutch only, determine the improvement in A/C system energy use and air-to-cabin reference temperature tracking that can be achieved by switching from PID (benchmark) to MPC.Objective 2. Identify what further improvement, if any, can be achieved by including the condenser fan rotational speed and AGS position in the MPC formulation.
The remainder of this paper is organized as follows.Section 2 details background materials for the reader to understand the subsequent sections of the paper as well as the implemented methodology in this study.Section 3 includes a description of the problem formulation.Section 4 discusses the findings and implications of the results, as well as a discussion of the analysis.Finally, the conclusions of this study are offered in Section 5, followed by recommendations for future studies.

Materials and Methods
This section provides preliminary background on the theories used in this paper to help the reader follow the content more easily and to make the paper self-contained.Additionally, it provides the implemented methodology for the controller design and formulation based on the materials to help the reader follow the content with ease.

MPC Design
Model predictive control is an optimal control technique that leverages a precise mathematical model of a real system to proactively predict its future behavior.This predictive capability empowers MPC to anticipate potential system deviations and effectively optimize control inputs to achieve predefined performance objectives.By employing sophisticated optimization algorithms, MPC with the help of its more advanced derivatives can handle complex, nonlinear engineering systems with a high degree of accuracy and robustness, making it a valuable tool for a wide range of engineering applications.MPC's ability to incorporate constraints on both system states and control inputs ensures safe and reliable operation, even in the presence of uncertainties and disturbances.Its adaptability to various real-world scenarios, such as process control, robotics, and energy management systems, underscores its versatility and practical relevance.The combination of predictive modeling, optimization, and constraint handling renders MPC an essential asset in the pursuit of efficient and stable control solutions for complex engineering systems.A simple block diagram of an MPC is shown in Figure 1, where the dashed box includes the MPC components and their interactions, namely the Optimizer block and the Model block.The model block, also known as the prediction model, contains a simplified mathematical model of the real system (plant).The prediction model computes the predicted output, ŷ.The optimizer block contains an optimization algorithm used to determine the optimal control input u based on the error predicted by the prediction model.The details of the optimizer block in this work are outlined in Section 3.3.When the optimizer computes a control signal, it sends it to the prediction model and the behavior of the real system is predicted again.This process repeats several times over an optimization window, called the prediction horizon, to forecast the future behavior of the real system.When the entire control sequence is completed, only the immediate next control action, u * , is sent to the real system with the states x and output y, designated as the plant block in Figure 1.
asset in the pursuit of efficient and stable control solutions for complex engineering systems.A simple block diagram of an MPC is shown in Figure 1, where the dashed box includes the MPC components and their interactions, namely the Optimizer block and the Model block.The model block, also known as the prediction model, contains a simplified mathematical model of the real system (plant).The prediction model computes the predicted output,  �.The optimizer block contains an optimization algorithm used to determine the optimal control input  based on the error predicted by the prediction model.The details of the optimizer block in this work are outlined in Section 3.3.When the optimizer computes a control signal, it sends it to the prediction model and the behavior of the real system is predicted again.This process repeats several times over an optimization window, called the prediction horizon, to forecast the future behavior of the real system.When the entire control sequence is completed, only the immediate next control action,  * , is sent to the real system with the states  and output , designated as the plant block in Figure 1.The plant can be a real physical system, such as a physical vehicle, or a virtual representation of the system, such as a high-fidelity model of a physical vehicle.In this paper, the plant is a high-fidelity model, introduced in Section 2.3.The connection to the real system in this work is detailed in Section 3.1 based on the previous work by the authors [28].

Type Selection
Selecting the appropriate MPC technique based on the system's characteristics is an important task in the overall MPC design process.A linear time-invariant MPC method is suitable for a linear system with linear constraints and a quadratic cost function.This scenario results in a convex optimization problem with a unique global optimum.Numerous numerical methods and software can be employed to solve this well-studied problem.When moving to a nonlinear system, two methods are discussed: adaptive and gainscheduled MPC controllers.These methods rely on linearization to approximate the nonlinear system around an operating point.While effective near this point, linearization's limitations outside this range are acknowledged.
Adaptive MPC involves computing a linear model on the fly as conditions change, updating the internal plant model for the MPC controller.This approach maintains the optimization problem structure across various operating points.Alternatively, gainscheduled MPC involves offline linearization at multiple operating points, designing separate MPC controllers for each.While offering controller independence, this method requires managing controller switching and may demand more memory.
It is beneficial to use adaptive MPC when the optimization problem structure remains consistent across various conditions.When the structure changes, gain-scheduled MPC is preferable.However, a nonlinear system that resists accurate linearization requires nonlinear MPC.This advanced method employs a nonlinear plant model for The plant can be a real physical system, such as a physical vehicle, or a virtual representation of the system, such as a high-fidelity model of a physical vehicle.In this paper, the plant is a high-fidelity model, introduced in Section 2.3.The connection to the real system in this work is detailed in Section 3.1 based on the previous work by the authors [28].

Type Selection
Selecting the appropriate MPC technique based on the system's characteristics is an important task in the overall MPC design process.A linear time-invariant MPC method is suitable for a linear system with linear constraints and a quadratic cost function.This scenario results in a convex optimization problem with a unique global optimum.Numerous numerical methods and software can be employed to solve this well-studied problem.When moving to a nonlinear system, two methods are discussed: adaptive and gain-scheduled MPC controllers.These methods rely on linearization to approximate the nonlinear system around an operating point.While effective near this point, linearization's limitations outside this range are acknowledged.
Adaptive MPC involves computing a linear model on the fly as conditions change, updating the internal plant model for the MPC controller.This approach maintains the optimization problem structure across various operating points.Alternatively, gain-scheduled MPC involves offline linearization at multiple operating points, designing separate MPC controllers for each.While offering controller independence, this method requires managing controller switching and may demand more memory.
It is beneficial to use adaptive MPC when the optimization problem structure remains consistent across various conditions.When the structure changes, gain-scheduled MPC is preferable.However, a nonlinear system that resists accurate linearization requires nonlinear MPC.This advanced method employs a nonlinear plant model for precise predictions but solving the associated nonconvex optimization problem in real time can be challenging.
Therefore, adaptive and gain-scheduled MPC can be used for systems that can be approximated by linear models, and nonlinear MPC can be employed for highly nonlinear systems.The implementation efficiency of nonlinear MPC must be considered as it relies on specialized nonlinear solvers.
The A/C system used in this study was developed and published by the authors of this study in [28].This model is an extension to a previously developed model by the industrial partner's collaborators where effects of underhood aerodynamics and modeling of system parameters using polynomial approximations are added for a more extensive and semi-analytical model of the system under study.The model in [28] requires an adaptive MPC for the control strategy development because it meets the following requirements for a choice of the adaptive MPC over a traditional MPC: 1.
Time-varying dynamics: The system's dynamics in [28] change over time due to various factors such as varying operating conditions or system wear and tear.2.
Uncertain models: Some of the model parameters [28] are not precisely known as they are embedded in the model developed by the industrial partner where the exact values of the parameters are unknown and approximate values were used to build the semi-analytical model, and there is uncertainty about the model's accuracy.

3.
Nonlinear systems: The system in [28] is highly nonlinear and for controlling systems with nonlinear behavior, where a linear model may not be sufficient, and an adaptive model helps to approximate the nonlinear dynamics better.

4.
Disturbance rejection: As mentioned in item 2, some of the system parameters are not entirely known throughout the simulation as they are provided by the software-in-theloop and depend on the driving cycle that the tests are being run over.When dealing with systems subject to disturbances that are not entirely predictable or change over time, adaptive MPC is the plausible choice.

5.
Parameter variations: Some of the system parameters in [28] change over time, and their values are embedded in the software-in-the-loop provided by the industrial partner.In cases where there are abrupt changes or slow variations in system parameters, adaptive MPC can be useful.
Therefore, a variation of adaptive MPC, Successive Linearization Based Model Predictive Control (SLMPC) [29] (see Appendix A for detailed derivation), is chosen for the problem introduced in this paper due to its ability to reduce the linearization error caused by the system operating far from the trim state.In the adaptive MPC, a linear model of the system is computed on the fly as the operating conditions change and the internal prediction model is updated with each new linearized model.As the operating conditions change, only the model of the system is updated and the MPC formulation remains the same.As discussed in Section 2.3, the plant model for the A/C system used in this study has varying system parameters that are controlled by other subsystems in the vehicle, therefore making this system time-varying.The use of adaptive MPC ensures that, despite variations in system parameters, at every operating point, the linearization guarantees close agreement between the linearized model and the nonlinear plant model for the A/C system.
In addition to the type of MPC controller, there are parameters to be discussed in the design process for any MPC controller.These parameters are discussed next.

Design Parameters
For MPC design, there are essential parameters that require careful consideration to enhance both controller performance and computational efficiency.These parameters encompass the controller sample time, prediction horizon, control horizon, constraint handling, and weight assignment.Each parameter plays a pivotal role in optimizing the MPC algorithm's real-time performance while ensuring effective control of dynamic systems.

•
Sample time: The choice of the sample time determines the controller's operational frequency, impacting its ability to respond to disturbances and setpoint changes.Balancing between rapid disturbance rejection and computational load, it is advisable to accommodate 10 to 20 samples within the open-loop system's rise time [30].This ensures a responsive controller without overwhelming computational demands.Further details about this parameter in this study are provided in Section 3.4.2.

• Prediction horizon:
The prediction horizon influences the extent to which the controller anticipates future plant behavior.A cautious prediction horizon encompasses a timeframe that captures significant system dynamics, preventing untimely responses to disturbances.
To account for open-loop transient responses, selecting 10 to 20 samples is recommended [30].Further details about this parameter in this study are provided in Section 3.4.2.

•
Control horizon: Conversely, the control horizon determines the number of future control inputs that shape the predicted plant output.A smaller control horizon minimizes computational efforts but may compromise maneuverability.An optimal balance can be struck by setting the control horizon to 10-20% of the prediction horizon, ensuring a minimum of 2-3 steps to account for effective control [30].Further details about this parameter in this study are provided in Section 3.4.2.

•
Constraints: Constraints on inputs, input rate changes, and outputs can be imposed within the MPC framework.These constraints may be either hard or soft.The distinction lies in the feasibility of violation: hard constraints remain inviolable, while soft constraints can be breached within limits.Balancing the conflicting interests of inputs and outputs, it is advised to adopt soft constraints for outputs, eschewing simultaneous hard constraints on inputs and their rate of change.This minimizes the risk of infeasibility and ensures more adaptable control [30].Further details about this parameter in this study are provided in Sections 3.3 and 3.4.3.

•
Weights: Weight assignment is a critical aspect of optimizing control performance.
Weights gauge the significance of objectives in MPC.These objectives involve tracking setpoints and achieving smooth control maneuvers.Achieving a harmonious performance balance necessitates cautiously weighing input rates and outputs relative to each other.Additionally, adjusting weights within these categories fine-tunes performance to the specific control objectives [30].Further details about this parameter in this study are provided in Sections 3.3 and 3.4.4.
One can see the role of distinct MPC design parameters in shaping controller efficacy and computational efficiency.By strategically tuning these parameters, control engineers can harness MPC's potential to efficiently regulate dynamic systems while navigating the intricacies of real-time optimization.

Discrete State-Space General Form
MPC strategies commonly use discrete state-space formulations for the mathematical modeling of the system of interest.A continuous-time linear state-space model form must be discretized to form a discrete-time linear state-space model.Typically, MPC algorithms are designed in discrete time.A great amount of MPC designs have been developed using discrete-time approaches and a much smaller amount of continuous-time MPCs are present in the literature.In this work, a discrete-time MPC has been chosen due to the nature of the communication between the MPC and the real system, as discussed in Section 3.1.
The standard form of a continuous state-space system can be written as [31]: .
where A, B, C, and D are matrices describing the system dynamics.x is the state vector, u is the controlled input vector, and y is the output vector.
The continuous system in (1) can be written in a discrete state-space system as [32]: where A d , B d , C d , and D d are matrices describing the linearized system dynamics.k denotes the current timestep, x k is the state vector, u k is the controlled input vector, and y k is the output vector.One can use forward Euler's method to convert (1) to (2).Forward Euler's method is a simple discretization method for continuous-time systems.It is based on the approximation of the first derivative at t = kT where T is the time step for the discretization.Having [31] .
Applying the approximate formula in (3) to the SSR system equation, we have [31] 1 or [31] x where A d = I + TA and B d = TB are the discrete system matrices for the discrete SSR of the system with sampling time T. The same approach can be followed to obtain C d and D d that similar to B d would only have a multiplication by T. The sampling time for the discretization in this study was chosen as T = 1 s as detailed in Section 2.1.2.In this paper, the system equations of the dynamics of an automotive A/C system, as detailed in Section 2.3, are considered.These equations are nonlinear and, therefore, are linearized to conform to the standard continuous-time form in (1).These continuous-time equations are then discretized to conform to the discrete-time form in (2) using the forward Euler method.The details of the full process are described in Section 3.

Introduction of A/C System
A simple diagram of the automotive A/C system used in this study is depicted in Figure 2. The A/C system comprises four main components, the compressor, condenser, evaporator, and expansion valve.The controllable actuators of interest in this work are the compressor clutch, which switches the compressor (used to move the refrigerant throughout the cooling circuit) on and off, and the fan and AGS used to regulate the front-end airflow passing through the condenser.Compressor clutch π c is not a continuous variable in practice and is a discrete binary variable as either engaged (with the value of 1) or disengaged (with the value of 0).In this study, π c is initially treated as a continuous variable to be computed via optimization.When the MPC computes the continuous compressor clutch signal π c , it rounds it to a value of either 0 or 1 prior to sending it to the GT-Suite model to ensure it is in the discrete form that GT-Suite expects (see Appendix B for a discussion on MPC relaxation and justification for applicability of this approach in this context).
The model used by the MPC is a semi-analytical nonlinear model of the A/C system by Parent et al. [28] (the authors of this study) as a prerequisite to run this study for controller design development.The dynamics of this model can be described by the heat exchanger pressures p c for condenser and p e for evaporator.The first system output of interest is the temperature of the evaporator air stream.The underlying continuous-time mathematical equations for the heat exchanger pressures and temperatures are [28]: .
T air,out,e = T re f ,e + T air,in,e − T re f ,e  Since system energy consumption is of interest, the model includes the power consumption definitions in continuous time as [28]: where  ˙ is the compressor's power consumption [j s ⁄ ],  ˙ is the fan's power consumption  From the developments in [28], the definitions for Q c and T re f ,c in continuous time are as follows: where N is the normalized rotational speed of the condenser fan between zero and one, X is the open-fraction of the AGS between zero and one, and v is the vehicle speed [m/s].
The full list of fitted curves is available in Appendix A of [28] in Equations ( 17)-( 20) and not further provided here for brevity.Note that, in the system model in (6), there are terms that are updated from outside of the A/C system model and controller by other vehicle subsystems.These parameters are updated as the vehicle is operating and not controlled by the controller designed in this study for the A/C system.Hence, they are treated as system parameters in (6) that vary with time.The varying system parameters controlled by other subsystems in the vehicle dynamics are defined as follows: where .m re f is the mass flow rate of the refrigerant set by the compressor in GT-Suite [kg/s], Q e is the volumetric flow rate of the air set by the evaporator blower model in GT-Suite [m 3 /s], T air,in,c and T air,in,e are the air temperatures entering the condenser and evaporator [K], h in,c is the inlet enthalpy for the condenser [joules], v is the vehicle speed [m/s], and h in,comp is the inlet enthalpy for the compressor [joules].All these parameters are measured and sent from the vehicle energy management (VEM) model to the MPC.It is important to note that this makes the system under study a nonlinear time-varying system, which would require an adaptive MPC type to handle the nonlinearities by linearizing the model at each operating point, as discussed in Section 2.1.1.
Since system energy consumption is of interest, the model includes the power consumption definitions in continuous time as [28]: . With all the required background information discussed above, next, the problem definition is discussed in more detail.

Problem Definition
This section provides a step-by-step formulation of the problem studied in this paper.

Introduction
To conduct simulations to determine the desired MPC design parameters, the industrial partner supplied a high-fidelity model of the physical vehicle in GT-Suite v2020 (Build 3.0002), a multi-physics simulation software created by Gamma Technologies.This high-fidelity model is treated as a substitute for the real physical vehicle in this work (plant).GT-Suite v2020 (Build 3.0002) and MathWorks' Simulink 2021b have built-in cross-platform communication capabilities that allow signals to be sent to and from the two software packages.Therefore, MATLAB and Simulink are used for the MPC implementation.In the GT-Suite model, there are numerous independent cases set up for simulation, each representing a different standard drive cycle with time-series data loaded for each of the driving conditions, some of which are the system parameters in (8) required by the MPC from GT-Suite, such as the vehicle speed.The remaining elements of (8) are computed by the GT-Suite model and sent to the MPC, such as .m re f and Q e .In this work, the MPC simulations are conducted for the SC03 drive cycle [33], which is a standard drive cycle used by the Environmental Protection Agency (EPA) to evaluate the vehicle fuel economy where the A/C system is active.The total duration of this drive cycle is 575 s.

System Equations
In this paper, an adaptive MPC, known as successive linearization-based MPC (SLMPC), is applied to the automotive A/C system illustrated in Figure 2, i.e., the A/C system is the plant.To define the elements of A, B, C, and D used in the prediction model described in (2), the system of nonlinear equations described in ( 6)-( 9) must be linearized.These equations are linearized on the fly using the adaptive MPC approach described in Section 2.1, allowing the trim state to always be the current working state of the plant.The Jacobian matrices that map the system nonlinear equations in (6) to the linearized state-space representation A, B, C, D are calculated at every time step using the MATLAB jacobian function, where jacobian( f , v) computes the Jacobian matrix of symbolic function f with respect to v. The (i, j) element of the result of ∂ f (i)/∂v(j) is as follows: where f 1 is the definition of .p c , f 2 is the definition of .p e , g 1 is the definition of T air,out,e in (6), and g 2 is the definition of .W total in (9).x is defined in (27); u is defined in (28).Additionally, the collective terms g 1 and g 2 capture the system outputs y as defined in (29).Note that, due to the form of the definitions for f 1 , f 2 , g 1 , and g 2 , the full form of the Jacobians in (10) is not provided here as it would be infeasible to fit all the terms in a presentable format.
The numerical values of the state-space matrices are computed using a successive linearization approach [29], SLMPC, as a common approach adopted for MPC designs [34].The concept of this approach is simple.At the beginning of each control iteration, the Jacobian matrices are evaluated at the current operating conditions of the complex system model, that being the current system states, controlled inputs, and system parameters.This will update the numerical values of the state-space matrix entries.By re-evaluating the statespace model at the current operating conditions, one ensures that the trim state is close to the current operating point.The intention of this is to reduce the linearization error caused by deviations from the trim state.Thus, the working condition of the complex system model will be treated as the trim state.Full theoretical development and proof of applicability for SLMPC can be found in [29].This allows the controller to be initialized at the current system state at each time step, allowing accuracy to be maintained throughout the simulation since the controller will always work in the vicinity of the calculated trim state.

Quadratic Programming Formulation
Quadratic programming is an optimization process used to solve mathematical problems containing quadratic functions.The optimal solution to a quadratic programming problem is found by minimizing the following objective function, J [32]: where X qp is a vector containing the control objectives shown in (12), H is a symmetric matrix containing relative weightings for each control objective in the quadratic term of the cost function, and f is a vector containing relative weightings for each control objective in the linear term of the cost function.In (11), the elements of the vector X qp are minimized to achieve the smallest possible value for the objective function.
For the MPC controllers, the controller is typically designed to track reference values for the states and outputs of the system while also considering the magnitude and rate of change of the controlled input values.In this case, the elements of X qp are as follows [32]: where the definitions of these terms are provided further below.This description of X qp is for a discrete-time case since the approach used for the controller design in this study is also discrete-time due to the nature of the controller type.The dimension of the vector depends on the prediction horizon length h, the number of states n x , number of inputs n u , and the number of outputs n y .The elements of the H matrix can be used to change the relative importance of each of the control objectives corresponding to the terms in the X qp vector as outlined in (12).The typical state-space equations can be modified to include the output and state reference tracking deviations.This will make forming the QP constraints much easier.The goal of the following modifications to the state-space model form is to explicitly show the output setpoint deviations, state setpoint deviations, and the rate of change of the controlled inputs since these are included in the X qp vector of the objective function.In QP problem formulations, linear equality constraints containing the X qp vector can be applied to the problem.These constraints can be used to mathematically define the elements of X qp .This can be done by treating the discrete state-space model in (2) as an equality constraint and reorganizing the formulation to contain the elements of X qp explicitly.The state-space formulation described in (2) is reorganized to explicitly include the elements of (12) using the approach outlined in [32].As a special case of the general form of the objective function for QP in (11) when H is symmetric positive-definite, the objective function reduces to where H = H ′ TH ′ follows from the Cholesky decomposition of H and f = −H ′T X qp,s .Hence, given the system in (2), the special case of the objective function in QP can be expanded as [32]:

S.t. : Dynamic Model and Constraints
where the subscript s denotes a setpoint, i is the current step in the time horizon window, and I is the identity matrix.Note that subscript i is from 0 to the time horizon h as the dimensions of these vectors change with the size of the time horizon.To make the formulation easier, the system equations are written in (14) where ∆u k ≜ u k − u k−1 .Rewriting the model in this form incorporates the rate of change of the controller inputs into the state-space model.The next step is to rewrite the state-space model in terms of setpoint deviations.So, the general form of the model equation becomes: Or in a compact form as If we define The form in (16) can be rearranged for time step 0 in the prediction horizon, where we initiate the dynamics with x 0 , y 0 , and u −1 , and given an equality constraint can be written in the form of A eq X qp = B eq where the subscript  denotes a setpoint,  is the current step in the time horizon window, and  is the identity matrix.Note that subscript  is from 0 to the time horizon ℎ as the dimensions of these vectors change with the size of the time horizon.To make the formulation easier, the system equations are written in {  +1 =     +   ∆  +    −1   =  −1 + ∆   +1 =    +1 +   ∆  +    −1 (14) where ∆  ≜   −  −1 .Rewriting the model in this form incorporates the rate of change of the controller inputs into the state-space model.The next step is to rewrite the statespace model in terms of setpoint deviations.So, the general form of the model equation becomes: If we define The form in (16) can be rearranged for time step 0 in the prediction horizon, where we initiate the dynamics with  0 ,  0 , and  −1 , and given an equality constraint can be written in the form of And for any other time step between  = 1 up to ℎ − 1 it can be written as follows: And for any other time step between i = 1 up to h − 1 it can be written as follows: Modelling 2024, 5, FOR PEER REVIEW 15 Hence, the objective function in (13) becomes: which can be written in compact form as: where Hence, the objective function in (13) becomes:

S.t. : Dynamic Model and Constraints
which can be written in compact form as: X T qp HX qp S.t.: A eq X qp = B eq and lb X ≤ X qp ≤ ub X (21) where with the lower and upper bounds for the entire length of the prediction horizon as where lb u and ub u are the lower and upper bounds on the inputs, and lb x , ub x , lb y , and ub y are the lower and upper bounds for the states and outputs, respectively.Each element of the X qp vector can be weighted individually, providing more significance to prioritizing certain control objectives over others.The weighting matrix H for the control objectives within the objective function (output reference tracking, state reference tracking, input value magnitude, and rate of change of the input commands) is [32] where R ∆u is the weighting of the rate of change of the inputs, Q x is the weighting of the state reference tracking deviations, R u is the weighting of the input magnitudes, and Q y is the weighting of the output reference tracking deviations.R ∆u , Q x , R u , and Q y are diagonal matrices with the respective weights along the diagonal.

Implementation
The cabin cooling effort of the A/C system is controlled using three actuators: the compressor clutch, π c , condenser fan, N, and the AGS, X.The compressor clutch connects the compressor to the engine, enabling the compressor to operate and increase the pressure of the refrigerant leaving through the discharge port.As mentioned in Section 2.3, the compressor clutch π c is not a continuous variable in practice and is a discrete binary variable.In this study, π c is initially treated as a continuous variable to be computed via QP optimization.When the MPC computes the continuous compressor clutch signal π c , it rounds it to a value of either 0 or 1 prior to sending it to the GT-Suite model to ensure it is in the discrete form that GT-Suite expects.Alternative methods exist that are better suited for dealing with mixed-variable systems like the one described.For instance, techniques such as hybrid predictive control models that incorporate both integer and continuous variables have been explored in the literature [35][36][37][38] and can be further investigated in future studies.These methods provide a more holistic approach to dealing with mixed-variable systems, allowing for more accurate and efficient control strategies in scenarios where variables exhibit both continuous and discrete behaviors.
The condenser fan and AGS regulate the flow of the ambient air stream entering the vehicle's front end, which passes through the condenser to exchange heat with the refrigerant.The fan's rotational speed is continuously controllable, and the AGS area open-fraction can continuously vary between fully closed and fully open.Note that some underhood airflow can still occur when fully closed due to the vehicle's motion and/or fan operation.
Based on the approach detailed in Section 2.2, using a time step of one second leaves only the A matrix changed due to the addition of the identity matrix, as shown in (3)- (5).By convention, the time step for MPC-plant interaction is the same as the one used within the MPC for future time predictions using the model up to the prediction horizon [32].The time step of one second was selected after assessing the open-loop response of the air temperature output subjected to a unit step from each of the three controlled inputs for the continuous-time linear model.All other parameters, such as the external inputs, were held constant at the trim state selected based on an operating point observed for the GT-Suite (real system) model.

States, Inputs, and Outputs
For the simulations in this study, from the A/C system equations in ( 6)-( 9) the state vector x is defined as: where p c and p e are the condenser and evaporator refrigerant pressures.The input vector u is defined as: where π c is a continuous compressor clutch signal, N is the normalized rotational speed of the condenser fan between zero and one, and X is the open fraction of the AGS between zero and one.The output vector, y, is defined as: where T air,out,e is the temperature of the air leaving the evaporator (entering the cabin) [K], and .
W total is the total power consumption of the compressor [Watt] or [j/s] that is comprised of .W comp , .
W f an , and ∆ .W drag , as discussed in (9).The evaporator outlet air temperature is chosen as one of the outputs for the model because the controller's goal is to control the actuators to maintain this air temperature close to a reference or set value, thus regulating the cabin cooling performance.The other output, .W total , is chosen because the second goal of this controller is to minimize the power consumption of the A/C system while satisfying the cooling objective.
It is important to note that, in the proposed formulation, feedback is taken into account by using the direct system outputs as the inputs for the controller.This means that no estimator or observer was used to obtain the state variables or the output variables of the system.In this study, it is assumed that the system outputs are measurable and noisefree, and that the system model is accurate.Therefore, a possible model mismatch is not considered.
However, in reality, these assumptions may not hold true.There may be measurement errors, nonlinearities, uncertainties, or disturbances that affect the system's performance and stability.In such cases, using an observer or an estimator could help to improve the feedback quality and robustness of the controller.This limitation can be further explored in future studies with the implementation of an observer or an estimator to handle potential system mismatches.

Sampling Time, Prediction Horizon, and Control Horizon
As per the recommendations and discussion provided in Section 2.1.2,the time unit of measurement for the governing equations used to derive the linearized model is in seconds.Thus, the units of the discretization time step are in seconds to maintain consistency.The rise time of the A/C system in this study is roughly 12.7 s, meaning a time step between 0.64 s to 1.3 s would fit 10 to 20 samples within the open-loop rise time, meaning a sampling or discretization time step of T = 1 s is satisfactory based on this best practice.
As per the recommendation for the choice of prediction horizon, in this study, a prediction horizon of 10 s or 10 time steps is chosen.This reduces the computational burden for the optimization process required during the prediction horizon by choosing the lower bound of the recommended range.However, in future studies, one can further optimize the prediction horizon.Additionally, a control horizon of two steps is chosen for the implementation of the adaptive MPC as it provides a sufficient balance between computation, efficiency, and performance for the MPC design.
It should be noted that the choices above were based on trial and error in the study to obtain satisfactory results for the industrial partner in this first phase of investigations for the implementation of an MPC controller for an A/C system in a vehicle.In future studies, additional investigations shall be pursued to further improve and optimize these choices for the controller design.

Constraints
As discussed in Section 3.3, constraints can be set on the optimization.The values of these three controlled inputs have physical limitations based on their range of operation.These are hard constraints that cannot be exceeded by any means.The mathematical number sets and limitations of these three controlled variables are provided by the industrial partner as: The states also have constraints but they are not due to physical limitations.The constraints on the states are imposed to prevent problems arising in the HEXs due to excessive or lack of pressure.The state constraints are as follows and are defined by the industrial partner: For the QP algorithm to run successfully, constraints must also be present for the outputs as well but, since the outputs do not have bounds for the application in this study, they are set to infinity as Feasibility and infeasibility issues in MPC controllers with QP optimization can affect the stability and performance of the closed-loop system.If the QP problem has hard constraints, such as input or output limits, it may be impossible to satisfy them at some time steps, leading to infeasibility.If the QP solver detects infeasibility, it terminates immediately and returns an error in MATLAB.To avoid this situation, some methods have been proposed, such as using soft constraints, additional constraint checking horizon, terminal condition and cost, or disturbance preview [38].
In this study, the infeasibility problem shall not occur as the only hard constraints in the QP optimization in this study are on the inputs outlined in (30) and these constraints shall be met as, in any A/C system of a vehicle, there must be a combination of these inputs that provides some sort of long-term asymptotic stability and tracking for the cabin temperature even without the use of an MPC controller.This was primarily achieved by the baseline PID controlled in previous works and can be the bare minimum solution to this optimization problem that would exist at all times.Therefore, since there is no time limit on the settling time for the temperature tracking of the cabin, the control inputs and hard constraints in (30) and (31), as shown in simulation results for the ranges of p c and p e , shall not prevent the optimization problem from converging to a solution at any given time step and, hence, the infeasibility issue shall not arise.

Weights
Additionally, from Section 3.3, the elements of the X qp vector defined in (12) can be weighted based on importance and contribution to the objective function through the weighting matrix H described in (26).As defined in ( 27)-( 29), for this work, there are two states (n x = 2), three controlled inputs (n i = 3), and two outputs (n y = 2).The specific weighting matrices inside (26) are defined as follows: where K p c and K p e are the weightings for the state deviations, K T air is the weighting for the air temperature tracking deviation, K .

W T
is the weighting for the total power consumption, K π c , K N , and K X are the weightings for the magnitude of the controlled inputs, and K ∆π c , K ∆ N , and K ∆X are the weightings for the rate of change of the controlled inputs.It is worth noting that the goal of the MPC is to reduce energy consumption, but the power consumption is modeled and weighted because energy is the time integral of power.Thus, reducing power consumption will also reduce energy consumption.

Scenarios
Two control input cases are considered: first, only controlling the compressor clutch and, second, adding the condenser fan speed and AGS position as additional controlled inputs.Thus, the u k and ∆u k elements of the X qp vector for the first case with clutch-only control are: and for the second case with full control of compressor clutch engagement, condenser fan speed, and open-fraction AGS position are: It is important to note that, as the input vector changes in cases 1 and 2, the applied constraints in the optimization problem are also adjusted to only include the applied control inputs.

Summary
The overall system implementation is shown in Figure 3, where the structure of implemented SLMC is shown with notations that are the same as in Figure 1.Additionally, the environment under which each component is developed/operated is noted in red color.
To summarize this section and formalize the control problem investigated in this study, we have the continuous SSR system form in (1) that can be written in the discrete SSR system form in (2) with x defined in (27), u defined in (28), and y defined in (29).The matrices A, B, C, and D in (1) are the Jacobians calculated from ( 6)-( 9) using (10).These matrices can be converted to their discrete form using Euler's method described in (3)-( 5) to obtain A d , B d , C d , and D d in (2) with the sampling step of T = 1 s.
To summarize this section and formalize the control problem investigated in this study, we have the continuous SSR system form in (1) that can be written in the discrete SSR system form in (2) with  defined in (27),  defined in (28), and  defined in (29).The matrices , , , and  in (1) are the Jacobians calculated from ( 6)-( 9) using (10).These matrices can be converted to their discrete form using Euler's method described in (3)-( 5) to obtain   ,   ,   , and   in (2) with the sampling step of  = 1 .The goal of the optimization problem in SLMPC is to minimize the objective function in (11) in the general case and for this study in a simplified form in ( 13) and with constraints formed as (21), where the elements of   and  are defined in general in ( 12)-( 26) with specific definitions for this study in (33) subject to constraints in ( 24) and ( 25) in general form and for this study in ( 30)- (32).
Finally, the investigations are conducted for two scenarios, 1. clutch only as input for the MPC design as outlined in (34), and 2. full control input including compressor clutch engagement, condenser fan speed, and open-fraction AGS position as outlined in (35).The time or prediction horizon for the MPC design was set to 10 time steps, and since the time step for this study was chosen as  = 1  it would equal a 10 s look ahead in time for the controller.
The results and analysis of the simulations with the VEM model, which was provided by the industrial partner in the GT-suite environment and is used as the plant for the simulations, are presented in Section 4, including some discussions on the observations made from the outcomes.

Results and Discussion
To evaluate the performance of the air temperature tracking, the root mean squared error (RMSE) between the actual air temperature from the GT-Suite model and the target reference temperature was calculated as: where  , is the actual value from the GT-Suite model,  , is the target reference value, and   is the total number of data points.The choice for the performance evaluation in (36) is to ensure that the tracking of the reference value is monitored The goal of the optimization problem in SLMPC is to minimize the objective function in (11) in the general case and for this study in a simplified form in ( 13) and with constraints formed as (21), where the elements of X qp and H are defined in general in ( 12)-( 26) with specific definitions for this study in (33) subject to constraints in ( 24) and ( 25) in general form and for this study in ( 30)- (32).
Finally, the investigations are conducted for two scenarios, 1. clutch only as input for the MPC design as outlined in (34), and 2. full control input including compressor clutch engagement, condenser fan speed, and open-fraction AGS position as outlined in (35).The time or prediction horizon for the MPC design was set to 10 time steps, and since the time step for this study was chosen as T = 1 s it would equal a 10 s look ahead in time for the controller.
The results and analysis of the simulations with the VEM model, which was provided by the industrial partner in the GT-suite environment and is used as the plant for the simulations, are presented in Section 4, including some discussions on the observations made from the outcomes.

Results and Discussion
To evaluate the performance of the air temperature tracking, the root mean squared error (RMSE) between the actual air temperature from the GT-Suite model and the target reference temperature was calculated as: where x actual,i is the actual value from the GT-Suite model, x re f erence,i is the target reference value, and n points is the total number of data points.The choice for the performance evaluation in (36) is to ensure that the tracking of the reference value is monitored and considered throughout the entire simulation, not just for a portion of it.That is why the summation in (36) is from 1 to the total number of data points or simulation outputs.The performance of the GT-Suite model with the baseline PID control scheme is shown in Table 1, where n ∆π c is the clutch actuation frequency in the number of actuations per minute.These metrics will be referenced to the MPC results to compare the improvement of the new control scheme.

MPC Tuning Process
The weighting parameters of the MPC controller are set for the individual elements of the objective function as X qp , defined in (12).The most crucial elements of ( 12) to be minimized are (i) the air temperature setpoint deviation corresponding to K T air in ( 33), (ii) the instantaneous power consumption corresponding to K .W T in (33), and (iii) the rate of change of the clutch command corresponding to K ∆π c in (33).The rate of change of the clutch command is critical to consider since the durability of the compressor can be a concern if a chattering phenomenon occurs, where the compressor clutch is constantly cycled between engaging and disengaging.Wear and tear on the compressor clutch can lead to reliability issues within vehicles and can increase expenses if the compressor requires maintenance more frequently.To quantify the actuation frequency of the clutch, the total number of clutch actuations throughout the cycle is recorded and divided by the 9.583 min (575 s) duration of the test cycle used in this study.With these three as the crucial weightings of interest for the MPC tuning, all other weightings in (33) are set to a value of one, while these three (K T air , K .

W T
, and K ∆π c ) are varied to ensure a reasonable contribution of various terms in the objective function.
There are optimal methods for tuning MPCs, as reported by Vazques et al. [39] using an artificial intelligence approach for real-time tuning of MPC for power converters and by Yamashita et al. [40] using a multi-objective tuning technique for MPC tuning in grinding circuits.However, in this study, a variation in the preliminary optimization method known as grid search with a systematic distribution of the grid points in the desired search space was considered as the focus of this study was more on the feasibility of implementing an MPC controller for the vehicle's A/C system rather than optimizing it.More advanced and optimal tuning techniques can be considered in future studies.A preliminary sensitivity assessment was conducted to determine the search space ranges for these three weighting values, K ∆π c , K T air , and K .

W T
, to ensure the entire relevant search space is being explored.K ∆π c , K T air , and K .

W T
were systematically increased while all other weighting factors were held constant.For example, K ∆π c was increased until no further significant change was observed in the system's clutch actuation frequency.
To form the optimization search space, the valid weighting ranges for K ∆π c was identified as 1-1000 since values greater than 1000 presented no change to the clutch actuation frequency.The valid weighting range for K T air was chosen between 1-50, as the values above this range provided no significant change to the air temperature's RMSE.Finally, the valid weighting range for K .

W T
was chosen to be between 1 and 50 since integer values greater than 50 caused the compressor to shut off completely for the entire cycle, meaning the A/C system was inactive, and the air temperature's RMSE reached extreme and unrealistic values.Therefore, the optimization process for the MPC tuning could be described as maximize( or minimize) f GS K ∆π c , K T air , and K .
where f GS (•) is the function whose value needs to be maximized or minimized during the optimization process.A Latin Hypercube Sampling (LHS) approach outlined by Huntington and Lyrintzis [41] was used to determine the grid points (candidate solutions distribution) in the search space for the three MPC weightings within the defined search spaces in (37).A sample space of 300 unique combinations of weighting values was randomly generated in MATLAB using LHS to adequately fill the search space defined in (37).The MPC was simulated with the GT-Suite model in two different scenarios discussed in Section 3.4.5 for the SC03 cycle.The plant was operated with the MPC for each set of 300 weighting combinations to assess the system's behavior with the new control scheme.As stated earlier, the three main metrics of interest are (i) the RMSE for the air temperature setpoint deviation, (ii) the total energy consumption throughout the cycle, and (iii) the clutch actuation frequency, each of which could be considered as the definition of f GS (•) in (37).In a traditional approach to grid search optimization, one would minimize or maximize the value of f GS (•) in (37) as one of the metrics outlined above.However, in this study, to provide a more insightful illustration of how the samples in the search space in (37) compare to one another against any of the above metrics, the results of the evaluation for all samples in the search space in (37) against all metrics above are shown in Figure 4. To further discuss the optimum points for this optimization approach, the points of interest (POIs) are introduced next to provide trade-offs and decision-making recommendations once the outcomes of all evaluations are obtained and visualized.
where  (•) is the function whose value needs to be maximized or minimized during the optimization process.A Latin Hypercube Sampling (LHS) approach outlined by Huntington and Lyrin is [41] was used to determine the grid points (candidate solutions distribution) in the search space for the three MPC weightings within the defined search spaces in (37).A sample space of 300 unique combinations of weighting values was randomly generated in MATLAB using LHS to adequately fill the search space defined in (37).The MPC was simulated with the GT-Suite model in two different scenarios discussed in Section 3.4.5 for the SC03 cycle.The plant was operated with the MPC for each set of 300 weighting combinations to assess the system's behavior with the new control scheme.
As stated earlier, the three main metrics of interest are (i) the RMSE for the air temperature setpoint deviation, (ii) the total energy consumption throughout the cycle, and (iii) the clutch actuation frequency, each of which could be considered as the definition of  (•) in (37).In a traditional approach to grid search optimization, one would minimize or maximize the value of  (•) in (37) as one of the metrics outlined above.However, in this study, to provide a more insightful illustration of how the samples in the search space in (37) compare to one another against any of the above metrics, the results of the evaluation for all samples in the search space in (37) against all metrics above are shown in Figure 4. To further discuss the optimum points for this optimization approach, the points of interest (POIs) are introduced next to provide trade-offs and decision-making recommendations once the outcomes of all evaluations are obtained and visualized.

Points of Interest
First, we examine the three metrics of interest for both MPC configurations, as shown in Figure 4a.Four observations can be made here.

1.
First, the upper bound of energy consumption is 1000 kJ, 21% lower than that for the baseline control scheme for the plant.Hence, all assessed MPC configurations significantly reduce A/C system energy consumption.

2.
Second, in a similar way, the largest air temperature error is 4.6 • C, 27% less than that for the baseline controls.This suggests that the model being re-linearized at every operating point is key to good control performance, as the baseline controls do not include this.

3.
Third, clutch actuation frequency ranges from 0 (same as baseline) to ~16 actuations per minute over the SC03 cycle, with higher clutch actuations, in general, being traded for lower energy consumption.This suggests there is no single optimal value of the QP weights but rather a trading relationship the control designer must choose within.4.
Finally, the difference between the total energy consumption using clutch-only MPC and full MPC is apparent, with clutch-only MPC yielding higher energy consumption.
The impact of the inclusion of two extra actuators into the MPC framework is easier to establish by examining the same data in each of the three two-dimensional views in Figure 4b-d.
In Figure 4b, the data is projected onto the energy-temperature error plane.It is clear that including all actuators in the MPC framework lowers energy consumption for a given temperature error at a comparable or lower clutch actuation frequency.Giving the MPC the control ability over all actuators also enables higher-energy solutions with few to no clutch actuations, which is impossible with clutch-only control.
In Figure 4c, the data is projected onto the clutch actuation frequency-energy plane.The three-actuator MPC is shown to lower energy consumption by 50-100 kJ over the drive cycle at comparable numbers of clutch actuation frequency and again the higherenergy solutions with little to no clutch activation are apparent.In Figure 4d, the data is projected onto the clutch actuation frequency-temperature error plane.Here, it can be readily seen that the three-actuator MPC enables similar temperature errors and clutch actuation frequency but at reduced energy.Some POIs are gathered in Table 2.When the clutch does not actuate in POI 1 for full control, the energy consumption is at its highest.However, the air temperature's RMSE is at its lowest.This scenario is most similar to the baseline control since the built-in compressor displacement control is the main driving force for the refrigerant control.As the compressor is active during the entire cycle, the energy consumption is high since the compressor is the primary energy consumption for the A/C system.Comparing this POI with the baseline performance, the energy consumption is reduced by 20.9% and the air temperature's RMSE is reduced by 34.6%.This demonstrates that, by just using MPC control of the compressor, fan, and AGS, there is a significant improvement to the reference temperature tracking and energy consumption.For the clutch-only control results, the smallest clutch actuation frequency was found to be 0.2, meaning the clutch has at least one on/off actuation over the 575 s drive cycle.This can possibly be attributed to the fact that the baseline fan and AGS control inside the GT-Suite model are poor, typically running the fan when it is not needed for additional cooling and maintaining the AGS fully open regardless of the cooling requirement, causing the clutch to be more inclined to be the primary source of cooling regulation.
An interesting impact can be observed by increasing the compressor clutch actuation frequency by a small margin, from POI 1 to POI 2 and 3, which is performed by decreasing the weighting value of K ∆π c or increasing the weighting values of K T air and K .

W T
. For full control, by increasing the actuation frequency from zero to 0.2, the energy consumption is decreased by 30.9% compared to the baseline.Similarly, from an actuation frequency of zero to 1.01, the energy consumption is reduced by 34.5% compared to the baseline.However, the RMSE for the air temperature is increased from 4.10 • C to 4.35 • C. POIs 5 and 6 demonstrate that, when the compressor clutch actuation frequency is above 2.03 for full control, no significant improvement to the energy consumption is achieved.However, in this region, the best air temperature's RMSE is found between a clutch actuation frequency of roughly 9.6-11.2.Comparing the POI results between the full control and clutch-only control clearly shows that, at the same clutch actuation frequency, the control of the fan and AGS provides an additional benefit to power consumption and air temperature tracking.The largest difference between the full and clutch-only control can be seen by comparing both cases at POI 3, where the full-control MPC uses 9.7% less energy compared to the clutch-only control for the same clutch actuation frequency.The weights associated with the POIs gathered in Table 2 are shown in Table 3.The system behavior for POIs 2 and 4 are shown in Figures 5 and 6, respectively, where they are both compared to the baseline system behavior.By investigating the behavior of the clutch-only MPC results shown in Figures 5 and 6, it can be immediately observed that the condenser fan rotational speed and AGS open fraction are controlled in the same manner as the baseline.
The impact of the full MPC on energy consumption can be recognized by comparing the condenser fan and AGS control to the baseline.For example, in POI 2, the full MPC is able to completely shut off the condenser fan for the majority of the cycle.In order to cause a sharp increase in air temperature, the clutch is disengaged, allowing the system to heat up quickly.However, when doing so, the full MPC controller drives the rotational speed of the condenser fan to its maximum value so as to not cause a significant overshoot in air temperature.This can be seen more often in POI 4, where the clutch actuation frequency is higher.In doing so, more energy is saved by disengaging the clutch and allowing the other two actuators to work toward satisfying the air temperature reference tracking objective.In POIs 5 and 6, the clutch actuation frequency is significantly higher than in POI 4, as seen in Table 2.The key takeaway is that there are multiple combinations of the weighting parameters which yield good performance, trading mainly between energy consumption and clutch actuation frequency.Choosing one is the designer's job, depending on the balance desired between energy use and clutch/compressor life longevity.For the vehicle of interest in this work, the fuel economy is 9.8 L/100 km when the A/C system is not active.In terms of fuel economy, the A/C system can typically use roughly 1.0 L/100 km, increasing the fuel consumption to 10.8 L/100 km [42].In this work, the greatest observed energy savings by the full MPC is 37.6%, which would reduce the fuel economy number to 10.4 L/100 km, roughly yielding a 3.5% savings in fuel economy.

Conclusions and Future Work
In this paper, two MPC schemes were applied to the A/C system of a vehicle, that is, one controlling only the compressor clutch and one additionally controlling the condenser fan and AGS.The analysis showed that, by switching to MPC control, an improvement of 32.7% to the air temperature reference tracking and 37.6% to the energy consumption can be achieved.By disengaging the compressor when it is not needed, up to 37.6% in energy savings was recorded using the full-control MPC.However, achieving a steady-state solution at the air temperature setpoint of 4 • C was not achievable by controlling the fan and AGS alone, to a cycling behavior of the discrete compressor clutch.By increasing the actuation frequency of the compressor clutch from zero to 2.03, the energy benefit using the full-control MPC was improved from 20.9% to 36.9%.However, increasing the clutch actuation frequency further resulted in no further energy benefit.Nevertheless, the air temperature RMSE was improved by 5.4% by increasing the clutch actuation frequency from 2.03 to 10.7, at the expense of more wear and tear on the clutch itself.
From the analysis done in this work, it can be concluded that switching to an MPC scheme is worthwhile for A/C system control, even if there is no change in the components being actuated.This can be seen by the energy saving and air temperature tracking benefit of 32.6% and 32.2% provided by the clutch-only MPC.Further benefit can be obtained, especially in terms of clutch durability, by including all three actuators in the MPC scheme.The full-control MPC is able to provide a 34.5% energy benefit with a clutch actuation frequency of 1.01, whereas the clutch-only control provides a 32.7% energy benefit with a clutch actuation frequency of 16.2.The discrete number of points investigated in the Latin Hypercube Sampling did not permit formal identification of a Pareto front.However, the trades seen between the outputs strongly suggest such a front could be identified for any given vehicle; thus, optimal weightings could be chosen based on the designer's choice between clutch actuation frequency, energy consumption, and temperature error.
With the assumption that u L = u L [k] does not change throughout a time step and A c is invertible, (A8) becomes In MPC formulation, we compute the system's future evolution within a finite horizon known as the prediction horizon.Predictions for a given set of control inputs are based on a discrete-time linear system model.The goal is to minimize a cost function to track a reference trajectory while adhering to constraints.At the current time step, k, the cost function typically involves the tracking error, represented by the difference between the output y k D and the desired reference trajectory r k as e k = y k D − r k , as well as control inputs u k D .The error's evolution over the prediction horizon commencing from time step k can be defined as  where K = EK − → r k ∈ R n p •n o collects all constant terms.The cost function, which quantifies the controller's performance, is defined as where Q ∈ R n p n o ×n p n o and R ∈ R n p n u ×n p n u are weight matrices for error and input, respectively.Substituting (A14) into (A15) yields After eliminating terms unrelated to the control input → u k , and combining the quadratic and linear components, we arrive at Utilizing matrices G and W, the objective function J becomes Nevertheless, when control inputs carry a non-zero weight in the cost function, a steady-state output error may arise.In such cases, it might be more cost-effective to allow this error in J instead of raising the control inputs.A solution is to define the cost function in terms of control input increments rather than their absolute values.This approach minimizes the impact of control input values on J.This requires transforming the control where ∆ is a lower diagonal matrix with identity I ∈ R n u ×n u or a zero 0 ∈ R n u ×n u matrix of the same size as its elements.Hence, (A14) can be rewritten as Since → u k−1 is constant throughout the horizon, it can be included in K.The objective function J ∆ in δu is formulated as where G ∆ = ∆ T G and W T ∆ = → u T k−1 G∆ + W T ∆.A key aspect of MPC is its ability to handle prescribed constraints on both state variables and control inputs.To enforce constraints on the states, it is essential to establish the state vector's trajectory over the prediction horizon.x k holds n p + 1 state vectors from the time horizon, and P x , H x , and E x are state prediction matrices.Hence, (A20) becomes The state constraint x 1 ≤ V → x k ≤ x u can be written as )n c ×(n p +1)n x picks n c states with active constraints.If all states are constrained, then V is an identity matrix.With → δu k and defining U = V H x , the QP problem can be characterized as argmin In a typical QP solver, matrices G and W, in conjunction with constraint and bound information, are employed to determine an optimal solution.In closed-loop MPC, only the first control vector within the horizon is implemented on the system, while the subsequent control inputs are disregarded.Following the current time step, new system measurements are acquired.This iterative process, involving linearization, discretization, prediction
where Q c is the volume flow rate of the air through the condenser [ m 3 /s , ρ a is the air density [ kg/m 3 , h in and h out are the inlet and outlet refrigerant enthalpies [joules], ρ l , ρ g are the densities [ kg/m 3 and h l , h g are the enthalpies [joules] for the refrigerant calculated at saturated liquid and vapor states, respectively.c H is the specific heat of the HEX material [j/K•kg], c p,air is the specific heat of air at constant pressure [j/K•kg], γ ∈ [0, 1] is the mean void fraction of the refrigerant, V is the volume of the HEX [m 3 ], m H is the material mass of the HEX [kg], T wall is the wall temperature of the HEX [K], p c and p e are the refrigerant pressures in the condenser and evaporator [kPa], π c is the compressor clutch engagement [on/off], .m re f is the refrigerant mass flow rate [kg/s], Q e is the volume flow rate of the air from the blower fan [m 3 /s], T air,in and T air,out are the inlet air temperatures to the condenser and evaporator [K], T re f is the HEX refrigerant temperature [K], NTU is the number of transfer units of the air, and K ca and K ea act as multipliers on the Nusselt number.α is the convective heat transfer coefficient of the air [W/m 2 •K], A s is the external surface area of the HEX [m 2 ], F f in ∈ [0, 1] is the fraction of air-to-structure surface area on the fins, η FA is the air-side fin efficiency, and .m a is the mass flow rate of the air [kg/s].Modelling 2024, 5, FOR PEER REVIEW 11 where  ˙ is the mass flow rate of the refrigerant set by the compressor in GT-Suite [kg s ⁄ ],   is the volumetric flow rate of the air set by the evaporator blower model in GT-Suite [m 3 s ⁄ ],  ,, and  ,, are the air temperatures entering the condenser and evaporator [K], ℎ , is the inlet enthalpy for the condenser [joules],  is the vehicle speed [m s ⁄ ], and ℎ , is the inlet enthalpy for the compressor [joules].All these parameters are measured and sent from the vehicle energy management (VEM) model to the MPC.It is important to note that this makes the system under study a nonlinear time-varying system, which would require an adaptive MPC type to handle the nonlinearities by linearizing the model at each operating point, as discussed in Section 2.1.1.
[j s ⁄ ], and Δ ̇ is power consumption associated with additional drag on the vehicle due to underhood airflow, which is set by the vehicle speed, fan rotational speed, and AGS open-fraction [  ⁄ ].  ˙ is the total power consumption from A/C comprising of the previous three components [  ⁄ ].  ˙ is the mass flow rate of the refrigerant [m 3 s ⁄ ], ℎ  and ℎ  are the enthalpies of the refrigerant at the inlet and outlet of the compressor, respectively [j kg ⁄ ],   is the ratio of isentropic efficiency to volumetric efficiency of the compressor,   is the pressure rise required of the fan [Pa],   is the fan's adiabatic efficiency,   is the frontal area of the vehicle [m 2 ], ∆  is the increase in drag coefficient due to additional flow through the underhood at a given vehicle speed due to the AGS being open and/or the fan being on, and  is the vehicle speed [m s ⁄ ].With all the required background information discussed above, next, the problem
where .W comp is the compressor's power consumption [j/s], .W f an is the fan's power consumption [j/s], and ∆ .W drag is power consumption associated with additional drag on the vehicle due to underhood airflow, which is set by the vehicle speed, fan rotational speed, and AGS open-fraction [j/s]. .W total is the total power consumption from A/C comprising of the previous three components [j/s].. m re f is the mass flow rate of the refrigerant [m 3 /s], h in and h out are the enthalpies of the refrigerant at the inlet and outlet of the compressor, respectively [j/kg], η comp is the ratio of isentropic efficiency to volumetric efficiency of the compressor, ∆p t is the pressure rise required of the fan [Pa], η f an is the fan's adiabatic efficiency, A f r is the frontal area of the vehicle [m 2 ], ∆C d is the increase in drag coefficient due to additional flow through the underhood at a given vehicle speed due to the AGS being open and/or the fan being on, and v is the vehicle speed [m/s].

Figure 4 .
Figure 4. Evaluation of full control and clutch-only control MPCs for SC03 cycle: (a) 3D space with all three key metrics, (b) air temperature RMSE vs. total energy side profile, (c) total energy vs. clutch actuation frequency side profile, (d) air temperature RMSE vs. clutch actuation frequency side profile.

Figure 4 .
Figure 4. Evaluation of full control and clutch-only control MPCs for SC03 cycle: (a) 3D space with all three key metrics, (b) air temperature RMSE vs. total energy side profile, (c) total energy vs. clutch actuation frequency side profile, (d) air temperature RMSE vs. clutch actuation frequency side profile.

Figure 5 .
Figure 5. System behavior for baseline vs. clutch-only MPC vs. full MPC for POI 2.

Figure 6 .
Figure 6.System behavior for baseline vs. clutch-only MPC vs. full MPC for POI 4.

x L [k + 1 ]
= e A c T s x L [k] + A −1 c e A c T s − I (B c u L [k] + K) (A9)which gives (A9) as the exact solution of discretized (A4) with the system output asy L [k] = C c x L [k] + D c u L [k]. (A10)The discrete-time SSR matrices can be defined asA d = e A c T s , B d = A −1 c e A c T s − I B c , K = A −1 c e A c T s − I K, C d = C c, and D d = D c to write (A9) and (A10) in a compact form.Since we are in the discrete-time domain from here on, we can denote x L [k] as x k D and u L [k] as u k D .Hence, the discrete-time linearized SSR yields Appendix A.3.Quadratic Programming Problem Derivation C d x k D + D d u k D − r k e k+1 = C d x k+1 D + D d u k+1 D − r k+1 = C d A d x k D + C d B d u k D + C d K + D d u k+1 D − r k+1 e k+2 = C d x k+2 D + D d u k+2 D − r k+2 = C d A 2 d x k D + C d A d B d u k D + C d B d u k+1 D + C d A d K + C d K + D d u k+2 D − r k+2 . . .(A12)The error and control signals over the horizon, spanning n p time steps, can be denoted as → e ∈ R n p •n o and → u ∈ R n p •n u , respectively.Hence, once can write the system's behavior over the horizon as H, and E denote the output prediction matrices, while K represents the constant term from (A11).The vectors → the combined error, control input, and reference vectors for the horizon commencing at time k.The concise expression for (A13) would then be as follows →

u k− 1 .
= x l − U k and U u = x u − U k , U k = VP x x k D + VE x K + V H x → u k−1 , while u l = ∆ −1 u l − → u k−1 and u u = ∆ −1 u u −→ It is important to highlight that the constraints and bounds in (A22) can be either constant or time-varying.

Table 2 .
MPC performance comparison to baseline control's performance.

Table 3 .
Weighting parameters for MPC simulations.