Category Archives: Energy analysis and reporting

The meaning of R-squared

In statistical analysis the coefficient of determination (more commonly known as R2) is a measure of how well variation in one variable explains the variation in something else, for instance how well the variation in hours of darkness explains variation in electricity consumption of yard lighting.

R2 varies between zero, meaning there is no effect, and 1.0 which would signify total correlation between the two with no error. It is commonly held that higher R2 is better, and you will often see a value of (say) 0.9 stated as the threshold below which you cannot trust the relationship. But that is nonsense and one reason can be seen from the diagrams below which show how, for two different objects,  energy consumption on the vertical or y axis might relate to a particular driving factor or independent variable on the horizontal or x axis.

r2_vs_CV(RMSE)

In both cases, the relationship between consumption and its driving factor is imperfect. But the data were arranged to have exactly the same degree of dispersion. This is shown by the CV(RMSE) value which is the root mean square deviation expressed as a percentage of the average consumption.  R2 is 0.96  (so-called “good”) in one case but only 0.10 (“bad”) in the other. But why would we regard the right-hand model as worse than the left? If we were to use either model to predict expected consumption, the absolute error in the estimates would be the same.

By the way, if anyone ever asks how to get R2 = 1.0 the answer is simple: use only two data points. By definition, the two points will lie exactly on the best-fit line through them!

Another common misconception is that a low value of R2 in the case of heating fuel signifies poor control of the building. This is not a safe assumption. Try this thought experiment. Suppose that a building’s fuel consumption is being monitored against locally-measured degree days. You can expect a linear relationship with a certain R2 value. Now suppose that the local weather monitoring fails and you switch to using published degree-day figures from a meteorological station 35km away. The error in the driving factor data caused by using remote weather observations will reduce R2 because the estimates of expected consumption are less accurate; more of the apparent variation in consumption will be attributable to error and less to the measured degree days. Does the reduced R2  signify worse control? No; the building’s performance hasn’t changed.

Footnote: for a deeper, informative and highly readable treatment of this subject see this excellent paper by Mark Stetz. 

Degree-day base temperature

When considering the consumption of fuel for space heating, the degree-day base temperature is the outside air temperature above which heating is not required, and the presumption is that when the outside air is below the base temperature, heat flow from the building will be proportional to the deficit in degrees. Similar considerations apply to cooling load, but for simplicity this article deals only with heating.

In UK practice, free published degree-day data have traditionally been calculated against a default base temperature of 15.5°C (60°F). However, this is unlikely to be truly reflective of modern buildings and the ready availability of degree-day data to alternative base temperatures makes it possible to be more accurate. But how does one identify the correct base temperature?

The first step is to understand the effect of getting the base temperature wrong. Perhaps the most common symptom is the negative intercept that can be seen in Figure 1 which compares the relationships between consumption and degree days. This is what most often alerts you to a problem:

Figure 1: the classic symptom
Figure 1: the classic symptom

It should be evident that in Figure 1 we are trying to fit a straight line to what is actually a curved characteristic. The shape of the curve depends on whether the base temperature was too low or too high, and Figure 2 shows the same consumptions plotted against degree days computed to three different base temperatures: one too high (as Figure 1), one too low, and one just right.

Figure 2: the effect of varying base temperature
Figure 2: the effect of varying base temperature

Notice in Figure 2 that the characterists are only curved near the origin. They are parallel at their right-hand ends, that is to say, in weeks when the outside air temperature never went above the base temperature. The gradients of the straight sections are all the same, including of course the case where the base temperature was appropriate. This is significant because although in real life we only have the distorted view represented by Figure 1, we now know that the gradient of its straight section is equal to the true gradient of the correct line.

So let’s revert to our original scenario: the case where we had a single line where the base temperature was too high. Figure 3 shows that a projection of the straight segment of the line intersects the vertical axis at -1000 kWh per week, well below the true position, which from Figure 1 we can judge to be around 500 kWh per week. The gradient of the straight section, incidentally, is 45 kWh per degree day.

Figure 3: correct gradient but wrong intercept
Figure 3: correct gradient but wrong intercept

To correct the distortion we need to shift the line in Figure 3 to the left by a certain number of degree days so that it ends up looking like Figure 4 below. The change in intercept we are aiming for is 1,500 kWh (the difference between the apparent intercept of -1000, and the true intercept, 500*). We can work out how far left to move the line by dividing the required change in the intercept by the gradient: 1500/45 = 33.3 degree days. Given that the degree-day figures are calculated over a 7-day interval, the required change in base temperature is 33.3/7 = 4.8 degrees

Figure 4: degree-day values reduced by lowering the base temperature
Figure 4: degree-day values moved leftwards by lowering the base temperature

Note that only the points in the straight section moved the whole distance to the left: in the curved sections, the further left the point originally sits, the less it moves. This can best be visualised by looking again at Figure 2.

In more general terms the base-temperature adjustment is given by (Ct-Ca)/m.t where:

Ct is the true intercept;
Ca is the apparent intercept when projecting the straight portion of the distorted characteristic;
m is the gradient of that straight portion; and
t is the observing-interval length in days


* The intercept could be judged or estimated by a variety of methods including: empirical observations like averaging the consumption in non-heating weeks; by ‘eyeball’; or by fitting a curved regression line, etc..

A new dark age?

Is this the worst energy dashboard ever?

The worst energy dashboard ever?

It’s an anonymised but accurate reconstruction of something I recently saw touted as an example of a ‘visual energy display’ suitable for a reception area. Apart from patently being an advertisement for an equipment supplier — name changed to protect the innocent (guilty?) — the only numerical information in the display is in small type against a background which makes it hard to read. Also, one might ask, “so what?”. There is no context. What proportion was 3.456 kWh? What were we aiming for? What is the trend?

There’s a bigger picture here: in energy reporting generally, system suppliers have descended into “content-lite” bling warfare (why do bar charts now have to bounce into view with a flourish?). And nearly always the displays are just passive and uncritical statements of quantities consumed. Anybody who wants to display energy information graphically should read Stephen Few’s book Information Dashboard Design . It is clear that almost no suppliers of energy monitoring systems have ever done so, but perhaps if their customers did, and became more discerning and demanding, we might see more useful information and less meaningless noise and clutter.

Flexible degree-day service

FlexDD_logo_2_smallThe FlexDD service from Degree Days Direct is a framework for delivering degree-day data. It allows you to create Excel energy workbooks with degree-day tables in them which update themselves automatically from the cloud.

Having subscribed to the observing stations you require, you’ll receive an Excel workbook linked to your account with some initial tables built in which you can customise as required.

flexdd_screenshotThis is a typical Excel table. In each column you specify the observing station (a), heating or cooling mode (b), and base temperature (c). Put datestamps at (d) and copy the output formulae into the table (e).

Available base temperatures for heating are at whole-number increments from 10°C to 25°C For cooling the range is 5°C to 30°C. For compatibility with legacy reports, additional base temperatures of 15.5°C and 18.5°C heating and 15.5°C cooling are also provided.

You can clone the worksheet to have both monthly and weekly reports if you wish, and your weekly reports can end on any day of the week.

Pricing

There is an initial setup charge of £50, with per-station subscription charges of £12 per annum. Prices exclude VAT. Orders can be placed by emailing .

Energy balance: debunk bogus product claims

One of the most powerful basic concepts for the energy manager to understand is that of the energy balance, i.e., that all the energy you put into a system comes out again as energy in one form or another. This fundamental principle enables you spot at least some of the dodgy offerings out there.

Take, for example, any product that claims to increase the efficiency of a heating boiler by improving heat transfer: if it does so, it can only do so by increasing the quantity of heat absorbed from the flame. This leaves less heat in the exhaust gas and so reduces the flue-gas temperature. If the treatment doesn’t reduce the exhaust temperature it hasn’t worked, and the extent of temperature reduction indicates how much improvement there has been.

Likewise with voltage reduction. Unless operating at reduced voltage somehow improves the energy-conversion efficiency* of the connected equipment, any saving in energy purchased (input) must be manifested as a reduction in output (light, mechanical effort or heat) from the equipment. Hence you can only save input energy if you can tolerate reduced output. You certainly cannot, as one product shamelessly claims, recover the saved energy and store it for use later.


*Electric motors do change efficiency with voltage. When trying to provide the same mechanical output at reduced voltage, the current in their windings has to increase to compensate, and because this increases the resistive heating effect, the result is a small increase in power consumed – not a reduction.

Gas meter conundrum

gearcutaway
Photo: Chris Morris

A reader contacted me to say that he had a gas meter on his site that runs backwards when there is no demand. It is a rotary positive-displacement type (see picture) and I believe it is one of a number of sub-meters on what I know to be a sprawling industrial complex. His first thought had been that the gas in the downstream pipework might be warming up and expanding, pushing back through the meter, but a quick calculation showed that this would only account for about 10% of the observed volume. We established that the meter was in the right way around, and had mechanical as well as digital readouts, which tallied with each other. I put the puzzle to the readers of the Energy Management Register to see what they thought. I got about twenty responses and here is an edited summary of what came back.

A few people asked questions and suggested some measurements that might be useful: for example wanting to know what sizes and types of equipment were on the network, and what the standing pressures were upstream and downstream of the meter (it can only run backwards if the downstream pressure is higher than upstream). One theory was that there is something pressurising the downstream side. This is not completely fanciful and one reader on a similar site mentioned that he had gas supplies at both ends, one of which had been capped off. A long-forgotten redundant but imperfectly-isolated second mains supply could easily be the culprit. On a big network it would feed back through the meter and into other branches if there is even the slightest pressure differential.

Another reader asked if there were any gas booster sets downstream of the meter, fitted to increase gas pressure above that of the supply main on high-output burners. When the burners shut off, any residual pressure could dissipate via a defective non-return valve back through the meter.

A lot of respondents asked no questions but fired off some inspired suggestions. One raised the possibility that groundwater was leaking into buried pipework and displacing gas. It would not need to be very deep for this to happen but presumably there would be obvious and dramatic consequences whenever the burners fired up after a prolonged idle spell. Several raised the possibility that air was being pumped in somehow — which could create a gas mixture that could detonate rather than ignite when next called on.

Other readers focussed on the upstream gas pressure and the possibility that something might be causing it to drop. For example, it  might be cooling down during periods of no demand. If the upstream pipework is extensive this could draw back a larger volume via the meter than expansion downstream but this would have only a temporary effect, and only when other branches were not drawing gas. Two or three people raised the possibility that there were gas booster sets in the other upstream branches and that the suction from those would depress the upstream pressure. Indeed one reader had seen exactly this effect trip out a CHP plant on low pressure. Two ingenious folk suggested a Bernoulli effect, in which the problematic supply is teed off from a main and high-velocity gas passing the junction sucks gas from the branch.

One reader thought that the meter ought to be fitted with a ratchet to stop it turning backwards; I think this is normal with fiscal meters for obvious reasons, and it is not a bad point. If you stall a gear meter like the one in question, it stops the flow, and as there are safety implications in many of the ideas put forward, that seems like a good idea.

At the time of writing we are waiting to find out what was discovered. Meanwhile thanks to Bill Gysin, Mike Mann, Mike Muscott, Andrew Cowan, Vic Tuffen, Ben Davies-Nash, Jeremy Draper, James Pollington, John Perkin, Alan Turner, Bill Spragg, Mike Bond, Jonathan Morgan, James Ferguson, Neil Howison, Ian Hill, Tony Duffin, Neil Alcock, Peter Thompson  and others for your insights.

Why league tables don’t work

League tables are highly unsuitable for reporting energy performance, because small measurement errors can propel participants up and down the table. As a result, the wrong people get praised or blamed, and real opportunities go missing while resources are wasted pursuing phantom problems.

Figure 1
Figure 1

To illustrate this, let’s look at a fashionable application for league tables: driver behaviour. The table on the right (Figure 1) shows 26 drivers, each of whom is actually achieving true fuel economy between 45 and 50 mpg in identical vehicles doing the same duties. This is a very artificial scenario but to make it a bit more realistic let us accept that there will be some error in measurement: alongside their ‘true’ mpg I have put the ‘measured’ values. These differ by a random amount from the true value, on a normal distribution with a standard deviation of 1 mpg — meaning that 2/3 of them fall within 1 mpg either side of the true value, and big discrepancies, although rare, are not impossible. Errors of this magnitude (around 2%) are highly plausible given the facts that (a) it is difficult to fill the tank consistently to the brim at the start and end of the assessment period and (b) there could easily be a 5% error in the recorded mileage. Check your speedometer against a satnav if you doubt that.

In the right-hand column of Figure 1 we see the resulting ranking based on a spreadsheet simulating the random errors. The results look fine: drivers A, B and C at the top and X, Y and Z at the bottom, in line with their true performance. But I cheated to get this result: I ran the simulation several times until this outcome occurred.

Figure 2
Figure 2

Figure 2 shows an extract of two other outcomes I got along the way. The top table has driver B promoted from second to first place (benefiting from a 2.3 mpg error), while in the bottom table the same error, combined with bad luck for some of the others, propels driver K into first place from what should have been 11th.

In neither case does the best driver get recognised, and in the top case driver P, actually rather average at 16th, ends up at the bottom thanks to an unlucky but not impossible 7% adverse measurement error.

A league table is pretty daft as a reporting tool. The winners crow about it (deservedly or not) while those at the bottom find excuses or (justifiably)  blame the methodology. As a motivational tool: forget it. When the results are announced, the majority of participants, including those who made a big effort, will see themselves advertised as having failed to get to the top.

Download the simulation to see all this for yourself.

Estimating savings from building-fabric improvements

If you improve a building’s insulation, or reduce its ventilation rate, the resulting energy saving can be estimated using simple formulae in combination with relevant weather-data tables. In the case of an improvement to insulation of an individual element of the building envelope, the approximate formula for annual fuel savings is

0.024 x (UOLD – UNEW) x A x DDA / EFF                         (kWh)

where  UOLD and UNEW are the original and improved U-values (W/m2K), and A is the area of building element being improved (m2).  EFF is heating-system efficiency, for which it would be reasonable to assume a value in the range of 0.8 to 0.9, reflecting the fact that 10-20% of the fuel used is accounted for by combustion losses.

DDA meanwhile is the annual heating degree-day figure, which is a measure of how cold the weather was in aggregate. Degree-day totals tend to be higher in the north and lower in the south; and they also depend on the outside temperature below which a given building’s heating needs to be turned on (the ‘base’ temperature). Selected totals are given in Table 1 for various regions and base temperatures. Buildings with high space temperatures and low casual heat gains have higher base temperatures, implying higher annual degree-day totals and thus bigger expected savings for a given improvement to their insulation.

Turning to the effect of reducing the building’s ventilation rate, we need to know the reduction in air throughput, RDV. If we express RDV in m3/day, the annual energy savings are given by this approximate formula:

(0.008 x RDV x DDA) / EFF                   (kWh)

DDA and EFF have the same meanings as before.

Use for air conditioning

The same techniques can be used to gauge the effect of reduced cooling load. In this case we use cooling degree days (examples in Table 2) and EFF is likely to be in the range 2 to 4, representing the chiller coefficient of performance. Saving one kWh of cooling effect saves much less than a kWh of electricity.

Base temperatures

The base temperature for heating depends on the temperature set-point, the construction of the building, how it is used, how densely it is populated and how much casual heat gain it experiences from lighting and equipment. It is invariably below the internal set-point temperature. How far below can be determined in various ways but there would typically be about 4°C difference.

Similar considerations apply to cooling: the cooling base temperature is the temperature above which it becomes necessary to run air conditioning. If you know air-conditioning is used throughout the year, a very low base (say 5°C) is appropriate. Otherwise something of the order of 15°C could be a reasonable assumption.

Table 1: Annual heating degree days1

Base temperature: 20°C 15°C 10°C
South West   3,189   1,576      503
Midland   3,632   2,033      860
N E Scotland   4,075   2,355   1,003

Table 2: Annual cooling degree days1

Base temperature: 25°C 15°C 5°C
South West          2      233   2,386
Midland          6      274   2,111
N E Scotland    0      111   1,649

1 The full tables can be downloaded from www.vesma.com. Click on ‘D’ in the A-Z index and look for ‘degree days’.

Accurate meter readings: a managing director’s view

More from the museum of energy management…

books_lyleThe UK’s first energy manager was Oliver Lyle, managing director of the eponymous sugar refinery in London. He was successful not only because he was in a position of influence but also because he was a very capable engineer. Fuel efficiency was mission critical to him both during the war (because of rationing) and afterwards when the effect of rationing was compounded by economic growth.

Lyle’s book The Efficient Use of Steam, published by the Ministry of Fuel and Power in 1947, remains a technical classic and is written in a most engaging style.  In one of my favourite passages he talks about my pet subject, the analysis of fuel consumption. He notes that energy performance seemed to be systematically better in weeks when the factory had been bombed. He remarks that common sense suggests that the opposite would seem more likely; “I can only conclude”, he writes, “that people were too busy clearing up the mess to take proper charts and meter readings”.

Accounting for the weather: an early degree-day meter

ddmeter1

I’m indebted to Dr Peter Harris for unearthing this curiosity, published in the journal of the Institute of Heating and Ventilating Engineers in 1936. It is a design for a “degree-day meter” whose purpose was to summarise how cold the weather had been over a given period (a month, say). This is how it works: a resistance thermometer a is mounted outdoors and connected via a Wheatstone Bridge b to a moving coil galvanometer c whose pointer d moves horizontally across a scale e, marked from 60°F on the left to -20°F on the right. It thereby indicates the outside air temperature. Above the pointer is a tapered chopper bar f, moved up and down by a light spring g driven by a rotating cam h.  Because the chopper bar is tapered, its vertical travel is constrained to an increasing extent as the pointer moves leftward indicating higher temperatures.  Conversely, its vertical travel will be greater the lower the temperature, as the pointer moves to the right. The intermittent vertical travel of the chopper bar is transmitted via a pawl i and ratchet-wheel j to a cyclometer counter k which shows the total vertical travel. The counter will advance more rapidly when it is colder and more slowly when it is warmer outside, and it is so arranged that when the temperature exceeds 60°F there will be no vertical play and the counter will not advance at all.

Because a building’s heating power requirement at any given moment is proportional to the temperature deficit, the accumulated deficit over any given period of days (as measured by this meter) is proportional to the total thermal energy lost from the building, which needs to be made up by the heating system.  Because it measures the time integral of temperature deficit, its units of measurement are degree-days (analogous to man-hours) and the threshold temperature of  60°F survives today as the common degree-day base temperature of  15.5°C.