1 Introduction

In recent years, electric vehicles have been increasingly adopted by public due to their superior energy efficiency and low or absent emissions. The presence of ample electric energy storage in hybrid and battery electric vehicles facilitates implementation of electrically-powered auxiliary drives for improved efficiency, flexibility and performance. This is of particular interest in automotive heating, ventilation and air-conditioning (HVAC) systems, where the use of variable-speed drives, such as those of compressor and fans, improves the overall performance. Moreover, modern electric vehicles are usually equipped with redundant HVAC actuators and multiple energy flows (Zhang et al. 2018), particularly when considering implementation of efficient heat pump systems in addition to air-conditioning (A/C) system (Drage et al. 2019). This all significantly extends the requirements on designing the HVAC energy management system.

The driving range of fully electric vehicles is heavily affected by heating and cooling loads. Zhang et al. (2015) report average reduction of driving range by up to 60% in cold weather and about 33% in extremely hot weather. Under these extreme weather conditions, the HVAC system can constitute up to 65% of secondary energy consumption, with the primary consumption coming from powertrain. Paffumi et al. (2019) investigated the influence of ambient temperature on driving range in laboratory conditions using WLTC driving cycle, and confirmed that at − 10 °C the range drops by 59% compared to the range obtained at + 23 °C. Thus, it is of great interest to achieve highest possible HVAC system efficiency, which would result in increased driving range, while maintaining high passenger thermal comfort. To fulfil these conflicting criteria, it is necessary to develop advanced control systems which optimally coordinate multiple actuators and energy storage units.

Setting a realistic and achievable benchmark is imperative from the perspective of complex control system design and verification. Such a benchmark can conveniently be obtained by off-line control trajectory optimisation (Rao 2014). The main advantage of dynamic programming method (DP) is finding globally optimal solution for the general case of a nonlinear, discontinuous and multi-variable system. However, the DP algorithm is rather computationally inefficient, and it can only be applied to systems with a low number of state and control variables. DP solutions have been used as control performance benchmarks in hybrid electric vehicles (Guzella and Sciaretta 2007) or extended range electric vehicles (Škugor et al. 2014). The aim is to find optimal response of control variables such as the engine or e-motor torques/speeds for minimising the fuel consumption at the end of prescribed driving cycle, while satisfying different hardware constraints including the boundary condition on final battery state-of-charge (SoC). Guermi et al. (2014) apply similar approach to a fuel cell-powered series hybrid electric vehicle, while Sinoquet et al. (2011) use DP to optimise e-motor/engine power split as a part of solving a powertrain component sizing optimisation problem. In the framework of HVAC systems, DP has been used in conventional vehicles’ A/C system optimisation (Zhang et al. 2016), where an A/C clutch command sequence is optimised to minimise fuel consumption for a given driving cycle. Similarly, Zhang and Canova (2016) apply DP for optimisation of energy management of A/C system that uses thermal energy storage in A/C system.

The cabin thermal comfort is usually controlled through cabin air temperature feedback control (Marshall et al. 2019). On the other hand, fuzzy-logic control of cabin thermal comfort (Farzaneh and Tootoonchi 2008) relies on the feedback information of simplified predicted mean vote (PMV), as an index that more comprehensively characterises the thermal comfort. It is demonstrated therein that both thermal comfort and energy efficiency can be improved when using the PMV feedback in comparison with cabin air temperature control. Yan et al. (2018) propose a multi-input/single-output proportional-integral (PI)-like controller that accounts for engine efficiency and a PMV-based thermal comfort criterion. It is shown therein that the fuel consumption can be reduced compared to conventional control algorithms for the same level of thermal comfort. A more advanced, optimal control system is presented in (Amini et al. 2019), which uses a model-predictive controller (MPC) for tracking the cabin air temperature reference by commanding the evaporator outlet air temperature and the blower fan air mass flow. However, MPC generally strongly relies on accurate prediction model and is computationally demanding because of applying on-line optimisation over the prediction horizon at each time step.

Once the control system structure is set up, the tuneable control parameters should be optimised for favourable performance. Genetic algorithm-based parameter optimisation is widely used in vehicle design, e.g. for vehicle suspension (Gobbi 2013) or automatic transmission control parameterisation (Ranogajec et al. 2019). HVAC control examples include (Zhang et al. 2017), where a multi-objective optimisation method is used for obtaining trade-off between the fuel consumption and the cabin cool-down time, and (Cvok et al. 2020) where a control allocation map is optimised.

This paper proposes a DP-based control trajectory optimisation method for an electric vehicle HVAC system, as well as a hierarchical/cascade control strategy that can approach the DP results. The contributions of the paper are threefold. First, the DP algorithm is aimed at optimising both thermal comfort and efficiency, where a simplified first-order cabin model and a static HVAC model are used to reduce the computational load. Secondly, a hierarchical control structure is proposed, where an instantaneous optimisation-based control allocation algorithm transforms the cooling/heating capacity commanded by the superimposed cabin air temperature controller to open-loop actions and references for inner HVAC control loops. Thirdly, combined tuning of optimal allocation cost function and superimposed cabin air temperature controller parameters is proposed, as it is recognized that both have impact on the DP-revealed trade-off between thermal comfort and efficiency. Although the presented case study is based on an A/C system model, the developed optimisation approach and particularly the hierarchical control strategy can also be applied to more complex HVAC systems, such as those utilised in advanced battery electric vehicles (Drage et al. 2019).

The remaining part of the paper is organized as follows. In support of optimisation and control strategy design studies presented, Sect. 2 outlines control-oriented HVAC and cabin models used, as well as PMV index mapping. The DP-based HVAC control trajectory optimisation is presented in Sect. 3. Design of hierarchical control system is described in Sect. 4. Section 5 presents control trajectory optimisation results and simulation-based verification of the control strategy for a cool-down scenario. Concluding remarks are given in Sect. 6.

2 HVAC and cabin modelling

Figure 1 depicts the passenger cabin thermal system connected to the conventional HVAC system considered to operate in A/C mode. A 12th-order control-oriented model of the HVAC system has been adopted from (Jensen and Tummescheit 2002) and described in detail in (Ratković et al. 2019). The model is based on moving-boundary method, which provides a good trade-off between model complexity and accuracy (Jensen and Tummescheit 2002), and has been experimentally validated against high-fidelity fixed volume models (Rasmussen and Shenoy 2012). Refrigerant properties used in the model are obtained using publicly available CoolProp tool (Bell et al. 2014), while other physical parameters such as component dimensions are estimated to represent typical vehicle A/C system. The main model variables and parameters are described in Nomenclature.

Fig. 1
figure 1

HVAC and cabin model schematic

Electric motor-powered compressor, electronic expansion valve, blower fan and condenser fan are considered as electric vehicle HVAC actuators. They typically have faster dynamics compared to the slower heat exchanger dynamics, which justifies modelling them as static elements (Rasmussen and Shenoy 2012). Therefore, the control inputs fed to the HVAC model are compressor speed ωcom, electronic expansion valve opening av, and blower and condenser fan air mass flows \(\dot{m}\)ea and \(\dot{m}\)ca, respectively. The model outputs include the evaporator outlet air temperature Tea,out (i.e. the cabin inlet air temperature), the superheat temperature ΔTSH, and the coefficient of performance (COP) defined as the ratio of evaporator air-side cooling power \(\dot{Q}\)ea and compressor power consumption Pcom, i.e. COP =  \(\dot{Q}\)ea/Pcom. The power consumptions of expansion valve, blower fan and condenser fan are not considered in COP calculation since the compressor is dominant power consumer in this system.

The considered passenger cabin model (Fayazbakhsh and Bahrami 2013) consists of two thermal masses: (1) the cabin air volume Vc with temperature Tc and (2) the cabin body elements with mass mb and temperature Tb. The modelled thermal loads include the constant metabolic load \(\dot{Q}\)met taken into account if the cabin air temperature is below 36 °C, the solar radiation load \(\dot{Q}\)sol, the ambient air convection heat transfer \(\dot{Q}\)ab over the outer body surface Aab characterised with a variable heat transfer coefficient αab(vveh), the HVAC thermal load \(\dot{Q}\)HVAC that takes into account the cabin air inlet and outlet, and the convection heat transfer from body elements to cabin air \(\dot{Q}\)cb over the inner body surface Acb with the heat transfer coefficient αcb.

The second-order cabin model based on the heat balance method reads (Fayazbakhsh and Bahrami 2013):

$$\begin{aligned} & c_{p,ac} \rho_{c} V_{c} \dot{T}_{c} = \underbrace {{\dot{m}_{ea} c_{p,ea} \left( {T_{ea,out} \left( {\omega_{com} } \right) - T_{c} } \right)}}_{{\dot{Q}_{HVAC} }} + \dot{Q}_{met} \left( {T_{c} } \right) + \underbrace {{\alpha_{cb} A_{cb} \left( {T_{b} - T_{c} } \right)}}_{{\dot{Q}_{cb} }} \\ & c_{p,b} m_{b} \dot{T}_{b} = - \underbrace {{\alpha_{cb} A_{cb} \left( {T_{b} - T_{c} } \right)}}_{{\dot{Q}_{cb} }} + \dot{Q}_{sol} + \underbrace {{\alpha_{ab} \left( {v_{veh} } \right)A_{ab} \left( {T_{b} - T_{a} } \right)}}_{{\dot{Q}_{ab} }} \\ \end{aligned}$$

where cp,ac is the cabin air specific heat capacity, cp,ea is the evaporator-side air specific heat capacity, ρc is the cabin air density and cp,b is the body specific heat capacity.

The model (1) may be simplified to a first-order model by assuming that the body temperature dynamic is slower than the cabin air temperature dynamic, which gives:

$$\begin{aligned} & k_{c} c_{p,ac} \rho_{c} V_{c} \dot{T}_{c} = \dot{Q}_{HVAC} + \dot{Q}_{met} (T_{c} ) + \dot{Q}_{sol} + \dot{Q}_{ab} \\ & T_{b} = T_{c} + \Delta T_{b} \le T_{b,{\max} } \\ \end{aligned}$$

where kc scales the cabin air temperature thermal inertia to properly match the second-order model dynamics and ΔTb is the constant air-to-body temperature offset used for “tuning” the steady state accuracy.

For the single-zone modelling assumption, the mean air velocity vair inside the cabin is set to be proportional to the blower fan air mass flow \(\dot{m}\)ea:

$$v_{air} = k_{v,ea} \dot{m}_{ea}$$

where kv,ea is expressed as the ratio of air density and cabin inlet vents cross-section area. Similarly, a linear relationship between the vehicle speed vveh and the condenser fan air mass flow \(\dot{m}\)ca is assumed:

$$\dot{m}_{ca} = k_{v,ca} v_{veh} + \dot{m}_{ca,R}$$

where kv,ca is constant coefficient, and \(\dot{m}\)ca,R is the condenser fan control input, set to zero herein.

The closed-loop dynamics of evaporator outlet air temperature control system built in the HVAC model is assumed to be by an order of magnitude faster than the cabin air temperature dynamics. Therefore, in order to enhance the computational efficiency of DP-based control trajectory optimisation, the overall HVAC model is in that case represented by static maps shown in Fig. 2 (Ratković et al. 2019). Here, the superheat temperature ΔTSH was fixed to its target value of 5 °C, based on the assumption that it was effectively controlled by the electronic expansion valve.

Fig. 2
figure 2

HVAC model static maps related to evaporator outlet air temperature (a) and efficiency defined by COP (b)

The cabin thermal comfort is evaluated through the Predicted Mean Vote (PMV) index, which is adjusted to take into account the cooling effect of increased air velocity (ANSI/ASHRAE Standard 55, Rev. 2017). A positive value of PMV means that the cabin environment is too hot, while a negative PMV indicates that it is too cold (Table 1). The zero PMV suggests ideal thermal comfort, while the comfortable range according to the aforementioned standard is defined as |PMV| < 0.5. The PMV takes into account six different parameters: air temperature Tair, air velocity vair, mean radiant temperature Tmr, air relative humidity RH, clothing insulation, and metabolic rate.

Table 1 Predicted mean vote value (PMV) and its corresponding category

In order to simplify the PMV calculation, it is assumed that: (1) the mean radiant temperature Tmr is equal to the mean air temperature inside the cabin Tc, (2) the driver is wearing summer clothes (the clothing thermal resistance is set to 0.5 clo), and (3) the metabolic rate is set to 1.5. This gives the PMV map shown in Fig. 3a, where black circles indicate the comfortable range, i.e. |PMV| < 0.5. An excerpt of PMV map related to constant relative humidity of 44% is shown in Fig. 3b, where the black solid lines denote the boundaries of comfort range (|PMV| < 0.5). This plot indicates that in the hot conditions, i.e. when PMV > 0, the same level of thermal comfort can be achieved for growing cabin air temperatures Tair if the air velocity vair is increased (and also if the humidity is reduced, Fig. 3a). Similarly, in the cold conditions, i.e. when PMV < 0, the thermal comfort can be preserved for falling cabin air temperature if the air velocity is decreased.

Fig. 3
figure 3

Predicted mean vote (PMV) map in dependence of three main inputs and with filled circles showing comfort range (|PMV| < 0.5) (a) and PMV map excerpt related to relative humidity RH = 44% with black lines denoting comfort range (b)

3 Control trajectory optimisation

The presented control trajectory optimisation is conducted by using a custom-designed algorithm based on the dynamic programming (DP) method (Bellman and Dreyfus 1962). The DP-based optimisation results in globally optimal solution, as it starts from the final time instant tf and calculates the optimal control inputs for all possible state variables backwards in time, while satisfying the process model.

In order to reduce the computational burden of DP optimisation, the cabin is described by the first-order model (2) with the state variable

$$x = T_{c} ,$$

the control input vector u is reduced to two main inputs

$${\mathbf{u}} = \left[ {\begin{array}{*{20}c} {\omega_{com} } & {\dot{m}_{ea} } \\ \end{array} } \right],$$

and the HVAC model is described by the static maps Tea,out = Tea,out(ωcom, \(\dot{m}\)ea, \(\dot{m}\)ca) and COP = COP(ωcom, \(\dot{m}\)ea, \(\dot{m}\)ca) shown in Fig. 2. The thermal comfort output PMV is obtained by using the map shown in Fig. 3a. Trilinear interpolation is applied when evaluating the maps in Figs. 2 and 3a. The expansion valve opening av is not contained in the control vector u, because the HVAC static maps have been obtained for the constant/target superheat temperature value. The condenser fan air mass flow \(\dot{m}\)ca represents a disturbance variable.

The control trajectory optimisation problem is to find the control vector u(k), which minimises the cost function

$$J = \Phi \left( {x\left( {t_{f} } \right)} \right) + \sum\limits_{k = 1}^{N} {F\left( {x\left( k \right),{\mathbf{u}}\left( k \right)} \right)}$$

at each discrete-time instant k and subject to a discrete-time counterpart of the plant dynamics model (2). The terminal condition function

$$\Phi \left( {x\left( {t_{f} } \right)} \right) = K_{tf} \left( {x_{R} \left( {t_{f} } \right) - x\left( {t_{f} } \right)} \right)^{2}$$

is set to provide that the cabin air temperature reference xR(tf) = TcR is achieved at the end of optimisation time horizon, which is ensured by applying a sufficiently high penalisation coefficient Ktf (set to 10,000, herein). The sub-integral function F(·) includes minimisation of thermal comfort criterion (PMV) and maximisation of efficiency (COP), alongside with penalisation of state-variable and control input constraint violations:

$$F\left( {x\left( k \right),{\mathbf{u}}\left( k \right)} \right) = K_{PMV} \left| {PMV\left( k \right)} \right| + K_{COP} COP(k)^{ - 1} + K_{lim} \left[ {H\left( {x\left( k \right) - x_{{\max} } } \right) + H\left( {x_{{\min} } - x\left( k \right)} \right)} \right]$$

where KPMV and KCOP are weighting coefficients that set the trade-off between thermal comfort and efficiency, Klim is constraint violation penalisation coefficient that should be sufficiently high (set to 1000, herein), and H(a) is the Heaviside function defined as H(a) = 0 for a < 0 and H(a) = 1 for a ≥ 0. The constraints are used to contain the state-variable in the target range defined by the scenario, e.g. 20–40 °C. Note that, alternatively, the HVAC system power consumption can be used instead of COP in the cost function (7).

4 Control strategy design

The control strategy proposed in this paper has a two-level hierarchical structure shown below in Fig. 6. Low-level feedback controllers ensure setpoint tracking and disturbance rejection for HVAC subsystem. The high-level control subsystem controls the cabin air temperature and allocates references for low-level controllers.

4.1 Low-level control system

The evaporator outlet air temperature, i.e. the cabin inlet air temperature Tea,out, is controlled in a feedback loop to provide accurate and high-bandwidth tracking of the reference set by the high-level control system. The superheat temperature ΔTSH is regulated with respect to fixed reference ΔTSH,R = 5 °C, where the main aim of the corresponding feedback controller is to suppress disturbance influence including the one imposed by the action of outlet temperature controller. The linearized input–output HVAC model is characterised by coupled dynamics, which is described in Fig. 4a by four transfer functions linking the control inputs ωcom and av to the controlled outputs Tea,out and ΔTSH:

$$\left[ {\begin{array}{*{20}c} {T_{ea,out} \left( s \right)} \\ {\Delta T_{SH} \left( s \right)} \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {G_{11} \left( s \right)} & {G_{12} \left( s \right)} \\ {G_{21} \left( s \right)} & {G_{22} \left( s \right)} \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {\omega_{com} \left( s \right)} \\ {a_{v} \left( s \right)} \\ \end{array} } \right]$$

It has been found that reasonably good control performance of superheat temperature regulation and evaporator setpoint tracking can be obtained for the given HVAC model by applying a simplified, decoupled control structure where only two main controllers Gc11(s) and Gc22(s) are used (Fig. 4a). The controllers are of proportional-integral (PI) type, and their parameters are tuned by using a search-algorithm optimisation procedure targeted to single-input single-output (SISO) linear system (Isermann 1981). The cost function to be minimised combines penalisation of closed-loop control error and control effort. Referring to the control structure shown in Fig. 4a, the cost functions for the two control loops are defined as:

$$\begin{aligned} {\min} \,J_{11} & = \frac{1}{1 + M}\sum\limits_{k = 0}^{M} {\left[ {\left( {T_{ea,out,R} - T_{ea,out} } \right)^{2} + r_{11} \left( {\omega_{com,R} - \omega_{com} } \right)^{2} } \right]} \\ {\min} \,J_{22} & = \frac{1}{1 + M}\sum\limits_{k = 0}^{M} {\left[ {\left( {\Delta T_{SH,R} - T_{SH} } \right)^{2} + r_{22} \left( {a_{v,R} - a_{v} } \right)^{2} } \right]} \\ \end{aligned}$$

where r11 and r22 are weighting coefficients which set the trade-off between control error suppression, i.e. performance, and control effort reduction, i.e. efficiency and relative stability. Since the linearized HVAC dynamics model parameters depend on the operating point, PI controller gain scheduling maps have been obtained by repeating the optimisation procedure for multiple operating points with fixed weighting coefficients r11 and r22. The analysis has showed that the most significant operating point parameters are the evaporator outlet air temperature Tea,out and the blower fan air mass flow \(\dot{m}\)ea, which results in two-dimensional scheduling maps for the controller proportional and integral gains. The final low-level control system structure is shown in Fig. 4b and it consists of two PI controllers with two pairs of gain-scheduling maps.

Fig. 4
figure 4

Block diagram of linearized HVAC system and corresponding controllers (solid lines) (where d denotes disturbance, e.g. varying air mass flow) (a), and block diagram of final low-level control system (b)

The low-level control system performance is illustrated in Fig. 5 for the full, 12-th order nonlinear process model, where blue lines denote the response of control system with fixed controller gains (tuned for Tea,out = 15 °C and mea = 0.05 kg/s), while green lines correspond to the control system with gain-scheduling applied. The evaporator air mass flow \(\dot{m}\)ea is kept at 0.075 kg/s, the superheat temperature reference is ΔTSH,R = 5 °C and the evaporator outlet air temperature reference with magnitude of ΔTea,out,R = 5 °C is applied at t = 1000 s. In comparison with the fixed-gain control system, the gain-scheduling control system achieves faster evaporator outlet air temperature response (Fig. 5a) and lower superheat temperature control error (Fig. 5b). The performance improvement is achieved by stronger compressor and expansion valve control efforts (Fig. 5c, d). Figure 5e, f show that optimal controller gains vary significantly, thus making the gain scheduling algorithm necessary to achieve optimal performance over a wide operating range.

Fig. 5
figure 5

Comparison of low-level control system performance for cases with and without using controller gain scheduling maps. (Color figure online)

It has been found that the closed-loop system performance can be further improved by taking into account the coupled dynamics of HVAC model, which are described in Fig. 4a by the cross-coupling transfer functions G12(s) and G21(s). In this case, the parameters of both PI controller were optimised simultaneously, with an option to include the cross-coupling controller terms/gains Gc12(s) and Gc21(s), as well (Fig. 4a). A multi-objective genetic algorithm was used as optimisation algorithm, because it allowed for overcoming the appearance of local optima and presenting the results in the form of Pareto frontier that enables the designer to select optimal solution based on his/her preference (Cvok et al. 2020). However, such procedure is more time consuming, especially when gain-scheduling is concerned.

4.2 High-level control system

In order to achieve favourable cabin thermal comfort while maintaining the maximum HVAC system efficiency, a supervisory high-level control system has been developed. According to the block diagram shown in Fig. 6, the high-level control system regulates the cabin air temperature Tc by commanding the cooling capacity \(\dot{Q}\)d. The cooling capacity \(\dot{Q}\)d is then transformed within a control allocation map to low-level controller inputs/references, which in this case include the evaporator outlet air temperature and air mass flow references Tea,out,R and \(\dot{m}\)ea,R, respectively, while in a more general case more inputs are possible, such as the condenser air mass flow \(\dot{m}\)ca,R. Using the cabin air temperature Tc and the cooling capacity demand \(\dot{Q}\)d as inputs to the control allocation map allows for omitting the cabin dynamics model when designing the control allocation map. This significantly facilitates allocation map generation, and, more importantly, makes the allocation map independent of cabin model and related disturbances (see Fig. 1).

Fig. 6
figure 6

Overall hierarchical control system structure including cabin air temperature controller, optimal control input allocation, and inner control loops

To achieve optimal system performance, it is crucial to base the design of control allocation map on optimisation (Johansen and Fossen 2013). For the specific HVAC system and design case, control allocation is based on instantaneous, on-line optimisation. A linear search-based method is applied starting from the minimum blower fan air mass flow setpoint and corresponding evaporator outlet air temperature as initial guesses. The on-line optimisation relies on PMV and COP maps, both of which are prepared off-line as functions of two inputs (Fig. 2). However, in more general case when using multiple control inputs (e.g. \(\dot{m}\)ca), the dimension of COP map grows, which can lead to poor computational efficiency when using a linear search or may result in local optima when a more advanced, directional search approach is applied. To overcome these weaknesses, an alternative, off-line optimisation approach based on a multi-objective genetic algorithm can be applied, as presented in Cvok et al. (2020). That approach results in control input maps as functions of cabin temperature and cooling capacity demand (Fig. 6), which could be fitted by analytical models/functions, to facilitate the control strategy implementation and calibration.

At the superimposed level, a fixed-gain PI-type cabin air temperature controller Gc,CAB(s) is used with an option to add a gain scheduling algorithm in more general case (Fig. 6). Since the cabin air temperature dynamics are slow, the cabin air temperature controller and the control allocation strategy can have higher sampling time than the low-level controllers (10 s vs. 0.1 s).

The optimal control allocation map is obtained by minimising the following cost function for a wide range of operating points (\(\dot{Q}\)d, Tc):

$$J_{c} = K_{PMV} \left| {PMV\left( {\dot{m}_{ea,R} ,T_{c} } \right)} \right| + K_{COP} \frac{1}{{COP\left( {\dot{m}_{ea,R} ,T_{ea,out,R} } \right)}}$$

where KPMV and KCOP are weighting coefficients that set the trade-off between the two conflicting criteria: thermal comfort (PMV) and efficiency (COP). The control variables Tea,out,R and \(\dot{m}\)ea,R, are subject to the following constraints:

$$\begin{aligned} & \dot{Q}_{d} = \dot{m}_{ea,R} c_{p,ea} \left( {T_{ea,out,R} - T_{c} } \right) \\ & \dot{m}_{ea,R,{\min} } \le \dot{m}_{ea,R} \le \dot{m}_{ea,R,{\max} } \\ & T_{ea,out,R,{\min} } \left( {\dot{m}_{ea,R} } \right) \le T_{ea,out,R} \le T_{ea,out,R,{\max} } \left( {\dot{m}_{ea,R} } \right) \\ \end{aligned}$$

5 Results

Control trajectory optimisation and, similarly, control system simulation analysis, have been carried out for a cool-down scenario at the constant vehicle velocity vveh = 40 km/h. The objective is to bring the cabin air temperature down from its initial value, which is equal to the ambient air temperature (Tc0 = Ta = 40 °C), to the final cabin air temperature of Tc,R = 26 °C in 10 min, i.e. tf = 600 s.

5.1 Control trajectory optimisation results

DP optimisation has been carried out by using the parameters listed in Table 2. The following optimisation cases have been considered: (1) thermal comfort-oriented PMV minimisation [KPMV = 1 and KCOP = 0 are set in the cost function (7)], (2) HVAC efficiency-oriented COP maximisation (KPMV = 0 and KCOP = 1), and (3) combined case of simultaneous PMV minimisation and COP maximisation (KPMV = 0.5 and KCOP = 1).

Table 2 Dynamic programming parameters

The results shown in Fig. 7 indicate that for the HVAC efficiency-oriented case (red line), the optimal control action maintains a modest cooling capacity. This is reflected in a relatively slow fall of cabin air temperature (Fig. 7a), relatively high evaporator outlet air temperature Tea,out (Fig. 7a), and correspondingly high evaporator air mass flow \(\dot{m}\)ea (Fig. 7c). Such control is beneficial for HVAC efficiency (Fig. 7f) as it enables the compressor to operate at low speeds (Fig. 7d), thus minimising its power consumption and maximising the COP. Note that the optimal behaviour for this case will change to some extent if the blower fan power consumption were accounted for in COP, as the power consumption typically grows with air mass flow increase.

Fig. 7
figure 7

Control trajectory optimisation results for three optimisation cases: PMV minimisation only (blue), COP maximisation only (red) and combined PMV minimisation and COP maximisation (green). (Color figure online)

For the case of PMV minimisation (blue line), the optimal control behaviour is to increase the compressor speed and also air mass flow (Fig. 7c, d) at the beginning of response, in order to lower the cabin inlet air temperature (Fig. 7a) and achieve high cooling capacity, thus bringing the thermal comfort criterion PMV (Fig. 7e) towards zero as fast as possible. This results in the lowest COP (Fig. 7f) until the thermal comfort has been achieved (PMV = 0, t ~ 200 s), while the COP increases afterwards since lower compressor speed and lower air mass flow are sufficient to maintain the PMV around zero.

In the combined cost function case (green line in Fig. 7), the optimal control action expectedly results in compromise between the previous two extreme cases related to efficiency and thermal comfort maximisation.

5.2 Control system simulation results

The control system simulation results shown in Fig. 8 have been obtained for the same sets of weighting coefficients KPMV and KCOP as used in Sect. 5.1, i.e. Figure 7, but now applied to the cost function (10) used in control allocation optimisation. In all these cost function settings, the same tuning of cabin air temperature PI controller is considered (KP = 125 and KI = 0.01).

Fig. 8
figure 8

Control system simulation results for cases of PMV minimisation (blue line), COP maximisation (red line) and combined cost function case (green line), and for the same cabin temperature controller in all cases. (Color figure online)

The cabin air temperature response shown in Fig. 8a (dashed lines) is very similar for all three cases due to the same PI controller used. However, the allocated control inputs, i.e. the evaporator outlet air temperature (Fig. 8a, solid lines) and the evaporator air mass flow (Fig. 8f), are dependent on the weighting coefficients KPMV and KCOP. For the case of COP maximisation (red line), the compressor speed (Fig. 8c) is kept low, which results in the highest efficiency (Fig. 8e, dashed lines). The low cabin air inlet temperature (Fig. 8a, solid lines) is set to meet the high cooling capacity demand set by superimposed controller. To achieve low cabin air inlet temperature at lower compressor speeds, the evaporator air mass flow (Fig. 8f) is kept relatively low. For the case of PMV minimisation (blue line) the thermal comfort (Fig. 8e, solid lines) is achieved at the fastest rate but this results in the lowest efficiency. The results of combined cost function case (green lines) fall between previous two extreme cases. Figure 8b, d show that the performance of superheat temperature control is satisfactory, and it could be further improved by applying more complex cross-coupling control.

Comparison of DP-optimised responses in Fig. 7 and the control system results in Fig. 8 indicates qualitative differences between the two solutions. This is especially pronounced in the COP maximisation case (red lines), in which the DP keeps the cooling capacity low to slowly bring the cabin air temperature to target value, whereas the superimposed controller commands relatively high cooling capacity and brings the cabin temperature to the target value faster. This is explained by the fixed parameters of superimposed cabin air temperature controller, i.e. same cabin air temperature (and cooling capacity demand) response for all allocation weighting coefficient settings. In order to bring the control system performance closer to DP results, the superimposed cabin air temperature controller bandwidth should be tuned in correlation with allocation cost function setting, i.e. the superimposed controller should be made slower for the COP maximisation case.

Figure 9 shows the comparative control system responses for three values of superimposed controller integral gains KI and the combined-criteria cost function (KPMV = 0.5, KCOP = 1). The cabin air temperature response (Fig. 9a, dashed lines) is faster for higher integral gain KI, which is connected with higher cooling capacity demand effort in that case (Fig. 9b). This results in faster thermal comfort achievement but deteriorates efficiency (see Fig. 9c and also Fig. 9d). The increased cooling capacity demand is optimally satisfied with lower evaporator outlet air mass flow (Fig. 9e), which enables lower evaporator air outlet temperature (Fig. 9a, solid lines).

Fig. 9
figure 9

Control system simulation results for different values of cabin temperature controller integral gains and combined PMV and COP penalization (KPMV = 0.5, KCOP = 1)

For the case of lowest KI (red line), the cabin air temperature response is slowest (Fig. 9a), and the cooling capacity demand effort is weakest (Fig. 9b). The weak cooling capacity demand is met by means of high evaporator air outlet temperature (Fig. 9a) and high blower fan air mass flow (Fig. 9e), which results in higher efficiency, but deteriorates the thermal comfort (Fig. 9c). Performance of moderate/nominal superimposed controller tuning (green line) falls between previous two tunings in terms of cost function indices (Fig. 9c) and control inputs (Fig. 9a–e). The overall control system behaviour is closer to the DP results (cf. Figs. 7, 9) than the previously considered case illustrated in Fig. 8.

Table 3 contains performance indices related to simulation results of cool-down scenario for various combinations of control allocation weighting coefficients and cabin air temperature controller tunings. The considered indices include the energy consumption Ecom = ∫Pcomdt and the following two thermal comfort criteria: (1) the cumulative absolute value of PMV, i.e. C1 = ∫|PMV|dt, and (2) the cumulative absolute value of those PMV values greater than a threshold (set to 0.22, herein), i.e. C2 = ∫|PMV|dt if |PMV| > 0.22. The criterion C2 is considered to be more suitable for transient evaluation as it allows the PMV to slightly deviate from the ideal value of zero in steady-state conditions.

Table 3 Cumulative energy efficiency and thermal comfort indices for cool-down scenario and different control strategy settings. (Color figure online)

The best overall performance in terms of efficiency is achieved in the case of slow superimposed cabin air temperature controller tuning and efficiency-oriented allocation cost. In this case the energy consumption is reduced by 25% compared to the selected nominal setting (blue line in Table 3). However, the best-efficiency setting results in the worst thermal comfort: the indices C1 and C2 are higher by 81% and 130% compared to the nominal setting. Keeping the slow superimposed controller tuning and changing the allocation cost towards the comfort-oriented case reduces the thermal comfort indices, but it in turn significantly increases the energy consumption. The best performance in terms of thermal comfort is achieved in the case of fast superimposed controller tuning and comfort-oriented allocation cost, where the comfort index C2 is 33% lower than in the nominal case, with only 13% more energy consumption. In the case of moderate controller tuning, the combined allocation cost appears to be a reasonable choice, as its performance falls approximately in the middle of those obtained for the two extreme cases.

6 Conclusion

A hierarchical thermal comfort control strategy, including an optimised HVAC control input allocation algorithm, has been developed and compared with globally optimal dynamic programming-based control trajectory optimisation results. The control strategy verification results are given for a cool-down scenario, and they show that it is possible to tune the strategy for a favourable trade-off between thermal comfort and HVAC efficiency, and achieve the behaviour that is comparable to the globally optimal solution. More specifically, along with tuning the allocation cost function weighting coefficients, the superimposed cabin air temperature controller bandwidth should be adjusted. For reducing the energy consumption, the superimposed controller should be made slower and the allocation should primarily be focused on efficiency, while for gaining the thermal comfort the superimposed controller should be tuned for fast response with the allocation adjusted for the combined comfort/efficiency setting.

Implementing the proposed control strategy in a fully electric vehicle would allow the designer to predetermine the trade-off between thermal comfort and efficiency depending on the driving conditions, or to allow the driver to adjust the trade-off based on his/her preference. A higher driving range would be achieved with slower superimposed controller and efficiency-oriented allocation at the expense of reduced thermal comfort. Therefore, such tuning may be reserved for range-critical scenarios, i.e. when the battery charge is not anticipated to be sufficient for given driving cycle. In extremely hot conditions or when pre-cooling the vehicle while being charged, the driver would opt for thermal comfort-oriented setting based on fast tuning of superimposed controller. Finally, a balanced efficiency/comfort tuning would be appropriate in most of the driving scenarios and a variety of ambient conditions.

The ongoing work includes extending the control trajectory optimisation tool with (1) additional state-variables to take into account slower HVAC dynamics that that may be characteristic for HVAC system architectures used in electric vehicles, and (2) additional control variables that may improve the system performance. Similarly, optimising the allocation maps taking into account additional HVAC control inputs and corresponding tuning of the superimposed controller deserves further research. Finally, a thorough multi-objective parameter optimisation of low-level controllers taking into account the coupled HVAC dynamics should be considered as a final refinement of the overall control strategy.