Preview only show first 10 pages with watermark. For full document please download

A Model Of The Air Temperature In A Truck Cabin

   EMBED


Share

Transcript

A Model of the Air Temperature in a Truck Cabin MATTIAS BJÖRKLUND Master's Degree Project Stockholm, Sweden 2004 IR-RT-EX-0426 Abstract This thesis project was carried out at Scania in S¨ odert¨alje. The aim was to develop a model for the air temperature in a truck cabin. The model should simulate the truck temperature as it would have been measured by the Automatic Climate Controller’s (ACC’s) temperature sensor. Apart from the actual cabin temperature model, models for the heater and cooler systems also had to be developed. The model was developed in Simulink and is intended to be used in real-time ”hardware-inloop” simulations at Scania’s integration laboratory. For that purpose, simplicity of the model is given priority over high accuracy. Both black- and white-box techniques to model the cabin air temperature where developed and evaluated. Both techniques resulted in a model with acceptable performance. The main problem with the white-box model was a non-symmetry in the cabin temperature dynamics. This problem was solved by using variable parameters in the white-box model. The results of this thesis project shows possible approaches to do more accurate models of the cabin air temperature. The white-box model, in particular, is suitable to enhance in order to improve the performance. Acknowledgements This master thesis project was the last part in my Master of Science education in Engineering Physics. There have been many people who in one way or another have helped me during this thesis project. I would specially like to thank my advisor at Scania, Emil Axelson and my advisor at KTH, Assoc. Prof. Elling W. Jacobsen. I would also like to thank the people at RESA on Scania for all the help during this time. I would also like to thank my family and friends “back home” for the support during my time at KTH. Special thanks to Entomed. To my mother and father - you will always be in my heart. Stockholm, November 2004 Mattias Bj¨ orklund i Notations All units in this thesis are SI-units, except for temperature which is in units of Celsius. A cp cp,air cp,cwt m mcab m ˙ m ˙ ATA m ˙ cwt m ˙ HVAC Q Qspec Q˙ t T TAC TATA Tcab Tcwt,c Tcwt,i Tcwt,o Teng Tmix Tout Twalls v σ σcab σin σout σeng λ ρ Area Isobaric heat capacity Isobaric heat capacity for air Heat capacity for the cooling water Mass Cabin air mass Mass flow Air (mass) flow through the ATA Cooling water (mass) flow Air (mass) flow through the HVAC-system Heat Specific heat Heat flow (power) Time Temperature Air temperature directly after the evaporator in the HVAC-system Air temperature from the ATA Cabin air temperature Cooling water temperature out from the heat exchanger Cooling water temperature in to the WTA Cooling water temperature out from the WTA and/or in to the heat exchanger Engine compartment temperature Mixed air temperature - air temperature directly after the heat exchanger in the HVAC-system Outside air temperature Temperature of cabin walls Vehicle speed Heat transfer coefficient Heat transfer coefficient through the cabin walls Heat transfer coefficient from the outside air to the cabin walls Heat transfer coefficient from the cabin air to the cabin walls Heat transfer coefficient from the engine compartment to the cabin Heat conductivity coefficient (thermal conductivity) Density All time derivatives in this thesis are noted by a dot. For example, the time derivative of the heat ˙ Q - the heat transfer - is noted as Q. Abbreviations AC ATA ACC CAN cwt ECU HVAC SITB WTA Air Conditioner Air To Air heater Automatic Climate Control Controller Area Network Cooling water Electronic Control Unit Heater Ventilation Air Condition System Identification Toolbox Water To Air heater ii Contents 1 Introduction 1 1.1 Background and Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Previous Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.3 Delimitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.4 Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.5 Readers Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 Description of the Air Heating and Cooling System in a Truck 3 2.1 Water to Air Heater (WTA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2 Air to Air Heater (ATA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.3 The Ventilation System (HVAC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.3.1 The Air Conditioning (AC) system . . . . . . . . . . . . . . . . . . . . . . . 4 2.3.2 The Heat Exchanger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3 Theory 3.1 3.2 3.3 6 Thermodynamics and Heat Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.1.1 Thermodynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.1.2 Heat Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.1.3 Conduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.1.4 Convection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1.5 Radiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.1.6 Composite Heat Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.1.7 Heat Exchangers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.1.8 Specific Power for a Heat Exchanger . . . . . . . . . . . . . . . . . . . . . . 10 Systems Theory and Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2.1 Dynamic Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2.2 Transfer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2.3 State Space Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2.4 Poles and Zeros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.5 Physical (White-Box) Modelling . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.6 Black-Box Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2.7 Grey-Box Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2.8 Continuous and Discrete Time Systems . . . . . . . . . . . . . . . . . . . . 14 3.2.9 Disturbances and Disturbance Models . . . . . . . . . . . . . . . . . . . . . 14 Model Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.3.1 The RMS-value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.3.2 Residual Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 iii 4 Models 4.1 16 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.1.1 Disturbances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 The HVAC Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.2.1 Modelling the AC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.2.2 Modelling the Heat Exchanger . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.2.3 Modelling the WTA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.3 The ATA Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.4 Black-Box Modelling of the Cabin Temperature . . . . . . . . . . . . . . . . . . . . 21 4.4.1 Poles for the Generated Models . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.4.2 Using a Bias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.4.3 The ATA-model and the Black-Box Model . . . . . . . . . . . . . . . . . . . 22 White-Box Modelling of the Cabin Temperature . . . . . . . . . . . . . . . . . . . 23 4.5.1 Heat Flow through the Cabin Walls . . . . . . . . . . . . . . . . . . . . . . 24 4.5.2 Heat Stored in the Cabin Walls . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.5.3 Heat From the Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.5.4 Sun Radiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.5.5 The Heat Stored in the Cabin Air . . . . . . . . . . . . . . . . . . . . . . . 26 4.5.6 Problems Caused by the Temperature Distribution . . . . . . . . . . . . . . 26 4.5.7 Estimation of Unknown Parameters . . . . . . . . . . . . . . . . . . . . . . 27 4.2 4.5 5 Validation and Performance of the Model 5.1 5.2 5.3 5.4 29 Validation of the ATA-model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.1.1 Validating the ATA-model with the Black-Box Cabin Model . . . . . . . . . 29 5.1.2 Validating the ATA-model with the White-Box Cabin Model . . . . . . . . 30 5.1.3 Comments on the ATA-Simulations . . . . . . . . . . . . . . . . . . . . . . 30 Validation of the HVAC-models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.2.1 The Heat Exchanger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.2.2 The AC-system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 5.2.3 Validation of the WTA-model . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Validation of the Cabin Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 5.3.1 The Black-Box Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.3.2 The White-Box Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 A Validation of the Complete Model . . . . . . . . . . . . . . . . . . . . . . . . . . 34 iv 6 Discussion and Conclusions 40 6.1 Performance of the ATA-model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.2 Performance of the HVAC-model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.2.1 The Heat Exchanger Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.2.2 The AC-model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.2.3 The WTA-model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Performance of the Cabin Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.3.1 The Black-Box Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.3.2 The White-Box Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 6.4 Achieved the goal? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 6.5 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 6.5.1 Future Work on the HVAC-model . . . . . . . . . . . . . . . . . . . . . . . 41 6.5.2 Future Work on the ATA-model . . . . . . . . . . . . . . . . . . . . . . . . 42 6.5.3 Future Work on the WTA-model . . . . . . . . . . . . . . . . . . . . . . . . 42 6.5.4 Future Work on the Cabin Temperature Model . . . . . . . . . . . . . . . . 42 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 6.3 6.6 Appendices A-1 A Inputs and Outputs in the Model A-1 A.1 The “toplevel” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1 A.2 Input- and output-blocks in “toplevel” . . . . . . . . . . . . . . . . . . . . . . . . . A-1 A.3 Description of the input signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1 A.4 Description of the output signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2 B Simulink Blocks B-1 C Parameters Used in the Model C-1 C.1 Physical Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-1 C.1.1 Parameters in the AC-model . . . . . . . . . . . . . . . . . . . . . . . . . . C-1 C.1.2 Parameters in the White-Box Cabin Model . . . . . . . . . . . . . . . . . . C-1 D Details of the Measurement Data Used ‰ data” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The “0 ‰ data” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1 D.1 The “-20 D-1 D.2 D-1 D.3 AC test data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1 v List of Figures 2.1 Overview of the heating and cooling system in a truck . . . . . . . . . . . . . . . . 3 2.2 Basic diagram over the HVAC-system . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.1 The first law of thermodynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.2 Heat flow through a wall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.3 A system with input u, output y and disturbance e. . . . . . . . . . . . . . . . . . 10 4.1 The general structure of the model . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.2 The AC-model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.3 The specific power Qspec for a heat exchanger. . . . . . . . . . . . . . . . . . . . . 19 4.4 The heat exchanger model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.5 The WTA-model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.6 The ATA-model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.7 Poles for the two black-box models . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.8 Zeros for the two black-box models . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.9 Simulation of the cabin temperature at 0 . . . . . . . . . 24 4.10 Plot of the heat conduction coefficient σeng . . . . . . . . . . . . . . . . . . . . . . 27 5.1 Simulation with the ATA-model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.2 Simulation with the ATA-model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.3 Simulation of the temperature after the heat exchanger at 0 31 ‰ ambient temperature. ‰ ambient . . . . . . 5.6 ‰ ambient temperature . . . . . . . Simulation of the temperature after the heat exchanger at -20 ‰ ambient . . . . . Model error of the mixed air-simulation with -20 ‰ ambient temperature . . . . . . 5.7 Simulation of the AC and the model error . . . . . . . . . . . . . . . . . . . . . . . 35 5.8 Cabin temperature simulation and the model error with the black-box model and -20 ambient temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Cabin temperature simulation and the model error with the black-box model and 0 ambient temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 5.10 Step responses in the black-box cabin temperature model . . . . . . . . . . . . . . 37 5.11 Simulation of the cabin temperature at 0 37 5.4 5.5 5.9 Model error of the mixed air-simulation with 0 ‰ ‰ ‰ ambient temperature. . . . . . . . . . 5.12 Simulation of the cabin temperature at -20 ‰ ambient temperature. . . . . . . . . 5.13 Simulation of the cabin temperature at 0 ‰ ambient temperature. . . . . . . . . . 5.14 Simulation of the cabin temperature at 0 ‰ ambient temperature using the “com- plete” model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 33 34 38 38 39 B.1 The top-level block for the complete model . . . . . . . . . . . . . . . . . . . . . . B-2 B.2 The HVAC-model block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3 B.3 The AC-model block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-4 B.4 The “evaporator temperature to air temperature”-model block . . . . . . . . . . . B-5 vi B.5 The heat exchanger model block . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-6 B.6 The ATA model block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-7 B.7 The WTA model block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-8 B.8 Block for cooling water temperature after WTA . . . . . . . . . . . . . . . . . . . . B-9 B.9 The cabin model box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-10 B.10 Calculation block for parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-11 vii viii 1 Introduction 1.1 Background and Purpose The next generation of Scania trucks contains up to 25 control units (ECU:s). These are connected together via a CAN-network. For example, there are control units for the engine, the gearbox, the break system and the automatic climate control system. The functionality of the control units when they are connected together are tested in an integration laboratory. A dynamic model reads the CAN-network and generates appropriate signals to the different ECU:s. At this point there are only a few signals generated by the model. The other signals are generated by various hardwares that are built specially for each ECU. Scania are currently building a new laboratory that will enable automatic integration tests. In this lab, most of the signals will be generated by dynamic models and circuit boards. There is currently no complete dynamic model to generate signals for the automatic climate control system (ACC). The purpose with this thesis is to develop a dynamic model that will generate appropriate signals to the ACC depending on the control output from the ACC and other systems. That is, we want to “dry run” the ACC. The main task is to model the temperate in the truck cabin and how it depends of factors such as auxiliary heaters, sun intensity, et cetera. The air temperature depends on the heat flow from the heating and cooling system (the HVACsystem) and auxiliary heaters. No complete models for these heaters and coolers were available. A major task in this thesis project was therefore to model the heating and cooling system in a truck. 1.2 Previous Works In a previous thesis work on Scania, Andersson [1] tried to model the temperature in the truck by setting up a complete model over the heat transfers through the different parts of the cabin walls and so on. This white box approach proved to get difficult to work well. The approach in this thesis is to model the temperature with as few as possible equations. For example, we can try to use only one heat transfer equation and then try to determine the coefficient in this equation from measurements of the cabin temperature. There is also a thesis work by Hammarlund et al [2], where the climate in a passenger car was modelled. This was done as a black-box modelling using System Identification Toolbox [10]. Eriksson [3] developed a model of the evaporator temperature in the AC-system. A significant part of that model will be used in this thesis project. 1.3 Delimitations One can spend an infinite amount of time trying to model the temperature in a truck cabin. The aim of this thesis work is to develop a model sufficiently good for integration testouts.1 Because of that there are some things that we not will consider: ˆ There are some different types of engines and cabins. Since there is a lack of available measurement to use in system identification, we have to limit the number of models to, perhaps, one general model. The aim is to show a fairly straight forward procedure to adapt the parameters to other types of engines and cabins. 1 The definition of “sufficiently good” in this context is a little vague, but it would require a thesis of its own to define it... 1 ˆ We will only consider the major contributions to the heat in the cabin. Factors such as heat generated by people in the cab, et cetera, will not be considered. ˆ The system identification and the model validation will rely on existing measurements. There was no time in this thesis project to do new experiments in the climate chamber Some work was also done with implementation of the model into the existing integration laboratory at Scania. 1.4 Sources The main sources for the heat transfer part in the theory section was Holman [4] and Pierre [5]. Other sources that are used are referred to in the text. 1.5 Readers Guide Chapter 2 gives an overview of how a Scania truck cabin is constructed from a “heat transfer point of view”. Chapter 3 gives a brief introduction of the different theories that applies to this thesis project. In chapter 4 the actual modelling work is presented. Chapter 5 discusses the validation of the different models that are developed in the thesis. The overall results of the thesis work and a discussion over these results are presented in chapter 6. Appendix A gives a more detailed description of the different inputs and outputs in the Simulinkmodel. This description is intended for the people who are going to use and maintain the model. Appendix B contains figures over the most important Simulink-blocks in the model. Appendix C contains the physical parameters and other constants used in the simulations. Appendix D gives a more detailed description over the measurement data used for modelling and validation in this thesis project. 2 2 Description of the Air Heating and Cooling System in a Truck This chapter gives a description of the different types of heaters and coolers that are used in a Scania truck. Air from cabin Heated air to cabin Depending of the configuration of the truck, we can have different heaters in the cabin. A truck can be equipped with auxiliary heaters, such as the Water to Air heater or the Air to Air heater. Those auxiliary heaters are intended to be used at long stops, such as overnight stops, when the driver wants to keep the temperature in the cabin at a comfortable level. We also have the “ordinary” heating system, the HVAC-system, which itself can consist of a heater and possibly a cooler (the AC-system). See figure 2.1 for a overview. Ventilated air HVAC−system Cooling water after WTA Truck cabin Mixed air to cabin Air after AC Outside or recirculated air WTA AC Heat exchanger Recirculated air Cooling water from engine ATA Cooling water after heat exchanger Recirculated air Figure 2.1: Overview of the heating and cooling system in a truck 2.1 Water to Air Heater (WTA) The WTA is a device that uses diesel to heat the engine’s cooling water. Depending of its temperature the cooling water are pumped in a short or a long circulation. At low water temperatures it flows in the short circulation, which includes the WTA and the HVAC-system. At higher temperatures the water flows in the long circulations, which apart from the short circulation also includes the engine. This means that the engine is already warm at startup, which reduces emissions and wear on the engine. Since the WTA heats the cooling water the heating of the cabin works in the same way as it would 3 if the engine were running. The WTA only controls the temperature of the cooling water. The cabin temperature is controlled by the ACC. 2.2 Air to Air Heater (ATA) The ATA works in a similar fashion as the WTA but it heats air instead of the cooling water. A fan forces air from the cabin through the ATA, where it gets heated, and then it is led back to the cabin. Contrary to the WTA, the ATA does control the cabin temperature. Because of this the ACC control of the cabin temperature is disengaged when the ATA is running. There is only either a WTA or an ATA (or none) installed in a truck. Never both at the same time. 2.3 The Ventilation System (HVAC) Air from the outside is passed from the front of the truck, through an evaporator and then through a heat exchanger (see the following sections for a description). The airflow can be induced by the vehicle’s speed, but it can also be forced by a fan. It is also possible to recirculate the cabin’s air. In that case air from the cabin, rather than air from the outside, is passed through the HVAC system. This is used to reduce the heat-up time of the cabin air at cold days. See figure 2.2 for a diagram over the HVAC-system. Refrigerant Cooling water from the engine Ventilated or recirculated air Outside or recirculated air AC Heat evaporator exchanger Cabin Refrigerant Cooling water returning to the engine Figure 2.2: Basic diagram over the HVAC-system 2.3.1 The Air Conditioning (AC) system The principles of the AC-system is basically the same as for an ordinary refrigerator. Low pressure and temperature refrigerant enters the evaporator where it evaporates as a consequence of the warmer air that passes through the evaporator. The heat needed for the evaporation is taken from the air, which therefore is cooled down. 4 The AC-system is mainly used to cool down the air during hot days before it enters the cabin. It can also be used to dry the air when needed. The air is first cooled down by the evaporator. Since cool air cannot contain as much water as warmer air, water condenses on the evaporator and the air is hence getting dryer. The air is then heated up again by the heat exchanger. 2.3.2 The Heat Exchanger Heated cooling water from the engine is passed through the circuit of the heat exchanger. The cooling water can also be heated by the WTA, as discussed in section 2.1. Fresh or recirculated air is passed through the flanges of the heat exchanger where it gets heated. The air is then passed out to the cabin. The cooling water temperature in to the heat exchanger is intended to be at a constant level at about 70 to 80 when the engine is warm and running. The power of the heat exchanger is controlled by the cooling water flow through the heat exchanger. The cooling water flow in its turn is controlled by a water valve. ‰ ‰ 5 3 Theory The intention with this chapter is to give the reader a brief overview of the theories that this thesis is based on. Section 3.1 gives a brief overview of the concept of heat transfer and heat flow. Most of the things covered here should be known for those who are familiar with basic thermodynamics. However, one thing that is not usually covered in basic thermodynamics is the specific power for a heat exchanger. Read more about this in section 3.1.8 on page 10. Section 3.2 gives brief overview of systems theory and model building. 3.1 3.1.1 Thermodynamics and Heat Transfer Thermodynamics What is “heat”? “By ’heat’ we mean the energy exchange between systems caused by a difference in temperature” [6]. This means that a system never can contain heat. Heat is not a state of a system. The only thing we can determine is heat flow, which is when heat flows from one system to another. From this it follows that two connected systems will exchange energy with each other until their temperatures are equal. What will happen when we, in some way, increase the temperature of a system? The internal energy (which in some sense the temperature is a measure of) of that system will increase, but the system will possible perform a work depending on the conditions. That follows from the first law of thermodynamics, which defines the internal energy E of a system to be the difference of the heat transfer Q into the system and the work W done by the system. That is E2 − E1 = Q − W . (3.1) The work W can for example be the work needed to do an isobaric expansion of a gas. A common example is if we heat a gas confined in a cylinder (see figure 3.1 on the facing page), that heat will then increase the internal energy of the gas. It will also perform a work against the surrounding gas. Since the gas is free to expand, it will be kept at a constant pressure. Heat capacity. One of the interesting things to know in this thesis project is how much the temperature of a substance (for example air) increases when we add a certain amount of energy. Since we know the specific heat capacity c for that substance, and we also know the amount of energy we add to the system, we can calculate the increase in temperature.1 This is due to that the specific heat capacity c is defined as E = cm∆T , (3.2) where E is the added energy, ∆T is the change in the temperature in the substance, m is the mass of the substance and c is the heat capacity. Isobaric and isochoric heat capacity. One differs between the isobaric heat capacity cp and the isochoric cv heat capacity. As we saw earlier, heat (energy) added to a system can cause the system to do a work on something. The isobaric heat capacity of a substance is the heat capacity when the substance’s pressure is free to remain constant. On the other hand, the isochoric heat capacity is the heat capacity when the substance’s volume is kept constant. 1 The convention used here is that a positive sign on the heat, is heat that flows to the system. 6 Pambient Pambient Pambient=Pinternal,1=Pinternal,2 Heat added Q Pinternal,1 Pinternal,2 V1, T1, m V2, T2, m Figure 3.1: Sketch over the first law of thermodynamics. When heat is added to the system, the gas expands and hence perform a work, aside from that the internal energy increases. Latent and sensible heat. In some cases we have to differ between latent heat and sensible heat. Sensible heat is heat that causes the temperature of a system to change. However, during phase-transitions the heat flowing from or to a system will not cause the temperature of that system to change. For example - if we boil water, we have to add a certain amount of heat just to boil off the water. This heat are called latent heat and will not increase the temperature of the water/steam. 3.1.2 Heat Transfer Dynamic systems. The science of heat transfer is a supplement to the thermodynamics. Thermodynamics deals with systems in equilibrium and we can therefore not use it to model dynamic systems. To model how the heat in a system varies over time, we have to use the results from the heat transfer science. There are three types of heat transfer: conduction, convection and radiation. There will only be a brief discussion of those four types in this thesis. For a more comprehensive discussion about the heat transfer theory, cf. Holman [4] and Pierre [5]. 3.1.3 Conduction Biot (1804) and Fourier (1822) came up with the equation describing the fundamentals for heat transfer in a material. In the one-dimensional case the heat flow Q˙ through a wall with area A is ∂T Q˙ = −λA , ∂x (3.3) where λ is the thermal conductivity. This equation is called Fourier’s law of heat conduction. If we assume that there are no heat sources or sinks in the material, Q˙ has to be equal through the whole wall. If we assume λ to be constant in the wall material and the wall face temperatures to be T1 and T2 we get T1 − T 2 Q˙ = λA . x1 − x2 7 (3.4) Figure 3.2 shows a sketch over the one-dimensional heat flow. T2 T1 Q Q A x2 x1 Figure 3.2: A sketch over a one-dimensional through a wall with area A and wall-face temperatures T1 and T2 . If we have a multi-layer wall, as in the case with the walls in a truck cabin, Q˙ must still be the same in all part of the wall. For a three layer wall that is T1 − T2 T2 − T3 T3 − T4 Q˙ = λA A = λB A = λC A . ∆xA ∆xB ∆xC (3.5) ˙ and we then get We can solve (3.5) for Q, Q˙ = A T 1 − T4 . ∆xA /λA + ∆xB /λB + ∆xC /λC (3.6) What it essential here is that the heat flow is proportional to the wall face temperatures. It will not introduce a non-linearity. For the purposes in this thesis project, we need to know the thermal conductivity in the layers and the thickness of the layers. It is also possible to estimate the denominator in (3.6) by measurements of the heat flow. 3.1.4 Convection When heat is transported away due to, for example, air flowing pass a surface we call it convection heat transfer. It is easy to realize that the theory of convection heat transfer is all but trivial. We have factors such as the orientation of the surface, the viscosity of the flowing media, the velocity of the flowing media and many other things which influence the rate of heat transfer. To keep things simple we will only consider Newton’s law of cooling (1701) Q˙ = αA(Tw − T∞ ) , (3.7) where Tw is the surface temperature of the wall and T∞ is the media’s temperature. The quantity α is called the convection heat-transfer coefficient. This quantity is dependent on a large number of factors. For example, we intuitively know that the convection heat transfer depends on such things as the speed of the flowing media, the type of media (water, air, etc.) and so on. Equation (3.7) is in fact the defining equation for α.The quantity α can be determined analytically, but it is normally determined experimentally. 8 3.1.5 Radiation From Stefan-Boltzmann’s law (1879; 1884) we have the thermal radiation from a blackbody Φ = σAT 4 , (3.8) where Φ is the total radiation energy emitted per unit time, and T is the temperature in Kelvin. This equation is valid for emitted radiation from a blackbody. We note that the net exchange between two blackbodies is proportional to the absolute temperatures to the fourth power, Φnet ∝ σA(T14 − T24 ) . (3.9) This expression is still only valid for blackbodies. Other types of surfaces do not radiate as much energy as a blackbody, but they generally follow the T 4 proportionality. However, to analyze the heat exchange for real bodies we also have to consider things such as shape factor, et cetera. It is beyond the scope of this thesis project to do a thorough analysis of this kind of heat transfer. What is interesting is that the heat transfer is close to proportional to the fourth power of the absolute temperatures. 3.1.6 Composite Heat Transfer The heat transfer in real systems is a composite of all types of heat transfer. For example - we might have a heat transfer by convection from the air inside a truck cabin to the wall, then a heat conduction through the wall and one for heat transfer by convection from the outside of the wall to the outside air. We also have a heat radiation from the walls in the cabin to the ambient. The composite heat transfer has the following components Q˙ tot = Q˙ c,i + Q˙ r,i + Q˙ con,i + Q˙ c,o + Q˙ r,o , (3.10) where Q˙ c,i and Q˙ c,o are the heat transfer due to convection on the cabin’s inside and outside wall respectively. Q˙ r,i is the net radiation heat flow between the inside cabin air and the cabin wall. Q˙ r,o is the same for the outside air and the cabin wall. Finally, Q˙ con,i is the heat transfer by conduction in the cabin’s wall.2 In this thesis project the heat transfer by radiation was neglected. That is Q˙ r,i = Q˙ r,o = 0. If we replace the expressions for the different modes of heat flow, except for heat transfer by radiation, in (3.10) with the full expressions for the respective heat flows, as we have derived in the previous sections, we get Q˙ tot = σ (Tcab − Tout ) , (3.11) where σ is the heat-transfer coefficient. Equation (3.11) is the expression for heat transfer that was commonly used in this thesis project. 3.1.7 Heat Exchangers To express a heat exchanger in a mathematical way, i.e. to give a physical description of it is not easy. The amount of heat exchanged between the medias depends of many things, such as the material used in the heat exchanger, the area of the heat exchanger and so on. We will not go into details here. See Holman [4] for details. 2 The wall of the cabin is build of different layers of materials, so this is in some sense a composite heat flow too. 9 The heat flow from a heat exchanger can be expressed as Q˙ = U A∆Tm , (3.12) where U A are a material parameter and ∆Tm is the logarithmic mean temperature. The logarithmic mean temperature is (Th2 − Tc2 ) − (Th1 − Tc1 ) ∆Tm = , (3.13) ln [(Th2 − Tc2 ) / (Th1 − Tc1 )] where Th1 and Th2 is the temperature of the cooling water flowing in and out from the heat exchanger respectively. Tc1 and Tc2 is the temperature of the air before and after the heat exchanger. Without going any further, we can see that we might have a problem here. We want to use this expression to calculate the air temperature after the heat exchanger, but we have (at least) two unknowns in this expression - Q˙ and Tc2 . A more easy way is to use the specific power for a heat exchanger. 3.1.8 Specific Power for a Heat Exchanger As seen in the previous section, it is hard to do a physical model of a heat exchanger unless we know all of the material parameters. Even if we know the parameters, we still have two unknowns in the expression for the heat flow. It is better to use empirical data over the heat exchanger. Using the specific power of a heat exchanger is such a way. The specific power is basically the power generated by a heat exchanger normalized with differential of the inlet temperatures of the medias in the heat exchanger (in this case the inlet air temperature and the cooling water temperature). That is Qspec = Q . Tcwt,in − Tair,in (3.14) Figure 4.3 on page 19 shows an example of the specific power as a function of cooling water flow and air flow. 3.2 3.2.1 Systems Theory and Models Dynamic Models By models we mean something that describes the relationship between different measured signals. We differ between input signals and output signals. The output signals are partially determined by the input signals. The output signals can also be affected by signals we cannot measure, disturbance signals. Moreover, those signals are all functions of time. Figure 3.3 shows the relationship between the signals. e u y System Figure 3.3: A system with input u, output y and disturbance e. The modelling problem is to describe how these three signals relate to each other. In the case of the temperature in a truck cabin, the input signals can be air temperature, wind speed and many 10 other things. It might even be so that we have to consider signals that could be measured (such as the sun intensity) as disturbances, since this signal was not measured in the experiment data we have to our disposal. If you want a more comprehensive discussion about different modelling techniques, please read Ljung et al [7]. The system itself can be described by different methods. The perhaps most common way is to describe it on state-space form. Other ways to describe it is via transfer functions or on other forms. Read more about this further on. 3.2.2 Transfer Functions The output y(t) of a causal linear time-invariant system can always be written as  ∞ y(t) = = g(τ )u(t − τ )dτ , (3.15) 0 where y(t) ∈ Rk and the inputs u(t) ∈ Rm . g(τ ) is a weighting function. We can Laplace-transform this expression into  ∞ G(s) = L(g) = e−st g(t)dt 0 U (s) = L(u) . (3.16) Y (s) = L(y) We can rewrite (3.15) to Y (s) = G(s)U (s) , (3.17) where G(s) is called the transfer function. It is in the scalar case common that G(s) is a rational function of s. That is B(s) G(s) = , (3.18) A(s) where A(s) and B(s) are polynomials. In the multi-variable case, the corresponding expression to (3.18) is G(s) = A−1 (s)B(s) . (3.19) If G(s) is a rational function with A(s) and B(s) as polynomials, then the solutions to A(s) = 0 are the system poles and the solutions to B(s) = 0 are the system zeros. Read more about poles and zeros further on. 3.2.3 State Space Functions It is always possible, via substitution, to rewrite a linear time-invariant differential equation like dn y dn−1 y dm−1 u dn u (t) + a (t) + · · · + a y(t) = (t) + b (t) + · · · + b0 u(t) . n−1 0 m−1 dtn dtn−1 dtm dtm−1 (3.20) to a system of first-order differential equations. It might also be that we have a set of first order differential equations that are dependent on each other. In either way we have a system of first order differential equations. A common way to describe this is with the state space form. That is x(t) ˙ = Ax(t) + Bu(t) , y(t) = Cx(t) + Du(t) (3.21) where x ∈ Rn is the state vector, u ∈ Rm is the input signals and y ∈ Rk is the output signals. Consequently A ∈ Rn×n , B ∈ Rn×m , C ∈ Rk×n and D ∈ Rk×m . 11 We can take the Laplace-transform of the matrix expression (3.21), which is sX(s) = AX(s) + BU (s) . Y (s) = CX(s) + DU (s) (3.22) Solving for X(s) in the first expression and substituting X(s) in the second expression yields   −1 Y (s) = C (sI − A) B + D U (s) ,    (3.23) G(s) where I is a n × n identity matrix. The function G(s) is again the transfer function. 3.2.4 Poles and Zeros The poles of the system. The poles of a system are defined to be the values s when the transfer function G(s) gets rank-deficient. That is the same values as the solution to det (λI − A) = 0 , (3.24) if the system is on state space form. The zeros of the system. For a square-matrix G(s) the zeros are defined as the poles to G−1 (s). For a non-square G(s), the zero-polynomial are defined as the greatest common divider to the nominators of the maximal sub-determinants of G(s), normalized so they have the polepolynomial as denominators. The zeros of the system is the zeros of the zero-polynomial. 3.2.5 Physical (White-Box) Modelling The most intuitive approach to model a system is perhaps to do a physical model over it. In that case we assume that we know all the describing equations for that system and all the parameters in the system. This is also sometimes called white-box modelling. This way to model requires that we can describe the system in a mathematical way. It also requires that we know all the parameters in the equation or equations. It is also a fact that most of the physical equations are approximations. For example, the familiar equation Q = mcp (T2 − T1 ) is an approximation. The isobaric heat capacity cp is usually temperature dependent. One other example of difficulties is if we want use the expression above to calculate the increase of temperature of air when we add heat to it. “Ordinary” air consists of a certain amount of water. This means that if we add heat to air some of that heat will increase the temperature of the water in that air. Water has a higher heat capacity than air, so the increase in temperature would not be as large as it would if the air was dry. The bottom line is that it can be hard to derive physical equations for a complicated system. Physical models are easy to overview for simple system, but could get hard to work for larger systems. It might even be that we do not know the mechanism in a system and we are then unable to derive the equations for that system. 12 3.2.6 Black-Box Modelling Black box modelling is a set of methods to model a system without the need of any physical insight. What one does is to find the parameters in a model that gives the best fit between the model and the measured data. Usually one has a set of model structures that are known to work for many different types of systems. The parameters are then estimated by using a least squares method. The tool used in this thesis project for the black-box modelling was System Identification Toolbox (SITB) [10]. SITB gives the possibility to estimate models in different structures. By structures we mean that if the estimated model could be a state-space model, a ARX-model or something else. Different structures have different advantages. Some structures can be too advanced for certain purposes, and others too simple. ARX-structures and similar. Very loosely speaking we can say that models such as the output y(t) from an ARX-model is the sum of the weighted inputs u(t) from a certain amounts of time steps. This means that the structure of these models are a bit different from the structure of a state-space model. An ARX-model has the structure (in discrete time) A(q)y(t) = B(q)u(t − nk) + e(t) , (3.25) where y(t) is the output, u(t) is the input and A(q) = 1 + a1 q −1 + . . . + ana q −na B(q) = b1 + b2 q −1 + . . . + bnb q −nb . (3.26) The operator q i is the lag-operator. That is q i u(tk ) = u(tk+i ). The parameters na, nb and nk defines the order of the model. The parameters ai and bi are estimated using the least squares method. We can see that with this kind of structure we perhaps do not have the same possibility to do a physical interpretation as with models in the state-space structure. State-space structures For the state-space model we want to estimate the parameter vector θ in x(t) ˙ = A(θ)x(t) + B(θ)u(t) . y(t) = C(θ)x(t) + D(θ)u(t) (3.27) This structure is in continuous time as oppose to the ARX-structure above. The advantage with the state-space structure, in this thesis project anyway, is that the estimated model is easier to implement in Simulink than an ARX-model. Examples of other structures. Other structures can use a moving average of the disturbance, such as the ARMAX-model A(q)y(t) = B(q)u(t) + C(q)e(t) . (3.28) 3.2.7 Grey-Box Modelling As the name implies grey-box modelling is a mix of black-box and white-box modelling techniques. If we consider white-box modelling as a modelling technique based on pure theoretical knowledge of the system and black-box modelling as a modelling technique based on pure empirical knowledge of the system, then grey-box modelling is a technique where one combines theoretical and empirical 13 knowledge of a system. In that sense the models developed in this thesis project were either black-box or grey-box models. Grey-box models because the describing differential equations for the systems were derived (theoretical), but the parameters in the equations where estimated from measurements (empirical). 3.2.8 Continuous and Discrete Time Systems All the models in this thesis project were built as continuous time systems. The measurement data used in the system identification with System Identification Toolbox [10] is of course discrete time data. Therefore the models generated by System Identification Toolbox were also in discrete time. Those models were converted to continuous time models before there were validated or implemented into Simulink [12]. 3.2.9 Disturbances and Disturbance Models As mentioned in section 3.2.1 on page 10 systems normally have some kind of disturbances. Such disturbances can be due to stochastic processes within the system or measurement errors. Depending on the purpose of the model one could deal with disturbances in different ways. One way of “dealing” with the noise is simply to ignore it. One other way is to filter the measurement data before it is used in system identification or validation. A third way is to model the noise, that is to do a disturbance model. In that case the characteristics of the disturbance is evaluated and included in to the model. In this thesis project all the measurement data are filtered for high frequency noise before it is used in any system identification. However, in the validation of the model the unfiltered measurements are used as inputs to the model and in the calculation of model errors. 3.3 Model Validation One major task in model building is the validation of the resulting model. We need to determine how “good” the model is. The way to do this is to feed the model with measurements of input signals to the system from experiments and compare the output from the model with the output from the actual system. It is of course a good thing if we have measurements derived under different conditions to use in the validation. The result from a validation can also give us a hint if there are other factors (inputs) that where not included in the measurements, but still affects the output. For example, a model error which increases with time can be an indication of this. A model error that varies with one (or more) of the inputs might be an indication of a non-linearity in the system. 3.3.1 The RMS-value A measure of the model error used in this thesis project is the Root-Mean-Square (RMS) value. The RMS is defined as  n 1/2 1 2 r= (˜ xi − xi ) , (3.29) n i=1 where n is the number of measurements, x ˜i is the simulated temperatures and xi is the measured temperatures. We can interpret this value as the mean deviation from the “real” values. 14 3.3.2 Residual Analysis Suppose that we have measured data y(t) from a system and a simulation yˆ(t) of that system. Then the model error, or the residual, (t) = y(t) − yˆ(t) (3.30) should ideally be independent of the input signal u(t) to the system. If it is not there are some effects from the input signal that the model are unable to catch. One can form N ˆ u (τ ) = 1 R  (t + τ ) u(t), |τ | ≤ M , N t=1 (3.31) and test if these values are close enough to zero. If {(t)} and {u(t)} is independent, then (3.31) should, for large N , be approximately normal-distributed with mean value zero. 15 4 4.1 Models Introduction The goal with this thesis project is to model the cabin air temperature as it would be measured by the ACC’s temperature sensor. Both a black-box and a white-box model for the cabin air temperature were developed and tested. These two different approaches have different advantages and disadvantages, which are discussed further on. Tcab, mATA TATA, mATA To be able to model the cabin air temperature the heat flow from and to the cabin had to be modelled. Common for both the black-box and the white-box approach was that the HVACsystem1 and the ATA was modelled separately from the cabin air temperature model. This means that models for the HVAC-system and the ATA, both with air temperature and air flow as outputs, were developed. The outputs from those models served as inputs to the cabin air temperature model. Read more about the HVAC- and ATA-models in sections 4.2 to 4.3. The general structure of the complete model can be viewed in figure 4.1. ATA−model Cabin model Tmix, mHVAC TAC, mHVAC Tout, mHVAC WTA−model AC−model Tcab Tcwt,i, mcwt Tcwt,o, mcwt HVAC−system Heat exchanger model Tcwt,c, mcwt Figure 4.1: The general structure of the model Black-box modelling. In the black-box approach, the cabin air temperature was modelled with help of System Identification Toolbox [10]. Two sets of data, from the “0 ” and “-20 ” experiments, were used for this. See appendix D for details about these two experiments. Two independent models were estimated with these data sets as a basis. That is, one model was estimated from the “0 ”-data and the other from the “.20 ”-data. Even though the models ‰ ‰ ‰ ‰ 1 Since the WTA heat the cooling water to the heat exchanger in the HVAC-system, it is in some sense a part of the HVAC-system. The WTA is therefore included into the HVAC-model here. 16 were independently estimated, there is a clear relationship between the poles in the two models. Read more about the black-box modelling in section 4.4 on page 21. The advantage with the black-box approach is that we do not need to know anything about the physics behind the heat transfer from and to the cabin. The disadvantages is that a black-box model is more difficult to tune compared to a white-box model. White-box modelling. The white-box approach requires more knowledge of the heat transfer physics than the black-box approach. It requires that we derive equations for the heat transfer from and to the cabin. These derived equations contains different parameters, such as heat conduction coefficients et cetera, that has to be either estimated or known. It turned out during the project that the white-box model originally developed did not perform well. The problem, as it turned out, was a non-symmetry in the cabin air temperature dynamics. It manifests itself by the results from experiments, where the cabin air temperature seems to have different time constants depending on if the cabin air temperature is increased or decreased. This non-symmetry is probably caused by the spatial air temperature distribution in the cabin. Depending on the difference between the temperature of the air that enters the cabin and the cabin air, they will mix at different rates. See section 4.5 on page 23 for further details about the white-box modelling. 4.1.1 Disturbances Disturbances were never considered in this thesis project. When system identification were used to estimate black-box model, the data used in the identification was low-pass filtered to reduce noise. 4.2 The HVAC Model As discussed in chapter 2, the HVAC-system basically consists of a heat exchanger and (possibly) an evaporator. The air flows first through the evaporator and then through the heat exchanger where it eventually gets heated. In this thesis project the WTA was considered to be a part of the HVAC-system. The reasons for this ere that the WTA heats the engine’s cooling water as described in section 2.1 on page 3. Therefore its in a modelling point of view convenient to include it in the HVAC-model. In order to keep the modelling work easy, and to keep the different sub-models as simple as possible, the HVAC-model was divided into three sub-models. The WTA, the heat exchanger and the AC-evaporator were modelled independent of each other. 4.2.1 Modelling the AC In the thesis work by Eriksson [3] the temperature of the evaporator was modelled in Simulink. Since that model only models the evaporator temperature a model of the air temperature after the evaporator, depending on the evaporator temperature and the air flow through the evaporator, was developed. A white-box as well as a black-box approach was tested to model the temperature after the evaporator. The most successful approach was the black-box approach. The black-box model was developed in System Identification Toolbox (SITB) [10]. A schematic figure of this model is viewed in figure 4.2 on the next page. A set of measurement data with the difference between the evaporator temperature and the ambient temperature, Tevap − Tout , used as input and the air temperature after the AC, TAC , used as 17 Tout TAC AC Tevap Figure 4.2: The AC-model with the evaporator temperature Tevap and the outside air temperature Tout as inputs. output was used in SITB. After the measurement data was low-pass filtered, a best-fit state space model was estimated. The estimated discrete time state space model was of the third order. It was transformed to continuous time before it was implemented into Simulink [12]. This gives us the parameters A, B, C and D in2 x˙ TAC = Ax + B∆T , = Cx + D∆T where TAC is the air temperature after the evaporator and ∆T = Tevap − Tout is the temperature difference between the evaporator and the ambient air. The reason for that the temperature difference was used as input and not the two temperatures Tevap and Tout separately as two inputs where that the ambient temperature Tout was almost constant during each of the measurement series. Using SITB with one constant, or almost constant, input can result in estimated models that has a very high gain for that input. In the case with the model developed here, that model proved to perform well with just ∆T as input. The air flow is not considered explicitly in this model. However, the model for the evaporator temperature considers the air flow. This means that we do not have to care about the air flow in the model for the evaporator to mixed air temperature. 4.2.2 Modelling the Heat Exchanger As discussed in the theory for heat exchangers, section 3.1.7 on page 9, the power generated by a heat exchanger depends on many factors. To do a physical model of the heat exchangers requires that we know all the material parameters as well as the fouling factor et cetera. Even if we know all these parameters, we still have to know the cooling water temperature after the heat exchanger. One could use a black-box approach to model the heat exchanger. Since the heat generated by a heat exchanger is in its nature very un-linear, a un-linear black-box model would be required. Such an approach was however never tested in this thesis project. It is much more convenient to use empirical data over the heat exchanger, and that is the specific power who was discussed in section 3.1.8 on page 10. The heat exchanger was modelled by using a look up-table for the specific power for that heat exchanger. The data was from a heat exchanger that is commonly used in a Scania truck. Figure 4.3 on the facing page shows the specific power for the heat exchanger used in this thesis project. The specific power Qspec from a heat exchanger is a function of the cooling water flow m ˙ cwt and the air mass flow through the HVAC-system, m ˙ HVAC . The relationship between the cooling water temperature in to the heat exchanger Tcwt , the air temperature of the air before the heat exchanger TAC , the specific power Qspec and the power generated Q is Qspec = Q . Tcwt − TAC (4.1) 2 Since it is a three-dimensional system with one input and one output, A is 3 × 3, B is 3 × 1, C is 1 × 3 and D is a scalar. The actual values can be viewed in appendix C. 18 180 160 140 Qspec [W/K] 120 100 80 60 40 20 0.4 0.2 0.3 0.15 0.2 0.1 0.1 0.05 Cooling water flow [kg/s] Air flow [kg/s] Figure 4.3: The specific power Qspec for a heat exchanger. This equation solved for Q and substituted into the equation for the specific heat capacity (Q = mcp ∆T ) yields the expression Tair,out = Qspec (Tcwt − TAC ) + TAC . m ˙ HVAC cp,air (4.2) From this expression we then have the air temperature after the heat exchanger, which is the output from this sub-model. Figure 4.4 shows a schematic figure of the heat exchanger model. Tcwt TAC Heat mcwt exchanger Tmix mHVAC Figure 4.4: The heat exchanger model with the temperature TAC , the cooling water temperature ˙ cwt and the air flow m ˙ HVAC as inputs. Tcwt , the cooling water flow m Problems by the nonlinearity in the specific power. The heat exchanger model is expected to have a relative poor performance at cooling water flows below 0.1 kg/s. The reason for this is clear from figure 4.3. The surface for the specific power is very steep for cooling water flows below 0.1 kg/s. This means that a small error in the cooling water flow will have a great impact on the specific power. Or, on the contrary, a small error in the table over the specific power will generate a large model error for cooling water flows below 0.1 kg/s. Implementation of the heat exchanger model in Simulink. See figure B.5 in appendix B. The model is basically implemented as described in equation (4.2), with the value of Qspec from a look-up table. A first order linear filter is also added to smooth the output. 19 4.2.3 Modelling the WTA As discussed in section 2.1 on page 3, the WTA heats the cooling water in the truck by using a diesel burner. The WTA was modelled by using a simple expression for the heat added to the cooling water. That is Q˙ cwt = cp,cwt m ˙ cwt (Tcwt,o − Tcwt,i ) , (4.3) ˙ where Qcwt is the heat added to the cooling water by the WTA, Tcwt,i is the cooling water temperature in to the WTA and Tcwt,o is the cooling water temperature out from the WTA. The heat added to the cooling water, Q˙ cwt , is given by the manufacturer of the WTA. Solving (4.3) for Tcwt,o yields Q˙ cwt Tcwt,o = + Tcwt,i , (4.4) cp,cwt m ˙ cwt which is the output from the WTA-model. Figure 4.5 shows a basic overview over this model. Tcwt,i mcwt WTA Tcwt,o PWTA Figure 4.5: The WTA-model with the cooling water temperature Tcwt,i in to the WTA, the cooling water flow m ˙ cwt and the applied power PWTA as inputs. The output from the model is the cooling water temperature after the WTA, Tcwt,o . The reasons for this “simple” approach was a lack of appropriate measurement data. With an appropriate set of measurement data it might have been possible to do a black-box model of the WTA instead of this white-box approach. But it is nothing that says that a black-box model would have a better performance than a white-box model. Implementation of the WTA-model in Simulink. A low-pass filter was added in the Simulink-model for the WTA after the calculation of Tcwt,o . This is to include some dynamics, since the temperature Tcwt,o certainly not will change with a time-constant zero when the WTA power is altered. The filter constant in this filter is used as a tunable parameter and it can be estimated by using measurement data from WTA tests. A low-pass filter has the Laplacetransform 1 Y (s) = U (s) , (4.5) 1 + τs where Y (s) is the filtered value, U (s) is the input to the filter and τ is the filter constant. Since it was not possible to compare the WTA-model with measurement data3 , the value of τ was set to 60 (seconds). This was considered to be a reasonable value, but further tests needs do be done to verify (or reject) this value. 4.3 The ATA Model There was a lack of relevant measurement data from ATA tests. Therefore a white-box model was developed for the ATA. As with the WTA, the heating power generated by the ATA is known from the manufacturer. The heat equation ˙ ATA cp,air (Tcab − TATA ) , Q˙ ATA = m (4.6) was used to calculate the temperature after the ATA. See figure 4.6 on the facing page for a overview over the ATA model. 3 The lack of measurement data for the WTA will be discussed further on in section 5.2.3 on page 32. 20 Tcab mATA TATA ATA PATA Figure 4.6: The ATA-model with the cabin temperature Tcab , the air flow m ˙ ATA through the ATA and the applied power PATA as inputs. The output from the model is the air temperature after the ATA, TATA . Implementation of the ATA-model in Simulink. With the save reasons as for the WTAmodel, discussed in section 4.2.3 on the preceding page, a low pass filter was added to the ATAmodel. The filter parameter was set to 60 (seconds). Transport delays. There is a certain amount of transport delay in this system. This is due to that there is an air pipe from the cabin to the ATA, and then a pipe from the ATA and out to the cabin. The order of this transport delay is small relative to the other time constants in the system. It is implemented anyway, since it is easy to model a transport delay in Simulink. The transport delay is calculated based of the dimensions of the pipes from and to the ATA. 4.4 Black-Box Modelling of the Cabin Temperature As stated in the introduction to this chapter, a black-box model of the cabin air temperature was one of the two type of models of the cabin air temperature developed and tested. System Identification Toolbox (SITB) [10] was used to do a Black-Box model of the cabin air temperature. The data set used for this was the “0 ” and “-20 ” data described in appendix D. From these data sets the measured ambient temperature Tout and the measured mixed air temperature Tmix were used as input signals and the measured seat temperature was used as output signal. ‰ ‰ The air flow in to the cabin will also affect the temperature, and hence should be used as an input signal. However, the air flow was constant during the measurement. The best thing would be if the air flow had been changed during the experiment. In that case it would have been possible to establish a relationship between the air flow and the output signal, the cabin air temperature, as well. The approach used in this thesis project was to normalize the mixed air temperature Tmix with the mixed air mass flow m ˙ HVAC . That is Tmix,norm − 273 = k m ˙ HVAC (Tmix + 273) , m ˙ HVAC,nom (4.7) ˙ HVAC,nom where Tmix,norm is the normalized temperature used as input to the black-box model and m is the nominal mixed air mass flow. The nominal mixed air mass flow is the air flow in the experiment used in system identification. The parameter k is a tuning parameter and its nominal value is 1. Also note that absolute temperate was used here, hence the figure 273. After the measured data was low-pass filtered for periods down to 0.1 rad/s4 , a best-fit state-space model was estimated by SITB for each of the two measurement series. These models were of a fifth order for both of the measurement series. The ARX-models generated by SITB were also tested, but were found to have the same, or poorer, performance than the state-space models. The state-space models generated by SITB were in discrete time, but were converted to discrete time before the implementation into Simulink. 4 The major part of the noise in the measurement was found to have periods shorter than 0.1 rad/s. This corresponds to a wavelength of 6 seconds, and it would be of no interest to include such short periods in this model. 21 4.4.1 Poles for the Generated Models The poles for the two generated models are shown in figure 4.7. 0.15 0.1 Im 0.05 0 −0.05 −0.1 −0.05 −0.045 −0.04 −0.035 −0.03 −0.025 Re −0.02 −0.015 −0.01 −0.005 0 Figure 4.7: Poles for the two models generated by SITB. The poles for the model derived from the 0 data are represented by circles, and the poles for the model derived from the -20 data by x-marks. ‰ ‰ We can see that there apparently is a relationship between the poles of the different models. An idea is to use a variable state-space system. By variable we mean that the poles and zeros in this system are changed continuously depending of the ambient temperature. The zeros of the two models, which are presented in figure 4.8 on the next page, shows also a similar relationship. The zeros showed in this figure are for the transfer function from Tmix to Tcab . There was unfortunately no time available in this thesis project to develop a model with “dynamic” poles and zeros. Each of the models generated by SITB were tested independently of each other. See section 5.3.1 on page 33 for validation of the black-box models. 4.4.2 Using a Bias One other suggestion to merge the two black-box models to one model is to use a biased cabin air temperature. Figure 4.9 on page 24 shows a simulation with the model identified from the -20 -data, but with the data from the 0 experiment used as a input. The only thing done here is that a 16 bias is added to the output from the model. This model fits quite well with the measured data from the experiment. ‰ 4.4.3 ‰ ‰ The ATA-model and the Black-Box Model There was no available measurements to include the ATA in the system identification of the cabin air temperature. Because of this the output temperature TATA from ATA-model was normalized 22 0.1 0.08 0.06 0.04 Im 0.02 0 −0.02 −0.04 −0.06 −0.08 −0.1 −0.18 −0.16 −0.14 −0.12 −0.1 −0.08 −0.06 −0.04 −0.02 0 Re Figure 4.8: Zeros for the two models generated by SITB. The zeros for the model derived from the 0 data are represented by circles, and the zeros for the model derived from the -20 data by x-marks. The zeros are for the transfer from Tmix to Tcab . ‰ ‰ by the ATA air mass flow m ˙ ATA in the same manner as the mixed air temperature Tmix . See equation (4.7). The normalized temperature after the ATA was then used as input to the cabin temperature model. That is TATA,norm − 273 = k m ˙ ATA (TATA + 273) , m ˙ ATA,nom (4.8) where TATA,norm was used as input to the black-box cabin air temperature model. The parameter k is a tuning parameter and its nominal value is 1. Absolute temperature is used here, therefore the figure 273. 4.5 White-Box Modelling of the Cabin Temperature The other approach to model the cabin temperature was to derive the physical equations for the processes that governs the cabin air temperature. It turned out during the project that the whitebox model developed did not perform well. During the initial parameter estimation it became apparent that there is a non-symmetry in the cabin air temperature. This non-symmetry is probably caused by the air temperature distribution in the cabin. Depending on the temperature of the air that enters the cabin, this air and the cabin air will mix at different rates. This causes a transient behavior that is difficult to model. The solution was to let some of the parameters in the white-box model be depended of the rate of change of the mixed air temperature. This topic is discussed further in section 4.5.6 on page 26. However, the original structure of the white-box model was used. In this structure the following factors were considered:5 ˆ The heat flow from the HVAC-system and the ATA. 23 50 3 2.5 45 Model error [deg C] Cabin temperature [deg C] 2 40 35 1.5 1 0.5 0 30 −0.5 25 0 2000 4000 −1 6000 Time [s] 0 2000 4000 6000 Time [s] Figure 4.9: Left figure: Simulated cabin temperature (solid line) and the measured temperature at the seat (dashed line), at 0 ambient temperature. Right figure: Model error for this simulation. ‰ ˆ The heat flow through the cabin walls. ˆ The heat flow from the engine compartment to the cabin. Since the cabin on most of the Scania trucks is placed above the engine, the temperature in the engine compartment will have an impact on the cabin temperature. ˆ Heat stored in the cabin walls. How the equations for these factors were derived is discussed in the following sections - 4.5.1 to 4.5.3. The resulting system is discussed in section 4.5.5 on page 26. 4.5.1 Heat Flow through the Cabin Walls The temperature difference between the cabin air and the outside air causes a heat flow through the cabin walls. This heat transfer is caused by conduction, convection as well as radiation. To model the heat flow through the cabin walls we have to know the characteristics of the confining walls. A part of the thesis work by Andersson [1] was to do a physical model over the cabin walls. That model included the heat conduction properties for the walls in different part of the cabin. Such a model is not the right approach here. Even though the model by Andersson [1] might be good enough for the purposes of this thesis project, it would be too complicated to use here. The approach will instead be to use the single heat transfer equation Q˙ loss = (α + βv) σcab cp,air (Tout − Tcab ) ,    (4.9) f (v) 5 There is of course many other factor that influences the cabin temperature, such as heat generated by people in the cabin. To keep the white-box model on a reasonable level, only the above factors were included to the model. 24 that is we assume the heat flow through the cabin walls to be proportional to the temperature difference between the cabin air and the outside air and the vehicle speed v. (The only reason cp,air is included is that it will be cancelled later on.) This is a very coarse approximation. One of the mechanism for heat transfer which is neglected is heat transfer due to radiation. This heat loss would be proportional to the fourth power of the temperatures. Since all the measurements used in this thesis project were made at the same “vehicle speed”, it was unfortunately not possible to estimate the factors α and β in equation (4.9). The values used in the simulations were α = 1 and β = 0. 4.5.2 Heat Stored in the Cabin Walls The heat stored in the cabin walls was considered as a contributor to the cabin air temperature dynamics. The walls were modelled as a thermal inertial mass. This means that the walls were considered to be just a lump of material with a “mass” and heat capacity to be determined. The heat flow in to the walls depends of the cabin temperature and the ambient (outside) temperature, Q˙ in = cp,air σin (Tcab − Twalls ) , Q˙ out = cp,air σout (Tout − Twalls ) (4.10) where Q˙ in is the heat flow from the outside air and in to the walls and Q˙ in is the heat flow from the cabin air to the walls. The factors σin and σout are the heat transfer coefficients from the outside air and from the inside air respectively to the walls. And again - cp,air has nothing to do with this, but it will cancel later on. The net change of the heat in the walls is Q˙ walls = Q˙ in + Q˙ out . (4.11) The usual heat equation are used for the heat stored in the walls, mc (T2 − T1 ) . Qwalls =  (4.12) κ The time-derivative of this expression is Q˙ walls = κT˙walls . (4.13) The equation (4.13) substituted in (4.11) yields after some rearrangements κT˙walls /cp,air = − (σin + σout ) Twalls + σin Tcab + σout Tout . (4.14) This is a first order system of Twalls as the state and Tcab and Tout as inputs. The parameters σin and σout are determined later on. It might be important to notice that the temperature Twalls is not the “real” temperature of the walls. Since all the walls were modelled as one mass, it will be a kind of average temperature of the walls. If the system is not at steady state (i.e. T˙cab = 0), the different walls in the cabin might have different temperatures. 4.5.3 Heat From the Engine On most of the Scania trucks, the engine is placed under the cabin. This means that heat from the engine compartment will flow through the cabin floor and in to the cabin. This heat flow will be affected by things such as the vehicle speed, the type of engine and other things. We will however use the same approximation as in the case with the heat flow through the cabin walls, Q˙ eng = cp,air σeng (Teng − Tcab ) , (4.15) where σeng is the heat transfer coefficient between the engine compartment and the cabin. Teng is the temperature in the engine compartment. 25 4.5.4 Sun Radiation The sun radiation will also affect the cabin air temperature. However, the heat generated by sun radiation was not considered in this thesis project. 4.5.5 The Heat Stored in the Cabin Air In the previous sections the equations for some of the heat transfer processes that governs the cabin temperature was derived. The total amount of heat stored in the cabin air at time t is given by  t   Qcab = Q˙ HVAC (τ ) + Q˙ ATA (τ ) + Q˙ loss (τ ) + Q˙ walls (τ ) + Q˙ eng (τ ) d τ . (4.16) −∞ Differentiating expression (4.16) above and substituting the terms yields (cp,air cancels) mcab T˙cab =m ˙ HVAC (THVAC − Tcab ) + m ˙ ATA (TATA − Tcab ) + f (v) σcab (Tout − Tcab ) . + (σin + σout ) Twalls − σin Tcab − σout Tout + σeng (Teng − Tcab ) (4.17) Rearranging again gives ˙ ATA + f (v) σcab + σin + σeng m ˙ HVAC + m σin + σout T˙cab = − Tcab + Twalls mcab mcab . ˙ ATA TATA + f (v) σcab Tout − σout Tout + σeng Teng m ˙ HVAC THVAC + m + mcab (4.18) The system (4.17) combined with (4.14) is a second order system, which on state-space form is ⎛ ⎡ ⎤⎛ ⎞ ⎞ ˙ ATA + f (v) σcab + σin + σeng − (σin + σout ) T˙cab m ˙ HVAC + m Tcab 1 ⎝ ⎣ ⎦⎝ ⎠ ⎠=− mcab (σin + σout ) mcab Twalls −σin mcab T˙walls . ⎡ ⎤ ˙ ATA TATA + f (v) σcab Tout − σout Tout + σeng Teng m ˙ HVAC THVAC + m 1 ⎣ ⎦ + mcab σout Tout mcab (4.19) This is essentially the complete model. The solution to equation (4.19) is the average cabin temperature. It is the average temperature because the total heat stored in the cabin air is used. This means that the temperature distribution in the cabin is disregarded. The temperature distribution does have a impact on the dynamics, and this is discussed in the next section. 4.5.6 Problems Caused by the Temperature Distribution As discussed earlier the temperature distribution causes a non-symmetry in the cabin air temperature dynamics. Depending on the difference between the mixed air and cabin air temperature, the dynamics of the cabin air temperature will be different. Dynamic parameters. The solution used in this thesis to deal with this non-symmetry is to let the heat conduction coefficients σcab and σeng be dependent on the rate of change of the mixed air temperature Tmix . That is σcab,2 + σcab,1 σcab,2 − σcab,1 ˙ Tmix + 2 2k , σeng,2 + σeng,1 σeng,2 − σeng,1 ˙ Tmix = + 2 2k σcab = σeng 26 (4.20) where the parameters σcab,1 , σcab,2 , σeng,1 and σeng,2 have to be estimated. The interpretation of the expressions in (4.20) is that the heat conduction coefficients used is σcab,2 and σeng,2 when the mixed air temperature is increasing with a rate k. On the opposite, the heat conduction used when the mixed air temperature is decreasing with a rate −k is σcab,1 and σeng,1 . In the Simulink [12] implementation, the values of σcab,1 and σeng,1 were used as the minimum values for the heat conduction. The same thing for σcab,2 and σeng,2 - these values were used as the maximum values. Figure 4.10 shows an example of how σeng depends on T˙mix . k 0.12 ρcab,2 ρcab [W/mK] 0.11 0.1 0.09 ρcab,1 0.08 −k 0.07 −0.04 −0.03 −0.02 −0.01 0 0.01 Tmix rate of change [K/s] 0.02 0.03 0.04 Figure 4.10: Plot of the heat conduction coefficient σeng as a function of T˙mix . The use of these dynamic parameters means that we in some sense loose the physical interpretation of σcab and σeng . These heat conduction coefficients are in reality not dependent of T˙mix . The heat conduction coefficient rather play a role as tunable parameters in this model. The value of T˙mix was also low pass filtered in the Simulink implementation. See figure B.10 in appendix B. This was done to get a more reliable value of T˙mix . An unfiltered time derivative of Tmix would certainly be too noisy. 4.5.7 Estimation of Unknown Parameters The parameters in the white-box model were estimated mainly by using data from the “0 “-20 ” experiments. Those experiments are described in appendix D. ‰ ‰” and The parameters σcab,1 , σcab,2 , σeng,1 and σeng,2 were used as tunable parameters with k set to a fixed value. The cabin temperature were basically simulated with different choices of σcab,1 , σcab,2 , σeng,1 and σeng,2 . The set of parameter who yielded the lowest RMS-value was selected to be used in the resulting model. It would have been possible to formulate an optimization problem out of this, and use an optimization algorithm to decide the values of the four parameters that minimized the RMS-value. This was not done, because the ”trial and error” method yielded values for the four parameters that were good enough for the model’s performance. 27 ‰ ‰ The parameters who gave the lowest RMS-value differs between the 0 and -20 experiments. However, the parameters derived from the -20 experiment gave a reasonable performance also in the 0 case. The “-20 parameters” were therefore used is the white-box cabin air temperature model. Read more about this in the validation of the white-box model, section 5.3.2 on page 33. The estimated parameters is (in units of W/mK) ‰ ‰ ‰ σcab,1 = 0.08 σcab,2 = 0.114 . σeng,1 = 0.15 σeng,2 = 0.011 Compare these values to the heat conductivity for water (which is about 0.6 W/mK) or air (which is about 0.024 W/mK). The estimated parameters are quite close to what the “real” heat conduction coefficients might be. 28 5 Validation and Performance of the Model In this chapter we will discuss the performance of the different sub-models and the complete model. For comments and conclusions from these validation, read chapter 6 - “Discussion and Conclusions”. 5.1 Validation of the ATA-model Because of lack of time in this thesis project, the ATA-model was never fully validated. The ATA-model was evaluated by a couple of simulations that were done with different conditions. From the ATA-specifications in [9] it should be possible to reach 30 cabin air temperature at -20 ambient temperature when using the highest power stage on a 4kW ATA. It should also be possible to heat the cabin air temperature from -20 to 20 in less than 120 minutes. These specifications gives a rule-of-thumb of what a reasonable behavior of the ATA is. ‰ ‰ ‰ ‰ A validation of the ATA by studying the cabin air temperature involves of course also the cabin air temperature model. Therefore the ATA model was evaluated both with the black-box and white-box cabin air temperature model. 5.1.1 Validating the ATA-model with the Black-Box Cabin Model Figure 5.1 shows a simulation of the cabin air temperature at a step change of the ATA output power from zero to maximum (4kW) at t = 500. The black-box cabin model was used and the ambient temperature was set to -20 . ‰ 30 Cabin temperature [deg C] 20 10 0 −10 −20 −30 0 1000 2000 3000 time [s] 4000 5000 6000 Figure 5.1: Simulation of the ATA-model and the black-box cabin air temperature model. The ambient temperature was -20 and a step change from zero to highest ATA power was made at t = 500. ‰ According to the Scania specification [9] the ATA should be able to increase the cabin air temperature to 30 at -20 ambient air temperature. The ATA fails to do so in this simulation. ‰ ‰ 29 In this simulation the ATA air temperature TATA was not normalized. That is TATA,nom = TATA . The tuning factor used was k = 1. If the tuning factor is increased, the simulated cabin air temperature generated by the ATA will increase. 5.1.2 Validating the ATA-model with the White-Box Cabin Model Figure 5.2 shows a simulation of the cabin air temperature. The white-box cabin model was used and the ATA-model was set up for a 4kW ATA. The ambient temperature was set to -20 and a step change of the ATA-power from zero to the highest (4kW) power was made at t = 500. ‰ ‰ ‰ The specifications [9] states that it should be possible to reach 30 cabin temperature at -20 ambient temperature when using the highest power stage on a 4kW ATA. This simulations fails clearly to do so since the highest cabin air temperature reached is about 2 . ‰ 5 Cabin air temperature [deg C] 0 −5 −10 −15 −20 −25 0 250 500 750 Time [s] 1000 1250 1500 Figure 5.2: Simulation of the ATA-model and the white-box cabin air temperature model. The ambient temperature was -20 and a step change from zero to highest ATA power was made at t = 500. ‰ 5.1.3 Comments on the ATA-Simulations The simulated cabin air temperature differs a lot in the two cases described previously. The simulated cabin air temperature when the black-box model was used, section 5.1.1, was the most reasonable result. The problems when using the white-box cabin air temperature model can be due to the fact that the average heat in the cabin is used in the model. In reality the air distribution from the ATA is completely different from the air distribution from the HVAC-system. The ATA is normally situated under the bed at the back of the cabin and the ATA’s air inlets and outlets are situated at each side of the cabin (in a “left/right”-direction). This causes the air around the bed to get most heated. So it is not unrealistic that the average air temperature in the cabin is significantly lower than the air temperature around the bed. 30 5.2 5.2.1 Validation of the HVAC-models The Heat Exchanger This model was validated by two different sets of measurements. Both of the measurements were from tests in a climate chamber at Scania. See appendix D for more details of these measurements. Figure 5.3 shows a simulation of the temperature after the heat exchanger, Tmix and the actual measurement of the mixed air temperature at a 0 ambient temperature. We can see that the simulation fits the measured data up to about t = 4500, but then the simulated temperature starts to deviate from the measured temperature. ‰ 80 70 Mixed air temperature [deg C] 60 50 40 30 20 10 0 0 1000 2000 3000 Time [s] 4000 5000 6000 Figure 5.3: Measured (solid line) and simulated (dashed line) temperature after the heat exchanger at 0 ambient temperature. ‰ Figure 5.4 on the next page shows the model error and the cooling water flow. We can see that the model error are limited to 5 up to t ≈ 4500. After this it start to increase to a level up about 10 . ‰ ‰ We should not be surprised if there is an relatively large error for cooling water flows below 0.1 kg/s. A look at the shape of the surface in figure 4.3 on page 19 reveals that for cooling water flows less that 0.1 kg/s we might have a problem if this flow is not correct. We can see that the slope of the surface at this region is very steep. That means that we are very sensitive for disturbances for those flows. This does not explain all about the model error in this simulation. If the model error was only to be dependent on the cooling water flow, the model error should always be about the same for a certain cooling water flow. A check on figure 5.4 on the next page shows that there is not a one-to-one relationship between the model error and the cooling water flow. Since the water flow is stepped up and down in a symmetrical way, the model error should also be symmetrical if the model error only was to be dependent on the cooling water flow. ‰ Figure 5.5 on page 33 shows a similar simulation as the previous one, but with a -20 ambient temperature. Figure 5.6 on page 34 shows the corresponding model error. We can see in this 31 15 0.4 0.35 10 Model error [deg C] 5 0.25 0 0.2 0.15 Cooling water flow [kg/s] 0.3 −5 0.1 −10 0.05 −15 0 1000 Figure 5.4: Model error of the 0 (dashed line). 2000 3000 Time [s] 4000 5000 0 6000 ‰ mixed air-simulation (solid line) and the cooling water flow figure that the model error is at its maximum for cooling water flows around 0.1 kg/s. Again, this can be an indication of that the table over the specific power used in the model is not quite right, or that we have an error in the measurement of the cooling water flow. The model error is more symmetrical this time, as it would if it is only dependent on the cooling water flow. 5.2.2 The AC-system There were nine series of measurement data available to validate the AC-system. These measurement series were from a AC-test rig at Scania. See appendix D.3 for details. Of the nine available measurements, it were seven who were relevant for validation purposes. These seven available measurements series were evaluated and the root-mean-square (RMS) value was calculated. The RMS values for the seven series ranged from about 1.8 to 7.6. One example of a simulation compared to the measurement data can be seen in figure 5.7 on page 35. In the same figure there is also a plot over the model error. 5.2.3 Validation of the WTA-model It was not possible to validate the WTA-model because of that this models requires an model over the heat loss in the engine. An engine model would simulate the cooling water temperature in to the WTA as a function of the cooling water after the HVAC-system. Such a engine model was not available at the time of this thesis project. 5.3 Validation of the Cabin Model In the validation of both the black-box and white-box cabin air temperature model, the measured mixed air temperature was used as input. Had a simulated mixed air temperature from the HVAC32 80 70 Mixed air temperature [deg C] 60 50 40 30 20 10 0 0 500 1000 1500 2000 2500 Time [s] 3000 3500 4000 4500 5000 Figure 5.5: Measured (solid line) and simulated (dashed line) temperature after the heat exchanger at -20 ambient temperature. ‰ model been used, then the model error from the HVAC-model would have influenced the results in this validations. 5.3.1 The Black-Box Model The black-box model proved to work quite well. The problem is that, as stated earlier, measurement for only one rate of air flow was available. Figure 5.8 on page 36 shows a simulation of the cabin temperature along with the measured temperature in the -20 case. It is important to notice that the measurement data used here is the same that was used in the system identification. The RMS value for this simulation was 2.2. ‰ Figure 5.9 on page 36 shows a similar simulation as the previous one, but with a 0 temperature. ‰ ambient Since we do not have many measurement series to use for validation it can be interesting to see how the system behaves at step inputs. Figure 5.10 on page 37 shows a simulation with a step change in the cooling water flow. The step was from 0 to 50% (which is about 0.19 kg/s) at t = 500. The ambient temperature was set to -20 and the fan speed was set to 20%. The results seems reasonable, except from a very transient behavior at the step time. ‰ 5.3.2 The White-Box Model Below is a couple of simulations of the cabin air temperature with the white-box model. The parameters adjusted to tune the model was σcab,1 , σcab,2 , σeng,1 and σeng,2 . The heat transfer coefficients for the heat stored in the cabin walls, σin and σout , were set to zero. This because the influence of the heat stored in the cabin walls proved to be negligible. 33 15 0.4 0.35 10 Model error [deg C] 5 0.25 0 0.2 0.15 Cooling water flow [kg/s] 0.3 −5 0.1 −10 0.05 −15 0 500 1000 1500 Figure 5.6: Model error of the -20 (dashed line). 2000 2500 Time [s] 3000 3500 4000 0 5000 4500 ‰ mixed air-simulation (solid line) and the cooling water flow Since the speed wind (the “vehicle speed”) during the experiments from which the measurements used here were derived from was constant, it was not possible to estimate the factors α and β in equation (4.9). The values used here were α = 1 and β = 0. ‰ Figure 5.11 on page 37 shows a simulation with the white-box model at 0 ambient temperature. The parameters used in this simulation were the ones who gave the best performance for the 0 data. ‰ ‰ Figure 5.12 on page 38 shows a simulation with the white-box model at -20 ambient temperature. The parameters used in this simulation were the ones who gave the best performance for the 20 data. One can see that the simulated cabin air temperature had a very oscillating behavior for the first 1000 seconds. Adjusting the parameters lessens the oscillations, but gives a higher RMS-value. ‰ ‰ Finally, figure 5.13 on page 38 shows an other simulation with the white-box model at 0 ambient temperature, but this time with same parameters as were used for the -20 simulations. There was still a reasonable performance of the model even though the “best fit” parameters for the -20 data were used. ‰ ‰ 5.4 A Validation of the Complete Model The tests with the cabin air temperature models in the previous sections were made with the measured mixed air temperature Tmix as input to the models. Figure 5.14 on page 39 shows an example of a simulation of the complete model. That is a simulation with the measured cooling water flow and the measured cooling water temperature as inputs to the heat exchanger model. The measurement is from the “0 -experiment” described in the earlier sections. The airflow was constant during the experiment from which the measurements were made, and was set to 0.12 kg/s in the simulation. ‰ The white-box cabin air temperature model was used in this simulation. The output from the heat exchanger model was used as input to the cabin air temperature model. We can see in 34 30 5 25 0 15 Model error [deg C] Mixed air temperature [deg C] 20 10 5 −5 −10 0 −5 −15 −10 −15 0 500 1000 Time [s] 1500 −20 2000 0 500 1000 Time [s] 1500 2000 Figure 5.7: Left figure: Simulated (solid line) and measured (dashed line) mix air temperature. Right figure: Model error for this measurement. figure 5.14 on page 39 that the model had a reasonable performance. The simulated temperature starts to deviate from the measured temperature after t ≈ 4500. This is due to the error in the heat exchanger model, and that was discussed in section 5.2.1 on page 31. 35 40 3.5 3 35 2.5 2 Model error [deg C] Cabin temperature [deg C] 30 25 20 1.5 1 0.5 0 15 −0.5 10 −1 5 0 2000 4000 Time [s] 6000 −1.5 8000 0 2000 4000 Time [s] 6000 8000 Figure 5.8: Left: Simulated cabin temperature (dashed line) and measured (solid line) for the black-box model generated from the “-20 ”-data. Right: Model error for this simulation. ‰ 50 4 3 45 Model error [deg C] Cabin temperature [deg C] 2 40 35 1 0 −1 30 −2 25 0 2000 4000 −3 6000 Time [s] 0 2000 4000 6000 Time [s] Figure 5.9: Left: Simulated cabin temperature (dashed line) and measured (solid line) for the black-box model generated from the “0 ”-data. Right: Model error for this simulation. ‰ 36 40 35 Temperature [deg C] 30 25 20 15 10 5 0 0 500 1000 1500 2000 2500 Time [s] 3000 3500 4000 4500 5000 Figure 5.10: Simulated cabin temperature, using the black-box model, with a step change in the cooling water flow at t = 500. 50 4 3 45 Model error [deg C] Temperature [deg C] 2 40 35 1 0 −1 30 −2 25 0 2000 4000 −3 6000 Time [s] 0 2000 4000 6000 Time [s] Figure 5.11: Left figure: Simulated cabin temperature with the white-box model (solid line) and the measured temperature at the seat (dashed line), at 0 ambient temperature. Right figure: Model error for this simulation. ‰ 37 40 7 6 5 4 Model error [deg C] Simulated temperature [deg C] 35 30 25 3 2 1 0 20 −1 −2 15 0 1000 2000 3000 Time [s] 4000 −3 5000 0 1000 2000 3000 Time [s] 4000 5000 Figure 5.12: Left figure: Simulated cabin temperature with the white-box model (solid line) and the measured temperature at the seat (dashed line), at -20 ambient temperature. Right figure: Model error for this simulation. ‰ 50 4 3 45 2 Model error [deg C] Simulated temperature [deg C] 40 35 30 1 0 −1 25 −2 20 15 −3 0 2000 4000 −4 6000 Time [s] 0 2000 4000 6000 Time [s] Figure 5.13: Left figure: Simulated cabin temperature with the white-box model (solid line) and the measured temperature at the seat (dashed line), at 0 ambient temperature. Right figure: Model error for this simulation. ‰ 38 50 Cabin temperature [deg C] 45 40 35 30 25 0 1000 2000 3000 Time [s] 4000 5000 6000 Figure 5.14: Simulated cabin air temperature with the “complete model” and the white-box cabin air temperature model. 39 6 6.1 Discussion and Conclusions Performance of the ATA-model ‰ ‰ The ATA-model was not able to increase the air temperature in the cabin from -20 to 30 as it should according to the specifications [9] neither with the black-box nor the white-box cabin air temperature model. The simulations of the cabin air temperature when using the ATA-mode, section 5.1.1 and 5.1.2, yielded very different results. Since both the black-box and the white-box cabin air temperature model performed well when they were validated they should produce similar results when the ATA is simulated. That is not the case and further investigations are required to find out what causes this difference. 6.2 6.2.1 Performance of the HVAC-model The Heat Exchanger Model ‰ From the model error in the 0 case, figure 5.4 on page 32, we can see that the model error is less than 4 for cooling water flows above 0.1 kg/s. We also know from the specific power of the heat exchanger, figure 4.3 on page 19, that 0.1 kg/s is a kind of critical flow. The relationship between the cooling water flow and the specific power is very un-linear at this point, so we should not be surprised that we have a large model error at this flow. ‰ It should also be noticed that there was a certain non-symmetry in the model error. As stated earlier, the cooling water valve was stepped from closed to open and back to closed again in the experiments used for validation. The air flow was constant during the experiment. If the model error only was dependent on the cooling water flow, then the model error should also be symmetrical and that is not the case. That means there is mechanisms regarding the mixed air temperature Tmix that the heat exchanger model does not consider. 6.2.2 The AC-model The amount of measurement data to validate the AC-model was relatively large. A RMS was calculated for the model errors, and we can interpret these RMS values as the mean model error. The mean model error ranges from about 2 to 8 depending on the conditions. However, we shall be careful with some of the conditions. On one set of the measurements, the measured mixed air temperature was at a high level even tough the AC-request was set. This signal is actually only a request to the AC-system to engage the compressor, it does not tell if the compressor is actually engaged. In the case of this measurement - it was probably not engaged and we got a huge deviation between the simulated temperature and the measured temperature. ‰ 6.2.3 ‰ The WTA-model As discussed in section 5.2.3 on page 32, it was not possible to validate the WTA-model. Therefore more work is needed to validate and tune the WTA-model. 6.3 6.3.1 Performance of the Cabin Models The Black-Box Model We cannot claim that the black-box models have been properly validated, since same measurement data have been used in the validation as in the system identification. The state space models 40 estimated by System Identification Toolbox [10] performed well for the data they were identified with. ‰ Running, for example, the model estimated from the -20 -data with measurement data from the 0 experiment as inputs works also quite well if the output is biased. That was discussed in section 4.4.2 on page 22. ‰ 6.3.2 The White-Box Model The non-symmetry in the cabin air temperature made it difficult to do a proper white-box model of the cabin air temperature. The developed model was more of a grey-box model. The equations used in the model has physical interpretations, but since some of the heat conductivity coefficients are made dependent of T˙mix we can not really do a clear physical interpretation of the values. The resulting white-box model has a quite reasonable performance. The work in this thesis shows that a white-box model with T˙mix -dependent parameters can be quite successful. Because the limited amount of available time in this thesis project, a further investigation of this could not be made. The performance of this white-box model is good enough for integration testouts. The cabin models were validated only by data from heat exchanger tests. There were no good measurements of the cabin temperature from AC-tests. The reason for this was that most of the AC-tests were done in a test rig. However, the mixed air temperature generated by the AC-system was successfully validated. It should not matter which are the main contributor to the mixed air temperature, influences on the cabin temperature should be the same. Of course, when using the heat exchanger the mixed air temperature are at a level at about 50 to 80 . When using the AC-system it will be in a level from 0 to 10 . It would certainly be an advantage to verify the cabin model at those two different levels of mixed air temperature. ‰ ‰ ‰ ‰ Heat stored in the cabin walls. This factor proved to be almost negligible. Running simulations with different values on σin and σout showed that the cabin air temperature dynamics was not affected significantly. 6.4 Achieved the goal? The main goal with this model was to do a coarse model of the cabin temperature. For the purposes of integration testouts we do not need no more than that. It is enough that the model resembles the “real” cabin temperature. 6.5 6.5.1 Future Work Future Work on the HVAC-model The heat exchanger model. There is still improvements that can be done on the heat exchanger model. As seen in the validation there was a quite large model error for certain cooling water flows. This model error can be reduced by a more careful mapping of the specific power. It might also be an idea to study the causes of the non-symmetry seen in the validation. 41 6.5.2 Future Work on the ATA-model There was not much effort put in to the modelling of the ATA. With relevant measurement data for the ATA it should be possible to establish a relationship between the output power of the ATA and the air temperature after the ATA. 6.5.3 Future Work on the WTA-model This model need to be implemented with an engine model and tested. 6.5.4 Future Work on the Cabin Temperature Model The results from this thesis project shows that it is possible to develop a model over the cabin temperature that has a good performance. We have seen that both the black-box model as well as the white-box model can perform well right tuned. Develop a model with dynamically placed poles and zeros. The results in section 4.4.1 on page 22 shows a relationship between the poles and zeros in the two developed black-box models. An idea is to do a system identification on a range of measurement data and study the relationship between the poles respective zeros of the different models. Estimate the parameters for the vehicle speed. Since all of the available measurement data was from experiments with the same speed wind, the factors α and β in equation (4.9) on page 24 could not be estimated. 6.6 Summary There are many questions left to be answered. In order to fully validate and tune the models it requires more measurement data from experiments. The conclusions that can be drawn are: ˆ The ATA-model was not validated successfully. More work is required both to model the temperature out from the ATA (TATA ) and to understand the difference of the ATA-simulations depending of which cabin air temperature model is used. ‰ ˆ The heat exchanger model fitted the measured data with a model error less than 5 in the major part. This shows that using a table over the specific power in enough for the purposes in this thesis project. A non-symmetry in the model error implies that there is more dynamics factors in the system than what was included in the model. ˆ The AC-model worked also well. The simulated temperatures matched the measured temperatures well for almost all sets of measurement. ˆ The WTA-model could not be validated. To do so, it requires an implementation of a engine model to the complete model. ˆ The measurement data from the cabin air temperature implies that the cabin air temperature has non-symmetric dynamics. This was most apparent when the white-box cabin air temperature model was developed. ˆ The white-box cabin air temperature model worked well with the available measurement data from experiments. The influence of the speed wind needs to be investigated (that is α and β in equation (4.9)). 42 ˆ The black-box cabin air temperature model worked also well with the available measurement data from experiments. But since the used measurement data sets used in the validation was the same used in the system identification, it requires more validation with “fresh” data. ˆ Heat from sun radiation was not considered in this thesis project. Modelling this is left for the future. 43 References [1] Andersson, J. (1999). A model of the temperatures in a truck cabin. Final Thesis at Link¨ oping Institute of Technology, Link¨ oping LiTH-ISY-EX-1959 [2] Hammarlund, H., Nordmark O. (2001). Modellering av bilklimat i Volvo S80. Final Thesis at Link¨ oping Institute of Technology, Link¨ oping LiTH-ISY-EX-3149 [3] Eriksson, M. (2001). Modelling and control of the AC-system in Heavy Duty vehicles. Final Thesis at Royal Institute of Technology, Stockholm [4] Holman, J.P. (2002). Heat Transfer. Mc Graw Hill, New York ISBN 0-07-112230-3 [5] Pierre, B. (1982). Mekanisk V¨ armeteori. Institutionen f¨ or mekanisk v¨ armeteori och kylteknik, Royal Institute of Technology, Stockholm [6] Ekroth, I., Granryd, E. (1999). Till¨ ampad termodynamik. Institutionen f¨ or termodynamik och kylteknik, Royal Institute of Technology, Stockholm ISBN 91-7170-067-6 [7] Ljung, L., Glad, T. (2004). Modellbygge och simulering. Studentlitteratur, Lund ISBN 91-44-02443-6 [8] Ljung, L. (2003). System Identification Toolbox User’s Guide. The Math Works, Inc. [9] Scania Internal Document PD1511032, dated 2003-09-18 [10] System Identification Toolbox 5.0.2, The MathWorks, Inc. [11] Matlab 6.5.0 R13, The MathWorks, Inc. [12] Simulink 5.0, The MathWorks, Inc. 44 Appendices A Inputs and Outputs in the Model A more detailed description of some of the parts and thoughts behind the model. Intended for the people at Scania. A.1 The “toplevel” The idea behind the structure of the model is that is should be used in a sort of layer structure. This means that the model itself are uses physical values. When the model are implemented into dSPACE, it would require to be embedded in a application layer. This application layer would handle all the scaling from the electrical signals to physical values. A.2 Input- and output-blocks in “toplevel” The input signals to the model are sorted into four blocks, namely: ˆ “Hard wired data” - intended for the electrical output from the ACC’s ECU. ˆ “Simulation setup” - setup parameters for the simulation. The intension for these signals are that they should be set from a user interface. ˆ “CAN-data” - signals from the CAN-bus. ˆ “Panel-data” - signals from the ACC’s user panel. The output blocks are: ˆ “Panel output to ECU” - outputs the ACC’s control panel setting to the ECU. ˆ “Signals to ECU” - the simulated signals that are used as inputs in the ACC’s ECU. ˆ “Signals to ATA” - CAN signals that are to be sent to the ATA. ˆ “Signals to WTA” - CAN signals that are to be sent to the WTA. A.3 Description of the input signals ˆ Water valve position. A decimal value from 0-100% that represents the opening of the cooling water valve. ˆ Fan speed setpoint. The actual fan speed in the range of 0-100% . ˆ Enable ATA. An integer value in the range from 0 to 2. 0 - No ATA is simulated. 1 - A 2kW ATA is simulated. 2 - A 4kW ATA is simulated. ˆ Enable WTA. If non-zero, a WTA will be simulated. A-1 ˆ ADR. Not used in the model. Intended to be a straight-trough signal to the ECU. A non-zero value means that an ADR-vehicle is simulated. ˆ Relative humidity. The relative air humidity (0-100%) used in the simulation. This value is only used in the AC sub-model. ˆ Sun sensor. A value of the sun intensity in units of w/m2 . This signal is currently not used in the model. ˆ Cooling water temperature. The temperature of the cooling water flowing in to the HVAC-system. That is in to the WTA or the heat exchanger. Used in the HVAC-model. ˆ Vehicle speed. Used in the HVAC-model and the cabin model. ˆ Outdoor temperature. ˆ Aux. heater power. The auxiliary heater’s (either ATA or WTA) heating power. Set by its ECU and is in units of %. ˆ AC clutch. Set by the ACC’s ECU. 0=disengage, 1=engage the AC compressor. A.4 Description of the output signals ˆ Sun sensor. A straight-through signal from the sun sensor input in the “Simulation setup” input block. ˆ Mixed air temp. Simulated mixed air temperature. ˆ Evaporator temp. Simulated evaporator temperature. ˆ Cabin temp. Simulated cabin air temperature. ˆ Air inlet temp. Inlet temperature to the ATA. Currently equal to cabin air temperature. ˆ Heater air temp. The air temperature after the ATA. Currently equal to TATA , the simulated temperature after the ATA. ˆ Cwt inlet temp. Inlet cooling water temperature to the WTA. Currently equal to the “Cooling water temperature” input. ˆ Cwt outlet temp. Cooling water temperature after the WTA. Currently equal to Tcwt,o , the simulated cooling water temperature after the WTA. A-2 B Simulink Blocks The figures in this appendix shows the essential Simulink-blocks used in the model. There are many blocks in the Simulink-model that have functions not directly related to the model (such as “mux”-blocks), but these are not included here. B-1 Figure B.1: The top-level block for the complete model. B-2 Relative air humidity [%] Sun sensor Use vpos as flow Out4 Out5 Out6 Cab fan speed [%] Roof hatch open Roof hatch close Auxiliary heater switch Cab temperature setpoint [deg C] Out4 Out5 Out6 Out7 Out8 Subsystem4 Out2 Out1 Subsystem3 Initial (t0) data Initial evaporator temperature [deg C] Initial cab temperature [deg C] Panel data Air distribution knob Out3 AC (on/off) Recirculation (on/off) Out2 Out9 ECON (on/off) CAN-data Engine comp. temperature [deg C] Out1 Subsystem2 Out7 AC clutch (on/off) Aux. heater power stage Out4 Cab temperature [deg C] Outdoor temperature [deg C] Out3 Out6 Vehicle speed [km/h] Out2 Out5 Cooling water temperature [deg C] Out1 Simulation setup ADR (on/off) Out3 Subsystem1 Enable WTA (on/off) Out2 Hard wired data Panel data CAN-data Simulation setup Enable ATA (0=disabled, 1=2kW, 2=4kW) Out1 Hard wired data Fan speed setpoint [%] Out2 Subsystem Water valve position [%] Out1 Panel data CAN-data Simulation setup Hard wired data Signals Signals Signals ATA data Cabin data Cabin5 ATA data Signals AC data Toplevel block for cabin air temperature model Version 0.2.76 Created by: Mattias Björklund / RESA Modified: Tue Oct 12 16:28:51 2004 ATA HVAC/ WTA AC data Mux Cabin data AC data Signals Bus Bus Bus Bus Bus Sun sensor Signals to WTA Heater air temp. [deg C] Air inlet temp. [deg C] Signals to ATA Heater air temp. [deg C] Air inlet temp. [deg C] Signals to ECU Cabin temp. [deg C] Evaporator temp. [deg C] Mixed air temp. [deg C] Panel output to ECU AC (on/off) Cab temperature setpoint [deg C] Auxiliary heater switch Roof hatch close Roof hatch open Subsystem8 In2 In1 Subsystem7 In2 In1 Subsystem6 In4 In3 In2 In1 Subsystem5 In9 In8 In7 In6 In5 In4 In3 Cab fan speed [%] In2 In1 Air distribution knob ECON (on/off) Recirculation (on/off) Figure B.2: The top-level HVAC model. (Block “HVAC/WTA” in figure B.1.) B-3 1 Signals Out. temp. Recirc. Cab. temp. V. speed Fan speed WTA on/off W. temp. Created: Tue Apr 20 09:45:34 2004 Version: 0.2.74 Last modification: 12-Oct-2004 16:19:53 Demux 4 Signals Stage Is flow Valve pos. Demux 2 Signals Demux 1 Signals Demux 3 Signals WTA on/off WTA Cooling water temp. after WTA [deg C] Airflow [kg/s] rh AC AC-model Water temperature out [deg C] Heater model Cooling Water temperature [deg C] Cooling Water flow [kg/s] Airflow [kg/s] Water temperature out [deg C] Mixed air temperature [deg C] Air temperature before heat exchanger Evaporator temperature [deg C] Air temperature [deg C] Air temperature [deg C] Evaporator temperature [deg C] Inlet (ambient) air temperature [deg C] Airflow [kg/s] Inlet temperature [deg C] Relative air humidity [%] AC (on/off) This block and its sub-systems calculates the resulting mixed air temperature after the AC and the heat exchanger. It also calculates the temperature increase in the cooling water "caused" by the WTA. Cooling water temp. [deg C] WTA power stage Water flow [kg/s] Airflow [kg/s] Coolw. flow [kg/s] Valve pos. to water flow Valve pos. is flow Valve pos. [%] Fan speed to air flow Vehicle speed [km/h] Inlet temperature [deg C] Calculate inlet temperature Fan speed setpoint (0-100%) Recirculation (on/off) Cabin temperature [deg C] Ambient temperature [deg C] Signals Demux 5 AC data 1 AC data Figure B.3: The AC-model. (Block “AC-model” in figure B.2.) B-4 Created: Tue Apr 20 09:45:34 2004 Version: 0.2.77 Last modification: 12-Oct-2004 16:42:07 fh Air temperature [deg C] Evaporator temp. to air temp. Evaporator temperature [deg C] Air flow [kg/s] Ambient temperature [deg C] This evaporator model is from the final thesis "Modelling and control of the AC-system in Heavy Duty vehicles" by Magnus Eriksson, 2001 Evap temp Evaporator rh [%] 2 Relative air humidity [%] 4 Airflow [kg/s] AC (on/off) Ambient temp 1 AC (on/off) 3 Inlet temperature [deg C] 1 Evaporator temperature [deg C] 2 Air temperature [deg C] Figure B.4: The “evaporator temperature to air temperature”-model. (Block “Evaporator temp. to air temp.” in figure B.3.) B-5 State-Space (with initial outputs) x' = Ax + Bu y = Cx + Du Created: Tue Apr 20 09:45:34 2004 Version: 0.2.77 Last modification: 12-Oct-2004 16:42:07 1 Ambient temperature [deg C] 3 Evaporator temperature [deg C] 2 Air flow [kg/s] Comp. Delta T [deg C] Calculate the mixed air temperature after the evaporator. Air flow compensation Delta T [deg C] Air flow [kg/s] 1 Air temperature [deg C] Figure B.5: The model of the heat exchanger. (Block “Heater model” in figure B.2.) B-6 Look-Up Table (2-D) Q_spec Created: Tue Apr 20 09:45:34 2004 Version: 0.2.76 Last modification: 12-Oct-2004 16:28:50 1 Inlet (ambient) air temperature [deg C] 4 Cooling Water temperature [deg C] 3 Cooling Water flow [kg/s] 2 Airflow [kg/s] Calculate the air temperature after the heat exchanger (i.e. the mixed air temperature). Constant2 Heat capacity of air Product 0 Q Cp_air Product1 Use a look-up table with the specific heat to calculate the air temperature after the heat exchanger depending of the cooling water temperature and so on... Switch 1 2 Water temperature out [deg C] 1 Air temperature [deg C] Future enhancements: Calculate the cooling water temperature after the heat exchanger Constant 0 Transfer Fcn (with initial outputs) 5s+1 Figure B.6: The ATA model. B-7 p From [Air_flow] 3 Cab temperature [deg C] 2 Air flow [kg/s] 1 Output power [w] p Delay from ATA [s] Delay to ATA [s] Heat capacity for air (Cp) Cp_air Calculate transport delays ATA air flow [kg/s] Goto [Air_flow] Calculate outlet air temperature from the heater acording to Q =mc ∆ T Product Air transport from cabin to ATA Transfer Fcn 10s+1 1 Enable Air transport from ATA to cabin 1 Heater air temperature [deg C] The block below models the dynamics of the ATA. We have a transportation delay (air moving from the ATA to the cabin). The linear filter describes how the air temperature changes after the output power of the ATA has been altered. Figure B.7: The WTA model. (Block “WTA” in figure B.2.) B-8 AND Output power [W] Cooling water temp. after WTA [deg C] Calculate cooling water temerature after WTA Cooling water temp. before WTA [deg C] Cooling water flow through WTA [kg/s] Applied WTA power [W] Calculate the increase of cooling water temperature "caused" by the WTA (if it's enabled). 3 Cooling water temp. [deg C] 1 Water flow [kg/s] WTA power stage to power WTA power stage [0-4] Logical Operator Created: Tue Apr 20 09:45:34 2004 Version: 0.2.75 Last modification: 13-Oct-2004 10:48:56 2 WTA power stage 4 WTA on/off Multiport Switch ∆T = 0 if WTA disabled (or power stage 0). 1 Cooling water temp. after WTA [deg C] 1 Applied WTA power [W] 2 Cooling water flow through WTA [kg/s] Cp_coolw Heat capacity for cooling water 1 Cooling water temp. after WTA [deg C] Product 3 Cooling water temp. before WTA [deg C] Enable Figure B.8: Block “Calculate cooling water temperature after WTA” in figure B.7. B-9 Figure B.9: The (white-box) cabin model. (Block “Cabin” in figure B.1.) B-10 Signals Loss factor This block models the dynamics of the cabin temperature. It calculates a "net power" of heat transferred to (or from) the cabin. The cabin temperature is then calculated from that net power. Created: Tue Apr 20 09:45:34 2004 Version: 0.2.104 Last modification: 02-Nov-2004 15:06:25 From2 [WallTemperature] Heat Loss ATA data 3 ATA data 2 Signals Out1 Out1 Out1 Out1 Out1 B(2)*u(2) Outside temp Out1 B(1)*u(1) Loss factor Signals ATA data HVAC data A(2,2)*x(2) T_walls A(2,1)*x(1) Cab temp A(1,2)*x(2) T_walls A(1,1)*x(1) Loss factor Cab temp HVAC data 1 HVAC data 1 xo s Integrator1 Integrator 1 xo s Cabin temperature [deg C] Cabin temperature [deg C] From1 [InitialCabTemperature] From [InitialCabTemperature] Gain scheduling deriv Signals HVAC data Used in feedback GoTo CabinTemperature Cabin data 1 Cabin data GoTo1 [WallTemperature] Look-Up Table1 Goto1 EngineRho Goto 2 Signals Terminator Derivative Transfer Fcn Look-Up Table HeatLossRho 1 400s+1 du/dt 1 HVAC data Figure B.10: The block “Gain scheduling deriv” in the white-box cabin air temperature model figure B.9 on page B-10. This block calculates the parameters discussed in section 4.5.6 on page 26. B-11 C C.1 Parameters Used in the Model Physical Constants cp,air cp,cwt ρair ρcwt C.1.1 1013.0 [J/(kg K)] 3547.0 [J/(kg K)] 1.2 [kg/m3 ] 1023.0 [kg/m3 ] Heat capacity for air Heat capacity for the cooling water Density of air Density of the cooling water Parameters in the AC-model The state space parameters: ⎡ ⎤ ⎛ ⎞ −0.0381 −0.0530 0.1411 −0.0003 A = ⎣ 0.0118 −0.0069 0.1782 ⎦ B = ⎝−0.0014⎠ −0.1324 −0.1560 −0.3015 0.0045   C = 69.0477 −0.1648 −0.6148 C.1.2 Parameters in the White-Box Cabin Model σout = 0 σin = 0 ρcab,1 = 0.08 ρcab,2 = 0.114 ρeng,1 = 0.15 ρeng,2 = 0.011 C-1 D=0 D Details of the Measurement Data Used D.1 The “-20 ‰ data” ˆ Measured in the climate chamber at Scania. ˆ A Scania “P-cab” was used. ˆ Ambient temperature about -20 ‰. ˆ Fan speed at level 2. ˆ External fan used to simulate a wind. The fan speed setting and the external fan was estimated to give about 0.12 kg/s air mass flow through the HVAC-system. (That is m ˙ HVAC ≈ 0.12.) The cooling water valve was stepped from closed to open and back to closed again. Following parameters where measured: ˆ The cooling water flow. ˆ The cooling water temperature before the heat exchanger. ˆ The mixed air temperature. ˆ The temperature at the passenger side in front of the air inlet ˆ The temperature at the seat D.2 The “0 ‰ data” ˆ Measured in the climate chamber at Scania. ˆ A Scania “P-cab” was used. ˆ Ambient temperature about 0 ‰ (though increasing during the experiment). ˆ Fan speed at level 2. ˆ External fan used to simulate a wind. was estimated to about 0.12 kg/s. As for the “-20 ‰ data”, m ˙ HVAC The cooling water valve was stepped from closed to open and back to closed again. Following parameters where measured: ˆ The cooling water flow. ˆ The cooling water temperature before the heat exchanger. ˆ The mixed air temperature. ˆ The temperature at the passenger side in front of the air inlet ˆ The temperature at the seat D.3 AC test data The experiments which these sets of data where collected from was done in a test rig at Scania. The AC-compressor was turned on and off and the evaporator temperature and the mixed air temperature was measured. A total of nine measurements were done with different conditions such as ambient temperature and air flow. D-1