Quiver: Using Control Perturbations to Increase the Observability of Sensor Data in Smart Buildings Jason Koh, Bharathan Balaji, Vahideh Akhlaghi, Rajesh Gupta Yuvraj Agarwal University of California, San Diego Carnegie Mellon University {jbkoh, bbalaji, vakhlagh, gupta}@eng.ucsd.edu [email protected] Abstract—Modernbuildingsconsistofhundredsofsensorsand algorithms can be used to discover sensor conditions and actuatorsformonitoringandoperationofsystemssuchasHVAC, reduce sensor maintenance work required for creation of CPS 6 lightandsecurity.Toenableportableapplicationsinnextgenera- applications. We focus on buildings as a driver application to 1 tionsmartbuildings,weneedmodelsandstandardizedontologies testthishypothesis.Buildingsconsistofhundredstothousands 0 that represent these sensors across diverse types of buildings. 2 Recent research has shown that extracting information such as of sensors and actuators that are used for management of sensortypewithavailablemetadataandtimeseriesdataanalysis air conditioning, lighting, fire safety and water. Prior work n isdifficultduetoheterogeneityofsystemsandlackofsupportfor has addressed many challenges to enable development of a interoperability. We propose perturbations in the control system J smartbuildingapplications–standardizedAPIforinformation asamechanismtoincreasetheobservabilityofbuildingsystems access [10], data management [11], [12], and semantic ontol- 7 toextractcontextualinformationanddevelopstandardizedmod- 2 els. We design Quiver, an experimental framework for actuation ogy [13]. These solutions have led to innovative applications of building HVAC system that enables us to perturb the control suchasoccupancybasedcontrol[14],[15],humanintheloop ] system safely. Using Quiver, we demonstrate three applications control [16], [17] and energy disaggregation [18]. A major Y usingempiricalexperimentsonarealcommercialbuilding–co- challenge in adoption of these applications is that they are S locationofdatapoints,identificationofpointtypeandmappingof not portable across different building systems due to lack of . dependencybetweenactuators.Ourresultsshowthatwecanco- s locatedatapointsinHVACterminalunitswith98.4%accuracy standardized ontologies [19], [20]. c [ and 63 % coverage. We can identify point types of the terminal Recentworkshavefocusedonstandardizingbuildinginfor- units with 85.3 % accuracy. Finally, we map the dependency mationusingexistingsensormetadataandavailabletimeseries 1 links between actuators with an accuracy of 73.5 %, with 8.1 % data to enable portable applications [19], [20], [21], [22]. v and 18.4 % false positives and false negatives respectively. These works illustrate that modern buildings consist of a 0 6 I. INTRODUCTION wide variety of sensors and actuators with varying naming 2 conventionsacrossvendors.Oftentimesthemetadataavailable 7 Cyber-Physical Systems (CPS) represent continuing ad- is not understandable to a non-expert and sometimes no 0 vance of instrumentation of existing systems (such as au- metadata is available to understand the data context. Even . 1 tomobile [1]) and networks (such as transportation [2], en- when researchers used the available metadata, timeseries data 0 ergy grid [3]) with a growing list of sensors and actuators. and applied state-of-the-art algorithms to identify the type of 6 These sensing mechanisms (from tire-pressure meters to syn- thesensor,theoverallaccuracywaslow[21],[22]orrequired 1 chrophasers) provide a greater awareness of complete sys- significant manual effort [19], [20]. Identifying sensor type, : v tems with increasingly finer resolutions of time and distance however, is just one step towards creation of standardized i X scales. Yet, deployment and maintenance of growing sensing models that can be used by portable applications. Other infrastructure presents a significant challenge [4], [5], [6], pertinent problems include determining sensor location, rela- r a one that researchers have tried to address through analysis tionship among sensors/actuators and models which capture of the sensory data. Actuation also provides us with increased the behavior of the system. observationalcapabilitiesbyactivelymodulatingasystemand Active control is a promising approach to address the observing responses. Active control has shown to be effective lack of information available, as carefully designed control across disparate disciplines – seismic structural design [7], perturbations can reveal insights into system behavior that is aerodynamicstabilityanalysis[8]andfaulttolerantcontrol[9]. not observed in regular operation. Recently, Pritoni et al. [23] However, control is seldom used across most systems and showed that the mapping between the Air Handler Units much of the literature is based on simulation studies. We (AHU) and the corresponding terminal units in the building propose that control perturbations be used across a variety Heating, Ventilation and Air Conditioning (HVAC) system of CPS applications such as information discovery, modeling, can be inferred with 79% accuracy with control perturbations control optimization and privacy protection. compared to 32% accuracy with data analysis alone. Control In this paper, we explore use of perturbation control to perturbations have also been studied for Fault Detection and address sensor data management problem. Our thesis is that Diagnosis(FDD)[24],[25]andfaulttolerantcontrol[26],[27] a carefully selected and controlled modulation of control inHVACsystemsasiteliminatesmundanemanualtestingand fixes some classes of faults automatically. Supply Air Return Air We expand on these ideas and show that active control NR U VAV mCeinqoeuancihtprramoenaleilbsnmabtsusaeindlcddaiinnnstgaebfreHevteVyunsAteiisCodsnuassesysas.arteenWmnieon.tteWeumgserpeadbilruiipcinaladrpltlryQaocufetixiavcpeeldro,abrteeaacaccmuooosnnedttrreooolfll. YLPPUS RETAW T TER RETAW TOH DSaumpFpaplneyr EFaxnhaust framework that allows us to do control experiments safely on OH Reheat Reheat Valve the HVAC system by constraining control input that satisfies Coil criteria such as range of values, frequency of actuation and Flow sensor dependency between actuators. We deploy Quiver in our building testbed and use it to demonstrate three example applications that exploit control perturbations. First, we show that perturbations can be used to identify co-located sensors Room 1 Room 2 which has been shown to be difficult with data alone [28]. HVAC Zone Zone Temperature We co-locate data points in HVAC terminal units with 98.4% T Thermostat Adjust accuracyand63%coverage.Second,weidentifythepointtype ofterminalunitsgivengroundtruthpointtypesofoneterminal Fig. 1. Sensors and actuators in a Variable Air Volume (VAV) unit that unit using transfer learning classification. We identify point provideslocalcontroloftemperatureintheHVACsystem[29]. types with 85.3% accuracy across 8 zones. Third, we map the dependency between sensors and actuators in the control system using control perturbations and probabilistic analysis. DamperPosition;andtheactuatorpointsinclude:ReheatValve We identify dependency links between actuators with 73.5 % Command, Thermostat Slider Adjust and Damper Command. accuracy, with 8.1% false positives and 18.4% false negatives Theseactuatorsarecontrolledusingmanyconfigurationpoints across 5 zones. such as Temperature Setpoint, Occupied Command, Air Flow Setpoint, etc. These configuration points account for majority II. OURBUILDINGTESTBED of the points, and include nuanced parameters that ensure Modern buildings consist of hundreds of networked sen- minimum airflow, set the PID loop settings, etc. sors and actuators for operation and maintenance of various Not all of these 200 points are reported to the BMS, and systems. These systems are typically overseen with Building only the essential sensors and control points are exposed to Management System (BMS) which helps configure, monitor, limit resource usage and information overload for building analyze and maintain various systems. The sensors, actuators managers.Inourbuildingtestbed,14to17pointsarereported and the configuration parameters in the BMS are together to the BMS for each VAV box. The points exposed to BMS referred to as points. We focus on building HVAC systems changes depending on the vendor, type of VAV and the where BMSes are most commonly used. installation version used by the vendor. Even though the same Ourtestbedisa150,000sqftbuilding,constructedin2004 model of VAV is used across all zones in our building, there andconsistsofafewthousandoccupantsand466rooms.The areminorvariationsduetoconfigurationchanges,presenceof HVAC system consist of an Air Handler Unit (AHU) that supply/exhaust fans or lack of heating. supplies cool air to the building via ductwork using chilled A. Data Collection and Control water supplied by a central plant. A heat exchanger supplies hot water to the rest of the building using hot water supplied The points in our building communicate with the BMS by central plant. The cool air and hot water are used by local using BACnet [32], a standard building network protocol. We terminal units called Variable Air Volume (VAV) boxes to connect our server to this network to collect data and control regulate the temperature of rooms. The area serviced by the thepointsinourbuilding.WeuseBuildingDepot[33],anopen VAV box is referred to as a thermal zone, which consist of source RESTful web service based building datastore to man- a large room or multiple small rooms in our building. Figure agethepointsinthebuilding,provideappropriatepermissions 1 shows a schematic of the VAV box with the sensors and to developers, and search using a tagging mechanism. Our actuators installed for its operation. control framework Quiver works on top of BuildingDepot to VAVs have been commonplace since 1990s [30], and their manage control inputs from our experiments. Figure 2 depicts basic working is well understood. The VAV regulates the the system architecture of our deployment. amount of cool air provided using a damper, and if the zone BACnetisawelldevelopedprotocolwithwhichdevelopers needs to be heated, it regulates the hot water in the heating can not only read and write points, but also schedule hourly coilusingavalve.Thetemperaturesensorinthethermalzone control, mark holidays on a calendar, and even manage pro- providesfeedbackonhowmuchcoolingorheatingisrequired. gramsrunningintheembeddedVAVcontroller.Forsimplicity, However, in the real VAV box, there are over 200 points we only focus on read and write points, i.e., in BACnet that govern its working [31]. The essential sensors include: terminology Input, Output and Value points. These points can ZoneTemperature,SupplyAirFlow,ReheatValvePositionand havefloatingpoint,binaryormulti-statevalues,andinBACnet perature completing the feedback loop. These three points BACnet BACnet/IP Building determine the Cooling and Heating Command of the thermal Connector Management System zone. The Cooling Command determines the amount of cool airrequiredforthezoneanddeterminesanappriopriateSupply HTTP Air Flow Setpoint that is between the designed minimum and maximum supply air flow. When the Cooling Command is high (∼100%), feedback is sent to the AHU to decrease the MySQL BuildingDepot Storage supplyairtemperaturetomeetthecoolingneedsofthethermal Cassandra zone.TheHeatingCommand determinestheamountofreheat required by controlling the Reheat Valve Command. During HTTP heating, the airflow is set to the minimum to reduce chilled airflow from AHU, and this airflow is increased when high Quiver Python Control HeatingCommand(∼100%)failstoheatupthethermalzone Control Framework API Experiments sufficiently. A high Heating Command also sends a signal to the heat exchanger to increase the supply water temperature. Fig.2. SystemarchitectureofQuiver.Datacollectionandcontrolisdonevia Note that only one of Heating or Cooling Commands can be BACnetprotocolusingBuildingDepotwebservice[33].Quiverensuresthat >0% at a time. thecontrolsequencesofourexperimentsaresafeandrollsbackthesystem The Supply Air Flow Setpoint determined by the cool- toitsoriginalbehaviorincaseoffailure. ing/heatingrequirementsinturndeterminestheDamperCom- mand which is the amount of damper actuation required to a floating point that can be written to is referred to Analog match the setpoint to the measured Supply Air Flow. The Output.EachoftheseOutputpointshaveanassociatedpriority Damper Position sensor also provides feedback to set the array.Thedefaultoperationisperformedatthelowestpriority appropriate Damper Command. There is a separate PID loop and the highest levels are reserved for emergency operations associated with setting each of Heating Command, Cooling such as fire safety. Once a higher level priority is written to, Command, Supply Air Flow Setpoint and Damper Command, the lower levels are ignored. An explicit write with value “0” and there are PID parameters such as those that govern needs to be written to the higher level priority in order to proportional gain and integration time, but these are hidden relinquish control to the lower levels. from the BMS. The university Facilities Management provides us with a fixed priority level in this priority array for our control III. QUIVER:CONTROLFRAMEWORK experiments.Weneedtorelinquishcontrolbacktothedefault Quiver1 is built upon our building testbed. In this section, priority level after our control experiments to ensure that our we show the utility of Quiver on the VAV box to demonstrate interferencedoesnotaffecttheregularoperationoftheHVAC our control perturbation applications. system.Quiverensuresthatallthepointsarerelinquishedafter Given that exercising control over a building control sys- an experiment. tem can lead to unintended, and potentially dangerous con- sequences, we ensure safety for the control perturbations B. Points in Variable Air Volume Box we perform by: (a) global time synchronization across the Figure 3 shows the points associated with VAV in our computational servers running different parts of Quiver, (b) buildingBMSandhowthesepointsrelatetoeachother.Atthe identification of a range of ‘safe’ values for control through top of the figure, we have the zone Temperature Setpoint and metadata and data history, (c) dependency checks based on Occupied Command, which in combination with thermostat domain knowledge, and (d) status tracking to ensure we input determine the temperature guardband within which the relinquishcontrolattheendofourexperimentandareableto VAV is trying to keep the zone temperature. The temperature rollbackthechangesmadeincaseofanapplicationcrash.We guardband is indicated by Heating and Cooling Setpoints, have designed these safeguards based on five years of control which represent the lower and upper bounds of temperature experience with BMSes and discussions with our university respectively. There are three occupancy modes: Occupied, Facilities Management. Standby and Unoccupied during which the temperature bands We perform basic checks such as checking the range of are 4oF, 8oF and 12oF respectively. During the Occupied values exercised (i.e. min/max), type of data for each input mode, minimum amount of airflow is maintained to ensure basedonmetadataavailableinBACnetaswellasself-imposed indoor airquality. TheThermostatAdjust allows changingthe limits. For instance, we force the Temperature Setpoint to be temperature setting by ±1oF, and the Temporary Occupancy between 62oF −78oF. Each point marked as read/write in maps to a button on the thermostat which when pressed puts Figure 3 can be written to using Quiver. We synchronize time thezonetoOccupied modefortwohoursduringnights/week- acrossallourservers–BACnetConnector,BuildingDepotand ends. The Heating and Cooling Setpoints determine the behavior 1The basic control framework will be presented as a poster abstract (not of the VAV control system with the measured Zone Tem- peerreviewed)inanupcomingconference. Thermostat Input Occupied Command (OC) Temperature Setpoint (TS) Thermostat Adjust Temporary Occupancy Air Handler Supply Air Heat Exchanger Supply Cooling Setpoint (CS) Heating Setpoint (HS) Temperature Water Temperature Min Supply Air Flow Cooling Command (CC) Heating Command (HC) Max Supply Air Flow When Occupied Supply Air Flow Setpoint (SAFS) Direct Read-only Point Link Reheat Valve Command (RVC) Indirect Damper Command (DC) Read/Write Point Link Feedback Central Unit Poin t Damper Position (DP) Link Legend Supply Air Flow (SAF) Zone Temperature (ZT) Fig. 3. BMS points associated with VAV in our building testbed. The dependency between the points as shown by arrows is mapped based on domain knowledge.Read-onlypointsareeithersensorsorconfigurationpointswhichcannotbechanged.Read/writepointscanbechangedviaBACnet. Quiver – using our university Network Time Protocol server. Wesetaminimumdelayof10secondsbetweeneachwriteso The time synchronization across these servers is necessary to thattheBMSdoesnotgetoverloaded.Aftereachwrite,Quiver ensurecorrectsequenceofoperationsandproperdataanalysis. ensures that the BMS has accepted the input and throws an exceptionincasethewriteisrejectedafterretryingtwotimes. A local database keeps track of all the read/write points in Upon further experimentation, we found that the VAV the testbed building. For example, we keep a track of whether embedded controller has some built-in safety features that thepointispartofacurrentexperiment,thelastvaluethatwas also limit the amount of control available. For example, the written to the point, the reset (default) value of the point, the VAV does not allow the Supply Air Flow Setpoint to be set timestamp of the last write to that point, and the thermal zone beyond the minimum and maximum values. It also does not that the point belongs to. This database is used to keep track allowheatingwhentheZoneTemperatureexceedstheHeating of the status of the experiment as well as allow developers Setpoint and disallows cooling when the temperature is lower to query it through APIs. The database is also used to ensure than the Heating Setpoint. The Damper Command represents that all points are reset to their default values at the end of thechangeinDamperPositionrequired,andresetsitselfafter an experiment and, if an experiment crashes due to an error thedamperisactuatedappropriately.Thisbehaviorisdifferent condition, a rollback is performed to restore the points to a from the rest of the actuator points such Supply Air Flow safe (default) state. Setpoint, which match the sensor value as much as possible. Quiver limits the frequency of control of a single point, or We incorporate these constraints in our experiments, and dependent points, to allow time for HVAC control changes to integrate them in the next version of the control framework. take effect and to avoid problems such as damper oscillations whichreducesequipmentlife.Currently,wehavesetthemin- IV. QUIVER:CONTROLEXPERIMENTS imum time between consecutive writes to 10 minutes. Before We use Quiver to learn more information about the sensor writing to a BACnet point, Quiver checks for dependency and actuator points inside a building using control perturba- betweenthepointandotherpointswhichhavebeenwrittento tions. We define control perturbation as any changes made byreferringthelocaldatabase.Weconservativelyassumethat to actuators that deviates from typical HVAC operation. We all the control points in a particular VAV are related to each confine all of our control experiments to nights/weekends, or other,andthus,onlyonecontrolinputcanbewrittentoaVAV in unoccupied zones only, to alleviate any effects on occupant every10minutes.Notethatthereare237thermalzonesinthe comfort.Wefocusourcontrolexperimentstowardsaddressing building,andeachofthesezonescanbecontrolledinparallel. three important smart building applications: Temperature Setpoint perturbations can be used to force the control system to F) unusual operating points, and co-located points that respond e (◦ 78 to this perturbation can be clustered together by data analysis. ur 74 at We assume that we already know the type of points in er 70 p the building which can be obtained using recently proposed m Te 66 methods [20], [22], but do not know if they are co-located 62 or how these point relate to each other or affect the control Cooling Setpoint Zone Temperature system. We do not use the location information already in- F) Heating Setpoint tegrated into Quiver for these experiments. We perturb the e (◦ 80 actuator point identified as the Temperature Setpoint (TS) of ur at 75 a randomly chosen zone, and identify the corresponding co- per 70 locatedpointsusingthetemporaldatafeaturesofotherpoints. m Te 65 Towards the end of this section, we discuss how we can relax 60 the assumption of knowing the point type apriori. Figure 4 shows an example control sequence, where we Cooling Command Heating Command change TS 4 times across 4 hours from low (62oF) and %) 100 and ( 75 hzoignhe(t7h8aotFre)a,catntdotihtes cchoarrnegsepso.nWdinegchVoAsVe spuocihntsaninosthceillsaatimone m m 50 of TS as it deviates substantially from normal operation and o C 25 we can easily distinguish the controlled zone from the rest 0 of the zones under normal operation. This control sequence was chosen empirically, and we show that even such simple Supply Air Flow Supply Air Flow Setpoint n) control sequences can be effective for co-location of points. mi cu. ft/ 900 Hcoonwtreovlesr,eqausenwceessdhoowaffwecitththoeuqrueaxliptyeriomfernetssu,lttsh.eWeeffdeoctnooft ow ( 600 focus on design of generic control sequences in this paper. Air Fl 300 We extract basic features such as range (max - min), mean and standard deviation from the observed timeseries 0 data. We also extract the Dynamic Time Warping (DTW) nd (%) 1.5 Damper Command Damper Position 100 n (%) distance [35] between the applied TS signal and the point a o under consideration. DTW compensates for the time delay in mm 1 75 ositi thereactionandchangeinsensorvaluesduetoacontrolaction o P mper C 0.05 50 amper aInndadqduiatinotnifi,ewsetheexpdlioffietroeunrcepublestewceoenntrthoel asnhdapaenoalfytzheetshiegnFaalsst. a D D Fourier Transform (FFT) after normalizing the data and use 25 09 PM 10 PM 11 PM 12 AM 01 AM theEuclideandistancebetweentheFFTofthepointsignaland FFT of the TS signal. We refer to this feature as “L2 norm Fig.4. Asampleofco-locationexperiment,wheretheTemperatureSetpoint isoscillatingbetween62oF and78oF forfourhoursatnight(thetopgraph). of FFT” or “LFT”. We ignore frequencies beyond 0.0005 Hz, TheVAVpointswhichreacttothesechanges(remainingfourgraphs)canbe i.e.aperiodof30minutes,becauseweonlyfocusonchanges co-locatedbyusingtemporaldataanalysisofthiscontrolledperiod. caused by our low frequency control sequence. We extract these features for all the VAV points in the • Identifying points which are co-located with a VAV box. building and identify the outlier points. In principle, the point • Identifying point types within a VAV given ground truth whichdeviatesthemostfromregularcontroloperationswould point types of one VAV unit. be co-located with our TS point with high probability. • Mapping the dependency between VAV actuator points. Figure 5 shows the distribution of all the Zone Temperature AllofourdataanalysisisimplementedusingPythonScikit (ZT) points in our building across three features – DTW, LFT Learn library [34]. and range – with a control sequence of two changes to TS. The zone under control is marked in red, and as observed, the A. Using Control Perturbation to Determine Location red point is far away from most of the points from the other The location of sensor and actuator points is not readily zones in the building. However, there are still a few points available in the BMS for older buildings. In buildings where which are also differ significantly from most zones and it is location information is available, it is usually inconsistent difficulttodistinguishtheredpointfromthoseoutliers.When due to errors in manual labeling process [20], [21]. It is we examine the data from the experiment where we made 4 also difficult to co-locate points using historical data alone changes to TS, the corresponding to changes to the ZT in the as many VAVs function in a similar manner, and the variation same zone resulted in much higher variation from those in of data is not enough to distinguish them apart [28]. Control uncontrolled zones. This is captured by our features as shown Uncontrolled Zones Controlled Zone Uncontrolled Zones Controlled Zone ZT 4.4 SAFS 4.2 SAF 4.0 DTW RVC 3.8 HC 3.6 3.4 DP 20 15 DC 0.0 0.5 1R.0an1g.e5 (°2F.0) 2.5 3.0 3.5 5 0 L52N or1m0 of FFT AHCCS ACS Fig. 5. Co-location of Zone Temperature by perturbing the Temperature Setpoint. 2 changes of Temperature Setpoint is applied across 2 hours in 0 10 20 30 40 50 60 thecontrolledzone. L Norm of FFT 2 Fig. 7. Comparison of the L2 norm between FFT of VAV points and the FFTofthecontrolledTemperatureSetpoint.Thepointscorrespondingtothe Uncontrolled Zones Controlled Zone controlled VAV have a much lower L2 norm compared to regular zones for eightpointtypes,butfailstocapturethedifferenceinDamperCommand. 4.2 4.1 for one of the zones, leading to a drop in accuracy. 4.0 The Damper Command (DC) is a differential actuator that DTW 3.9 sets the change that needs to be made to the damper. There 3.8 areseveralVAVsinthebuildingwhichconstantlychangetheir 3.7 DC for minor variation in the air flow, and the features we 3.6 extracted – DTW, FFT, mean, variance, number of changes – failed to differentiate the DC of the zone under control 50 0 1Rang2e (°F)3 4 20 3L02N or4m0 of FFT fpWreoermtucrotbuhalendcroeesnstliyg(Fnciaogl-usloraecrae7te)r.eDqMuCoirrepedoisfnootpsrhciinost-itlcwoacotaetdoiofdntahoteafeaDingCahltypzsoioisnnteossr. with our current method. Another issue with these control experiments is that we Fig. 6. Co-location of Zone Temperature by perturbing the Temperature can only co-locate those points which react to changes in Setpoint. 4 pulses of Temperature Setpoint is applied across 4 hours in the controlledzone. TS (see Figure 3). Points such as Occupied Command (OC) and Thermostat Adjust, which are external inputs to the VAV control system, cannot be co-located. To remedy this, we in Figure 6. Hence, with the help of a well designed control perform a second set of experiments which oscillates the OC perturbation it is possible to mold the behavior of the control similar to our TS control perturbations. We successfully co- system for end use applications. located OC and points such as Cooling Setpoint and Sup- We analyze the data for other point types to check if we ply Air Flow that have been already co-located with their canco-locatethezonalpointssuccessfully.Inpractice,wefind corresponding TS point. Thus, all of these points can be thatLFTfeaturealoneissufficienttodistinguishthecontrolled marked as being co-located in the same VAV. We performed zone points from the rest. Figure 7 shows compares the LFT the Occupied Command oscillation experiments across four of the controlled zone with other zones for point types: Zone zones with 100% success rate in their co-location results. We Temperature (ZT), Supply Air Flow Setpoint (SAFS), Supply couldnotperformsimilarexperimentsonthethermostatpoints Air Flow (SAF), Reheat Valve Command (RVC), Heating (Thermostat Adjust and Temporary Occupancy). They cannot Command (HC), Damper Position (DP), Cooling Command becontrolledbyourplatformasthermostatsproducetheirdata (CC), Heating Setpoint (HS) and Cooling Setpoint (CS). We contiguously, and we acknowledge this is a limitation of our performedthiscontrolexperimentoneightzonesinourbuild- proposed method. ing, and we co-located the listed points with 98.6% accuracy. We repeated our TS control experiments on a hot day, and We only failed to identify the correct Damper Position point found that the same control perturbations cannot co-locate heatingrelatedpoints–HeatingCommand(HC),ReheatValve 100 DP Command(RVC)–astheyarenottriggeredsufficientlydueto DC OCM hot outside weather. The zone cannot be cooled down enough CMF 75 to activate heating (HC, RVC) when its TS is changed to the e ASFSP %) highvalue.Weneedtochangeourcontrolperturbationstoex- nt Typ RHCVCCC 50 uacy ( cite these points specifically. Thus, the perturbation signature Poi ZHTS Accr needs to be sensitive to external conditions and confounding CS 25 factors. WCA OC NotethatinFigure7,theLFTfeatureofthecontrolledzone TS 100 ffZorTormimstonhsoettrpdeoissittniontfgtuythipseehsapboelixenctfesr.potCmZoonTtthroaenlrldetydDpzeCos’ndeL’iFsffTeLrFfesTaigtfuneriaefitucoarfenttholyef GaussianL iNnaeiavre S BVRaMaynedsom RFBoFre SsVtMNearest DNeeicgishiboonrB TserreneoulliA NdaaiBvoeo Bstayes other zones though it can be co-located within the same type. Classifier Contrary to DC’s different operational behavior, ZT’s signal responseisslowerthantheothertypesduetoheatcapacityof Fig.8. Accuracyofpointtypeidentificationusingtransferlearningacrossten supervisedclassifierswithoneyearhistoricaldataforVAVpointsbelonging zones. If we assume that we do not know the point type, then toonezone. the points except ZT and DC can be obtained as outliers from the points belonging to normal zones. However, we would need to design appropriate threshold or clustering technique features for one week of data represents one row of training to identify the outlier points correctly. data for our classifier. We train many standard classifiers – Overall, with our control perturbations based co-location, GaussianNaiveBayes(GNB),LinearSupportVectorMachine we successfully co-located 10 out of 16 point types (63% (LSVM), Random Forest (RF), Radial Basis Funcation SVM coverage) with 98.4% accuracy across eight VAV units. We (RBF SVM), Nearest Neighbours (NN), Decision Tree (DT), co-located the Occupied Command points using auxiliary Adaboost, and Bernoulli Naive Bayes (BNB). Our test results control experiments for four zones. We failed to co-locate show high accuracy (∼100%). We use these trained models Damper Command due to its divergent behavior. We also do for identifying point types of different zones with the same not co-locate 4 point types which do not respond to control featuresextractedfromoneyearofdata.Thisprocessiscalled perturbations. transferlearning,andfigure8summarizestheresultsobtained across all the classifiers for different point types in one zone. B. Identification of Point Type WefindthatsomepointtypessuchasTemperatureSetpoint We now look at the inverse problem of identifying point (TS) are readily identified even with simple features such type given the co-located points in a VAV. Identification of as mean and variance across most classifiers, while other point type is essential for third party application to interpret pointtypes workonly withspecific classifiersor requiremore timeseries data, and prior work has shown that data analysis features. We experimented with 10 classifiers for three zones, alone fails to identify point types accurately [21], [22]. and choose the classifier which works best for each point As shown towards end of Section IV-A, it is possible to types for analysis with other zones. Some point types such as identifyco-locatedpointsevenwhentheindividualpointtypes Heating Command (HC), Cooling Command (CC) and Zone are unknown. For this problem, we assume that we know the Temperature (ZT) are not identifiable by any classifier with co-location of all the VAV point types and the ground truth all the features we used. This is because the behavior of point types for one zone. We use this information along with these point types are similar to each other or other identified thetimeseriesdatatoidentifypointtypesofotherzonesinthe pointtypesduringregularoperation.Werepeatedthisanalysis building.Whenourdataanalysisfailstoidentifycertainpoint across 8 zones and found similar results. Our results are types, we use control experiments to increase the coverage of summarized in Table I. These results are corroborated by point types identification. Note that the VAV points we focus priorworkwhousedmoresophisticateddatafeaturesfortype on cover 79% of all points in our building testbed. identification [19], [21], [22]. With the help of the zone for which ground truth is known We leverage control perturbations to identify point types apriori,wetrainsupervisedclassifiersusingfeaturesextracted which were unsuccessful using data analysis. As points such from one year of timeseries data and ground truth point as TS and Occupied Command (OC) are easily identifiable types as labels. We slice one year of data into 53 weeks using data analysis, we use these points to create our control (partial weeks for starting and ending week), and extract perturbations. We put the zone to the Occupied mode, and features such as mean, variance, dominant frequency, noise, increasetheTSto78oF toforcetheVAVintoaheatingmode skewnessandkurtosis[36]foreachweek.Noiseisrepresented for 3 hours. The same perturbation is applied for the ground by error variance between original data and its piece-wise truth zone as well as all the zones for which the point type contant approximation. Skewness measures the symmetry of needs to be identified. We then extract the same data features the data values across the mean while kurtosis measures the for this control period across all the points, and use transfer peak of the data distribution at the mean. The vector of learning to label points in different zones. As the behavior of TABLEI 1 RESULTSOFPOINTTYPEIDENTIFICATIONUSINGBOTHDATAANALYSIS DC ANDANALYSISWITHCONTROLPERTURBATIONS. SAFS 0.75ge|e) ng TempPeoraintutreTySpeetpoint ClaRssFifierDataAc1c0u0r%acy Clas-sifiCerontrAolccu-racy Points RHVCC 0.5 ndent Chaolled Chan OTchceurpmieodstCatoAmdmjuasntd RABdFaBSoVoMst 9993..21%% -- -- OCCC 0.25P(Depe Contr CoolingSetpoint LSVM 88.9% - - TS 0 HeatingSetpoint DT 87.4% - - TS OC CC HC RVC SAFS DC ZoneTemperature RF 65.0% RF 88% Controlled Points MinSupplyFlow RF 77.8% - - Fig.9. Colormapshowingthechangesinducedbycontrolperturbationsof MaxSupplyFlow BNB 100% - - eachactuatorpointonotheractuators.Probabilitiesarecalculatedastheratio CoolingCommand DT 47.0% DT 88% ofnumberofchangesobservedinanon-controlledactuatorandthenumber ofchangesmadebythecontrolledactuator. HeatingCommand DT 32.1% - - ReheatValveCmd RBFSVM 78.4% - - SupplyAirFlowSP NN 80.3% - - forperturbingdifferentoperatingpointsofthecontrolsystem. SupplyAirFlow LSVM 90.6% - - For every change in TS, we analyze the behavior of the VAV DamperCommand RF 96.2% - - pointsfor10minutes,andnotethepointswhosevalueschange DamperPosition RF 80.3% - - during this period. The threshold of change is one standard deviation for values observed for the past 12 minutes. We chose these times so that we can isolate changes that occur allthecontrolledzonesisforcedtobesimilar,thebehaviorof due to the change in TS rather than other external factors the same point type across the zones is similar. However, the such as solar radiation. For the duration of the experiment, controlled sequence also forces the non-identified point types we calculate a final probability for each of the points as the – SAF, SAFS, ZT, HC – to be different from the rest of the ratio of the number of changes observed for the point and points. Thus, with this experiment, we are able to identify the the number of changes in TS. We repeat this experiment by rest of the point types successfully. Our results across the 8 perturbing all the actuator points - Occupied Command (OC), zoneshavebeensummarizedinTableI.Overall,ouraccuracy CoolingCommand (CC),HeatingCommand (HC),SupplyAir of point type of identification is 85.3 %. FlowSetpoint(SAFS)andDamperCommand(DC).Notethat Our data analysis or control experiments could not distin- weignorethepointsrelatedtominimumandmaximumsupply guishbetweenpointtypesHeatingCommand(HC)andReheat air flow as they are constants. Valve Command (RVC) as they are virtually identical in their behavior. However, it is possible to separate these two points Figure 9 shows a color map representing the probabilities using dependency analysis, which we describe next. obtainedbyperturbingeachofthesepoints.ThechangestoTS affects all the actuators except OC and DC, while changes to C. Dependency Mapping of Points actuators like CC cause changes only in DC and SAFS. With We now focus on the understanding the working of the thehelpofthiscolormap,wecanunderstandwhichpointsare VAV, and how the points relate to each other. As the type being affected by each of the actuator points. However, this of points exposed are different across vendors and equipment, does not precisely decide the dependency between points as it is necessary to understand the context of these points, and points which are lower in the dependency tree such as SAFS mapittoamodelthatcanbeusedbyotherapplications.These get affected by almost all of the actuation experiments. We models can be built using domain knowledge, technical docu- find the behavior of DC to be unpredictable, and the changes ments and historical data analysis [37], [38] as demonstrated that occurred in DC with our control perturbances were lesser by our dependency graph in Figure 3. We propose control than our set threshold. We perform these perturbation across perturbations as an alternative tothese methods, which can be five zones. usedforeitherverifyingalreadydevelopedmodelsorusedfor Figure 10 shows the relationships obtained as a result of older buildings where information available is insufficient for ouranalysis.Thegreensolidlinksindicaterelationshipswhich modeling using other methods. aretrueandconfirmedwiththeanalysis.Thereddashedlinks We assume that we already know the point type and the show relationships which are not true, but are shown to be co-located points in a VAV. We focus on modeling the depen- related by the analysis. In general, the above experiments dencies between the actuator points (or read/write points). cannot identify the true links when a “cycle” is formed in WewritetotheTemperatureSetpoint (TS)ofazonewitha the graph. Here, by “cycle” we mean that there are multiple randomlychosenvalueevery20minutesfor6hours.Thegoal pathsfromonepointtoanotherinthegraph.Weperformmore of this control sequence is to identify the points that react to control experiments to negate the red links, and also confirm changes in TS, and so we choose random values within limits the blue dotted links which form a cycle with the green links. also referred to as auxiliary or secondary signals, has been studied for modeling different types of control systems [42], TS OC [43]. System identification techniques have also been used for HVAC modeling [44], and some prior work have explored using control signals for system identification [45], [46]. However, all of these works focus on modeling the control system or perform control optimizations and do not address CC HC identificationofcontextualinformationsuchaslocation,point typeordependencygraphs.Moreover,thecontrolperturbation methodsusedforbuildingsareonlyverifiedusingsimulations. RVC Active HVAC control on real systems has been used for SAFS Legend fault diagnosis [24] and fault tolerant control [26]. These works and other simulation based studies which propose fault True link, no test required tolerant control [47], [48] assume the contextual information False link, test required aboutthesystemisalreadyavailable.Wefocusondiscovering DC True link, test required contextual information using active control. Co-locationofsensorshasbeenstudiedbefore[49],[28]but Fig.10. Dependencylinksobtainedbyperturbingeachoftheactuatorsand theyusesophisticateddataanalysisalgorithms.Thesemethods checkingwhichotheractuatorsreacttothesechanges.Thelinkswhichrequire fail when the points from different locations have similar furthertestingareverifiedusingconditionalcontrolperturbations. data characteristics during regular usage. We show that with perturbations we can excite the local control system to unique Consider the cycle formed between the points TS, CC and operatingpointsandco-locatepointswithhighaccuracyusing SAFS. In order to verify if the link between TS and SAFS is simple data analytics. correct, we perform a conditional control perturbation, where Point type identification has also been studied earlier using we change TS but force CC to be unchanged, which is called both metadata [19], [20] and data analytics [21], [22]. These GraphSurgery[39].Werepeatthisexperimentforatleastfour worksshowthatmetadataalonecanbeunreliableandrequires changes of TS. If TS were directly affecting SAFS, we would significant manual input for accurate type identification, and observe that SAFS changes even when CC is held constant. the data analytics based method is useful for some point Weverifyeachoftheredandbluelinksthisway.Whenthere types but fails for others. Our results conform to the data are more than three points in a cycle, such as that with TS, analysis works, and we show that perturbations can be used OC, HC and RVC, we ensure several combinations of TS to identify the points which are difficult with data analysis. and OC are performed to test validity of the link. In some We also note that Hong et al. [22] focus on transfer learning of these experiments, we preset the TS value to a fixed value across buildings, while we focus on transfer learning within for appropriate conditions that can activate other points such the building across the different instances of VAV units. as HC. As we note at Section III, an external variable, ZT, In addition, we focus on creating dependency graphs be- may disable HC or CC in certain condition though ZT is not tween points in the HVAC system. Pritoni et al. [23] use con- anactuator.WelettheVAVcontrolsystemtosettletoasteady trol of AHU discharge air temperature to map the VAV units stateafterourchangeofTSbeforeperforminganydependency to their corresponding AHUs. We present control techniques experiments. to isolate relationships within the VAV unit. We performed these experiments on five zones in our We have presented a detailed view of how HVAC VAV building, and verified the links with 73.5 % accuracy with unitsworkinpractice,andhowourQuivercontrolframework a false positive rate of 18.4 % and false negative rate of 8.1 has been designed for safe control of the VAV unit, and %. All of the false positive and 64.7 % of the false negative providesfeaturessuchasqueryofcurrentstatusandrollbacks are due to the external variable, ZT. Thus, we can discover in case of crashes. Dawson-Haggerty et al. [50] provide the dependency between actuator points in the VAV using similarmechanismstoprovidesafeoperations,buttheonusof our control experiments. However, in order to discover the rollbacks and error checking is on the application developer. complete dependency map as shown in Figure 3, we need to They also provide support for multi-user control with timed usemaximumlikelihooddataanalysisasthebehaviorofread- leases and locks, while we only support single user control. only points cannot be controlled directly. VI. LIMITATIONSANDFUTUREWORK V. RELATEDWORK We have shown that control perturbations can be useful in Theproblemofdiscoveringsystemcharacteristicsandmod- discoveryofcontextualinformationinHVACVAVunitsinour elsusingavailabledataiscalledsystemidentification[40],and building testbed. This is just a first step, and more research is a well studied subject in control systems research. Using is needed to extend these results to other types of equipment control perturbations for system identifications is also well and control systems. We hope that the research community known [40], [41], and the design of control perturbations, embraces control perturbations as a tool and generalizes the resultsacrossdifferentbuildings,vendorsandevenothercyber [6] B.Balaji,A.Faruque,M.Abdullah,N.Dutt,R.Gupta,andY.Agarwal, physical systems. “Models, abstractions, and architectures: the missing links in cyber- physicalsystems,”inProceedingsofthe52ndAnnualDesignAutoma- Although our control perturbations were simple and ef- tionConference. ACM,2015,p.82. fective for extracting information we were interested in, we [7] M.D.SymansandM.C.Constantinou,“Semi-activecontrolsystemsfor observe that design of perturbation signatures can affect the seismicprotectionofstructures:astate-of-the-artreview,”Engineering structures,vol.21,no.6,pp.469–487,1999. results significantly depending on external disturbances and [8] A.Epstein,J.FfowcsWilliams,andE.Greitzer,“Activesuppressionof behavior of the control system. We will focus on automating aerodynamicinstabilitiesinturbomachines,”JournalofPropulsionand the perturbance signals in future work, borrowing ideas from Power,vol.5,no.2,pp.204–211,1989. [9] M. Blanke and J. Schro¨der, Diagnosis and fault-tolerant control. system identification literature [43]. We have also forced our Springer,2006,vol.2. control experiments to be done on either weekends or nights. [10] S.Dawson-Haggerty,X.Jiang,G.Tolle,J.Ortiz,andD.Culler,“sMAP: Our work needs to be extended to perform these experiments Asimplemeasurementandactuationprofileforphysicalinformation,” in Proceedings of the 8th ACM Conference on Embedded Networked evenduringworkhourswithperturbationsignalsthatconform SensorSystems. ACM,2010,pp.197–210. to comfort constraints. [11] P.Arjunan,N.Batra,H.Choi,A.Singh,P.Singh,andM.B.Srivastava, To fully exploit control capability for both perturbation “SensorAct: A privacy and security aware federated middleware for buildingmanagement,”inProceedingsoftheFourthACMWorkshopon applications and control optimizations, we need to provide EmbeddedSensingSystemsforEnergy-EfficiencyinBuildings. ACM, supporttothirdpartydevelopersfordirectcontrolofsystems. 2012,pp.80–87. Initial work in both academia [50] and industry [51] have [12] A.Krioukov,G.Fierro,N.Kitaev,andD.Culler,“Buildingapplication stack(bas),”inProceedingsoftheFourthACMWorkshoponEmbedded extendedtraditionalvendorspecificcontrolstocommonAPIs. Sensing Systems for Energy-Efficiency in Buildings. ACM, 2012, pp. Ourcontrolframework,Quiver,allowssafecontrolbyasingle 72–79. user. Further work needs to be done to provide safety guaran- [13] ProjectHaystack.http://project-haystack.org/. teessothatmultipleuserscanaccessthecontrolsystematthe [14] B. Balaji, J. Xu, A. Nwokafor, R. Gupta, and Y. Agarwal, “Sentinel: occupancybasedhvacactuationusingexistingwifiinfrastructurewithin sametimeanddevelopersareprovidedsandboxesoremulation commercialbuildings,”inProceedingsofthe11thACMConferenceon tools to experiment with different control applications. EmbeddedNetworkedSensorSystems. ACM,2013,p.17. [15] P. X. Gao and S. Keshav, “Spot: a smart personalized office thermal VII. CONCLUSION control system,” in Proceedings of the fourth international conference onFutureenergysystems. ACM,2013,pp.237–246. Traditional Building Management Systems are vendor spe- [16] V. L. Erickson and A. E. Cerpa, “Thermovote: participatory sensing cific vertically integrated solutions. To enable third party for efficient building hvac conditioning,” in Proceedings of the Fourth ACMWorkshoponEmbeddedSensingSystemsforEnergy-Efficiencyin building applications that exploit sensor information, recent Buildings. ACM,2012,pp.9–16. works have created standardized APIs and data management [17] A.Krioukov,S.Dawson-Haggerty,L.Lee,O.Rehmane,andD.Culler, solutions which have led to a spurt of innovative applications. “Alivinglaboratorystudyinpersonalizedautomatedlightingcontrols,” Weextendtheseworksbyenablingcontrolofbuildingsystems inProceedingsofthethirdACMworkshoponembeddedsensingsystems forenergy-efficiencyinbuildings. ACM,2011,pp.1–6. and demonstrate applications that exploit control to extract [18] X. Jiang, M. Van Ly, J. Taneja, P. Dutta, and D. Culler, “Experiences contextual information. We design Quiver, a control frame- with a high-fidelity wireless building energy auditing network,” in workthatallowssafeexperimentationofHVACVAVunitsby Proceedings of the 7th ACM Conference on Embedded Networked SensorSystems. ACM,2009,pp.113–126. integrating domain knowledge gained through experience and [19] B.Balaji,C.Verma,B.Narayanaswamy,andY.Agarwal,“Zodiac:Or- empirical experiments. Using Quiver, we demonstrate three ganizingLargeDeploymentofSensorstoCreateReusableApplications control perturbation applications that extract context informa- for Buildings,” in Proceedings of the ACM Conference on Embedded SystemsForEnergy-EfficientBuiltEnvironments. ACM,2015. tion about VAV units – co-location of points, identification of [20] A. Bhattacharya, D. Culler, D. Hong, K. Whitehouse, J. Ortiz, and point types and mapping the dependency between points. We E.Wu,“AutomatedMetadataConstructionToSupportPortableBuilding co-locate 63% VAV points with 98.4% accuracy, we identify Applications,” in Proceedings of the ACM Conference on Embedded SystemsForEnergy-EfficientBuiltEnvironments. ACM,2015. point types with 85.3 % accuracy across 8 zones, and we [21] J.Gao,J.Ploennigs,andM.Berges,“AData-drivenMeta-dataInference identify dependencies between VAV actuator points with 73.5 Framework for Building Automation Systems,” in Proceedings of the % accuracy across 5 zones. ACM Conference on Embedded Systems For Energy-Efficient Built Environments. ACM,2015. REFERENCES [22] D.Hong,H.Wang,J.Ortiz,andK.Whitehouse,“TheBuildingAdapter: TowardsQuicklyApplyingBuildingAnalyticsatScale,”inProceedings [1] C.BergerandB.Rumpe,“Autonomousdriving-5yearsaftertheurban oftheACMConferenceonEmbeddedSystemsForEnergy-EfficientBuilt challenge: The anticipatory vehicle as a cyber-physical system,” arXiv Environments. ACM,2015. preprintarXiv:1409.0413,2014. [23] M.Pritoni,A.Bhattacharya,D.Culler,andM.Modera,“ShortPaper:A [2] H. Abid, L. T. T. Phuong, J. Wang, S. Lee, and S. Qaisar, “V-cloud: MethodforDiscoveringFunctionalRelationshipsBetweenAirHandling vehicularcyber-physicalsystemsandcloudcomputing,”inProceedings UnitsandVariable-Air-VolumeBoxesFromSensorData,”inProceed- ofthe4thInternationalSymposiumonAppliedSciencesinBiomedical ingsoftheACMConferenceonEmbeddedSystemsForEnergy-Efficient andCommunicationTechnologies. ACM,2011,p.165. BuiltEnvironments. ACM,2015. [3] S.Karnouskos,“Cyber-physicalsystemsinthesmartgrid,”inIndustrial [24] J.Weimer,S.A.Ahmadi,J.Araujo,F.M.Mele,D.Papale,I.Shames, Informatics (INDIN), 2011 9th IEEE International Conference on. H.Sandberg,andK.H.Johansson,“Activeactuatorfaultdetectionand IEEE,2011,pp.20–23. diagnosticsinhvacsystems,”inProceedingsoftheFourthACMWork- [4] P. Derler, E. Lee, A. S. Vincentelli et al., “Modeling cyber–physical shoponEmbeddedSensingSystemsforEnergy-EfficiencyinBuildings. systems,”ProceedingsoftheIEEE,vol.100,no.1,pp.13–28,2012. ACM,2012,pp.107–114. [5] S. Karnouskos, “Stuxnet worm impact on industrial cyber-physical [25] M. Padilla and D. Choinie`re, “A combined passive-active sensor fault system security,” in IECON 2011-37th Annual Conference on IEEE detection and isolation approach for air handling units,” Energy and IndustrialElectronicsSociety. IEEE,2011,pp.4490–4494. Buildings,vol.99,pp.214–219,2015.