I'm working on a project where I must find a way to measure the displacement of a large steel cable as it vibrates (imagine a cable on a suspension bridge). I'd really like to be able to measure as much information as accurately as possible to learn about the various kinds of motions that are going on, but I'd like to get some advice about types of sensors to go for.
Ideally I would like to be able to measure the relative displacement of the cable in real-time, to both measure the frequency of vibration and the amplitude in various directions (it might be swaying up-down more than left-right, for example).
Do there exist any libraries, code examples or prior open-source work that I can look to to get some insight about how to wrangle this data (ideally in real-time)?
If there is another sensor or approach that you would recommend, I'm all ears! Just keep in mind that I need something that can be physically attached to the large cable and easily moved around so I can run multiple experiments.
We are talking about steel cables on a suspension bridge, so we're talking about a good couple inches of motion in any direction, depending on how hard the wind is blowing. I would expect frequency to be in the range of 5-10 Hz or so, but this is the kind of information that I am aiming to find out through measuring it accurately.
In that frequency range, a standard MEMS accelerometer may be able to log the accelerations. Keep in mind that you need a sample rate at least 10 times the highest frequency oscillation expected, in order to accurately characterize the motion. From the accelerations, it is possible to approximate the displacement.
And that's what I'm most interested in finding out - how to approximate the displacement (as accurately as possible).
I understand that the standard math answer to take the double integral of the acceleration, but this generally has too much drift to be used for more than a few seconds at a time.
What kinds of existing implementations can I make use of to approximate the position / displacement based on accelerometer data in real-time? Are there any useful libraries or code examples that I can make use of that do it 'the right way', rather than having to try to do it (crudely) myself?
The main problem with obtaining position data from accelerometers is the need to subtract the constant acceleration due to gravity. You must know the orientation of the accelerometer very accurately in order to do the subtraction accurately. See this: http://www.chrobotics.com/library/accel-position-velocity but beware the numerical errors in the table (only the velocity column is correct in this worst-case analysis).
If you can figure out how to do the subtraction in your case, obtaining position as a function of time is just a matter of double numerical integration of the acceleration A(t).
On the other hand, if the cable is oscillating sinusoidally with frequency f, then (neglecting sign changes) the position X(t) = A(t)/ (2pif)2.
In my experience, simply taking the double integral of accelerometer data results in a huge amount of error that makes any position data pretty much useless.
What I'm looking for is a way to use an accelerometer (or any other sensor you can recommend) to measure the amount and direction of movement of a large vibrating cable in multiple dimensions.
If an accelerometer is not practical for this, I completely understand. Can anyone think of any clever alternatives for measuring the data I'm looking for?
In my experience, simply taking the double integral of accelerometer data results in a huge amount of error that makes any position data pretty much useless.
That is certainly true in many cases, but unless you have tried the experiment with the cable in question, your experience may not be relevant. Wise use of restraints on the allowable motion may make the project feasible.
You've certainly piqued my interest! I assume you are talking about restraints within the code or data, as I can't restrain the physical motion of the cable in any way.
What kinds of restraints are you thinking of? Are there any standard terms that I can research to learn how to approach this problem?
The restraints would be in the code, of course, on the allowable solutions. One approach is to reset the accelerometer integration drift to zero, whenever possible. Here is an example of that: Gait tracking with x-IMU – x-io Technologies
An idea that comes to mind is using the sensor from an optical mouse with suitably altered lenses. If, instead of focusing on a surface a few millimeters away, it was instead, focused on a distant target, then any movement relative to the target would be translated as a mouse movement.
It would take a bit of hacking to work out the details, but I'm sure the basic concept could work.
@DaveEvans: of course, that was the first thing I did, way before posting this topic. Trouble is, all of the literature I have found don't give any code examples or hardware implementations, only densely academic results. Most of the results I found were much more heavily interested in the mathematics of the problem, which were all totally over my head.
@KenF: I don't think that would work well here. I need an option that can be placed directly on the cable. Furthermore, I need an option that can be easily fabricated with standard components, without much hacking. Since I expect the motion to occur in multiple dimensions, I don't think a single optical sensor would give me meaningful data for what I want to do. Plus, the sensor would be completely ineffective in bad weather.
@jremington: Thanks for the links! I need this system to run in real-time (will be used to control audio), so a PC doing pattern matching wouldn't be ideal for this project (though possible if there is absolutely no other way). Can I use a low-pass filter implemented in the Arduino firmware to reduce or remove drift at each of the integrals? Or do I need something more fancy to do the low-pass filtering?
Have you considered a hall-effect sensor for motion and displacement?
Also could something be attached to the cable such as small magnets secured in four quadrants around the cable?
@jremington - if I run it through a high-pass filter, won't that remove the very data I'm interested in in the low frequency range? I mean, you're totally right, that's what the documentation I've found said, I'm just curious about what is going on mathematically.
@spicetraders - as I said a few times already, I need something that can be mounted directly on the cable. A hall effect sensor system would require a few sensors placed around the cable(s) in fixed locations, which increases set up time. Plus, I'm pretty sure most hall effect sensors can't sensor large motions in the range of several inches (maybe I'm wrong).