dynamic modeling and self-optimizing control of building hvac systems

339
DYNAMIC MODELING AND SELF-OPTIMIZING CONTROL OF BUILDING HVAC SYSTEMS by Pengfei Li A Dissertation Submitted in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy in Engineering at The University of Wisconsin-Milwaukee December 2011

Upload: carfield95

Post on 16-Apr-2015

241 views

Category:

Documents


2 download

DESCRIPTION

Pengfei Li's Ph.D. Dissertation

TRANSCRIPT

DYNAMIC MODELING AND SELF-OPTIMIZING CONTROL OF BUILDING HVAC SYSTEMS by Pengfei Li A Dissertation Submitted in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy in Engineering at The University of Wisconsin-Milwaukee December 2011 ii DYNAMIC MODELING AND SELF-OPTIMIZING CONTROL OF BUILDING HVAC SYSTEMS by Pengfei Li A Dissertation Submitted in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy in Engineering at The University of Wisconsin-Milwaukee December 2011 Major Professor Date Graduate School Approval Date iii ABSTRACT DYNAMIC MODELING AND SELF-OPTIMIZING CONTROL OF BUILDING HVAC SYSTEMS by Pengfei Li The University of Wisconsin-Milwaukee, 2011 Under the Supervision of Professor Yaoyu Li The heating, ventilating, and air conditioning (HVAC) systems of commercial and residential buildings are responsible for a significant portion of overall energy consumption. The performance and energy efficiency of building HVAC systems may be dramatically improved with better control strategies. This dissertation research was motivated by two imperative needs from the HVAC practice. First, the development of advanced HVAC control techniques demands for quality dynamic models for various HVAC systems. The high-fidelity dynamic simulation platform thus obtained would provide quality virtual plant for advanced control design and controller validation before field tests and building commissioning or retrocommissioning. Second, for energy iv saving oriented supervisory control, it is desirable to optimize the setpoints in real time without detailed knowledge of building HVAC system models or behavior, i.e. in a nearly model-free fashion. Such cost-effective solutions would best fit the operation of building industry. This dissertation study investigates on both dynamic modeling and self-optimizing control for the chilled-water air conditioning and ventilation system which is an important class of HVAC systems for commercial buildings. First, the dynamic models of major equipment in the chilled-water system are developed based on Modelica, an equation based multi-physical dynamic simulation platform. These models are developed based on first-principle and contain detailed formulations for heat and mass transfers and pressure drops. The dynamic simulation model of an air-handling unit (AHU) is first developed. In particular, a chilled-water cooling coil model is developed with some improvements, which is validated with experiment data in ASHRAE project RP-1194 and also compared with the state-of-the-art model reported therein. Improvement in the modeling quality is clearly demonstrated. Second, the dynamic simulation model of a centrifugal chiller system is developed based on Modelica, based on a first-principle dynamic model of centrifugal compressor. In particular, a consistent initialization strategy has been proposed and demonstrated with simulation study. Second, this dissertation study investigates the application of the Extremum Seeking Control (ESC) for AHU self-optimizing control problems. This control strategy optimizes the damper opening based on the feedback of the chilled water flow rate. Compared with the existing methods of AHU control and optimization, this scheme eliminates the need for expensive and unreliable sensors. Also, a back-calculation based anti-windup ESC v scheme is applied to this problem, which can resolve the integral windup problem inherent to the ESC design. The ESC based economizer control strategy is evaluated with the dynamic AHU models developed, with significant success demonstrated. Finally, the experimental study is conducted to investigate the dp/dt assumption made in the two-phase heat exchanger modeling for vapor compression refrigeration cycle. This assumption is originally implemented in the Modelica Library TIL, but without any experimental proof. Experiments have been conducted on a commercial chiller at the testing facility of York China. The experimental results suggest that the time derivatives of pressures (dp/dt) at the inlets of the condenser and evaporator are extremely close to those at the respective outlets. This observation can thus justify the assumption of equal time derivative of pressure for dynamic simulation of two-phase heat exchangers, which in consequence improves the numerical efficiency and/or convergence of the overall refrigeration cycle simulation. Major Professor Date vi Copyright by Pengfei Li, 2011 All Rights Reserved vii To My Parents & My Wife viii TABLE OF CONTENTS LIST OF FIGURES ...................................................................................................... xii LIST OF TABLES ........................................................................................................ xx LIST OF NOMENCLATURE .................................................................................... xxii Chapter 1 Introduction .....................................................................................................1 1.1 Modeling and Simulation of Building HVAC Systems ......................................2 1.2 Building HVAC Controls ..................................................................................5 1.3 Chilled-Water System in Buildings ...................................................................6 1.4 Dynamic Modeling of Building HVAC Systems ...............................................8 1.5 Control and Optimization of Building HVAC Systems ......................................8 1.6 Organization of the Dissertation ...................................................................... 13 1.7 Summary......................................................................................................... 16 Chapter 2 Literature Review .......................................................................................... 17 2.1 Modeling and Simulation Techniques ............................................................. 17 2.1.1 Conventional HVAC Modeling and Simulation Programs .................. 18 2.1.2 Historical View of Simulation Tools ................................................... 18 2.1.3 Current Status of HVAC Simulation Tools ......................................... 20 2.1.4 Modeling Techniques ......................................................................... 21 2.1.5 Previous Work on Modelica Based Dynamic HVAC Models .............. 22 2.2 Dynamic Modeling of Air-Handling Unit ........................................................ 26 2.3 Dynamic Modeling of Centrifugal Chillers ...................................................... 29 2.4 AHU and Economizer Control ........................................................................ 33 2.5 Extremum Seeking Control (ESC) ................................................................... 36 2.6 Summary......................................................................................................... 39 Chapter 3 Dynamic Modeling of Air Handling Units ..................................................... 41 3.1 Air-Mixing Box .............................................................................................. 43 3.2 Air Duct .......................................................................................................... 45 3.3 Fan .................................................................................................................. 46 ix 3.4 Zone................................................................................................................ 47 3.5 Cooling Coil ................................................................................................... 49 3.5.1 Medium Model Design and Implementation ....................................... 53 3.5.2 Dynamic Control Volumes ................................................................. 62 3.5.3 Friction Factor .................................................................................... 65 3.5.4 Water Side Heat Transfer .................................................................... 79 3.5.5 Water Side Pressure Drop ................................................................... 81 3.5.6 Air Side Heat and Mass Transfer ........................................................ 83 3.5.7 Lewis Number and Lewis Relation ..................................................... 85 3.5.8 Air Side Pressure Drop ....................................................................... 90 3.6 Summary......................................................................................................... 90 Chapter 4 Dynamic Modeling of Centrifugal Chiller for Building Air Conditioning Systems........................................................................................................... 92 4.1 Introduction .................................................................................................... 92 4.2 Object-Oriented Modeling of Centrifugal Chiller System ................................ 96 4.2.1 Centrifugal Compressor ...................................................................... 97 4.2.2 Condenser and Evaporator ................................................................ 105 4.2.3 Expansion Device ............................................................................. 119 4.3 Simulation Study ........................................................................................... 124 4.3.1 Comparison of VRL-Based and FV-Based Heat Exchanger Models . 124 4.3.2 Compare Chiller Simulations ............................................................ 131 4.4 Summary....................................................................................................... 155 Chapter 5 Consistent Initialization for Dynamic Simulation of Centrifugal Chillers ..... 157 5.1 Introduction .................................................................................................. 157 5.2 Brief Review on DAE Consistent Initialization ............................................. 159 5.3 Direct method for consistent initialization of dynamic centrifugal compressor ..................................................................................................................... 164 5.3.1 Problem Statement ............................................................................ 167 5.3.2 Computation of Reasonable Compressor Start-up Speed Command .. 169 5.3.3 Pseudo-Physical Analogy for Centrifugal Compressor ...................... 172 5.3.4 Perturbation Method ......................................................................... 174 5.3.5 Variable Structure Modeling and Reinitialization .............................. 175 x 5.3.6 Choice of Suitable Perturbation Functions ........................................ 177 5.3.7 Discussion on the Feasibility of Steady-State Initialization Method .. 179 5.4 Case Study: Preprocessing Scheme for Dynamic Simulation of Centrifugal Chillers ......................................................................................................... 181 - Step 1: Determine the Initial Guess for Compressor Discharge (State 2)... 183 - Step 2: Determine the Initial Conditions for Condenser ............................ 184 - Step 3: Determine Initial Conditions for Evaporator ................................. 185 5.5 Simulation Study ........................................................................................... 187 5.5.1 Simulation Results of the Proposed Perturbation Function ................ 187 5.5.2 Discussion on the Pseudo-Physical Analogy ..................................... 189 5.5.3 Simulation Results of the Direct Initialization Method on Compressor 190 5.5.4 Validation of Mass and Energy Conservation ................................... 192 5.5.5 Computational Efficiency ................................................................. 194 5.6 Summary....................................................................................................... 196 Chapter 6 Self-Optimizing Operation of Air-Side Economizer Using Extremum Seeking Control (ESC) ............................................................................................... 197 6.1 Introduction .................................................................................................. 197 6.2 Proposed Economizer Control Strategy ......................................................... 199 6.3 Extremum Seeking Control (ESC) ................................................................. 202 6.3.1 Overview of ESC .............................................................................. 202 6.3.2 ESC for Energy Efficient Operation of Economizers ........................ 204 6.3.3 ESC Design ...................................................................................... 205 6.3.4 Anti-Windup ESC ............................................................................ 206 6.4 Simulation Study ........................................................................................... 207 6.4.1 ESC with Standard Design ................................................................ 207 6.4.2 Anti-Windup ESC ............................................................................ 215 6.5 Summary....................................................................................................... 219 Chapter 7 Experimental Validation .............................................................................. 220 7.1 Benchmark with Expermental Data from Zhou (ASHRAE RP-1194) [18] ..... 220 7.2 Comparion of Compution Efficiency ............................................................. 236 xi 7.3 Experimental Validation for the dp/dt Assumption of Heat Exchangers in Vapor Compression Refrigeration Cycles ................................................................ 239 7.3.1 Introduction ...................................................................................... 239 7.3.2 Experiment Setup ............................................................................. 240 7.3.3 Resutls and Discussion ..................................................................... 247 7.4 Summary....................................................................................................... 267 Chapter 8 Conclusions and Future Work ...................................................................... 268 8.1 Summary of Research Contributions ............................................................. 268 8.1.1 Dynamic Modeling of Building Chilled-Water Systems .................... 269 8.1.2 Self-Optimizing Operation using Extremum Seeking Control ........... 271 8.2 Suggested Future Work ................................................................................. 272 8.2.1 Future Research for Chilled-Water System ....................................... 272 8.2.2 Modelica Models for Real-Time Applications................................... 274 8.2.3 Integration with Smart Grid and Renewable Energy.......................... 274 References ................................................................................................................... 276 Appendices .................................................................................................................. 298 A. Review of Centrifugal Compressor Modeling in Gravdahl and Egeland [194] ..................................................................................................................... 298 B. Geometric Parameters for Centrifugal Chiller Modeling ................................ 302 C. Initial Guess for Chiller Initialization Study .................................................. 304 D. Simulation Layout of ESC Based Economizer Control .................................. 305 E. Model Development Based on TIL................................................................ 307 CURRICULUM VITAE .............................................................................................. 309 xii LIST OF FIGURES Figure 1.1: U.S. primary energy consumption [1] ............................................................1 Figure 1.2: Schematic diagram of a chilled-water system in commercial buildings [10] ...7 Figure 1.3: Block diagram for model-based RTO and regulatory feedback control (reproduced with permission from [14])..................................................... 10 Figure 1.4: Block diagram of applying self-optimizing control as the dynamic RTO layer for building HVAC system (modified from Figure 1.3) ............................. 13 Figure 3.1: Modelica model of the air handling unit ....................................................... 42 Figure 3.2: Damper characteristic curve ......................................................................... 44 Figure 3.3: Comparison of pressure drop due to wall friction in the ducts ...................... 46 Figure 3.4: UML class diagrams of the water- and air-side heat exchanger modeling. The shaded blocks represent the efforts made in this dissertation research to modify the corresponding components from ACL...................................... 52 Figure 3.5: Cp errors of the IF-97 and LUT models relative to the IAPWS-95 standard. . 55 Figure 3.6: Cv errors of the IF-97 and LUT models relative to the IAPWS-95 standard .. 55 Figure 3.7: Density errors of the IF-97 and LUT models relative to the IAPWS-95 standard ..................................................................................................... 56 Figure 3.8: Specific-entropy errors of the IF-97 and LUT models relative to the IAPWS-95 standard ................................................................................................ 56 Figure 3.9: Regions and equations of IAPWS-IF97 (reproduced with permission from Figure 1 in [107]) ...................................................................................... 60 Figure 3.10: Object diagram of the cooling coil composition of air, wall and water sub-models. ...................................................................................................... 62 xiii Figure 3.11: Comparison of maximum errors of existing equations to the PKN correlation (Table 3.4), plot created on logarithmic scale with base 10 ........................ 75 Figure 3.12: Comparison of RSS with existing equations to the PKN correlation (Table 3.5), plot created on the logarithmic scale with base 10.............................. 76 Figure 3.13: Comparison of computation time among existing equations (Table 3.6), plot created on the logarithmic scale with base 10............................................. 78 Figure 3.14: Comparison of percent errors to the PKN correlation (Eq. (3.22)) between the proposed model (Eq. (3.28)) and Techo et al.s approximation (Eq. (3.29)). ...................................................................................................... 79 Figure 3.15: Cooling and dehumidifying of moist air over the cooling coil surface ........ 86 Figure 4.1: Schematic drawing of water-cooled centrifugal chiller system interacted with cooling tower and air handling unit ............................................................ 94 Figure 4.2 Schematic drawing of centrifugal chiller ....................................................... 95 Figure 4.3: p-h diagram of cyclic operation in R134a-based centrifugal chiller system ... 96 Figure 4.4: Cross-sectional view of a centrifugal compressor (reproduced with permission from Figure 47 in 2008 ASHRAE Handbook: HVAC Systems and Equipment, p. 37.28) ................................................................................. 98 Figure 4.5: Schematic drawing of a centrifugal compression system in chiller with inlet guide vane (IGV) and speed control ........................................................... 98 Figure 4.6: Modelica model layout of the condenser model (reproduced and modified with permission from TILs TubeAndTube heat exchanger model)........... 107 Figure 4.7: Illustrative diagram for the dp/dt assumption ............................................. 110 xiv Figure 4.8: Illustration of water and refrigerant sides heat transfer in basic cell models ................................................................................................................ 111 Figure 4.9: Illustrative diagram of heat transfer regions in the evaporator .................... 115 Figure 4.10: Illustrative diagram of heat transfer regions in the condenser ................... 115 Figure 4.11: Modelica model of a VRL-based condenser in TIL .................................. 118 Figure 4.12: Control volume of an orifice plate ............................................................ 119 Figure 4.13: Illustrative diagram of forces acting on a TXV ......................................... 122 Figure 4.14: Test configuration of FV-based heat exchanger simulation ...................... 125 Figure 4.15: Test configuration of VRL-based heat exchanger simulation .................... 125 Figure 4.16: Comparison between the VRL-based model and the FV-based model (case 1) ................................................................................................................ 127 Figure 4.17: Comparison between the VRL-based model and the FV-based model (case 2) ................................................................................................................ 128 Figure 4.18: Comparison of computation time of VRL-based model with FV-based model ................................................................................................................ 131 Figure 4.19: Modelica model of the modified Bendapudi chiller in TIL ....................... 134 Figure 4.20: Modelica model of the detailed chiller in TIL .......................................... 134 Figure 4.21: Comparisons of modified Bendapudi chiller and the detailed chiller (case 1) ................................................................................................................ 141 Figure 4.22: Comparisons of modified Bendapudi chiller and the detailed chiller (case 2) ................................................................................................................ 147 Figure 4.23: Comparisons of modified Bendapudi chiller and the detailed chiller (case 3) ................................................................................................................ 153 xv Figure 4.24: Comparison of computation time between the modified Bendapudi chiller and detailed chiller .................................................................................. 155 Figure 5.1 Total refrigerant mass charge at chiller start-up in fault-free condition, simulation of example 1 in Bendapudi [118]. ........................................... 159 Figure 5.2: Simulation results for testing individual chiller components under a 10 seconds ramp change in compressor rotation speed at 500 seconds .......... 166 Figure 5.3: Dymola simulation log of a failed initialization when the four chiller components were connected. ................................................................... 167 Figure 5.4 Selection of analyticalm based on compressor characteristic map ...................... 175 Figure 5.5: Illustrating example of inconsistent conditions for the reinitialization after switching to the original compressor equation ......................................... 176 Figure 5.6: Comparison of unit step function with the proposed perturbation function with different time durations for transitions ............................................. 179 Figure 5.7: Schematic of the four state points labeled on the centrifugal chiller system 182 Figure 5.8: Modelica model layout of the detailed centrifugal chiller model in TIL...... 188 Figure 5.9: Refrigerant quality profile at the compressor inlet during chiller initialization ................................................................................................................ 190 Figure 5.10: Mass flow rate at compressor outlet during chiller initialization ............... 191 Figure 5.11: Compressor pressure rise ratio during chiller initialization ....................... 191 Figure 5.12: Refrigerant mass accumulation at condenser and evaporator sides during chiller initialization .................................................................................. 192 Figure 5.13: Total refrigerant mass imbalance during chiller initialization ................... 193 Figure 5.14: Total energy imbalance during chiller initialization .................................. 194 xvi Figure 5.15: Solution profiles of compressor mass flow rates based on the integration algorithms of DASSL and Radau lla ........................................................ 195 Figure 5.16: Comparison of computation time for the proposed chiller model with the integration algorithms of DASSL and Radau lla ...................................... 196 Figure 6.1: Schematic of a single-duct AHU (reproduced with permission from Figure 1 in [60]) .................................................................................................... 199 Figure 6.2: State transition diagram for the proposed control strategy (reproduced with permission from Figure 4 in [81]) ............................................................ 201 Figure 6.3: Illustration of the three control states with different outside air conditions for an ideal coil with return conditions of 75F and 50% RH (reproduced with permission from Figure 9 in [81]) ............................................................ 202 Figure 6.4: Block diagram of ESC [50] ........................................................................ 203 Figure 6.5: ESC based air-side economizer control [50] ............................................... 204 Figure 6.6: Block diagram for the anti-windup ESC [50] ............................................. 207 Figure 6.7: Static map from OAD opening to chilled water flow rate ........................... 210 Figure 6.8: Tuning results of standard ESC design based on 30% initial OAD opening 211 Figure 6.9: Tuning results of standard ESC design based on 20% initial OAD opening 212 Figure 6.10: Tuning results of standard ESC design based on 25% initial OAD opening ................................................................................................................ 212 Figure 6.11: Tuning results of standard ESC design based on 40% initial OAD opening ................................................................................................................ 213 Figure 6.12: Tuning results of standard ESC design based on 65% initial OAD opening ................................................................................................................ 213 xvii Figure 6.13: Tuning results of standard ESC design based on 75% initial OAD opening ................................................................................................................ 214 Figure 6.14: Tuning results of standard ESC design based on 85% initial OAD opening ................................................................................................................ 214 Figure 6.15: Illustration for the changes of the outdoor-air conditions on the psychrometric chart for anti-windup ESC simulation ............................... 216 Figure 6.16: Ramp change of outdoor air conditions at 5000 and 8000 seconds ........... 217 Figure 6.17: Static map from OAD opening to chilled water flow rate (State 2) ........... 217 Figure 6.18: Integral windup of standard ESC under actuator saturation ...................... 218 Figure 6.19: Anti-windup ESC under damper saturation .............................................. 218 Figure 7.1: Schematic diagrams for the 4-row cooling coil........................................... 221 Figure 7.2: Inlet flow rate variations of cases 4 and 5 in Table 7.2 ............................... 224 Figure 7.3: Increase air inflow rate for an 8-row fully wet coil (case 1) ........................ 226 Figure 7.4: Increase air inflow rate at low water flow rates for a 4-row partially wet coil (case 2) .................................................................................................... 228 Figure 7.5: Increase water inflow rate for 4-row partially wet coil (case 3) .................. 230 Figure 7.6: Feedback control of air flow rate for 8-row partially wet coil (case 4) ........ 231 Figure 7.7: Feedback control of water flow rate for a 4-row partially wet coil (case 5) . 233 Figure 7.8: Decrease air inlet temperature for an 8-row partially wet coil (case 6) ........ 234 Figure 7.9: Increase air inlet humidity for an 8-row partially wet coil (case 7) ............. 236 Figure 7.10: Comparison of the simulation profiles of DASSL, Rauda IIa and Zhous method (ASHRAE RP-1194) [18]. .......................................................... 238 Figure 7.11: Photograph of the chiller test bench ......................................................... 241 xviii Figure 7.12: Schematic of sensor allocation and data acquisition system for dp/dt test . 242 Figure 7.13: Photographs of the butterfly valve used in York YR chiller ...................... 244 Figure 7.14: Cross sectional view of water tubes in the condenser and evaporator ....... 245 Figure 7.15: Experimental results of case 1 where (a) and (b) are the pressures at inlet and outlet of condenser and evaporator respectively and comparison of dp/dt at their respective inlet and outlet, (c) and (d) are the normalized dp/dt difference at condenser and evaporator, respectively. ............................... 252 Figure 7.16: Experimental results of case 2 where (a) and (b) are the pressures at inlet and outlet of condenser and evaporator respectively and comparison of dp/dt at their respective inlet and outlet, (c) and (d) are the normalized dp/dt difference at condenser and evaporator, respectively. ............................... 254 Figure 7.17: Experimental results of case 3 where (a) and (b) are the pressures at inlet and outlet of condenser and evaporator respectively and comparison of dp/dt at their respective inlet and outlet, (c) and (d) are the normalized dp/dt difference at condenser and evaporator, respectively. ............................... 256 Figure 7.18: Experimental results of case 4 where (a) and (b) are the pressures at inlet and outlet of condenser and evaporator respectively and comparison of dp/dt at their respective inlet and outlet, (c) and (d) are the normalized dp/dt difference at condenser and evaporator, respectively. ............................... 258 Figure 7.19: Experimental results of case 5 where (a) and (b) are the pressures at inlet and outlet of condenser and evaporator respectively and comparison of dp/dt at their respective inlet and outlet, (c) and (d) are the normalized dp/dt difference at condenser and evaporator, respectively. ............................... 260 xix Figure 7.20: Experimental results of case 6 where (a) and (b) are the pressures at inlet and outlet of condenser and evaporator respectively and comparison of dp/dt at their respective inlet and outlet, (c) and (d) are the normalized dp/dt difference at condenser and evaporator, respectively. ............................... 262 Figure 7.21: Experimental results of case 7 where (a) and (b) are the pressures at inlet and outlet of condenser and evaporator respectively and comparison of dp/dt at their respective inlet and outlet, (c) and (d) are the normalized dp/dt difference at condenser and evaporator, respectively. ............................... 264 Figure 7.22: Experimental results of case 8 where (a) and (b) are the pressures at inlet and outlet of condenser and evaporator respectively and comparison of dp/dt at their respective inlet and outlet, (c) and (d) are the normalized dp/dt difference at condenser and evaporator, respectively. ............................... 266 Figure A.1: Fluid velocity angles at the impeller (Reproduced with permission from Figure 5.2 and Figure 5.3 in Gravdahl and Egeland [194]), where (a) is the fluid velocity angle at the inducer (inlet). (b) is the fluid velocity angle at the impeller tip (outlet). ................................................................................. 299 Figure D.1 Simulation model layout of ESC based economizer control ........................ 305 Figure D.2: Modelica model layout of the ESC block with anti-windup logic .............. 306 Figure E.1: Library structure of the modified TIL (the customized modeling efforts are marked with the shaded blocks)...308 xx LIST OF TABLES Table 3.1: Relative Errors of IF-97 and LUT Water Models to IAPWS-95 Standard in Property Calculations ................................................................................... 54 Table 3.2: Summary of Cited-PKN Correlations from Some Heat Transfer References .. 68 Table 3.3: Summary of Optimization Results from Each Step ........................................ 71 Table 3.4: Comparison of Maximum Errors of Existing Equations to the PKN Correlation ..................................................................................................................... 73 Table 3.5: Comparison of RSS with Existing Equations to the PKN Correlation ............ 73 Table 3.6: Comparison of Computation Time among Existing Equations ....................... 77 Table 4.1: Equipment breakdown of primary cooling energy use [9] .............................. 93 Table 4.2: Comparison of model size of heat exchangers for initialization problem...... 129 Table 4.3: Comparison of model size of heat exchangers for time-step integration ....... 130 Table 4.4: Comparison of model size of chillers for initialization problem ................... 153 Table 4.5: Comparison of model size of chillers for time-step integration .................... 154 Table 7.1: Dimensions of the Test Coils [18] ............................................................... 222 Table 7.2: Coil Inlet Conditions for Sample Transient Comparisons [1] ....................... 223 Table 7.3: Comparison of Computation Time (CPU-Integration Time) ........................ 238 Table 7.4: Instrumentation for the dp/dt Test ............................................................... 243 Table 7.5: Dimensions of the Screw Compressor Tested .............................................. 244 Table 7.6: Dimensions of the Condenser and Evaporator ............................................. 245 Table 7.7: Arrangement of Water Tubes at Condenser and Evaporator ........................ 245 Table 7.8: Total Number of Water Tubes at Condenser and Evaporator ....................... 246 Table 7.9: Operating Ranges for the dp/dt Tests ........................................................... 248 xxi Table 7.10: Summary of dp/dt Difference at Condenser Inlet and Outlet ...................... 249 Table 7.11: Summary of dp/dt Difference at Evaporator Inlet and Outlet ..................... 249 Table B.1: Geometric Parameters of the Centrifugal Compressor [194] ....................... 302 Table B.2: Geometric Parameters of the Condenser and Evaporator [118] ................... 302 Table B.3: Geometric Parameters of the TXV [118] .................................................... 303 Table C.1: Initial Guesses for Dynamic Chiller Simulation Obtained from the Three-Step Preprocessing Scheme.304 xxii LIST OF NOMENCLATURE Abbreviations AHU Air handling unit AESC Adaptive extremum seeking control CAV Constant air volume DAE Differential algebraic equation DAEs Differential algebraic equations ESC Extremum seeking control FDI Fault detection and identification FV Finite volume IGV Inlet guide vane MB Moving boundary OAD Outdoor air damper RH Relative humidity TXV Thermal expansion valve VAV Variable air volume Latin Symbols A1 Cross section area of the impeller eye Ain Cross-sectional area at the inlet of the orifice plate Aout Cross-sectional area at the outlet of the orifice plate Aeff Effective flow area of the orifice plate Aeff_smooth Effective flow area for the smoothing function used in the orifice plate vA Flow area of TXV Af Face flow area of heat exchangers Ar Heat transfer area in each refrigerant cell xxiii Aw Heat transfer area in each liquid cell 0 1 2 3 4, , , , a a a a a Coefficients of compressor polytropic efficiency map 0 1 2 3 4, , , , c c c c c Coefficients of compressor maximum capacity map Cb Time constant of TXV bulb CD Discharge coefficient Cf Fanning friction factor in smooth pipes p,inc Specific heat capacity at compressor suction line p,wallc Specific heat capacity of wall material sf,condC Surface enhancement factor for condensation heat transfer sf,supC ,sf,subC Surface enhancement factors for superheat and sub-cooling refrigerants, respectively D1 Average inducer diameter Dh hydraulic diameter of the pipe Ds Shell diameter di Tube inner diameter do Tube outer diameter e1, e2 Manufactures coefficients for heat transfer calculation in evaporator f Darcy friction factor f1, f2 Coefficients of flow area map of TXV 2h Initial guess of specific enthalpy at compressor outlet 3h Initial guess of specific enthalpy at condenser inlet ha , hb Inlet and outlet specific enthalpies rh Mean specific enthalpy in each refrigerant cell r,inh Inlet specific enthalpy in each refrigerant cell r,outh Outlet specific enthalpy in each refrigerant cell xxiv hv,in Inlet specific enthalpy of the expansion valve hv,out Outlet specific enthalpy of the expansion valve hideal Ideal energy transferred to the refrigerant flow without any losses J Momentum of inertia of the compressor k Thermal conductivity of the fluid kd Empirical constant based on the type of damper blades fk Friction coefficient in centrifugal compressor initialk Gain for the use of pseudo physical analogy rk Thermal conductivity of refrigerant wk Thermal conductivity of water lk Thermal conductivity of saturated refrigerant liquid IGVk Normalized IGV position springk Spring constant Lcond Tube length of the condenser L Length of the pipe or tube Ld Leakage when the damper is fully closed Ltot Total tube length mwall Wall mass Mz Mass of air in the air volume in the conditioned zone aM, bMInlet and outlet air flow rates in the conditioned zone humanM Mass flow rate of the total water vapor from the people in the conditioned zone condM Refrigerant mass at condenser condM A Change of refrigerant mass at condenser during the time interval [t0, t2] evapM AChange of refrigerant mass at evaporator during the time interval [t0, t2] rM Mass in each refrigerant cell xxv wallM Mass in each wall cell 1,nomm Nominal compressor mass flow rate from design specification 2m Outlet mass flow rate from the compressor based on Figure 5.7 3m Inlet mass flow rate to the expansion valve based on Figure 5.7 4m Outlet mass flow rate from the expansion valve based on Figure 5.7 analogym Compressor mass flow rate calculated from the pseudo-physical analogy analyticalm Compressor mass flow rate calculated from the non-surge analytical solution maxm Maximum compressor mass flow rate meanm Mean mass flow rate of each refrigerant cell m Compressor mass flow rate r,inm Inlet mass flow rate of each refrigerant cell r,outm Outlet mass flow rate of each refrigerant cell v,inm Inlet refrigerant mass flow rate of expansion valve v,outm Outlet refrigerant mass flow rate of expansion valve smoothm Valve mass flow rate for the smoothing function used in the orifice plate N Total number of tubes Nuw Water side Nusselt number Num Mean Nusselt number p Pressure 1 p Initial guesses of the inlet pressure to the compressor based on Figure 5.7 2 p Initial guesses of the outlet pressure to the compressor based on Figure 5.7 3 p Initial guesses of inlet pressure to the expansion valve based on Figure 5.7 4 p Initial guesses of outlet pressure to the expansion valve based on Figure 5.7 / dp dt Time derivative of pressure xxvi inp Inlet pressure outp Outlet pressure IGVp A Pressure loss across IGV c,inp Compressor suction line pressure c,outp Compressor discharge line pressure ep Evaporator side pressure bulbp TXV bulb pressure mindp Empirical parameter of minimum opening pressure of TXV Prr Refrigerant side Prandtl number Prw Water side Prandtl number humanQ Total evaporative power from the people in the conditioned zone rQ Rate of heat transfer to each refrigerant cell wQ Rate of heat transfer to each liquid cell boilQ'' Boiling heat flux in kW/m2 r1 Average inducer radius r2 Radius at impeller tip Rdamp Resistance of the damper Ropen Resistance of fully open dampers Rwall Thermal resistance of the wall Re Reynolds number Rer Refrigerant side Reynolds number Rew Water side Reynolds number linearR Flow resistance of the linear IGV model nonlinearR Flow resistance of the nonlinear IGV model t Current simulation time xxvii t0 Time instant when refrigerant enters the condenser t1 Time instant when refrigerant start to leave the condenser t2 Time instant at the end of the pseudo-physical analogy period tc Transition time for the perturbation method ts Transition time for the model switching Ta Temperature at heat port a Tb Temperature at heat port b rT Mean temperature in each refrigerant cell e,outT Refrigerant temperature at evaporator outlet bT Mean refrigerant temperature of TXV bulb wT Mean temperature in each liquid cell wallT Mean temperature in each wall cell, duct wall, or cabin wall inT Refrigerant temperature at compressor suction line U1 Tangential velocity of the rotor at diameter D1 Uz Total internal energy of the air v Mean velocity meanv Average refrigerant flow velocity at shell-side Vcond Total refrigerant volume in the condenser Vevap Total refrigerant volume in the evaporator rV Volume in each refrigerant cell V Volumetric flow rate of refrigerant in compressor Vtot Total volume of the refrigerant at shell-side pW Polytropic work of compressor lifty Valve lift xxviii Greek Symbols boilo Boiling heat transfer coefficient condo Condensation heat transfer coefficient od Fractional opening of the damper IGVo IGV opening ro Refrigerant side local convective heat transfer coefficient supo Superheat heat transfer coefficient subo Subcooling heat transfer coefficient wo Water side local convective heat transfer coefficient 1b Fluid velocity angle 2 Fluid velocity angle 2b Backsweep angle at the impeller tip po Uncertainty of the pressure measurement / dp dto Uncertainty of the dp/dt calculation Expansion factor isq Isentropic efficiency of the centrifugal compressor pq Polytropic efficiency k Heat capacity ratio Friction coefficient Dynamic viscosity l Dynamic viscosity of the saturated refrigerant liquid s Dynamic viscosity evaluated at the average value of the mean temperature Kinetic viscosity Density 3 Inlet refrigerant density to expansion valve based on Figure 5.7 xxix c,in Inlet refrigerant density of the compressor c,out Outlet refrigerant density of the compressor cond Mean refrigerant density of the condenser based on Figure 5.7 evap Mean refrigerant density of the evaporator based on Figure 5.7 l Density of saturated refrigerant liquid r Mean density in each refrigerant cell v,in Inlet refrigerant density of the expansion valve v Density of saturated refrigerant vapor Slip factor ct Compressor torque dt Drive torque of the motor c Pressure rise ratio Rotation speed of the rotor xxx ACKNOWLEDGEMENTS This dissertation was facilitated by tremendous effort and help from other people and resources. I would like to express my deep and sincere gratitude to my Ph.D. advisor Dr. Yaoyu Li for his great help and effort. It was my pleasure and honor to be his first Ph.D. student working on building HVAC research. I truly appreciate all his support and patience to teach and guide me through the turbulence of research and study smoothly. I am also sincerely indebted to Dr. John E. Seem, from whom I am fully convinced of the importance to always master the fundamentals first. His serious attitude towards research is always inspiring me to never overlook details and never give up. The way he presents research outcomes, is a persistent reminder for me to always pursue high quality. I gratefully acknowledge the continuous funding support from Johnson Controls, Inc. during my Ph.D. study, from which I have all the resources to concentrate on my research and have the opportunity to attend many conferences, travel to Germany and visit York-China for meaningful collaborations. I am also grateful for the experimental test conducted at York-China, Wuxi to validate the key modeling assumption in my research. I am thankful for the rest of my committee members: Dr. Tien-Chien Jen, Dr. Ronald A. Perez and Dr. Dexuan Xie, for their precious time and support on my Ph.D. work. I am also thankful for the model library developers in TLK/ifT. It was my great experience and joyful trip to attend the workshop and stay there for a month as a visiting researcher. Finally, my deepest gratitude goes to my mom, dad, and my wife, for all your endless support. It is your unconditional love that keeps me moving forward. 1 Chapter 1 Introduction Buildings are a major sector for energy consumption. As of 2010, commercial and residential buildings consume nearly 40% of the primary energy supply in the United States, even more than the industry and transportation sectors [1] (see Figure 1.1). Considerable amount of carbon emissions from buildings have a large impact on man-made global warming effect. In addition to economical savings, improving energy efficiency in buildings can also help to reduce carbon emissions. Building energy efficiency can be improved in a variety of aspects. In commercial buildings, the major sources of energy consumption in buildings are identified as lighting (17.4%), space heating and cooling (23.8%), ventilation (8.7%), and refrigeration (6.7%) [1]. Thus, improving the energy efficiency of heating, cooling, ventilation and air-conditioning (HVAC) systems would have a significant impact on the overall building efficiency. Figure 1.1: U.S. primary energy consumption [1] 2 The performance and energy efficiency of building HVAC system may be improved with better control strategies, better control setpoints, and better controller tuning. To serve these needs, academia and industry have invested tremendous efforts for developing various modeling and simulation techniques to advance controller design and validation before actual implementation for field tests. This dissertation is concerned with both dynamic modeling of building HVAC systems and the development of self-optimizing control strategies for efficient operation of such systems. 1.1 Modeling and Simulation of Building HVAC Systems Building HVAC simulation programs can be roughly classified as whole-building energy performance simulation and equipment level1 simulation. A major difference between these two simulation tasks lies in their respective purposes and the dominant time scales in the simulation. The time scale for the former usually spans from hours to days, while that for the latter usually ranges from several minutes to several seconds, or even down to milliseconds (e.g., compressor failure protection mechanism usually responses in milliseconds). In general, the whole-building level simulation aims at performance assessment, building commissioning and diagnostics [2-4]. For potential savings of applying whole-building simulation tools in building diagnostics, Roth [4] said: The energy-saving potential of retro-commissioning represents the upper boundary on automated whole building diagnostics (AWBD) energy savings. Thus, AWBD tools could reduce building energy consumption by 5% to 20%. 1 The equipment level simulation defined here includes component level simulation such as a single heat exchanger, and system level simulations such chillers, chiller + tower, chiller + air handling units, etc. 3 In control applications, the equipment level simulation focuses on studying the transients of a single HVAC component or subsystems coupled with local controllers. Optimal controllers designed in this stage target at minimizing energy losses due to improper operations on a cycle-by-cycle2 base, thus the time scale considered would be much less than the whole-building simulation programs. For control and diagnostics study, there is a strong need to integrate dynamic equipment level simulation with the dynamic whole-building simulation to solve challenging problems for building HVAC systems. Currently, such combination3 can be realized by running co-simulation with different simulation platforms. The simulation data is synchronized between different platforms based on a pre-defined sample rate for data synchronization. An effort is also being made to unify the capabilities of simulating both equipment level and whole-building level in a same modeling and simulation platform [5]. Another important area of study is automated fault detection, diagnostics, and prognostics of building HVAC systems. According to Katipamula and Brambley [6], Poorly maintained, degraded, and improperly controlled equipment wastes an estimated 15% to 30% of energy used in commercial buildings. Fault detection and diagnostics schemes can be applied to both whole-building level and equipment-level simulations to monitor and correct the performance of building HVAC systems and their controls. One major focus of this dissertation study is to address the problems in equipment level modeling and simulation. In the past several decades, there has been tremendous 2 Cycle refers to thermodynamic cycle of a given refrigeration system to start to from its initial state to its final state 3 The purpose for co-simulation is to take the advantage of domain-oriented language and put together their respective capability, e.g., Modelica + EnergyPlus is suitable for dynamic equipment and detailed building envelop simulation, Modelica + Matlab/Simulink is suitable for dynamic simulation of HVAC system with advanced controllers. 4 progress achieved for modeling and simulation of building HVAC systems. However, there remain research needs and challenges in the dynamic modeling and advanced control of building HVAC systems. There are three modeling approaches that are often employed in control studies: 1) detailed physics-based (or first-principle) modeling, 2) reduced-order modeling, and 3) data-driven modeling. For HVAC controls, both detailed physics-based modeling and reduced-order modeling are needed. Physics based model reduction has been described in Tummescheit [7]. For control applications, the reduced-order models are generally developed based on the first-principles, through linearization to certain operating conditions, sometimes followed by some model reduction schemes. The states of the obtained models can be minimized by retaining the key dynamics. Such modeling techniques are sometimes called control-oriented modeling. Data-driven modeling often results in linear or nonlinear black-box models. Pairs of input and output data are used to determine the parameters in predefined mathematical model structures used to represent the actual HVAC models. Due to the nonlinearities typically presented in HVAC systems, certain techniques such as neural networks, support vector machine, and boosting tree are often applied to determine the input-output mappings [8]. A major objective of this dissertation study is the development of detailed physics-based models. While the reduced-order models are generally needed for model-based controller design. The physics-based detailed modeling can provide high-fidelity virtual 5 plant to facilitate the development of control and fault detection techniques, performance assessment, and design optimization. 1.2 Building HVAC Controls Another theme of this dissertation study is to develop self-optimizing controllers for building HVAC systems. For HVAC systems, one typical control objective is setpoint regulation, e.g. temperature and humidity control. Meanwhile, optimal control or setpoint optimization is needed for energy saving operation, i.e. minimizing the energy consumption while satisfying the demand for setpoint regulation. With the decades of development of feedback and adaptive control strategies, the regulation control has reached maturity for most occasions. The setpoint optimization or optimal control HVAC systems, as comparison, is still an open challenge in general. The building HVAC systems present a dilemma for control engineers. On one hand, such systems feature complex, nonlinear and time-varying processes; on the other hand, building operation has been a low-investment practice due to economical reasons. Accurate modeling or detailed/frequent calibration is a luxury in general. Such reality lends tremendous difficulty for applying the model-based control and optimization techniques and many practices that have been successful for other industrial sectors. Therefore, self-optimizing control strategies, which may achieve optimal operation (e.g. in terms of efficiency) with least model information, are desirable from the standpoint of building HVAC practice. This dissertation study, in addition to dynamic modeling, also investigates the design of self-optimizing control strategies for building HVAC systems using the extremum seeking control. 6 These two research themes may present an apparent paradox: we try to build high-fidelity dynamic HVAC models, while the pursuit of self-optimizing control strategy implies the least dependency on the model. In fact, such paradox reflects the two parallel and somewhat related needs from the practice of HVAC industry. Accurate simulation models are beneficial for technology development, while operations have to adapt to high uncertainties. Among the large set of building HVAC equipment, the chilled-water system is chosen as the target application. Such system is an important class of equipment for commercial building ventilation and air conditioning systems [9]. The physics and system configuration of such system are in many ways similar to many other HVAC systems, such as rooftop and heat pump systems, etc. Therefore, the research outcomes of this dissertation research may be easily extended to other types of HVAC systems and render greater impact. The remainder of this chapter will introduce the chilled-water system first, followed by a description of the current status of dynamic modeling for building HVAC systems. Then, a brief summary of control and optimization for building HVAC systems will be described. Finally, this chapter will be concluded with a summary and organization of the whole dissertation. 1.3 Chilled-Water System in Buildings In the central HVAC system of commercial buildings, the chilled-water system supplies chilled-water to meet the cooling loads in buildings [9]. As shown in Figure 1.2, a chilled-water cooling system typically consists of three sub-systems: 1) cooling tower 2) 7 chiller and 3) air-handling units (AHU). Among these three sub-systems, chiller can be regarded as the heart of the overall system, which provides the cooling source, i.e., the chilled-water to the conditioned space via AHU. The chiller system typically includes a water pump to circulate the chilled-water generated from chillers evaporator to the buildings AHU for cooling. Another water pump is usually placed in the chillers condenser side to reject heat, which circulates the heated water to the cooling tower and cooled back. Figure 1.2: Schematic diagram of a chilled-water system in commercial buildings [10] 8 1.4 Dynamic Modeling of Building HVAC Systems Dynamic modeling of HVAC system has received significant attention due to the needs from control system design and fault detection and diagnostics scheme. Such modeling problems are usually complicated by strong interactions among multiple physical domains, such as thermodynamics, heat transfer, fluid mechanics, rigid body dynamics, electro-magnetics, electric circuits and control systems. Transient behaviors of these physical phenomena are in principle very complicated. There are some challenges in both the modeling and simulation perspectives. First, from the modeling viewpoint, the mass, energy, and momentum balance are by default described as partial differential equations (PDEs). For implementation to a modeling platform, such as Modelica [11], these PDEs need to be transformed mathematically to ordinary differential equations (ODEs) or differential algebraic equations (DAEs). Second, from computer simulation viewpoint, simulation of the HVAC equipment dynamics may end up with solving a mixture of ordinary differential equations (ODEs), linear/nonlinear algebraic equations and possibly discrete equations, which in turn imposes great challenges to the robustness of the numerical solvers. Therefore, in spite of extensive study in the past 30 years, dynamic modeling of HVAC equipment remains an active research subject. 1.5 Control and Optimization of Building HVAC Systems This section will address the topics of setpoint tracking and optimal control in building HVAC system. For setpoint tracking purpose, the proportional-integral-derivative (PID) controllers are by far the most widely used control algorithms in industry. strm and Murray [12] said: More than 95% of all industrial control problems are solved by PID control, although many of these controllers are actually 9 proportional-integral (PI) controllers because derivative action is often not included. However, PID controllers may be poorly tuned in practice. In basic control books, these theories of designing and evaluating PID controllers are typically based on linear systems, which may not work well in a highly nonlinear system such as buildings HVAC system. To achieve better performance, PID controller has to be linearized based on certain operating conditions and then switch different controller parameters based on different operating ranges. However, such techniques may not work well for building HVAC systems which typically has a wide range of operations [6]. In addition, even if the control systems are well designed, building operators may not be well trained for good controller tuning. Thus, there is a strong needs for automated controller tuning, i.e., adaptive control methods, for proper operation and maintenance of buildings. Therefore, for building HVAC control, adaptive control methods seem desirable in the sense of smart buildings or intelligent buildings. For optimal control of building HVAC system, the optimal setpoints are typically determined at the supervisory control level and then regulated by local controllers in the HVAC systems, such as PID controllers described above [6]. However, majority of the buildings today do not use control and optimization method to improve their energy efficiency. Rather, heuristic approaches are typically applied [13]. Other industry, such as the process industry, has much more applications for optimal controls than the building industry [13]. Real-time optimization (RTO), a popular approach in process control, is an on-line strategy for determining the setpoint of system operation via minimizing certain cost function while observing to certain operating constraints [14]. Figure 1.3 shows the block diagram of RTO and regulatory feedback control in process control. The outer loop 10 is the RTO and the inner loop is the regulatory control. The RTO layer handles relatively slow dynamics and steady-state optimization is performed to determine the setpoint for the inner-loop control when some of the key measurements reach the steady state [14]. The regulatory control loop deals with dynamic models that have faster dynamics. Figure 1.3: Block diagram for model-based RTO and regulatory feedback control (reproduced with permission from [14]) Traditionally, the RTO is achieved via steady-state optimization only, and is used at supervisory level to assign optimal setpoints to local controllers. At the local controller level, model predictive control (MPC) is typically used for setpoint-tracking purpose based on the dynamic process model. The main disadvantage [15] for such configuration is the possible model mismatch (process gain) between the steady-state model used in the optimization and the dynamic model used in the regulation. Also, because of its decoupled nature, the RTO layer may render delayed decision and miss the actual optimum during the dynamic process. Currently, many research efforts aim at combining the RTO and MPC together, and trying to solve the economic-oriented optimization problem in real time based on linear 11 or nonlinear dynamic models. Recently, such methods have been actively studied for building HVAC controls [16, 17]. However, there may be several issues need to be addressed for model-based optimal control for building HVAC systems. First, the time and effort for model development are often costly. The key rationale for MPC to work well is built upon reliable dynamic models. However, for building HVAC systems, reliable dynamic models may be difficult to obtain. The performance map and design information for all HVAC equipment in a given building may not be fully available. Even if all the design information and nominal operating conditions are known when building up the models, the actual performance for the installed HVAC equipment may drift far away from their manufacturers rated performance. Thus, extensive time and effort would also need to spend on model calibration and validation with different operating conditions to ensure that the models can predict reasonably well for the dynamics and the process gains. Second, the cost for instrumentation is often high for model validation and those measurements needed for control design. Reliability of sensors is an add-on issue and uncertainty for model-based design. Large number of measurements and high-resolution sensors are desirable for model-based design, while the cost induced by sensor acquisition, installation, calibration and maintenance may impose a heavy burden for building development and operation. In addition, some measurements, such as the relative humidity, are hard to measure accurately. Sensor redundancy may be needed to reduce the risk of errors due to poorly calibrated sensor or problematic sensor locations, which in turn further increases the cost. Future efforts on model-based control design shall address this issue and narrow the gap between technically sound solutions and 12 building industrys actual needs and concerns, i.e., reducing the number of sensors while keeping the associated risks to low enough. Finally, the on-line computational load may be an issue for implementation of large-scale nonlinear MPC. The on-line computational load in general depends on the fidelity of the models, the optimization algorithms employed, the sampling rate, and the length of the predicting horizon. Usually it is quite difficult to foresee the actual computational cost until the control designer finishes all the required steps in modeling and controller design and then initiate the tests. If the optimal solutions cannot be obtained within the desired sampling interval, then the control designer may need to switch back and iterate on the modeling and controller design process until the on-line computational load can be met. In this dissertation study, the above limitations of model-based optimal control are addressed by considering the approach of self-optimizing control which requires less or little information from the process models in the design phase. Thus, the risks associated with modeling uncertainties, sensor errors and costs are mitigated. Figure 1.4 illustrates the block diagram of applying self-optimizing control as the dynamic RTO layer for building HVAC systems. The sensor output is the performance metric of interest, e.g., power or flow rate, etc. The self-optimizing control strategy would then learn the gradient of the performance metric w.r.t. the tuning parameters or setpoints during the dynamic processes. The updated tuning parameters or setpoints are fed back to the building HVAC system and then repeat the gradient-learning process until the optimum can be achieved. 13 Figure 1.4: Block diagram of applying self-optimizing control as the dynamic RTO layer for building HVAC system (modified from Figure 1.3) The self-optimizing control strategy employed in this study can be applied to nonlinear time-varying HVAC systems with unknown parameters. In particular, a dither-based extremum seeking control strategy, is considered to learn the gradient of the actual HVAC systems in real-time with potential trade-offs among the regulations of different tuning parameters or control setpoints. Such approach is often referred as model-free approach due to its self-learning and optimizing feature. In practice, the key measurement needed is the performance metric to be optimized. More detailed descriptions of this approach and its implementation are described in Chapter 2 and Chapter 5, respectively. 1.6 Organization of the Dissertation The remainder of this dissertation is organized as follows. Chapter 2 presents a comprehensive literature review on dynamic modeling of HVAC systems and extremum seeking control. Success and limitation of the existing work will be described. Building HVAC SystemsData ReconciliationReal-Time Gradient Learning & OptimizationUpdated Tuning Parameters/SetpointsSensorOutputUpdatedPerformance Metric14 Chapter 3 describes the modeling of dynamic AHU model. The modeling details of each component will be given, such as damper module, fans, ducts, zone and the chilled-water cooling coil. The emphasis is on the dynamic cooling coil model, which is considered to be the most energy-consuming device in an AHU. The dynamic coil model developed in this study is capable of predicting cooling performances under fully-dry, partially-dry-partially-wet, and fully wet conditions for both transient and steady-state conditions. The experiment validation of the proposed coil model is given in Chapter 7. Chapter 4 presents the dynamic modeling of centrifugal chiller system. Two centrifugal chiller models are developed with the differences in compressor modeling. A benchmark compressor model is developed following the previous ASHRAE sponsored project, which is based on a performance map, while the new compressor model is developed based on detailed physical and geometric parameters, and thus the resulting chiller model is named as detailed chiller. For both chiller models, the condenser and evaporator are modeled based on finite-volume method with detailed heat transfer correlations and geometric configurations. For condenser and evaporator modeling, a new concept, called variable refrigerant level based modeling, is studied and compared with the model developed based on finite-volume method. Finally, the two dynamic chiller models with different compressor models are compared based on a comprehensive simulation study. For the detailed chiller model, the physical connections of these dynamic components are considered quite complicated in terms of the differential algebraic equations (DAE) to be solved. Consistent initialization of such DAE system is difficult to obtain and special techniques should be applied for a successful simulation. Such difficulties are further addressed in Chapter 5. 15 Chapter 5 presents the direct method and preprocessing scheme for consistent initialization of the detailed centrifugal chiller system described by DAE system. First, reasonable initial guesses for the chiller system components are computed once the geometric parameters and design conditions are available. Then, a direct initialization method is proposed for the consistent initialization of dynamic centrifugal compressor. The mass and energy conservation during the initialization phase is further checked and the computation efficiency of the proposed initialization method is also studied. Chapter 6 presents the self-optimizing operation of air-side economizers using Extremum Seeking Control (ESC). The motivation and principal operation of air-side economizer will be given first. Followed by the review of existing economizer controls strategies and illustration of the proposed three-state self-optimizing economizer control. The overview of ESC is described next. The design guidelines and details of standard ESC and anti-windup ESC design are further addressed. Finally, simulation studies are conducted to demonstrate the potential of using ESC to achieve the minimal mechanical cooling load in a self-optimizing manner as well as to validate the effectiveness of the proposed anti-windup ESC. Chapter 7 presents the experimental validation of the cooling coil modeling and an important assumption generally made in vapor compression cycle modeling. The benchmark results of the developed chilled-water cooling coil model with experiment data will be given. In addition, comparison results are presented to evaluate the transient and steady-state predictions of the proposed model with the dynamic model developed by Zhou and Braun as an ASHRAE sponsored project 1194-RP conducted at Purdue 16 university [18]. Finally, experimental validation of the dp/dt assumption in heat exchanger modeling for vapor compression cycle simulation will be given last. Finally, conclusions and suggested future work are summarized in Chapter 8. 1.7 Summary This chapter begins with the discussions about energy crisis in buildings. The energy efficiency of buildings can be greatly improved by increasing the efficiency of building HVAC systems. Modeling and simulation techniques are essential to preform building energy analysis as well as design and validate advanced control strategies that may improve the performance and efficiency of existing or new HVAC systems. This dissertation study focuses on equipment level simulation and control. Chilled-water system, a common HVAC system in commercial buildings, is selected as the target system in this study. The first theme of this dissertation study is to develop detailed physics-based dynamic HVAC models. These detailed dynamic HVAC models are built based on first-principles and contain detailed formulations for heat and mass transfer as well as pressure drop calculations. Based on the high-fidelity dynamic models developed in this study, another theme of this dissertation study is to apply self-optimizing control strategy to optimize the energy use for such systems. Such control strategy requires little information from the models as in the control design phase, but its performance and effectiveness should be validated with high-fidelity dynamic models. 17 Chapter 2 Literature Review This chapter presents a comprehensive literature review on modeling and simulation techniques, previous work on dynamic modeling of HVAC systems, previous work on Modelica based dynamic modeling of HVAC systems, and extremum seeking control. The achievements and limitations of existing work will be discussed in detail and the motivation and objective of this dissertation study will be justified accordingly. 2.1 Modeling and Simulation Techniques Modeling and simulation tools are critical for controller design and fault detection and diagnostics (FDD) of HVAC systems. Conventional HVAC modeling and simulation programs are typically created based on imperative languages, and the physical models are mixed with numerical solvers [19]. Block diagram modeling methods, such as Simulink based modeling [20], have been successfully implemented to simulate and control the dynamic behaviors of HVAC systems. Such platforms are built upon the so-called input-output components, i.e. observing the causality principle, which is usually not the most natural representation of the physical systems. More recently, equation-based object-oriented modeling has greatly attracted the attentions from both academia and industry since the introduction of the Modelica [11] language in 1997. The Modelica modeling paradigm, due to its equation-based nature, accommodates acausality within physical systems, and thus can well embrace the differential algebraic equation (DAE) systems which would otherwise be difficult to handle. In addition, the simulation platform such as Dymola [21] gives strong support in terms of the numerical solvers. The equation-based paradigm also allows a possibly parallel development of the numerical 18 solvers by applied mathematicians and the physical models by HVAC engineers. Therefore, the HVAC engineers can focus on improving the dynamic models with up-to-date solvers while being relieved from the burden of reproducing the solver codes. However, there are still some technical limitations for Modelica based modeling and simulation to become seamless. For example, consistent initial conditions are often difficult to obtain for large and complex system models with a considerable size of nonlinear system of equations. Such limitations are expected to be overcome in the future for robust numerical simulations of dynamic HVAC systems. 2.1.1 Conventional HVAC Modeling and Simulation Programs Conventional HVAC modeling and simulation programs were written based on imperative programming languages, such as Fortran, C and C++ [19]. With such languages, the developers should define sequences of commands for computer to perform calculations of the assigned variables. In addition, to develop an HVAC simulation model with such languages, the developer has to integrate the modeling codes that define the physical process with the numerical solver for a particular problem [19]. Such methods have been successfully implemented into many HVAC simulation programs and applications such as DOE-2 and EnergyPlus [22, 23]. 2.1.2 Historical View of Simulation Tools strm et al. [24] provides an excellent review for modeling and simulation tools. Detailed descriptions were given for the historical development of many simulation tools that dated back to the 1920s, including analog simulators, domain-oriented simulators designed for specific purposes, and simulators based on object-oriented modeling. To 19 better illustrate the motivation of Modelica based dynamic modeling, this subsection reiterates the highlights in strm et al. [24]. The first generation of emulators for ODE systems are analog devices, which were dominant from 1920s to 1950s. The analog emulators have significant difficulty in handling algebraic loops, because some manual procedures are needed to manipulate and transform the original equations to a standard form. Such procedures, as strm et al. [24] point out, are easy to perform for simple systems, but are quite time-consuming and error-prone for complicated systems. Thus, DAE systems, although regarded as the most natural representation of physical systems, are very difficult to be implemented into analog emulators in a straightforward manner. Afterwards, availability of digital computers was the game changer, and simulation techniques grew with the technological advancement in computer hardware and software. In 1967, a major breakthrough was introduced with the development of the CSSL (Continuous System Simulation Language) report [25], which integrated the concepts and language structures of the simulation programs at that time. A number of software products were developed based on the CSSL definition. More specifically for HVAC systems, the HVACSIM+ [26] and TRNSYS [27] were developed based on the CSSL languages. Graphical block-diagram modeling then became popular in the 1980s. Simulation models can be built from connecting the lines between different graphical blocks with predefined input and output connecting ports. The block diagram modeling is however limited by the requirement of explicit state models. Data flow among different blocks is unidirectional. Therefore, it is often time-consuming and error-prone to develop physics-based model libraries using the block diagram languages. Bond graph modeling is another graphical based method, which is 20 claimed to be more suitable for multi-domain physics-based modeling of dynamic systems [28]. Compared to block-diagram modeling, the major difference is that bond graph modeling supports bi-directional energy exchange by reflecting the physical nature of the models while block-diagram modeling is unidirectional by considering the signal directions and their functional relations only [28]. Bond graph modeling has been applied to thermo-fluid systems [29, 30] and HVAC applications [31, 32] . 2.1.3 Current Status of HVAC Simulation Tools Currently, most simulation tools used in the HVAC community, such as BLAST, DOE-II, and EnergyPlus [33], have detailed dynamic models for the heating and cooling loads, but do not include dynamic models for the equipment. Some transient modeling tools have been developed based on Matlab/Simulink and Modelica. The Thermosys Toolbox [34], originally developed by University of Illinois and now jointly with Texas A&M University, is a Matlab/Simulink based transient modeling tool for air conditioning and refrigeration systems. A larger class of simulation packages for thermo-fluid systems has been developed based on Modelica. In the past decade, Modelica has demonstrated its great capability for simulating multi-physical systems, through various engineering applications, especially for large, complex, and hybrid systems. In Modelica, physical components can be represented by DAE. Acausal modeling is a major advantage of Modelica over Simulink. Several Modelica based simulation packages have been developed in Europe, e.g. the ThermoFlow Library [7, 35], the AirConditioning Library [36], the Modelica_Fluid Library [37], the HITLib [38], the FluidFlow [39], and the TIL [40, 41]. The AirConditioning Library (ACL) is capable of handling both steady-state and transient 21 simulations, however, it was mainly developed for automotive air conditioning systems. Some components need to be modified for modeling building HVAC components. The TLK/IfT Library (TIL) is designed for steady-state and dynamic simulation of thermo-fluid systems. This library is jointly developed by TLK-Thermo GmbH and Technical University Braunschweig, Institut fr Thermodynamik [42]. TIL can be easily adapted to model and simulate customized heat pump, air conditioning, refrigeration and cooling systems [40, 41]. The TIL has a better hierarchy than ACL by keeping the model structure as flat as possible. 2.1.4 Modeling Techniques The modeling of HVAC systems typically falls into two categories, i.e. transient and steady-state. For steady-state modeling, the system input/output variables are invariant over time. Transient operation, by definition, features time-varying input/output variables with different time scales [43]. Dynamic modeling deals with problems in transient operation such as system start-up, shutdown, and response to disturbance. Depending on a number of factors, the disturbances in HVAC system can range broadly from small to very large, which typically includes changes in conditions such as heating and cooling load, ambient temperatures, human interactions, and/or control actions [43]. Such important problems in transient operation are addressed by the subject of dynamic modeling, which lays the ground for system analysis, control design and FDD. Dynamic models are important for the development and evaluation of control algorithms and FDD techniques. For example, modeling and control of air handling unit (AHU) and economizers have been previously studied [44-47]. Model based FDD has also been studied for various AHU [48, 49]. These studies have been based on steady-22 state models, and such models are insufficient to address the transient behavior of the economizer. Stability and transient performance cannot be investigated, which limits the effectiveness of control development. Transient response, which usually contains more valuable information for fault detection, would otherwise be abandoned without dynamic model available. From both control and fault detection perspectives, dynamic models have significant advantage over steady-state models. Advanced control and fault detection schemes built upon dynamic models may lead to better performance, improved FDD capability [18], and higher efficiency [50]. 2.1.5 Previous Work on Modelica Based Dynamic HVAC Models In the past decade, a lot of work has been done on the dynamic modeling of HVAC systems with Modelica. As described earlier, there are some commercial and free Modelica Libraries that have been developed for thermo-fluid and HVAC applications. The following presents a review of existing work on Modelica based dynamic HVAC models in the open literature. Mattssons work [51] seemed to be the first effort with the development of a dynamic water-to-water heat exchanger model in Modelica. The model was structured by connecting the two duct models, and the wall model in between. Two connectors were defined at each duct model to store the variables of pressure, volume flow rate, and temperature. The model can be discretized to a number of control volumes by declaring the number of the duct and wall models with array expression. The heat transfer model was developed based on the log-mean temperature difference. The developed model has been validated against the measurements from a real system, and the model predicted the 23 results quite well under normal operations. However, it was found that the predictions were not good for small flow rates. Jensen and Tummescheit [52] described a general moving-boundary model for two-phase flows in heat exchanger. The 7th-order model was intended for control design. The authors stated that the prediction of mean void fraction is important to the prediction of overall system performance, and a new technique was proposed to calculate the mean void fraction by considering the effect of slip ratio. By using the simple correlation from Zivi (1964), the liquid fraction could be evaluated as only a function of the density ratio of the liquid fraction to the vapor fraction. Pfafferott and Schmitz [53] developed a CO2-Library based on the free ThermoFluid Library [54]. The efficiency of the reciprocating compressor was modeled based on steady-state data. The heat exchangers were modeled based on the finite volume method, where the thermodynamic model and fluid flow model were decoupled. The enthalpies at the inlet and outlet of the expansion valve were treated as the same, and an algebraic equation was used to compute the valve mass flow rate based on a flow coefficient. The flow coefficient and the critical differential pressure ratio need to be determined experimentally. Experimental validation was conducted at the Department of Aircraft Systems Engineering of the Technical University Hamburg-Harburg. The steady-state results were predicted quite well except for the internal heat exchanger model. For the transient results, the model showed a systematic under-estimation of the mass flow rate. According to the authors, the first reason was due to the compressor efficiency map obtained based on the steady-state data, which may not well represent the actual behavior across the full operating range especially for the start-up process. The second reason is 24 that the flow coefficient in the expansion valve was treated as merely a function of the opening ratio, and was decoupled with the thermodynamic state at valve inlet and the pressure drop. Skoglund et al. [55] developed dynamic heat exchanger models to study the transient changes in fluid composition for liquid food process lines. The models were developed based on the finite volume method. The author developed different fluid dispersion models based on the assumption of ideal mixing or transport delay. Simulation studies were conducted to compare three different dispersion models and the effect of different number of control volumes. However, the comparisons with experimental results were not reported. Fu et al. [56] developed a model library called ABSML for dynamic simulation of absorption refrigeration systems based on the ThermoFluid Library [54]. The generators, condensers, absorbers and evaporators were modeled as lumped systems with phase change at the shell side. The single-phase solution heat exchangers were modeled based on the finite volume method. The control volumes were discretized by the staggered grid method. The mass and energy balances were calcu