Project mini "Segway" CC3D
#1
Posted 31 October 2012 - 05:10 PM
here is a short video of my try to get the ServoBot balanced...
i have balanced the bot and leveled it vertically. Next step was to switch to attitude mode so the vehicle will try to stay balance...
i use TxPID for Innerloop Kp Pitch to find the right point... but around level the vehicle has really fast oscillation... if i lover Kp the servos wont move..
you can see at the end of the video when i'm holding the vehicle on an angle that the wheels don't continue to rotate.. but they should keep turning to try to come back in balance... anyone a idea how i can do that? I have never done something like that... so i'm basically just playing around and see if it gets better or not...
any suggestions are welcome
View on Vimeo
#2
Posted 31 October 2012 - 11:06 PM
example is my tilting vtail, Ki is twice KP in the outerloop to get enough it to level properly , i would go inner loop kp as high as you can with no oscillation, ki=0
outerloop kp = 2 (so you have decent authority) and Ki, start at 2 and keep going up
I always wanted to build on of these - great work
#4
Posted 01 November 2012 - 12:52 AM
It also looks like you are using the tilt angle to govern wheel absolute rotation angle. It won't work this way.
Instead of governing the wheel absolute rotation from the tilt angle modify the wheel controller so that the wheel ACCELERATION is governed by the current tilt angle of the board. This way it will continue to attempt to bring itself to level.
Step 1. Wheel acceleration is what causes a counter-tilt torque to appear. So make the controll law: more tilt->more acceleration. Note that at first, this may make your vechicle constantly go in one direction - see step 2.
Step 2. When you can controll or at least limit the tilt, can begin to controll the overall velocity of the vechicle by allowing for certain tilt for limited amount of time. To accelerate the vechicle, rotate the 'apparent ground level' in your controll algorithm by a small amount. It's like having a ball roll down the ramp.
Controlling vechicle position is not something that you want using Your radio (because that would mean that you can only go as far as you can move your stick)
hint 1: I can see that You are using turnigy 9x. It has 3 analogue knobs. You can use 3 channels to set gains for your control algorithm - this will allow you to experiment with gain settings. Then use one of your Return-To-Zero sticks as a velocity setpoint. This way it will attempt to stop when you release the stick.
I have done inverted pendulum controll for my Masters. This is not all that easy and in fact, you need a specific torque-to-inertia ratio range in your mechanical system, otherwise the system is uncontrollable - both when you have too much or not enough torque per inertia. If the wheels slip - that's even worse. Unless You know about system identification theory and controll design theory, it might take you quite a bit of experimentation to set the gains right.
Alternatively, you can try to use Your existing controll law, and raise the gains on your servo (raise the motor velocity) by such amount that the 'virtual rotation axis' moves above the table. (imagine the wheels running on the bottom inside of a 'big wheel'). This may be enough to keep it in single place, but then, moving it from that place will become difficult . . . . depending on the system dynamics, it might or might not work.
In any case, there is plenty of articles on "inverted pendulum control algorithm" . . . .
Edited by Jurek, 01 November 2012 - 01:27 AM.
#5
Posted 01 November 2012 - 10:21 AM
i don't really know much about that segway problem.. i just thought that the CC3D should have the right sensors to get this thing balanced.. but i don't really know how to get it working
so i'm basically just playing around... i will try later some tuning that Mat sugessted me
Step 1: "more tilt->more acceleration" i think that is what the Kp term ist for?
Step2: will think about that after i got it level.. not sure if i can get it level with my skills... (i can't code new algorithm or anything)
i will post a new video as soon i see some progress
#6
Posted 01 November 2012 - 10:56 AM
as to step 1, no, ditch the Kp altogether. Try this. Put the CC3D in attitute stabilisation mode. Set all gains to zero initially. Then set the first Ki term to some nonzero value, and see how the wheels respond. You might need to set it quite high. I think that this should be the starting point. If this doesn't seem to work in the right direction, start over(zeros everywhere) and try playing with the SECOND Kp (exclusive-or) SECOND Ki. See where this gets you.
If You look at any of these inverted pendulum videos, these carts move very fast and do high accelerations. Your modified-servo wheels might not be able to achieve that, but it's worth trying . . . .
Edited by Jurek, 01 November 2012 - 10:56 AM.
#8
Posted 01 November 2012 - 12:03 PM
.
QAV400 . QAV500 . Quadrixette 40 . TBS discovery . HT-FPV . HT-FPV prototype . VC-450 . UAP1 . youtube . juzfpv.com
#10
Posted 01 November 2012 - 11:22 PM
Bildschirmfoto 2012-11-01 um 22.03.04.png 164.51K
91 downloads
Bildschirmfoto 2012-11-02 um 09.03.45.png 185.19K
69 downloadsVideo
View on Vimeo
Thanks Mat and Jurek for your input!
#12
Posted 02 November 2012 - 01:54 AM
after a second tought - yes, it had to be the outer loop Ki.
regarding these small left/right turns, was it you controlling it, or is the slip of your wheels not symmetric?
#13
Posted 02 November 2012 - 06:20 AM
thanks
#14
Posted 09 November 2012 - 04:50 PM
KAF-Q500 FPV Quad KAF-Q40 / SHA-Q40 KAF-HQ7 Micro H-Quad Sharana-HQ6 Micro H-Quad
FPV Honcho MrHeli4444 Artful B4 Green Meanie 430mm HQ Grizzly 450 Quad
#15
Posted 09 November 2012 - 05:20 PM
#16
Posted 10 November 2012 - 09:10 AM
that is a BIG mile stone
Help Those That Help Themselves First
convicted zealot
Quad - 01 Build Blog (Now Dead)
THE BEAST My RC Lawn Mower Blog
My Eurgle 2.4Ghz 9ch (Turnigy 9x clone)
HEX-01 - Build Log
FPVRaptor Composite 1600mm - Build Log
if i link to hobbyking i use Affiliate links that pay me a few cents each time you use them
#17
Posted 10 November 2012 - 09:24 AM
#19
Posted 10 November 2012 - 07:03 PM
#20
Posted 10 November 2012 - 07:12 PM
.
QAV400 . QAV500 . Quadrixette 40 . TBS discovery . HT-FPV . HT-FPV prototype . VC-450 . UAP1 . youtube . juzfpv.com



Germany
New Zealand
United Kingdom
Australia
United States
United Kingdom
