IMAC Team 2 - Improved Efficiency Final Report December 2006

Appendix H: Vehicle Algorithm Page 1 of 13 **Ap pendix IMA**  **C2 –**  **H: Vehicle A lgorithm**  **Control System Overview** The control algorithm was designed to maintain cabin comfort and optimize sy stem COP. While providing cabin comfort energy needs are reduced by controlling c ompressor capacity to a desired evaporator air temperature (EAT) , controlling the EXV to minimal superheat , and optimizing recirc ulation air use (reducing load ). Three operating regions were defined:
 First a pulldown region where the compressor is operated at full displacement to maxi mize capacity. The EXV is originally set to 8 °C superheat during the pulldown transient to minimize send ing liquid to the compressor. The make up air door is set to full recirculation of cabin air.
 The second region is a frost protection region in whi ch the compressor displacement is reduced to maintain an evaporator exit air temperature of 2 °C to avoid evaporator freeze up. The expansion valve is adjusted to 2 °C to provide optimal efficiency

during steady

conditions.
 The thi rd region is a comfort region where it is desired to c ontrol the evaporator air exit temperature to 2°C less than lowest th e target air outlet temperature. This a llows for maximum compressor displacement reduction while maintainin g occupant comfort as calculated by the automat ic control target air outlet temperature determined by the HVAC control head / microprocessor. It also prevents the vent outlet temperature from dipping below the target which eliminates the need for the vehicle computer to add reheat . S uperheat is contr olled to 2 °C for maximum COP during steady conditions . In this region , the recirculation door is controlled to maximize recirculation while still providing sufficient outside air for occupant safet y and comfort.IMAC Team 2 - Improved Efficiency Final Report December 2006

Appendix H: Vehicle Algorithm Page 2 of 13  A summary of control i nputs and outputs are shown below.

**Expansion Valve Control**  The expansion valve consists of a stepper motor which takes 680 steps to go from a full y open to fully

clo sed position. The valve is controlled using a designed driver circuit that controls each valve motor coil individually , software controls the four valve motor coils to open and close the valve at a rate of 80 steps per second . The valve s mechanical stop is at the full closed valve position. During an ignition off event, the valve is dri ven beyond fully

closed (to ensure it has hit its stop) and then returned to the normal startup position. The expansion valve operates in four stages shown in the plot below . The first is a startup stage where the valve is at a predefined start position. The second is a pull down and transient stage where the PID is set to maintain a superheat of 8°C. The transient operating stage is defined as the first 5 minutes of operation and any time where the superheat has varied more than 4 °C from the setpoint i n the last 30 seconds. The third is a stable region where the superheat is controlled to 2°C. The optimal superheat for capacit y and COP is 2°C as shown in the main body of this report. This is accomplished in the stable region. Oscillations in superhe at have been observed duri ng transient periods which can cause liquid to go to the compressor if the superheat setpoint were too low thus th e superheat is controlled to 8°C during pulldown and transient operation. The final stage is shutdown where the val ve returns to the predefined start point after being re - zeroed.IMAC Team 2 - Improved Efficiency Final Report December 2006

Appendix H: Vehicle Algorithm Page 3 of 13 The expansion valve is controlled by a PID controller where the desired superheat is determined based on the diagram above and the actual superheat is feed bac k to determine the error. The controller is linearized for the effect of high to low side pressure drop and the very

nonlinear behavior of the EXV. Max Open Start Pull down transient region

Max Close Stable - efficiency maximization

t1 t2 t3 Time Shutdown

Start Positi onIMAC Team 2 - Improved Efficiency Final Report December 2006

Appendix H: Vehicle Algorithm Page 4 of 13 **Compressor Control** The compressor is controlled using a PID controller. The displacement is contr olled based on a desired evaporator exit air temperature which is se t by at offset from the interior target air temperature which is determined by the vehicle chassis computer. The offset is set to 2 degrees below the lowest target air temperature which s hould result in temperatures approaching the targets while preventing the vehicle from adding reheat. A safet y switch has also been added to ramp down the compressor displacement if the discharge pressure exceeds the prescribed limit at any given speed. The control diagram is shown below.IMAC Team 2 - Improved Efficiency Final Report December 2006

Appendix H: Vehicle Algorithm Page 5 of 13IMAC Team 2 - Improved Efficiency Final Report December 2006

Appendix H: Vehicle Algorithm Page 6 of 13 **Recirculation Door Control** The recirculation door is controlled to allow the necessary outside air intake for occupant comfort and safet y. While maintaining safet y and comfort recirculation air is maximized to obtain the highest capacity and lowest compressor power as explained in the vehicle discussion (reference the main body of the report , vehicle section). One cycle i s shown below which has been programmed in , but the set - points are made to be easily c hanged based on the comfort and safet y guidelines of the manufacturer. The recirculation door control has been designed to set full recirculation during pull - down when maximum capacity is required , and then to allow the required outside air following the pull down period. 

### Re **ci rc**  **ulat ion door**  **position**

0. 0% 10. 0% 20. 0% 30. 0% 40. 0% 50. 0% 60. 0%

0 1000 2000 3000 4000 5000 **Time a**  **fte r**  **pul ldow**  **n ( s)** **D o** **o r** **p o** **s i** **t i** **o n** 

**Real Time Estimates of COP and Capacity** COP is estimated real time as is shown in the Simulink block diagram below. The following diagrams also show the capacity and compressor power calculations used in the COP calculation.IMAC Team 2 - Improved Efficiency Final Report December 2006

Appendix H: Vehicle Algorithm Page 7 of 13 The refrigerant mass flow and compressor power regression implementation are shown in the following Simulink diagram.IMAC Team 2 - Improved Efficiency Final Report December 2006

Appendix H: Vehicle Algorithm Page 8 of 13 The capacit y is then calculated in the following block diagram where the refrigerant mass flow rate is multiplied by the change in enthalpy across the evaporator. The enthalpies are determined from the measured refrigerant properties using pol ynomials fit over the range of operating conditions.IMAC Team 2 - Improved Efficiency Final Report December 2006

Appendix H: Vehicle Algorithm Page 9 of 13 **Software Model Implementation** The software mod el is divided into four layers: 1. the hardware input output (HWI O) lay er, 2. the software integration (SWIL) layer, 3. the application layer, and 4. the operating s ys tem (OS) lay er. The HWIO lay er is the lowest level in the s ys tem. It inclu des a digital output block, analog output block, digital input block, analog input block, and a CAN bus signals block shown below.IMAC Team 2 - Improved Efficiency Final Report December 2006

Appendix H: Vehicle Algorithm Page 10 of 13 The analog and digital variables are then sent to the software integration layer which comprises general service utilit ies. This lay er contains blocks to condition the analog and digital inputs to convert the variables to engineering units. In addition this layer has an AC calculations block in which the mass flow and compressor power regressions are implemented and man y other A/C sy stem calculations are performed. The SWIL also converts output signals from engineering units to voltages, checks for sensor faults, and contains the EXV stepper motor driver. The main blocks are shown below.IMAC Team 2 - Improved Efficiency Final Report December 2006

Appendix H: Vehicle Algorithm Page 11 of 13IMAC Team 2 - Improved Efficiency Final Report December 2006

Appendix H: Vehicle Algorithm Page 12 of 13 The application laye r is the highest level of the s ystem. It includes estimate and management of COP, management of the compressor control, and initialization and management of the EXV control. The main blocks are shown below.IMAC Team 2 - Improved Efficiency Final Report December 2006

Appendix H: Vehicle Algorithm Page 13 of 13 The operating s ys tem layer performs startup and shutdown tasks for all controllers at ignition on and ignition off. The Simulink program containing all layers and sy stem calculations is compiled and used in the DSpace Control Desk to control the A/C system. It is also flashed to the Micro Aut obox to control the A/C sy stem when the DSpace Control Desk is not being used.