Shop OBEX P1 Docs P2 Docs Learn Events
Accelerometer capabilities without a gyro — Parallax Forums

Accelerometer capabilities without a gyro

Leo.KLeo.K Posts: 21
edited 2008-03-19 21:28 in General Discussion
Hi All, Sorry I just realised this probably the most suitable place to ask this,

I'm working on university final year project to detect and record the movements of a kite flight and display it in google earth.

The initial idea was to use a tri-axis accelerometer (Hitachi H48C) to measure x,y,z movements but I now realise I need a gyro or similar to detect the angles. Otherwise I believe it is impossible to seperate the g component from the forces created by the kite movement as soon as the kite is moving at·a "non-constant" speed.

Now there is no budget left I have been asked to do what I can with the accelerometer. My initial thought was to apply it to a vehicle or similar. The question is,

What am I able to sucessfully·display/measure with the accelerometer? I'd like to at least be able to display forwards and backwards movement plus display any turns, allowing me to plot a route I took. (Start and end location are obtained by GPS) My thoughts are it should be able to do this fairly accurately until it comes to a hill where the g component will shift to the y axis slightly. Am I able to overcome this problem? Is what Im trying to do only possible on flat terrain if at all?

Any help would be much appreciated. I have read and read and read on this but just can't seem to work out if its possible without extra components. Please ask if I am being unclear about anything.

Thank you

Leo

Comments

  • James LongJames Long Posts: 1,181
    edited 2008-03-18 00:18
    Leo,

    A lot of this depends on the flying conditions at the time.

    The more aggressive the wind, the more confused the accelerometer is going to be. Slow easy motions will be pretty easy to map the motion. Quick jerky motions will not be as accurate. I figure you have already thought of this.

    Because the earth pulls at a constant 9.8m/s2· the accelerometer can measure angle deflection. One axis (or a combination of two, or three) will always add up to 1 G, unless in free fall.....or descending pretty fast.

    You could also calculate upward and downward motion to a degree. If the G force is above 1, you know the kite is rising. If the G force is below 1 you know it is descending.

    It can all be calculated, but the accuracy of your result may not be what you need.

    If the kite is anchored to a stationary point....then calculating it's relative movement is not that hard. Relating that to a grid location (GPS) on the other hand could be a significant challenge.

    You didn't say what type of kite (free flight, or control) if the kite will be stationary anchored, or mobile. There are a lot of variables that can create problems with what you are talking about.

    This project will require a high degree of math and programming to get it close. I don't think you will ever get it perfect.



    James L


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L

    Partner/Designer
    Lil Brother LLC (SMT Assembly Services)
  • Leo.KLeo.K Posts: 21
    edited 2008-03-18 01:10
    Hi James,

    Thanks very much for your fast response smile.gif

    The kite is a stunt kite so will have movement in all directions and would even be upside down or spinning. The problem i've realised is that as soon as the kite is accelerating, total g will be above 1. I mean without a gyro, if the kite was flying sideways at 1 g it wouldnt be possible to distinguish between gravity and the acceleration of the kite without a gyro to monitor its rotation. I hope that makes sense?

    As I have now realised that it wont be possible to measure the stunt kite's movements, I'd like to apply the accelerometer to an object that would remain upright. I could then convert its x and y accelerations to distances by double integration. I am pretty sure this would work for flat surfaces where g would only affect the z axis (i.e gravity would never affect the x and y axis') I see a problem arising when the (motor car for example) came to a slope as suddenly gravity would be read seen on the x and/or y axis. I guess what I'm trying to ask is, is there a way to compensate for this without using a gyroscope or similar? I understand what you are saying that gravity=1 is spread over the 3 axis but this is only true when the car is at constant speed (i.e acceleration = 0) otherwise there are other acceleration components on the axis' and it is impossible to say whether they are part of the g component or acceleration from the car moving.

    Basically I am trying to use this accelerometer somehow in the project to plot speed or distance etc moved. Is there anything else I could use it for as I believe monitoring the position of any object would only be possible on flat terrain so the g component is always on a seperate axis.

    I hope it is clear what I'm trying to say. I really appreciate your help. If I have confused please say as I am more than willing to try and explain better.

    Thanks again,

    Leo
  • James LongJames Long Posts: 1,181
    edited 2008-03-18 01:18
    Leo.K said...
    Hi James,

    Thanks very much for your fast response smile.gif

    The kite is a stunt kite so will have movement in all directions and would even be upside down or spinning. The problem i've realised is that as soon as the kite is accelerating, total g will be above 1. I mean without a gyro, if the kite was flying sideways at 1 g it wouldnt be possible to distinguish between gravity and the acceleration of the kite without a gyro to monitor its rotation. I hope that makes sense?

    As I have now realised that it wont be possible to measure the stunt kite's movements, I'd like to apply the accelerometer to an object that would remain upright. I could then convert its x and y accelerations to distances by double integration. I am pretty sure this would work for flat surfaces where g would only affect the z axis (i.e gravity would never affect the x and y axis') I see a problem arising when the (motor car for example) came to a slope as suddenly gravity would be read seen on the x and/or y axis. I guess what I'm trying to ask is, is there a way to compensate for this without using a gyroscope or similar? I understand what you are saying that gravity=1 is spread over the 3 axis but this is only true when the car is at constant speed (i.e acceleration = 0) otherwise there are other acceleration components on the axis' and it is impossible to say whether they are part of the g component or acceleration from the car moving.

    Basically I am trying to use this accelerometer somehow in the project to plot speed or distance etc moved. Is there anything else I could use it for as I believe monitoring the position of any object would only be possible on flat terrain so the g component is always on a seperate axis.

    I hope it is clear what I'm trying to say. I really appreciate your help. If I have confused please say as I am more than willing to try and explain better.

    Thanks again,

    Leo
    Leo,

    I don't see why you couldn't use it for just about anything on the ground, but you are still going to introduce side acceleration for anything "in motion". Any kind of moving vehicle will introduce a side acceleration.

    I guess....this would depend on what you are trying to achieve for the project. You have left much open for interpretation.

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L

    Partner/Designer
    Lil Brother LLC (SMT Assembly Services)
  • Leo.KLeo.K Posts: 21
    edited 2008-03-18 01:35
    Hi James,

    It has been agreed that the kite problem is impossible to get to any accuracy with the accelerometer alone. And because I can explain why, the project hasnt failed.

    So to try and at least have something to plot in google earth we (my tutor and I) decided to try and apply it to something on the ground. In principle this seemed much easier, but when I thought about it further I realised that on a slope things become more complicated.

    Maybe if I try and explain my thoughts it will make more sense.

    When the car is stationary g total = 1 across all axis'. If the accelerometer is parallel to the ground this equals 1g on the z axis. If the car accelerates at 1g (not likely i know) and turns to pull 1g, then we would have 1 g on z and 1 g on y and 1g on x. Now assume this exact situation happened on a sideways sloped hill, we could/would have 0.5g on z and 1.7g on y and 0.7g on x (depending on the hill, this is just an example) so the total is still 3g but it is impossible (i think) to tell which of the measured g's comes from a gravity component and what comes from acceleration. I guess i'm asking is,

    is there a way to calculate which part of these measurements is gravity and which is acceleration when I think all i would know is that the gravity component = 1.

    I hope this makes better sense? Thanks again for your help. smile.gif

    Leo
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-18 02:22
    The effects of gravity vs. acceleration are indistinguishable. Read Einstein's Theory of Relativity for the discussion of the justifications.
  • James LongJames Long Posts: 1,181
    edited 2008-03-18 04:21
    Leo.K said...
    Hi James,

    It has been agreed that the kite problem is impossible to get to any accuracy with the accelerometer alone. And because I can explain why, the project hasnt failed.

    So to try and at least have something to plot in google earth we (my tutor and I) decided to try and apply it to something on the ground. In principle this seemed much easier, but when I thought about it further I realised that on a slope things become more complicated.

    Maybe if I try and explain my thoughts it will make more sense.

    When the car is stationary g total = 1 across all axis'. If the accelerometer is parallel to the ground this equals 1g on the z axis. If the car accelerates at 1g (not likely i know) and turns to pull 1g, then we would have 1 g on z and 1 g on y and 1g on x. Now assume this exact situation happened on a sideways sloped hill, we could/would have 0.5g on z and 1.7g on y and 0.7g on x (depending on the hill, this is just an example) so the total is still 3g but it is impossible (i think) to tell which of the measured g's comes from a gravity component and what comes from acceleration. I guess i'm asking is,

    is there a way to calculate which part of these measurements is gravity and which is acceleration when I think all i would know is that the gravity component = 1.

    I hope this makes better sense? Thanks again for your help. smile.gif

    Leo
    Leo,

    The problem....is the system has no reference to location. Even if you could distinguish accel from gravity, you would be un-accurate within minutes if not seconds. The sensor is just not that accurate. Even with a gyro and an accelerometer (and a Kalman filter) you would only tell motion in a specific direction, you wouldn't necessarily be able to tell how fast (you would have a reference to speed, but no way to reference it to any scale) with just those sensors. The problem is decyphering linear acceleration·versus laterial acceleration. It is just impossible, without many more sensors.

    I wish I had a better answer......I just don't see how this can happen with just an accelerometer.

    I know I was not of any help.....sorry,

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L

    Partner/Designer
    Lil Brother LLC (SMT Assembly Services)
  • Leo.KLeo.K Posts: 21
    edited 2008-03-18 12:36
    Hi Mike and James,

    You have both been of great help thank you both very much. I really appreciate your help. For now I just wanted an idea of what was possible using this accelerometer, to save me many hours of programming to find what I was trying to achieve was impossible anyway, and you have both helped me very much in realising this (and have also helped to explain as to why). Thank you smile.gif I will continue to monitor the forums in case my experience from this project can be shared, but please also let me know if there is anything I can do directly to help either of you.

    As a quick update, I'm going to obtain what I can from the accelerometer on flat ground and compare this to a route tracked by the GPS. I will then be able to discuss why the results have differences (thanks to you two) and this is more than acceptable smile.gif·I will relate acceleration to distance by integration and record the results, would either of you be able to tell me how I can display these results as a plot of the route taken? It's the next problem I had already considered. I mean how to plot the turn as a turn rather than just a movement in the x axis. As i picture it, the system would detect a change in x and y, but unless the acceleration went negative, I dont see how to make a reduction in the y movement. I hope this makes sense. I guess I'm trying to say is, for a turn of 180 degrees (a hairpin turn for example) The result will come out as increase x increase y increase x increase y. Leading to a "up, across, up, across" shape instead of a "up, across, down" shape. Am I missing something here?

    Thanks again for everything

    Leo

    Post Edited (Leo.K) : 3/18/2008 12:53:15 PM GMT
  • stephenwagnerstephenwagner Posts: 147
    edited 2008-03-18 16:53
    Leo.k,

    There is a skate board application in the parallax text book smart sensors and applications.

    I hope this helps.



    Stephen Wagner
  • Leo.KLeo.K Posts: 21
    edited 2008-03-19 21:28
    Thanks Stephen,

    It's much appreciated :-)

    I was actually looking at converting the RC car program to work with the Hitachi H48C but only use the X and Y axis. Has anybody done this?

    My thoughts are to data log values of g for both the x and y axis. Then copy these to excel using the method of show data in debug window. I can then multiply this by 9.81 and apply the constant acceleration equations. Would this work? I am confused as to all the other maths they seem to be applying.

    What does this do for example? And would I need to apply it?

    x = (x MIN 1875 MAX 3125) - 1875 ** 10538
    y = (y MIN 1875 MAX 3125) - 1875 ** 10538

    Many thanks

    Leo
Sign In or Register to comment.