Author Topic: Smartphone "power meter" app  (Read 5155 times)

Smartphone "power meter" app
« on: 07 August, 2013, 03:48:07 pm »
While procrastinating, I had an idea that, using the sensors build into a smartphone (GPS, accelerometer, location based weather forecast, etc.), I could write an app that would measure power using the "opposing force" method of power metering.  (Opposing force on Wiki)

Of course, like all good ideas, someone else has already done it:
Bicycle Power Meter app on Google

Has anyone used this app?  It's supposed to be accurate to within 15% uncalibrated.  If it works it could be great, if not it could be a waste of £7.

Re: Smartphone "power meter" app
« Reply #1 on: 13 August, 2013, 10:47:56 am »
Thanks for replying.

I noticed that the app has very few reviews and googling for it only reveals the google play website and the owners very poor website.

I have another (possibly better, possibly worse) idea for an app that uses data from turbo trainer workunits to map heart rate to power, and then allow you to use it during outdoor rides.  Sort of like the Cyclops PowerCal, but using a calibration phase from a weekly turbo session, and with a few other metrics (velocity, cadence, possibly slope).

Is it better for an power meter to be accurate or consistent?  I'm thinking consistent, which might be a problem with heart rate data, as even resting heart rate fluctuates between days.  I'm still thinking about it! :)

Re: Smartphone "power meter" app
« Reply #2 on: 13 August, 2013, 11:11:34 am »
The problem with HR data is that it lags at least 60 seconds behind power, there are other issues at play such as cardiac drift, etc.

Here's a plot of my HR when doing 5x5 intervals:-

http://www.greenbank.org/misc/hr_int3.jpg

So, the power is near constant during each interval yet the graph shows HR climbing sharply from a low value and then continuing to rise slowly over the rest of the interval.

Good luck trying to go from that plot to a power graph that's essentially a square wave.
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Smartphone "power meter" app
« Reply #3 on: 13 August, 2013, 11:33:16 am »
My idea is basically to use the HR data to calibrate the data from other measurements over a longer period, but using the other measurements (wheel acceleration, cadence) to provide the small time-scale changes.  I'm confident I can produce something reasonable "offline" - providing it in real time will be the tricky aspect.

I know the Cycleops PowerCal uses gradient of heart rate plus an equation that is an empirical fit to data to convert from HR to power, but the problem I see with this is: as you improve, the power output for a given HR will increase, and even when coasting downhill it will produce power.  Plus the lag, as you've already indicated.

We shall see if it works.  Even if I just end up with an app that allows me to monitor power on my turbo I'll be quite happy (all turbos have a power / speed curve - mine is printed on the side of the box).

mattc

  • n.b. have grown beard since photo taken
    • Didcot Audaxes
Re: Smartphone "power meter" app
« Reply #4 on: 13 August, 2013, 12:47:13 pm »
Is it better for an power meter to be accurate or consistent?  I'm thinking consistent, which might be a problem with heart rate data, as even resting heart rate fluctuates between days.
Resting HR doesn't matter. Your active HR doesn't change nearly as much.

As you train (and hopefully get fitter) your lactate threshold HR (and your max) will hardly move, but your power will increase by many %.

SO HR is very good for training in the right zones. It's also VERY cheap to measure.
CONS:
- rubbish for very short durations. (how long are your target rides? Under 20mins??) &
- doesn't measure improvements. You'll have to measure your speed, or do something like TTs.
Has never ridden RAAM
---------
No.11  Because of the great host of those who dislike the least appearance of "swank " when they travel the roads and lanes. - From Kuklos' 39 Articles

fuaran

  • rothair gasta
Re: Smartphone "power meter" app
« Reply #5 on: 13 August, 2013, 12:50:00 pm »
I think for outdoor cycling, wind speed/direction will make a big difference. Even if you have local weather forecasts, I doubt they will be very helpful, as the wind can vary within a few metres, eg if you are behind a hedge.

There is the iBike Newton, which measures the wind on your handlebars, then calculates power. Though its not exactly cheap.

Or the Velocomputer Smart Sensor. http://www.dcrainmaker.com/2012/08/hands-on-with-200-bluetooth-smart-power.html
It is basically a more precise speed/cadence sensor and accelerometer, which calculates power. Doesn't consider wind, so not very useful outdoors. But should be OK on a velodrome, or on a trainer if calibrated for the power/speed curve.

Re: Smartphone "power meter" app
« Reply #6 on: 13 August, 2013, 01:38:08 pm »
I think for outdoor cycling, wind speed/direction will make a big difference. Even if you have local weather forecasts, I doubt they will be very helpful, as the wind can vary within a few metres, eg if you are behind a hedge.

I'm hoping the HR will be able to inform this, i.e. you're travelling a bit slowly, but your HR is still up at a level that reflects the effort (power) you're putting in.  I'll have to do some modelling and experiments to see if this is the case, though.

Thanks for the input from everyone.

Re: Smartphone "power meter" app
« Reply #7 on: 13 August, 2013, 02:42:07 pm »
It'd be interesting to see if you can take a GPX file (of mine for example) that contains HR, cadence, speed/position data and then try and compare your computed power output with the real power data in the file (maybe after the power in the file is smoothed a bit).
"Yes please" said Squirrel "biscuits are our favourite things."

Pedal Castro

  • so talented I can run with scissors - ouch!
    • Two beers or not two beers...
Re: Smartphone "power meter" app
« Reply #8 on: 13 August, 2013, 04:14:54 pm »

As you train (and hopefully get fitter) your lactate threshold HR (and your max) will hardly move, but your power will increase by many %.


Although your max HR won't change, your anaerobic threshold HR will change a lot going from an untrained condition to a highly trained one.

mattc

  • n.b. have grown beard since photo taken
    • Didcot Audaxes
Re: Smartphone "power meter" app
« Reply #9 on: 13 August, 2013, 05:51:12 pm »

As you train (and hopefully get fitter) your lactate threshold HR (and your max) will hardly move, but your power will increase by many %.


Although your max HR won't change, your anaerobic threshold HR will change a lot going from an untrained condition to a highly trained one.

You may well be right. But [quick google] Joe Friel says this:

Quote
At April 6, 2010 2:50 PM , Blogger Joe Friel said...
    birly-shirly--You're not training to change LTHR. It's pretty stable once you are even moderatly fit. Your goal is to lift output (power, pace). There are no awards given at races for the highest LTHR.
So I guess it depends on what point our enquirer is starting from.
Has never ridden RAAM
---------
No.11  Because of the great host of those who dislike the least appearance of "swank " when they travel the roads and lanes. - From Kuklos' 39 Articles

Pedal Castro

  • so talented I can run with scissors - ouch!
    • Two beers or not two beers...
Re: Smartphone "power meter" app
« Reply #10 on: 13 August, 2013, 06:47:50 pm »
Never heard of Joe Friel but a quick check of my reference books (mainly Peter Janssen's excellent "Training Lactate Pulse-Rate") on this subject suggests that for example a 20 yr old could increase L4 HR from ~130 all the way up to ~180.

Basically this is the HR that you should be able to maintain for times greater than 1 hour. Obviously the rate of increase will level off as you get fitter but of course if you are racing than these small differences become more important.

On the basis that on an audax you will be working aerobically, your anaerobic threshold will be the limiting factor in your overall average speed, not max power output. Increase your anaerobic threshold and you increase your cruising speed - simples.

amaferanga

Re: Smartphone "power meter" app
« Reply #11 on: 13 August, 2013, 07:48:10 pm »
On the basis that on an audax you will be working aerobically, your anaerobic threshold will be the limiting factor in your overall average speed, not max power output. Increase your anaerobic threshold and you increase your cruising speed - simples.

Increasing threshold power is what matters.  You can do that without increasing your HR at threshold.  Once you become trained I don't think you'll see huge changes in HR at threshold, but you can still make significant changes to the power you can produce at threshold (usually known as Functional Threshold Power).  As this increases then holding a given (higher) speed over very long durations such as in audax becomes easier since the power required is a smaller percentage of FTP.


Trying to guess power from HR and even speed, cadence, etc. is doomed to fail unfortunately, though I can see that it might be interesting to mess around with.

Re: Smartphone "power meter" app
« Reply #12 on: 06 January, 2014, 10:03:16 am »
I haven't had any time to work on this, and won't in the near future.

I (finally) got hold of the power curve for my turbo trainer and have implemented a program that will take a Garmin .fit file or .tcx file and insert the power in watts into the file, based on the trainer power curve and speed in the .fit or .tcx file.  It then outputs a .tcx file, which can then be uploaded to Strava or Garmin Connect or which ever of the hundreds of training websites that are available now.

That was just a couple of hours work, including digitising the power curve from a .jpg file.  Building the smart phone app would be a much bigger project.

I can now train with (virtual) power - but I've realised as my trainer has such a linear speed / power response, I could have just used speed all along!  It's an Elite PowerMag one.  I think the approach might be more relevant for a fluid trainer, with a non-linear speed / power response.

(But it was a fun afternoon - and I've realised a bug this morning which needs fixing as it's overestimating the power due to using the curve one higher than that input)

Re: Smartphone "power meter" app
« Reply #13 on: 21 February, 2014, 09:45:32 am »
This started as a reply to a forum user, but I thought I'd put it here for everyone to see.

I haven't done any work on the Power Meter app.  I actually just bought a Cyclops Powercal which does a similar thing - it calculates power from your heart rate.

I actually don't think it's the most sensible approach any more as, when doing sprints or intervals on the turbo, my heart rate takes too long to respond and so the Powercal gives a too low reading.  This is really only for short intervals - less than a minute long.  Over a 20 minute interval the Powercal actually gives a pretty accurate reading.

What I have done in regards to power and the Elite Powermag is print a table of Power vs Speed.  I found the power curve for the Powermag on the internet.  I then translated this to a cubic function so that power is a function of speed.  I then printed a table of power in the left column and the speed I need to do on the turbo in the right column, for each resistance level.  I can then aim for a speed which will, in effect, be aiming for a power level.

The Elite PowerMag is really linear in its response to speed, so I can quickly interpolate in my head between two power values, e.g. the table says 200 and 250W are reached at 23.4 and 27.2 km/h.  To hit 225W I know I need to be doing 25.3 km/h.  Doing this also relieves some of the turbo boredom! :)

The power calculated this way and from the Powercal actually match up pretty well, either over 2x20 intervals or a 45 minute "sweet spot" ride (ride at just below lactate threshold heart rate).

Re: Smartphone "power meter" app
« Reply #14 on: 21 February, 2014, 10:21:25 am »
Ok I undestood, thank you.
I'm using the powercurve of elite powermag but I think the wattage is too low than real wattage.

Re: Smartphone "power meter" app
« Reply #15 on: 21 February, 2014, 10:25:41 am »
Ok I undestood, thank you.
I'm using the powercurve of elite powermag but I think the wattage is too low than real wattage.

It might be - the Powercal is usually 20W higher than the PowerMag - but consistently so.  This is about 1 resistance level on the PowerMag.  I thought the Powercal might be over-reading, but it could be the Elite Powermag is under reading.  I'm going to check the tension on the cable before doing another session just to check that it's not one resistance level out!

I think the only way to check would be to borrow a Powertap wheel that has been calibrated recently.

Re: Smartphone "power meter" app
« Reply #16 on: 21 February, 2014, 10:27:05 am »

Ok I undestood, thank you.
I'm using the powercurve of elite powermag but I think the wattage is too low than real wattage.

It might be - the Powercal is usually 20W higher than the PowerMag - but consistently so.  This is about 1 resistance level on the PowerMag.  I thought the Powercal might be over-reading, but it could be the Elite Powermag is under reading.  I'm going to check the tension on the cable before doing another session just to check that it's not one resistance level out!

I think the only way to check would be to borrow a Powertap wheel that has been calibrated recently.

If you have patient, in the next days I rent a powertap so I can calculate a real powercurve!