Jump to content

Testing and see how you ride your EUC / balance algorithm works


Recommended Posts

Hi.

I am developing the world's first OpenSource firmware/technology that drives the electric unicycles (the commercial ones, like MicroWorks, GotWay, etc). I am in a phase that I need to implement the balance algorithm and I need your help. Can you guys please look at the video and try replicate with your EUCs and confirm if you maintain a constant forward tilt the speed increases gradually and to maintain the speed is needed to be stay on vertical position (or very near)??

@Hunka Hunka Burning Love @lizardmech @esaj

Link to comment
Share on other sites

Tested my generic.

-Does have a neutral position where it doesn't spin even when lifted but the deadband is tiny compared to your video.

-Does not idle once sped up neutral position always results in friction slowing it down to a stop.

-Almost certain it is current/torque based with a very small tilt angle I can stop it moving with 1 finger. If it remains at the lowest tilt value motor will just slowly spin up until it reaches max speed. Tilting it further while holding it stalled with one finger increases torque until I can no longer stop it moving.

The sensitivity in general is very high if it's in a neutral position raising one side of the case 2mm or less is enough. The difference between neutral and max current must be only a few degrees at most.

Link to comment
Share on other sites

I can't test right now (beeping would wake people up) but I lifted my wheel (Gotway ACM 84V) some time ago to test the speed alarms, and it does exactly what you describe (at least that's what I remember;)):

  • As long as it's tilted, it accelerates. Can't say how exactly different accelerations with different tilts work, but I can test that later.
  • It keeps the speed if it's not tilted. I would quickly jerk/tilt it for a second to increase the speed and it would stay at that speed.

--

Both of these are kind of the basic definition of how EUCs control - if there is a tilt, they accelerate until there is no more tilt; and if there is no tilt they keep doing what they are doing. Not sure what the alternatives would be? The "accelerate if there is a tilt" thing is mandatory; and who wants a EUC that constantly brakes itself or gets faster on its own?

I guess the really interesting thing is to choose the exact function for the power input P to the motor (or whatever quantity ultimately controls the motor), depending on tilt angle A and possibly its derivative - P = f(A,dA/dt) - which defines how the EUC feels to ride.

Anyways, I can re-check and do some more tests later, if you have any requests (will try to find out info on how acceleration depends on different tilts). Extremely impressed by the entire thing you are doing!:clap3:

Link to comment
Share on other sites

At least in Sport-mode, the Firewheel had very small deadzone, but it was there. I'm pretty sure that if keeping it level, it would continue turning at the same speed (not slowing down). Don't have a wheel to test with right now... 

1 hour ago, meepmeepmayer said:

I guess the really interesting thing is to choose the exact function for the power input P to the motor (or whatever quantity ultimately controls the motor), depending on tilt angle A and possibly its derivative - P = f(A,dA/dt) - which defines how the EUC feels to ride.

From what I understand, you're basically describing a "PD"-controller/-loop (a simpler form of PID, without the integral). The letters come from words Proportional, Integral, Derivative. Proportional is the "immediate" error of the system (ie. offset from 0-degrees, what you propably meant with A, wheel is tilting back or forth), integral is the accumulated error over time (for example summing the errors over time, maybe with some filtering, to get the accumulated error) and derivate measures the rate of error change (dA/dt as you described it).

There were some links to sources of different balancing unicycles/robots/whatever in the Firmware-thread. One of them described an unicycle (at least I think it was one of the unicycles, maybe the MIT-guy?) using a PD-loop for balance control.

Link to comment
Share on other sites

Ninebot one E+ does not behave that way.  It shuts off at less than 10 degrees forward tilt with no load.  Like if it bumped you off and it was flying through the air.  Good luck implementing that into the software.:pooping:  I hope I do not get sued for divulging trade secrets.

Link to comment
Share on other sites

1 hour ago, esaj said:

From what I understand, you're basically describing a "PD"-controller/-loop (a simpler form of PID, without the integral). The letters come from words Proportional, Integral, Derivative. Proportional is the "immediate" error of the system (ie. offset from 0-degrees, what you propably meant with A, wheel is tilting back or forth), integral is the accumulated error over time (for example summing the errors over time, maybe with some filtering, to get the accumulated error) and derivate measures the rate of error change (dA/dt as you described it).

There were some links to sources of different balancing unicycles/robots/whatever in the Firmware-thread. One of them described an unicycle (at least I think it was one of the unicycles, maybe the MIT-guy?) using a PD-loop for balance control.

Never heard of that. Very interesting comment though! Looks like it is more or less that (PIDs seem restricted to be linear, but you could use any function that makes sense).

The thought simply was (for example), if the tilt is increasing you'll want a swifter acceleration than if the tilt is constant or already decreasing, where a softer response might be more pleasant for the rider. So angle alone won't work unless you want only very basic responses, and its rate of change should at the very least be used too.

This is purely conceptual interest in how one would build a EUC. I'd love to see a list of what quantities the "advanced" Solowheel firmware considers (softer response in colder temperatures?B)) or what type of "controller" they use, but very likely they won't tell:P

Link to comment
Share on other sites

Tried with Freeman A4H and it behaves the same. With small constant tilt it slowly accelerates and when put into neutral position it keeps the speed or sometimes slowly decelerates but that might be because it wasn't leveled precisely to neutral. The bigger angle the faster acceleration.

Link to comment
Share on other sites

Tested again with the ACM, and it's pretty much confirmed (hard to say exactly because there is so little dead zone and the thing is heavy).

Vertical, it keeps its speed (or maybe slows down only very little, but basically it keeps the speed).

Didn't manage to test the different acceleration thing properly, inconclusive results at best without a decent test stand or so:)

Link to comment
Share on other sites

Hi, congratulations for the project. There is one successful free open source project for controlling flying rc models. It is used mainly for quadcopters. The basics are the same (but more complicated, 3 axis control and stability) . The name is MuliWii. I think it can help.

http://www.multiwii.com/wiki/?title=Main_Page

By the way, you have to achieve balance between time for reaction and stability. 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...