Louka, my daughter wants a robot. Being an engineer, it is really a dream request. She wants the usual for a 7 year old, straight out of a sci fi movie, fly, playmate companion etc. Boy, I have a surprise for her!
The basic concept is a Segway style robot that can be remotely controlled. It is the kind of robot that has that wow factor and it is achievable. I'm thinking that this will take between 6 months and a year.
Mathematical Model
A mathematical model of the Segway is the first step.
Here it is in matlab...(I grabbed this from a UWA under graduate thesis)
syms Ip Mp l ttt km ke R r Va g t xxx Mw Iw xx tt
f = ((Ip + (Mp*l*l))*ttt) - (2*km*ke*xx)/(R * r) + 2 * (km * Va / R) + (Mp * g * l * sin(t)) + (Mp * l * xxx * cos(t)) { equation a.1 }
ff = (-2*km*Va) / (R*r) + (2*Mw + (2*Iw/(r*r)) + Mp) * xxx + (2*km*ke*xx/(R*r*r)) + (Mp*l*ttt*cos(t)) - (Mp*l*tt*tt*sin(t)) { equation a.2 }
where
Ip = Inertia of body = 0.0041
Mp = Mass of body = 1.13
l = length to body centre of mass from wheel = 0.07
ttt = body angel acceleration (radians/second) = variable
km = torque constant Nm/Amp (from motor) = 0.006123
ke = back emf (V/radians) = 0.006087
R = terminal resistance (ohms) = 3
r = wheel radius = 0.051
Va = volts = variable used to control
g = gravity = 9.81
t = body angle (radians) = variable
xxx = robot acceleration = variable
Mw = wheel mass = 0.03
Iw = Inertia of wheel = 0.00039
xx = robot speed = variable
tt = body angle speed = variable
Of course
tt = ttt * time { equation a.3 }
t = tt * time { equation a.4 }
xx = xxx * time { equation a.5 }
x = xx * time { equation a.6 }
Bringing ttt and aaa to one side
Given the two equations { a.1 and a.2 }, we need to bring the ttt and aaa variables to one side. What we can then do is see the effects of Va upon ttt and xxx. Then given these we can see the effects upon tt, t and xx, and x over time (see equations a.2, a.4, a.5, a.6).
To do this, use matlab...
solve(subs(ff,xxx,solve(f,xxx)),ttt)
solve(subs(ff,ttt,solve(f,ttt)),xxx)
Adding Friction Component
To make the model more real, I added friction component...
pivotFrictionCoefficient = 0.5
wheelFrictionCoefficient = 0.05
ttt += pivotFrictionCoefficient * tt
xxx += wheelFrictionCoefficient * xx
Validation the Model
You can see what happens when it is pushed over quite hard. The segway is on a set of rails which allows it to spin a full 360 degrees. You can see that it spins three times before turning into a pendulum. The green line is tending to end up at 2.5 * Pi.
This is the effects without gravity and you can see it just keeps slowly spinning down.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.