Accelerometer Pedelec

frankus_

10 µW
Joined
Jun 4, 2013
Messages
6
I'm interested in building a pedal-assist system that measures acceleration and sort of back-calculates the rider's power input and uses that to control the motor input.

The basic idea is you estimate/measure/input the overall mass, and combined with the acceleration gives you the sum total of all of the forces acting on the bike (Newton's 2nd law). The forces consist more or less of gravity, rolling drag, aerodynamic drag, motor input, and human input (in the form of pedaling and braking).

Gravity can probably be figured out by comparing the inertial acceleration with the "odometric" acceleration from the motor speed. Rolling resistance should be fairly linear with speed, and wind resistance could be estimated with an estimate of the CdA and apparent wind (using an RC model airspeed sensor). Motor input is known because presumably your controller is, well, controlling it.

You could also measure a bunch of this stuff by having the human stay off the brakes and pedals for a short period a controlled setting, or use some kind of adaptive control that gradual refines its estimates.

It might not be that cost effective especially if you include an airspeed sensor, but my bike has kind of a tricky setup for torque sensing (eccentric bottom bracket) and brake switches (hydraulic). And this sort of setup could give you nice proportional regen (maybe even using a larger electric assist gain when it senses braking?).

There's mention of this type of system on Grin's torque-sensing page (https://ebikes.ca/learn/pedal-assist.html) and a few scientific papers (e.g. https://www.sciencedirect.com/science/article/pii/S240589632031822X), but it doesn't seem like there's anything commercially available. Has anyone in the forum tried this, and what sort of issues did you run into?
 
I made a post about this on my blog: https://metromotive.com/blog/2021/06/18/inertial-electric-assist.html

If nothing else, this seems like a neat and inexpensive way to make regen braking proportional—almost exactly like a trailer brake controller for towing a trailer with electrically-actuated friction brakes.

The brake controller would just need a ~$1 accelerometer IC and an on/off signal from the brake lever. Once the brake is on, see how much the bike is slowing down and contribute to that with regen (and then subtract out that contribution from the next accelerometer reading).

You could have the user estimate and input the gross weight of the bike, or you could have a mode where it learns the relationship between the braking signal to the controller and the deceleration of the bike (maybe instruct the user to apply the brakes only enough to trigger the switch but not enough to really engage the friction brakes to trigger the learning mode at the start of a ride).
 
@onemintyulep at the german forum has built such a system already several years ago....

https://www.pedelecforum.de/forum/index.php?threads/pedelec-mit-neigungssensor-automatisch-steuern-done.34317/

regards
stancecoke


index.php
 
You could connect an accelerometer to our EBike wireless controller and do that. It uses a well known microcontroller used by Arduino, that support machine learning and there are a few code samples exactly to work with the accelerometer data. In fact, I wish to implement what you say but I still didn't.

https://opensourceebike.github.io/
 
Back
Top