Heat pumps: defrost, wrong mode, capacity, staging and the source loop
Workbook exercise plant-heat-pump · heat-pump guides (no PNNL re-tuning chapter covers heat pumps) · about 50 minutes
Goal
Find the heat-pump faults that no open dataset in the catalog shows: a unit that defrosts far too often, a unit that heats a room that is already too warm, a unit that falls behind in a cold snap, a compressor stage that hunts, two units that fight in one room, and a source loop that pumps water without carrying heat. Then find out what a 15-minute trend hides, and how much the defrost verdict depends on the limit you choose.
Learn more
No PNNL re-tuning guide or chapter covers heat pumps. Read these instead (free):
- Heating and cooling with a heat pump (Natural Resources Canada): its sections on the defrost cycle, on supplementary heat and the balance point, and on thermostats explain the defrost, capacity and mode parts of this exercise.
- Guide to Installing Air-Source Heat Pumps in Cold Climates (NEEP): its thermostat section says where a unit's thermostat belongs, which is what goes wrong in the room with two units.
- Variable Flow Pumping (EPRI technical brief TB-114673): why a water-source loop whose pumps run at constant speed moves water it does not need.
- Chapter 3 of the small-building re-tuning course (PNNL): its packaged-unit and thermostat sections cover the settings that make a compressor cycle or stage.
Datasets and licence
synthetic-heat-pump: the synthetic heat pumps of one small building, which CAMBER generates on your computer. Nothing is downloaded and no real building is behind it. It covers a fortnight of late winter, every 5 minutes: damp days around freezing, a three-day cold snap, two days of mild fog and a sunny spell, so the units both heat and cool. Licence Apache-2.0 (CAMBER's own; the data may be shared). About 3 MB. See synthetic datasets for how CAMBER generates it.
Twelve pieces of equipment are ingested into the facility ds-synthetic-heat-pump:
- four air-source units (class
ASHP), each trended with its zone and discharge-air temperatures, fan, occupancy, heating and cooling setpoints, compressor status and reversing valve (1 = heating):ASHP__healthy,ASHP__defrost_sensor,ASHP__defrost_timerandASHP__no_aux_heat; - six water-source units (class
WSHP), trended with the same points but the compressor stage (0, 1 or 2) instead of the compressor and valve:WSHP__classroomandWSHP__classroom_twinshare one room,WSHP__window_sideandWSHP__door_sideshare another, andWSHP__stuck_heatingandWSHP__stage_huntingeach serve a room of their own; - the water-source units' source loop (class
HPLOOP), trended with its supply and return water, pump status, pump speed and differential pressure:LOOP__loop_okandLOOP__loop_flat.
What is wrong with each is the exercise; the instructor key describes how each was built.
Setup
In the lab
- Run
camber laband open the URL it prints (http://127.0.0.1:8765/lab?token=...). - Tick
synthetic-heat-pump(its kind readssynthetic) and press Fetch & ingest. CAMBER generates the file instead of downloading it, then ingests it like any other dataset. - When the job is done, the row links to trends (the trend viewer) and to report, the audit report of the dataset's template at the trend's own 5-minute resolution. The lessons in steps 7 and 8 below use the command line.
On the command line
camber datasets fetch synthetic-heat-pump
camber datasets ingest synthetic-heat-pump --store lab_store
camber datasets config synthetic-heat-pump --exercise plant-heat-pump --store lab_store --out hp.json
camber run hp.json --out hp_out
camber datasets score synthetic-heat-pump --store lab_store --findings hp_out/findings.json
The exercise's config (--exercise plant-heat-pump) runs six rules at their defaults on the
5-minute trend: heatpump_defrost (reversing-valve changes per day), hp_mode_vs_need (heating
a warm room or cooling a cold one), hp_capacity_shortfall (a room out of its band while its
unit works), hp_room_imbalance (units in one room that fight), compressor_staging (stage
changes per day) and source_loop_deltat (the loop's delta-T while it pumps). The units that
share a room are declared in the config's topology (each unit's parent is its room), since
nothing in a trend says which units share a room. Two variants run fewer rules: one on the same
data resampled to 15 minutes, one with a limit of 20 reversals a day instead of 24:
camber datasets config synthetic-heat-pump --exercise plant-heat-pump--15min --store lab_store --out hp15.json
camber run hp15.json --out hp15_out
camber datasets config synthetic-heat-pump --exercise plant-heat-pump--20rev --store lab_store --out hp20.json
camber run hp20.json --out hp20_out
Steps
- Look before you judge. In the trend viewer, open
ASHP__healthyandASHP__defrost_sensorand plot the reversing valve and the compressor over one foggy day (26 February) and one day of the cold snap (20 February). Zoom in until you can see single 5-minute samples. Note the outdoor temperature when each unit defrosts. - Run the exercise's config (the commands above). For the four air-source units, read
heatpump_defrostinhp_out/findings.json: the severity,reversals_per_dayandn_reversals. - Mode and capacity. For every unit, read
hp_mode_vs_need(heating_while_warm_hours,cooling_while_cold_hours,wrong_mode_pct_of_running,mode_source) andhp_capacity_shortfall(heating_outside_pct,cooling_outside_pct,verdict,side). Plot the zone and discharge-air temperatures of each unit that fires. - The rooms. Read the
hp_room_imbalancefinding (its equipment is<fleet>):roomshas one entry per room, withfight_pct,active_pct,zone_sensor_spread_fand a severity. Plot the zone temperatures ofWSHP__window_sideandWSHP__door_sidetogether. - Stages and the loop. Read
compressor_staging(stage_changes_per_day) for the six water-source units andsource_loop_deltat(deltat_median_f,deltat_p90_f,flat_pct,diff_press_median) for the two loops. - Score. Run
camber datasets scoreand read the rates for the five scored rules, then the per-equipment lines. - Sample it every 15 minutes. Run the
15minvariant and comparereversals_per_dayandstage_changes_per_daywith steps 2 and 5. - Choose the limit. Run the
20revvariant. Note which defrost verdicts change.
Questions
- Which air-source unit does
heatpump_defrostflag, and how badly? At what outdoor temperatures does it defrost, and why is that impossible for a coil carrying frost? ASHP__defrost_timerpasses, just under the limit. What makes it defrost more than the healthy unit, especially in the dry cold snap? With a limit of 20, what changes, and is it a fault?- Which unit heats a room that is already too warm? How does CAMBER know the unit is heating
when no compressor or valve is trended? What does
defrost_hourssay for the air-source units, and why are those hours not cooling? - Which unit falls out of its heating band while it runs flat out? What does the verdict say,
and what does it say for
WSHP__stuck_heating, and how did that unit spend its time? - Which room's units fight, and for what share of the occupied time? Why does
hp_mode_vs_neednot see the fight, and what verdict doeshp_capacity_shortfallgive its two units? - Which unit's stages hunt? What do the stage changes per day of the other water-source units say about normal staging?
- Which loop carries almost no heat, and what do its delta-T and DP say?
- What does the label score say for each rule? Which unit is the false alarm for each rule that has one?
- Resampled to 15 minutes, what happens to the defrost and stage counts and their verdicts? Why can a 15-minute trend not vouch for a 5-minute defrost?
What CAMBER shows
- Findings.
camber runprints one line per finding: one per rule and unit, and one<fleet>finding forhp_room_imbalance. - Defrost.
heatpump_defrostcounts every change of the reversing valve (into a defrost and out of it, and every heating/cooling changeover) and reportsreversals_per_day,n_reversalsandmax_reversals_per_day. It warns at the limit (24) and faults at twice it. It needs a trend of 5 minutes or finer (max_interval_min): coarser, the count is a floor, and a count below the limit declines toinfo. - Mode.
hp_mode_vs_needreportsheating_while_warm_hours,cooling_while_cold_hoursandwrong_mode_pct_of_running, in occupied hours.mode_sourcesays how it knew the mode:status(the compressor and the reversing valve) ordischarge_vs_zone(discharge air at least 15 °F above the zone reads as heating, at least 10 °F below as cooling). Withstatus, a reversal of at most 15 minutes between two heating samples is a defrost and counts as heating;defrost_hoursreports it. It warns at 2 hours and 2 % of the running time, and faults at 10 hours and 10 %. - Capacity.
hp_capacity_shortfallreports, per side, the share of occupied time out of band (heating_outside_pct,cooling_outside_pct) and the share of that time the unit was working in the right mode (heating_working_pct,cooling_working_pct). Itsverdictiscapacity(working at least 70 % of that time),control(at most 30 %) ormixed;heating_opposite_pctandcooling_opposite_pctgive the share spent in the other mode. A unit in a room whose units fight getsroom_fightinstead ofcapacityormixed. It warns at 10 % of occupied time and faults at 25 %. - Rooms.
hp_room_imbalancereports per roomfight_pct(one unit heating while another cools), the units'active_pctand its spread, andzone_sensor_spread_f. A room faults at a 10 % fight and warns at 2 %, a 40-point active spread or a 3 °F sensor spread. - Stages.
compressor_stagingreportsstage_changes_per_day(changes of the stage while the compressor runs; starts and stops are not counted) andmax_stage. It warns at 24 changes a day and faults at 48, and like the defrost count it needs a trend of 5 minutes or finer. - Loop.
source_loop_deltatreports the loop's |delta-T| while it pumps:deltat_median_f,deltat_p90_fandflat_pct(the share under 1 °F), against a 10 °F design value. It faults when 80 % of the pumping time is flat and the 90th percentile is under a quarter of the design. - Score.
camber datasets scoreprints the true- and false-positive rates for the entry's five scored rules.hp_room_imbalanceis a fleet rule with no per-unit finding, so it is not scored: read itsroomsinstead.

From this exercise's synthetic units ASHP__defrost_sensor (top) and ASHP__healthy (bottom) on 26 February: the reversing valve (1 = heating) and the compressor. Each shaded sample is a defrost: the valve reversed with the compressor running.
Caveats
- The data are synthetic: CAMBER's own model of one building and its heat pumps, built to show these faults. They show what the rules see, not how real heat pumps behave; never cite them as evidence about a building.
- A 5-minute trend still hides a defrost or a stage change shorter than 5 minutes, so the counts are a floor.
- The rules judge occupied hours (the trended
occupancy, weekdays 07:00 to 18:00 here). - Which units share a room comes from the config's
topology, not from the data. On a real site it comes from the drawings or a walk-down. - The limits are generic screening defaults (
camber rules params heatpump_defrost). A real unit's defrost interval and staging delays come from its documentation and controls.
Going further
- Read the boiler cycling exercise: its resolution lesson is the same one, for a boiler on a 15-minute trend.
- Run
camber rules params heatpump_defrost,camber rules params compressor_stagingandcamber rules params source_loop_deltatto see where each default comes from and how to calibrate it.