unless... the merry-go-round is on the back of a flat bed truck and the truck is moving up and over a small hill. The Z axis is no longer one gee and you can't tell if it was the hill or the tilt that changed the Z reading..
The problem is fundamentally the same as trying to fly a plane in clouds - it needs an artificial horizon and gyros are very cheap nowdays.
It is not the same because it is constrained to the ground. True that there would me momentary fluctuations due to dips and rises but they cannot be sustained and therefore can be dealt with.
A merry-go-round is not the same as a motorcycle and cannot be used to illustrate the same dynamics. The reason is that it's constrained not to tilt. But a motorcycle tilts in order to acheive dynamic equilibrium, and that equilibrium is reached when the transverse acceleration vector is zero. Rotating a two-axis accelerometer accomplishes nothing towards ferreting out the tilt angle.
The point of the merry-go-round example was to illustrate that an accelerometer axis pointing straight up will read one gee regardless whether or not it is experience centripetal forces. A motorcycle going around a curve at a 45 degree lean angle, with two accelerometers oriented at 45 degrees to each side of the motorcycle's centerline will have one axis pointing straight up, reading exactly one gee. The motorcycle tilts to average out the accelerations. The individual axis' of the accelerometers will sense the forces individually.
You should be able to calculate the one gee vector using data from the two axis' rather than actually tilting the accelerometer, you can also find the vector normal to the motorcycle which would be the same as the vector with the highest acceleration.
The motorcycle responds to a combination of all forces but the accelerometer only responds to acceleration along its axis. On flat ground (no dips or rises) there will always be an angle where the accelerometer will read one gee. If you find that angle then you know where straight up is.
... On flat ground (no dips or rises) there will always be an angle where the accelerometer will read one gee....
That's true. The problem is, you can find that 1 G measurement by turning your accelerometer either clockwise or counterclockwise away from the direction of maximum acceleration (the Big A) seen by the accel.
... If you find that angle then you know where straight up is.
And, on a statistical basis, you will be right about half the time because of what I mentioned above.
I think you are still looking at this problem from one frame of reference (standing with your feet on the ground) while Gorga is speeding around in a different frame of reference (the moving motorcycle).
...
A merry-go-round is not the same as a motorcycle and cannot be used to illustrate the same dynamics. The reason is that it's constrained not to tilt. But a motorcycle tilts in order to acheive dynamic equilibrium, and that equilibrium is reached when the transverse acceleration vector is zero. ...
What Phil is saying is the gospel truth. What drives everyone crazy with problems like this is that, while gravity and acceleration arise from different phenomena, they often appear to be the very same thing. Once they get mingled together in a frame of reference, you can't tell one from the other. You measure gravity the same way you measure acceleration, so for all practical purposes they are the same thing. So, in a sense, they dissolve into each other and you can't tell one component from another: they summate and then you are stuck rolling around somewhat blind in your very own little frame of reference. Without some kind of outside reference, you can't really see what's happening. Which is why pilots get confused if they can't see out their window and don't know how to read their instruments correctly. It sucks. But gravity and acceleration are just so promiscuous that way.
That's true. The problem is, you can find that 1 G measurement by turning your accelerometer either clockwise or counterclockwise away from the direction of maximum acceleration (the Big A) seen by the accel.
Only if you have not been tracking previous readings.
Only if you have not been tracking previous readings.
With a single accel, I don't think tracking would help. Consider Heater's example again: if you have a glass of beer sitting on Gorga's lap and she drives the motorcycle the way she's supposed to around any number of arcs, then she can gaze upon that glass of beer all she wants to, but she will never see the fluid rise up on one side or the other. What would tracking present to you that the glass of beer would not otherwise reveal?
You're finally starting to make sense! But you do not need a two-axis accelerometer, and I think that's what's throwing people off of your argument. One axis, mounted perpendicular to the seat, is enough, viz:
The problem is, from the inertial frame of reference of the motorcycle, you also have vectors that look like this. And without any other reference, you don't know which ones are the "right" ones to measure. But, as I've already said, as a practical matter, you could probably use this >1 G sensing method so long as you're willing to live with errors generated by vertical accelerations.
@phipi: That's what I said (or intended to imply) several pages ago. But as Rich so aptly pointed out, you don't get direction of lean nor any potential compensation from acceleration due to dips & crests in the road.
Okay, you don't get the direction of the lean, just the angle. But I think that's all the OP was after. And, yes, dips and crests in the road do throw a wrench into the works. But at least I think we have some universal understanding to start with -- finally.
Okay, now put an accelerometer on the handlebars, 90 degrees to the other axis. Can you determine the direction of lean now?
I'm afraid not. At 90 degrees to the "Measured Accel" in the drawing, you would read zero. If you didn't read zero, your motorcycle would flop on its side.
I tried it with a single accelerometer and it works until your angle becomes constant then it shows you as upright. I guess that is why you need a gyro. This video isn't clear but you get the idea.
[video=youtube_share;zp9w9E68U8Q]
If you watch full screen at 720 you can see the LCD display around a corner. I put a lot of power into it and it still read the turn until the steepest part where it bounced back to center(ish).
{{
***MODIFIED FOR 10 BIT Y AXIS ONLY USE AT OWN RISK***
***SEE PRODUCT PAGE FOR ORIGINAL CODE***
}}
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
CLKPIN = 8
DATAPIN = 9
CSPIN = 10
Y_OFFSETVAL = 50 ' Y-Axis offset compensation value
VAR
long XYZData[3]
OBJ
Term : "FullDuplexSerial" 'Used to Communicate to the PC
SPI : "MMA7455L_SPI_v2" 'Used to Communicate to the Accelerometer
lcd : "SparkFun_serial_lcd" 'Used to Communicate to the LCD
PUB main
lcd.init(11,9600,2,20)
lcd.displayOn
lcd.cursor(0)
lcd.backlight(true)
lcd.clrln(1)
lcd.clrln(0)
'Initialize the serial COM so that we can see the data on the PC
Term.start(31, 30, 0, 38_400)
'Initialize the device
SPI.start(CLKPIN, DATAPIN, CSPIN)
waitcnt(clkfreq/100+cnt)
SPI.write(SPI#YOFFL, Y_OFFSETVAL)
SPI.write(SPI#YOFFH, Y_OFFSETVAL >> 8)
term.tx(0) 'Clear the Display
repeat
term.tx(1) 'Home the Display
waitcnt(clkfreq/100+cnt)
Read10BitData
Display
lcd.gotoxy(0, 0)
waitcnt (clkfreq / 10 + cnt)
PUB Read8BitData(G_RANGE)
SPI.write(SPI#MCTL, (10 << 4)|(G_RANGE << 2)|SPI#G_MODE) 'Initialize the Mode Control register
XYZData[1] := SPI.read(SPI#YOUT8) 'repeat for Y-axis
PUB Read10BitData
SPI.write(SPI#MCTL, (10 << 4)|SPI#G_MODE) 'Initialize the Mode Control register
DataIn_High := SPI.read(SPI#XOUTH) 'repeat for X-axis
DataIn_Low := SPI.read(SPI#XOUTL)
XYZData[0] := DataIn
DataIn_High := SPI.read(SPI#YOUTH) 'repeat for Y-axis
DataIn_Low := SPI.read(SPI#YOUTL)
XYZData[1] := DataIn
DataIn_High := SPI.read(SPI#ZOUTH) 'and Z-axis
DataIn_Low := SPI.read(SPI#ZOUTL)
XYZData[2] := DataIn
PUB Display
term.str(string(13,"Y= "))
term.dec(~XYZData[1])
term.str(string(" "))
lcd.str(string(" "))
lcd.dec (~XYZdata[1])
lcd.str(string(" "))
if (~XYZdata[1]) <1
lcd.gotoxy(0, 1)
lcd.str(string(" LEFT "))
if (~XYZdata[1]) >1
lcd.gotoxy(0, 1)
lcd.str(string(" RIGHT "))
DAT
DataIn word ' Data positioning trick to convert Words to Bytes
DataIn_Low byte 0 ' or Bytes to a Word without using any math overhead
DataIn_High byte 0
DAT
{{
┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────────┐
│ TERMS OF USE: MIT License │
├───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────────┤
│Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation │
│files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, │
│modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software│
│is furnished to do so, subject to the following conditions: │
│ │
│The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.│
│ │
│THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE │
│WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR │
│COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │
│ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────────┘
}}
I'll probably redo the video part and maybe add a gyro too.
I tried it with a single accelerometer and it works until your angle becomes constant then it shows you as upright. I guess that is why you need a gyro. ....
I am off-the-chart impressed that you would try this out for us! I must be honest that I can't tell much from the video, but I'm blown away that you would give this a go. If you do any more tests, please post them. But also please be careful. During the course of thinking about this problem, I ran across images of "road rash". Ouch.
I am off-the-chart impressed that you would try this out for us! I must be honest that I can't tell much from the video, but I'm blown away that you would give this a go. If you do any more tests, please post them. But also please be careful. During the course of thinking about this problem, I ran across images of "road rash". Ouch.
Thanks! I will be doing some more testing soon. The video is really bad I will redo during the day and figure out a way to make it easier to see the readout. I might wait until the next track day and do some extreme leaning
Comments
It is not the same because it is constrained to the ground. True that there would me momentary fluctuations due to dips and rises but they cannot be sustained and therefore can be dealt with.
A merry-go-round is not the same as a motorcycle and cannot be used to illustrate the same dynamics. The reason is that it's constrained not to tilt. But a motorcycle tilts in order to acheive dynamic equilibrium, and that equilibrium is reached when the transverse acceleration vector is zero. Rotating a two-axis accelerometer accomplishes nothing towards ferreting out the tilt angle.
-Phil
You should be able to calculate the one gee vector using data from the two axis' rather than actually tilting the accelerometer, you can also find the vector normal to the motorcycle which would be the same as the vector with the highest acceleration.
The motorcycle responds to a combination of all forces but the accelerometer only responds to acceleration along its axis. On flat ground (no dips or rises) there will always be an angle where the accelerometer will read one gee. If you find that angle then you know where straight up is.
That's true. The problem is, you can find that 1 G measurement by turning your accelerometer either clockwise or counterclockwise away from the direction of maximum acceleration (the Big A) seen by the accel.
And, on a statistical basis, you will be right about half the time because of what I mentioned above.
I think you are still looking at this problem from one frame of reference (standing with your feet on the ground) while Gorga is speeding around in a different frame of reference (the moving motorcycle).
What Phil is saying is the gospel truth. What drives everyone crazy with problems like this is that, while gravity and acceleration arise from different phenomena, they often appear to be the very same thing. Once they get mingled together in a frame of reference, you can't tell one from the other. You measure gravity the same way you measure acceleration, so for all practical purposes they are the same thing. So, in a sense, they dissolve into each other and you can't tell one component from another: they summate and then you are stuck rolling around somewhat blind in your very own little frame of reference. Without some kind of outside reference, you can't really see what's happening. Which is why pilots get confused if they can't see out their window and don't know how to read their instruments correctly. It sucks. But gravity and acceleration are just so promiscuous that way.
Only if you have not been tracking previous readings.
With a single accel, I don't think tracking would help. Consider Heater's example again: if you have a glass of beer sitting on Gorga's lap and she drives the motorcycle the way she's supposed to around any number of arcs, then she can gaze upon that glass of beer all she wants to, but she will never see the fluid rise up on one side or the other. What would tracking present to you that the glass of beer would not otherwise reveal?
You're finally starting to make sense! But you do not need a two-axis accelerometer, and I think that's what's throwing people off of your argument. One axis, mounted perpendicular to the seat, is enough, viz:
The tilt angle, a can be computed as follows:
This will work, at least, up until this point:
Then I think all bets are off!
-Phil
-Phil
I'm afraid not. At 90 degrees to the "Measured Accel" in the drawing, you would read zero. If you didn't read zero, your motorcycle would flop on its side.
[video=youtube_share;zp9w9E68U8Q]
If you watch full screen at 720 you can see the LCD display around a corner. I put a lot of power into it and it still read the turn until the steepest part where it bounced back to center(ish).
I'll probably redo the video part and maybe add a gyro too.
I am off-the-chart impressed that you would try this out for us! I must be honest that I can't tell much from the video, but I'm blown away that you would give this a go. If you do any more tests, please post them. But also please be careful. During the course of thinking about this problem, I ran across images of "road rash". Ouch.
Thanks! I will be doing some more testing soon. The video is really bad I will redo during the day and figure out a way to make it easier to see the readout. I might wait until the next track day and do some extreme leaning