01-02-2016 02:15 AM
Hi there,
i'm an italian engineering student who try to learn LabView and i have one issue with an homework-software.
The target is to calibrate a two-axial accelerometer.
I have an input file with 4 columns e 5 rows: each row is a measurement point (the average value of a 1000-points measure) and the columns contains:
In Taratura.vi I:
Then in Verifica.vi i open a second file with some points i can use for verify the calibration:
I find a problem in these two last points: the array at point 3 it's ok but the array at point 4 isn't ok. I think that can be a problem in the last points because measured voltage and calculated voltage comparison is ok, but i hope in your help!
Thank you
Paolo
PS: i've attached some screenshots and main files
01-02-2016 02:09 PM
First, thank you for attaching the VIs -- with the VIs attached, we really don't need to see tiny pictures of the code (since we can open the code ourselves, and "play" with it). However, it would have been very useful to also attach a Sample File to give us a better idea of the nature of the data.
Some questions --
The last two questions get to how you calibrate this Accelerometer. I can think of two methods, and am not sure which you are using:
Note that you can make it more "complicated" by combining rotations about X and Y Axes, in which case you need to specify the order in which you do the rotations.
Bob Schor
01-02-2016 02:31 PM
Hi Bob,
thank you! Sorry, i'd reached upload limits, but i can attach here more attachments. So, here you can find two files:
- Taratura_accelerometro.txt > datas used for calibration;
- Verifica_accelerometro.txt > datas used for verify the calibration
In first two columns you'll find rotations around X axis and Y axis, in the second two columns you'll find voltage output for X and Y respectively.
Then, here the answer to your questions:
I used the second method, with fixed angles in a fixed system, combining rotations and elaborating it with a fixed rotational matrix.
Thank you!
Paolo
PS. I've used this second post to attach the complete .zip of the project. With my first post i've thought that wasn't possible to upload .zip because in many forum users are not allowed to do that... but now i tried and it works!
01-02-2016 06:03 PM
Thanks. So here are some more comments and questions.
Bob Schor
01-03-2016 04:29 AM
Hi Bob, thank you!
Here my answers:
I really don't know where the problem can be.. maybe in the pseudo-inverse or something else..
01-03-2016 09:52 AM
@pdellov wrote:
Hi Bob, thank you!
Here my answers:
Yes, the order matters. When doing 3-D rotations, I always use the "Right-hand 2-finger+Thumb" model (Thumb is Z, Up, first finger is X, forward, middle finger is Y, to the left). Do a +90° X rotation -- Y now points up. Now do a +90° about earth Y -- X points down, Y is forward. Start over, do the Y rotation first (X is down), followed by X (Y is up, X is left). These are different.
- If i use earth-fixed axes does the order matter?
I don't know what your model is for the output from the Accelerometer, but you seem to be "over-analyzing" it. What you really have are two 1D accelerometers, one along the X axis, one along the Y. If the system is linear (which you have already said you assume that it is), then the variation in its output will vary as the dot product of the sensor's 1D axis and the 1D axis of the Acceleration (which, if it is Gravity, is aligned with the Z axis). This, in turn, varies as the cosine of the angle between these axes (I'm ignoring a possible DC offset).
- I use matrices because of the pseudoinverse function, is there a function who allow me to pseudo-invert arrays? I make some confusion because of that continuos change of data-type;
It would seem to me that under some reasonable assumptions, your output will be a simple function of angle with two unknown variables -- the "bias" value from the Accelerometer and the "gain", or "Voltage per G" (no need to use meters/second, unless you are comparing with a published data sheet -- it is simpler with more "natural" units). You could estimate these two parameters with only two measurements, but with 5, you'll want to do some sort of error-minimization to get the "best fit" estimation.
Is this a requirement of the assignment? Curious ...