Hi, We have an application where we need to measure the angular position(relative to the floor) of a rotating portion of an industrial machine. Standard problem but we believe our application has constraints the make it tricky. Our idea is to use an accelerometer(e.g. analog devices imems sensor) mounted on the rotating object, with its senstive access perpendicular to the centripetal acceleration, and measure acceleration due to gravity only. (Acceleration due to gravity is always directed downwards towards the center of the earth). Although we are embedded experts, we are not DSP experts, and I'm interested in any feedback people may have on our idea. Its a dirty, wet environment so we believe that rules out any standard opto method. We want to mount our battery powered measuring device on the rotating object in a self contained/sealed unit. The rotation rate is from around 10Hz to 50Hz. And we were targetting an angular position accuracy of better than +-10 degrees. My crude algorithm was to find the max/min acceleration points and this tells you when the sensor is aligned with the gravity field, and thus position. Is this a sensible first approach? or way too simplistic? I'm guessing an important source of noise would be vibration of the rotating object, probably at the rotation frequency(and harmonics thereof). Given the desired accelorometer signal is at the same frequency as this noise it may be difficult to extract? What are the basic signal processing approaches I should be trying first? Just a few key terms and I will google the rest. I wondered about some sort of adaptive bandpass filter with a center frequency at the rotating rate. As the rotating rate changes the filter would adjust its center frequency. But I'm worried about the delay the filter will add - when the rotating object is accelerating we still need to measure its position/velocity. I'm interested in any signal processing ideas/approaches that might help to extract the angular position from the "noisy" accelerometer signal? Regards John
Angular position measurement using accelerometer - DSP approaches?
Started by ●June 11, 2006
Reply by ●June 11, 20062006-06-11
<john.dsp0@gmail.com> wrote in message
news:1150062550.672017.171530@y43g2000cwc.googlegroups.com...
<...>
Hi John,
I must have misunderstood something cause you seem to be
saying that you set up so that your accelerometer only measures acceleration
due to gravity then you want to detect changes in gravity as your machine
works?
Best of Luck - Mike
Reply by ●June 11, 20062006-06-11
Thanks for the comment Mike, looks like I didn't explain it clearly enough. See below for a better explanation of the geometry(I hope!). Mike Yarwood wrote:> <john.dsp0@gmail.com> wrote in message > news:1150062550.672017.171530@y43g2000cwc.googlegroups.com... > <...> > Hi John, > I must have misunderstood something cause you seem to be > saying that you set up so that your accelerometer only measures acceleration > due to gravity then you want to detect changes in gravity as your machine > works? > > Best of Luck - MikeNo. Acceleration due to gravity is assumed to be constant(9.81m/s/s) and is our reference. The accelerometer is mounted on the piece of rotating machinary. Imagine a plane that is perpendicular to the ground. The axis of rotation is perpendicular to this plane. The accelerometer then is moving in this plane only, about the axis of rotation. When the accelerometer is closest to the ground, at its low point, its sensitve axis is perpendicular to gravity so its output is zero. If the object now rotates 90 degrees, the accelerometer sensitive axis is now aligned with gravity, and the sensor will output "1G". (This is a simplificatio of course, just trying to explain the geometry....) Regards John
Reply by ●June 12, 20062006-06-12
john.dsp0@gmail.com wrote:> Hi, > We have an application where we need to measure the angular > position(relative to the floor) of a rotating portion of an industrial > machine. Standard problem but we believe our application has > constraints the make it tricky. Our idea is to use an > accelerometer(e.g. analog devices imems sensor) mounted on the rotating > object, with its senstive access perpendicular to the centripetal > acceleration, and measure acceleration due to gravity only. > (Acceleration due to gravity is always directed downwards towards the > center of the earth). Although we are embedded experts, we are not DSP > experts, and I'm interested in any feedback people may have on our > idea.I don't understand. Unless you know that your sensor is on the axis of rotation, how will you separate the centrifugal acceleration from gravity? (I think I know an impractical way, not worth detailing.)> Its a dirty, wet environment so we believe that rules out any standard > opto method. We want to mount our battery powered measuring device on > the rotating object in a self contained/sealed unit. The rotation rate > is from around 10Hz to 50Hz. And we were targetting an angular position > accuracy of better than +-10 degrees.How about transmitting linearly polarized microwaves, and determining the polarization angle at a receiver?> My crude algorithm was to find the max/min acceleration points and this > tells you when the sensor is aligned with the gravity field, and thus > position. Is this a sensible first approach? or way too simplistic?The turn-and-bank indicator in an airplane reads level when turn and bank are coordinated. Where is your artificial horizon?> I'm guessing an important source of noise would be vibration of the > rotating object, probably at the rotation frequency(and harmonics > thereof). Given the desired accelorometer signal is at the same > frequency as this noise it may be difficult to extract?... Have you made any preliminary measurements? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●June 12, 20062006-06-12
john.dsp0@gmail.com wrote: ...> When the accelerometer is closest to the ground, at its low point, its > sensitve axis is perpendicular to gravity so its output is zero. If the > object now rotates 90 degrees, the accelerometer sensitive axis is now > aligned with gravity, and the sensor will output "1G".... Only if the rotation velocity is negligible. It's easy to swing a pail of water by its bail over your head without spilling any. What's the slowest you can go without spilling water when the bottom of the pail is straight up? Will the radial acceleration still yield the data you want? (I think so.) Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●June 12, 20062006-06-12
john.dsp0@gmail.com wrote:> Hi, > We have an application where we need to measure the angular > position(relative to the floor) of a rotating portion of an industrial > machine. Standard problem but we believe our application has > constraints the make it tricky. Our idea is to use an > accelerometer(e.g. analog devices imems sensor) mounted on the rotating > object, with its senstive access perpendicular to the centripetal > acceleration, and measure acceleration due to gravity only. > (Acceleration due to gravity is always directed downwards towards the > center of the earth). Although we are embedded experts, we are not DSP > experts, and I'm interested in any feedback people may have on our > idea.In principal this should work -- the devil is in the details, though.> > Its a dirty, wet environment so we believe that rules out any standard > opto method. We want to mount our battery powered measuring device on > the rotating object in a self contained/sealed unit. The rotation rate > is from around 10Hz to 50Hz. And we were targetting an angular position > accuracy of better than +-10 degrees. > > My crude algorithm was to find the max/min acceleration points and this > tells you when the sensor is aligned with the gravity field, and thus > position. Is this a sensible first approach? or way too simplistic?I would choose the zero crossings around average, myself. If I could know the rotation rate (maybe with an accompanying rate gyro?) I would demodulate it with a sine wave.> > I'm guessing an important source of noise would be vibration of the > rotating object, probably at the rotation frequency(and harmonics > thereof). Given the desired accelorometer signal is at the same > frequency as this noise it may be difficult to extract?Since you are essentially looking for a sinusoidal signal at the rotation rate, any vibration at this rate will confound your measurements. If you could have two accelerometers at different parts of the arc you may be able to gather enough information to null out at least some of the effects, however (and to give you up to a 3dB improvement in SNR).> > What are the basic signal processing approaches I should be trying > first? Just a few key terms and I will google the rest. I wondered > about some sort of adaptive bandpass filter with a center frequency at > the rotating rate. As the rotating rate changes the filter would adjust > its center frequency. But I'm worried about the delay the filter will > add - when the rotating object is accelerating we still need to measure > its position/velocity.How will you measure this acceleration? Do you have an independent way of measuring the rotation rate? Here again, a rate gyro would be a cool thing (actually, a rate gyro with an accelerometer both feeding into a Kalman filter would be way cool, but it would probably be gross overkill for +/-10 degrees, and a steep learning curve for you).> > I'm interested in any signal processing ideas/approaches that might > help to extract the angular position from the "noisy" accelerometer > signal? >This is a bit of self-plagiarism, from response, dated 6/6/06 to "How to write a NotchFilter procedure". It details how to estimate the amplitude and phase of a sine wave if you know it's phase (in a way that rejects DC). This assumes that you know the rotation rate: Multiply your data by cos(rotation rate), sum the result, call it I Multiply your data by sin(rotation rate), sum the result, call it Q Determine atan(I, Q) (I'd use the atan2 function in the C math library, or it's equivalent). This is your angle. You'll spend about a half day working through permutations until you get it in the right quadrant, then another few hours getting the sign right. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by ●June 12, 20062006-06-12
> Only if the rotation velocity is negligible. It's easy to swing a pail > of water by its bail over your head without spilling any. What's the > slowest you can go without spilling water when the bottom of the pail is > straight up? Will the radial acceleration still yield the data you want? > (I think so.)Hi Jerry, Ok, so the reason the water doesn't spill is because the centripetal acceleration > acceleration due to gravity. In theory I agree with you, the centripetal acceleration will be roughly constant and the measured acceleration due to gravity will still vary as the bucket swings around. Problem is gravity is 1 g, and the centripetal acceleration for our geometry can be 100g and higher. I figured that mounting the sensor perpendicular to the centripetal acceleration nulls out most of that. (sure there will be some sensor alignment error so some centripetal acceration will appear in the measurement, but will be now greatly attenuated. I can't quite see the advantage of measuring the centripetal acceleration? What do I gain?
Reply by ●June 12, 20062006-06-12
<john.dsp0@gmail.com> wrote in message news:1150062550.672017.171530@y43g2000cwc.googlegroups.com...> Hi, > We have an application where we need to measure the angular > position(relative to the floor) of a rotating portion of an industrial > machine. Standard problem but we believe our application has > constraints the make it tricky. Our idea is to use an > accelerometer(e.g. analog devices imems sensor) mounted on the rotating > object, with its senstive access perpendicular to the centripetal > acceleration, and measure acceleration due to gravity only. > (Acceleration due to gravity is always directed downwards towards the > center of the earth). Although we are embedded experts, we are not DSP > experts, and I'm interested in any feedback people may have on our > idea. > > Its a dirty, wet environment so we believe that rules out any standard > opto method. We want to mount our battery powered measuring device on > the rotating object in a self contained/sealed unit. The rotation rate > is from around 10Hz to 50Hz. And we were targetting an angular position > accuracy of better than +-10 degrees. > > My crude algorithm was to find the max/min acceleration points and this > tells you when the sensor is aligned with the gravity field, and thus > position. Is this a sensible first approach? or way too simplistic? > > I'm guessing an important source of noise would be vibration of the > rotating object, probably at the rotation frequency(and harmonics > thereof). Given the desired accelorometer signal is at the same > frequency as this noise it may be difficult to extract? > > What are the basic signal processing approaches I should be trying > first? Just a few key terms and I will google the rest. I wondered > about some sort of adaptive bandpass filter with a center frequency at > the rotating rate. As the rotating rate changes the filter would adjust > its center frequency. But I'm worried about the delay the filter will > add - when the rotating object is accelerating we still need to measure > its position/velocity. > > I'm interested in any signal processing ideas/approaches that might > help to extract the angular position from the "noisy" accelerometer > signal?John, Instead of presuming a solution and asking only about the algorithm, maybe ask: "How would you do it with only the sensor that's available?" After all those perpendicular transformations, do I understand that the axis of rotation is parallel with the ground? An approach would be to postulate all of the signal components: - gravity - centrifugal acceleration - terms due to misalignment unless it's guaranteed to be perfect. Once the likely signal structure is known then it's easier to imagine the types of signal processing things that might be needed. You said you wanted angular position. One way is to measure the affect of gravity, isn't it? that gives you a result that is only ambiguous as to quadrant - as long as you have a maximum gravity reference and as long as you can accurately subtract everything else. Then all you have to do is resolve the quadrant which seems a simple matter of knowing the rotation direction and whether the measurement occurs before or after the positive or negative peak. The sign of the measurement tells you which 2 of 4 quadrants to resolve completely then. You say that the machine is rotating - so may one assume that you mean it rotates at some relatively fixed angular velocity? Or, does it simply move from one angle to another and stop? This likely affects how signals will be constructed. Just arm-waving thoughts: With constant angular velocity, gravity will be a sinusoid. With constant angular velocity, centrifugal acceleration will be a constant. So, given the sinusoid, you are interested in its phase - which is directly proportional to angular position. You want to know the phase to an accuracy of 10 degrees or 1/36th of a rotation or to an accuracy of 1/(50*36) = 0.5555msec. So, I'd consider using 1/(50*50) or 0.4msec or less as a data rate. So, this probably implies a sample rate of greater than 5kHz which is 50Hz x 50 x 2. If you are going to pass the data through a filter at 5kHz sample rate then there would be precious little delay possible as measured in sample times unless you are willing to have the resulting output delayed. I get the impression that the output has to be in real time. So, that lets out any filtering I believe. The only hope for filtering is a filter that would not delay the signal for more than 0.5msec. This implies a filter with frequency transitions that are not narrower than 2000Hz. Not much help here I'm afraid. Your implementation is sorta like having a tachometer that outputs only a couple of blips per rotation. How do you get good resolution between blips? You don't. You might differentiate to get velocity but I don't recommend it because differentiation is noisy. Maybe offset the accelerometer and measure centrifugal acceleration? If you're stuck on the accelerometer approach then you might do something like this: Subtract out a constant that is generated to approximate the centrifugal acceleration term. Presumably this is a function of angular velocity. Presumably this can be a longer term estimating process if the angular accelerations aren't too great - if the angular velocity is relatively stable. The subtraction can be relatively instantaneous. Then, the magnitude of the sinusoid in the signal remains. If you know the peak value then the angle can be estimated from the instantaneous value and the peak. I'd get a tachometer with a bunch of segments instead - or, better yet, a shaft encoder. Fred
Reply by ●June 12, 20062006-06-12
Once again, many thanks for you comments jerry. My response below. Jerry Avins wrote:> john.dsp0@gmail.com wrote: > > Hi, > > We have an application where we need to measure the angular > > position(relative to the floor) of a rotating portion of an industrial > > machine. Standard problem but we believe our application has > > constraints the make it tricky. Our idea is to use an > > accelerometer(e.g. analog devices imems sensor) mounted on the rotating > > object, with its senstive access perpendicular to the centripetal > > acceleration, and measure acceleration due to gravity only. > > (Acceleration due to gravity is always directed downwards towards the > > center of the earth). Although we are embedded experts, we are not DSP > > experts, and I'm interested in any feedback people may have on our > > idea. > > I don't understand. Unless you know that your sensor is on the axis of > rotation, how will you separate the centrifugal acceleration from > gravity? (I think I know an impractical way, not worth detailing.)I think we have a disconnect here, not sure how to resolve it without a diagram ;) What do you mean by "On the axis of rotation"? The sensor is actually mounted so that it is perpendicular to the centripetal acceleration. It doesn't measure any centripetal/centrifugal acceleration. It will only measure gravity and angular acceleration(although ignore the angular acc for now - assume its constant).> > Its a dirty, wet environment so we believe that rules out any standard > > opto method. We want to mount our battery powered measuring device on > > the rotating object in a self contained/sealed unit. The rotation rate > > is from around 10Hz to 50Hz. And we were targetting an angular position > > accuracy of better than +-10 degrees. > > How about transmitting linearly polarized microwaves, and determining > the polarization angle at a receiver?Nice idea! We already will need to have a wireless link to a fixed receiver. But we don't have any RF expertise so this could be a tough one for us. This also opens us up to interference from other users in the band.> > My crude algorithm was to find the max/min acceleration points and this > > tells you when the sensor is aligned with the gravity field, and thus > > position. Is this a sensible first approach? or way too simplistic? > > The turn-and-bank indicator in an airplane reads level when turn and > bank are coordinated. Where is your artificial horizon?Ummm, the ground, I think. I am actually a pilot so maybe I've over analysed this one :) We want to measure the angular position of the rotating object, and the reference point is when a certain part of the rotating object is at its closest point to ground.> > I'm guessing an important source of noise would be vibration of the > > rotating object, probably at the rotation frequency(and harmonics > > thereof). Given the desired accelorometer signal is at the same > > frequency as this noise it may be difficult to extract? > > ... > > Have you made any preliminary measurements?Have ordered the accelrometer dev kit so that is the plan.> Jerry > -- > Engineering is the art of making what you want from things you can get. > =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF==AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF
Reply by ●June 12, 20062006-06-12
Thanks Tim, my response below.> > > > My crude algorithm was to find the max/min acceleration points and this > > tells you when the sensor is aligned with the gravity field, and thus > > position. Is this a sensible first approach? or way too simplistic? > > I would choose the zero crossings around average, myself. If I could > know the rotation rate (maybe with an accompanying rate gyro?) I would > demodulate it with a sine wave.I didn't state it, but as well as knowing the position we also want to know the rotation rate and I was hoping this would also be an output of the algorithm. The time between zero crossings as you put it, or the max/min acc values would give the rotation rate - assuming a constant angular velocity. Demodulate it...Which means multiply I think, ... so I get the sum and difference frequencies...Ok I need go read about demodulation to get this one.> How will you measure this acceleration? Do you have an independent way > of measuring the rotation rate? Here again, a rate gyro would be a cool > thing (actually, a rate gyro with an accelerometer both feeding into a > Kalman filter would be way cool, but it would probably be gross overkill > for +/-10 degrees, and a steep learning curve for you).No we don't have an independent way. From what I understand a rate gyro is just a 3 dimensional accelerometer. I was thinking 1D to keep costs down.> > I'm interested in any signal processing ideas/approaches that might > > help to extract the angular position from the "noisy" accelerometer > > signal? > > > This is a bit of self-plagiarism, from response, dated 6/6/06 to "How to > write a NotchFilter procedure". It details how to estimate the > amplitude and phase of a sine wave if you know it's phase (in a way that > rejects DC).Thanks. Will look itup.> This assumes that you know the rotation rate: > > Multiply your data by cos(rotation rate), sum the result, call it I > Multiply your data by sin(rotation rate), sum the result, call it Q > Determine atan(I, Q) (I'd use the atan2 function in the C math library, > or it's equivalent). > > This is your angle. You'll spend about a half day working through > permutations until you get it in the right quadrant, then another few > hours getting the sign right. > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com > > Posting from Google? See http://cfaj.freeshell.org/google/ > > "Applied Control Theory for Embedded Systems" came out in April. > See details at http://www.wescottdesign.com/actfes/actfes.html






