Numerical integration of angular velocity

glycerunnin
Messages
3
Reaction score
0
OK...this is a really trivial question, but I hope someone can help me here. I am working on building a segway-style robot that balances on two wheels, but I am having some difficulties integrating the data I receive from my gyro sensor. The sensor gives me the angular velocity, and I know that to find the actual tilt angle I need to use something like RK4. However, I have not taken differential equations, just Calculus AB, and I am having trouble understanding exactly what Runge-Kutta integration does. I looked all over the place, from Mathworld to Wikipedia, and I feel that I am close to getting it, but the f(x,y) keeps throwing me off. Could someone please explain in more basic terms what I need to be doing?

[Edit]

I realize that I need to be a bit more specific. If my first 5 seconds of data are represented as ordered pairs (time t, angular velocity at time t) and I know that the angle is 0 at time t, how would I integrate (0,0), (1, 3), (2, 5), (3, 3), (4, 2), (5, 6) using, say, RK4? If you need more information, let me know.
 
Last edited:
Physics news on Phys.org
Never mind...I figured out how to use Heun's method for what I wanted to do, and it is a lot faster and simpler than RK4 and accurate enough to be useful. I am really glad I found this forum; there is so much information available and I will definitely use it in the future.
 
Hey, can u explain me how u integrated using the Heuns method. I am also working on a similar robot, with similar data input, i.e of form (time, angular velocity). Can u please help me out?
 
Is it about calcilating the area under a given curve?
Just plot the points and estimate the area.
Use trapezoidal rule? Simpson ? etc
 
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...
Back
Top