This object is in archive! 

Calculation of Energy

Mike Austin shared this question 6 years ago
Answered

I have written a spreadsheet to analysis an exported csv file and I am interested in how you calculate the energy used. This should be proportional to weight. I have a calculation that sums walking energy, increase in potential energy and kinetic energy., As it happens, the result is not far off the Locus Map value, yet Locus Map does not know my weight. How do you calculate it?

Replies (12)

photo
1

Actually, I see Locus Map does have my weight - but I would still like to know how the energy is calculated.

photo
1

Good day Mike,

Locus Map currently uses two methods to compute consumed calories.

First is based on the known heart rate value (in case of usage of some heart rate chest belt). If HR value is not known, energy is computed based on predefined activity for a track and computed basal metabolic. Both methods anyway need to know your sex, age, weight. These values may be defined in Locus Map in settings > Track recording > Personal details.

You did not know about this "Personal detail" dialog right? Then it seems to be too hidden in settings.

Also, one interesting topic (which was not yet used/implemented) is here: http://help.locusmap.eu/topic/what-are-the-parameters-used-for-calculating-the-calories .

If you have additional questions, feel free to ask.

photo
1

Thanks, but that did not explain how it is calculated. I have written a macro to read LocusMap csv files (now writing one for gpx files) and I am using an energy calculation based on data from BUPA. I have started with walking on a level, firm surface for which I fit a curve to the reference:

KJ = Weight*Time*(0.125888*v^3 - 0.532833*v^2 +0.951283*v + 2.471667)/1000

where weight is Kg, Time is secs, v is mph (funny mix of units, I know)

To this I add the increase in potential energy (mgh2-mgh1) and the increase in kinetic energy (½mv2² - ½mv1²), only considering increases in h and v. I sum these for all the track points to get a total for the track.

I will be incorporating other types of walking from the same site eventually.

What I wanted to know was the equations that you use. On an example walk, LocusPro calculates 1269KJ. I calculate 1485KJ, which is 1346KJ from walking, 85KJ from potential and 54KJ from kinetic.

photo
1

Exact equation?

In case of Locus, the method based on "not known Heart rate values" is the following:

The major complaint I see here is ignoring elevation changes as also mentioned in the second topic. Not sure yet, how to correctly add support for it here.

Is my explanation clear?

photo
1

Elevetion is only one of many unknown variables:

  • elevation
  • efficiency of the equipment (for example tires on bikes)
  • terrain
  • wind
  • pressure/oxigen level?

I guess if you don't have any power messurements (for example power meter on bike) every calculation isn't worth anything.


Just to show how far away our values are:

http://www.kreuzotter.de/english/espeed.htm

And even this is far away from correct values because there are many parameters missing as well.


I guess Locus maps isn't the right place to put 10 to 20 parameters in to calculate usefull energy values. An addon for energy calculation would make more sense?

photo
1

You are of course correct, but for every parameter you may define it's most probable impact. Only "crazy users" may expect that Locus Map will compute exact and very precise energy values. I had consider time and speed (together with values needed for basal metabolism) as the most important so the solution is based on these facts. The elevation is from my point of view next parameter, that is well known during computing! and that may have a significant impact. Mos of other parameters are completely unknown and as you wrote ... "Locus maps isn't the right place to put 10 to 20 parameters in".

photo
1

Acutally I don't know anything about energy calculation, but I got this crazy link from one of my friends. And wind makes more difference then altitute for road bikes.

I guess terrain and tires are the most expensive parameter for mtb.

I was just suprised that we do have this in locus. I used that opertunity to display energy on my elevation test tour just for fun: 23.471 KJ, well I guess I need to catch up on food consumtion to compensate last week ;)

photo
1

23471?? :). Week of running? If you see such huge value, there for sure have to be some explanation. Incorrect parameters in settings > track recording > profile or incorrect "activity" defined for your recorded track or some part of the track was maybe by car/bus but recorded into the same track?

photo
1

No, just a 10 hour 270km road cycle tour :D

This is my real word example for my elevation threshold testing.


I did just switch from walk to cycle that is even more:

29.268 kJ

Are you sure that cycling is more expensive then walking? I guess we do not calculate speed.

photo
1

270km/10h, then such huge consumption is logical I think.

Consumption: it depends. Cycling and also Walking has defined consumption based on it's speed. For example quick walk 1.6 m/s consume 4.3 x BRM. Average bike ride 4.9 m/s consume 6.8 x MET which I think is logical. In your case, you maybe ride on road bike and good road which is something completely different compare to 27km/h on MTB in dirty terrain. I know, many parameters ...

Suggestion: use these energy values just for overview information, not as something that should be used to plan your diet ;).

photo
1

Good point: many parameters such as road conditions, headwinds, tire size, and pressure. It's the same with my main sport, cross-country skiing: usually a slower speed means a harder workout due to bad wax, soft wet snow, etc.!


I compare LocusMap energy values with Oura ring values, and they are frequently pretty close. The ring measures heart rate, but not while active (they are working on it!), so it's algorithm is probably similar to LocusMap. One thing different about Oura, which may increase accuracy, is that the user self-reports intensity of activity-specific workouts (e.g. x-c skiing) in 3 categories: Easy, Medium, and Hard. Probably even better would be to report % time spent in two of the 3 categories, with the 3rd obtained by subtraction. Not too hard for the user, and probably most accurate?

photo
1

Thanks, I will dig deeper into those references to find suitable equations for my macro. Then I will know how clear it is!

My equation is a simple curve fit to the reference I quoted that would be valid from 2-5mph on flat hard surfaces. From my simple calculation, on a walk that is about 5km long and about 70m altitude, the elevation change is about 6% of the energy and the kinetic energy even less. That seems typical of my walks around town (Bristol, UK).

photo
1

I have now written a spreadsheet to read and analyse gpx files to compare with LocusMap. Initially, I wanted to check the energy expended, but I find large discrepancies in many areas. I generally use the ‘walking’ activity. I have obtained all my METs from the Compendium of Physical Activities, fitted them to walking speeds 0-5mph and applied the Harris Benedict MET correction for weight, height, age and gender (which is 1.26 for me).

Height gain and loss. I summate the increase in height in every step to height gain and the decrease in every step to height loss. I have found that, on long, hilly walks up to 14 miles, the height gain and height loss calculated this way can be over 1,000 metres more than LocusMap.

Activity type. LocusMap seems to be a bit confused with activity types. Apart from my normal longer walks, I have performed some simple tests on a 150m stretch of flat, firm road, walking backwards and forwards at different speeds.

I have compared overall energy and find that my calculations produce significantly higher energy than LocusMap. My analysis includes the MET correction. Strangely, if LocusMap were to have erroneously divided its energy by this correction, there would be a reasonable match. Of course, MET should be multiplied by this correction.

Nordic walking has METs of 0.15 above walking at ‘normal’ speed and 1.3 above walking at 5+ mph. LocusMap energy can increase by a factor of over 2 at low speeds and 0.59 at higher speeds when this activity is selected. And this behaviour is in the opposite sense – i.e. increasing with low speed.

Hiking has METs of about 1.75 above walking. LocusMap calculated the hiking energy to be between 0.88 and 3.47 times the walking value! And the highest factor is at the lowest walking speed. Bizarre!

For climbing, the MET is at least 8 – around twice that of walking – but LocusMap produces climbing energy levels between 16% and 62% of walking. There is something wrong here.

In running, at the highest speed, less energy is used than walking. The MET for running is between 6 and 23 – much higher than for walking. This does not make sense.

photo
1

Hi Mike,

let's bring some more light here.

Nordic walking: app use activity ID 17302, so defined MET is 4.8f. Locus use this value for all speeds when Nordic walking activity is selected. Result then should be:

Your computed basal metabolic rate * time (part of day) * activity MET.

Hiking: here was choose probably too aggressive 17040. Will change it to 17080

Climbing: ah thanks, copy & paste error. Will fix and use 15535 with MET as 5.8

Running: most complicated. App use many values since 1.1 m/s (MET 3.0) up to 6.2 m/s (MET 23.0) and interpolate between them based on speed.

Walking: Similar to running, just different values.

---

Difference between walk & run is a mystery for me. I tested it on my bike record to change it to walk & run and running display almost twice as big energy consumption. Do you use some track recording without heart rate values?

---

The difference in sum of elevation: Locus Map does some post-processing of elevation and filtration of data before use. If you use any web services or other apps, you will almost never get the same values.

---

If you send me something to test (exported GPX track + values to compare), I'll gladly check if in the app aren't any another issues. It is of course possible.

photo
1

Thanks very much for the feedback, Menion.


Firstly, I only use the walking category in LocusMap. I have checked the other categories to get some insight as to how LocusMap calculates energy and see if I can find any correlation. For example, if I can find consistent factors between categories, then these should relate to the METs from the Compendium of Physical Activity.


Nordic walking. Yes, activity ID 17302 with MET 4.8 at 3.5-4 mph. Walking at 3.5mph and 4mph (IDs 17200 and 17220) have METs 4.3 and 5, so we could say 4.65 average. Nordic walling thus adds 0.15 to the MET at these speeds. I would therefore expect an increase of 0.15/4.8 (3%) from LocusMap when reclassifying my walk from ordinary walking to Nordic walking. But I get a factors over 2x, or 200%. At 5mph, the difference between Nordic walking and ordinary walking is an increase in MET of 1.3 over the walking MET of 8.5, or 15%. LocusMap gives 59%.


Hiking. There are various activities, but METS are about 1.75 above walking. I would expect to see some constant factor in the LocusMap energy calculation not far away from this. However the factor varies wildly between 0.88 and 3.47. Unfortunately, the hiking categories the CPA provides have no dependence on speed.


Running. Apart from a walking/running and plying with children ID 05175 with MET 3.5, the running categories 12010-12200 provide METs of 6 to 23. At 4mph, running has MET of 6 compared to walking of 4.5. At 5mph, running and walking are the same at 8.3. There should never be a situation where running uses less energy than walking.


Heart rate values. I don't use these. I am only comparing energy calculations with the CPA that does not present any dependence on this variable.


Elevation. I calculate this from the gpx file produced by LocusMap, so I presume there is consistency here. However, I find my devices report elevation a bit unreliably from the same location on different occasions. I was wondering whether LocusMap performs some averaging to smooth out discrepancies in elevation and produce more realistic values of hGain and hLoss.


I have attached a file of short gpx files walking the same 145m walk at diferent speeds. There is also a summary of the energies calculated for different categories compared with my calculation.

photo
1

Hello,


problem with walking vs nordic walking was partially described before.

Main problem here is, that NW has defined an only single activity, so only 17302, so no matter how fast you go, it will always compute MET 4.8.

I just checked this on my simple 15 km walk and I get also almost 2xhigher value for NW. Reason? The slow speed of walk vs required speed around 4.65 for correct NW.

Hiking? Same problem ... a single defined parameter that completely ignores speed value.

----

Perfect, I have found one serious issue in my interpolation that may caused inaccurate values, mainly for higher speeds. Will be fixed in next version, thanks!

----

And elevation values ... what you get in GPX is not exactly what you see in app. In GPX are raw , almost original data. In app are usually used filtred and optimized values. So simply sum of gain/loss from GPX will be always higher then what you get in app.

Menion

photo
1

Thanks again, Menion.

As my main interest is calculating energy, I need to get some reasonable estimate of potential energy expended. Therefore, elevations are important. When you 'filter and optimise' values, what does that actually mean, and why do you do it? As the gpx file has fluctuations, it would appear that you effdctively make your adjustments to the gpx file data. What algorithm do you use?

photo
1

No need to thanks.

If you are interested in better computed energy values for your activities (which looks like you are), you may help me to improve it. As I wrote, elevation change currently does not affect computed energy, mainly because I was not able to find some useful source of information anyway I'll gladly improve it.

How Locus optimize altitude values ... something should be left as company secret ;) anyway it is few some basic filters that cooperate together to filter unexpected changes in altitude values. Why this? Altitude measured with GPS (vertical accuracy) is usually a lot worst then horizontal accuracy, so these values need to be optimized. If you import exported GPX file to other mobile or web apps, you mostly get different values in every app, because every app do this on its own. There is no universal system globally used.

photo
1

If you want to include elevation in your energy calculation, it is simply mgh, or mass (Kg) * gravity (9.81m/s2) * height (m). Units are Joules. I take only hGain and ignore hLoss. I sum it up step by step, but one can just simply use the net hGain at the end of the walk. The question then is what hGain actually is - something for the inner circle, it seems!

In the CPA, there is sparse data for walking on slopes. It was not possible to come up with any coherent dependency. Therefore, I take the MET on the level and add the potential energy. To me, this seems reasonable for moderate slopes. By moderate, I mean where the leading leg does not need to bend. I expect higher slopes would burn a bit more energy when the knees are worked.

Underestimating the energy burn is, for me, preferable because I am not tempted by an energy justification to eat a piece of cake!

Replies have been locked on this page!