nongdy Posted December 28, 2006 Report Share Posted December 28, 2006 Hi, I used labview 8.0 to acquire the acceleration signal from tri-axial accelerometer, and tried to filter the noise in it, and then transfer the signal into velocity and displacement of the movement by integral. The main vibration is the sine waveform movement, frequency are below 10Hz. It is something about the signal post processing, because the data acquiring vi had worked properly. (It was done by another people.) But we could not get the sine waveform of displacement output. How could I do it? Does somebody give me the general idea or some example VI? Thanks in advance! Regards, Quote Link to comment
crelf Posted December 29, 2006 Report Share Posted December 29, 2006 Please post the VI you're using, as well as some of the data you've acquired to help us diagnose your problem more easily. Quote Link to comment
torekp Posted January 2, 2007 Report Share Posted January 2, 2007 If I understand what you want, you should try the function "Integral X(t)" in the mathematics -> Integration and Differentiation Palette. But you have to have Professional edition(?) of LabView for that. If you only have basic Labview, try this (Labview 6.1); you'll want to use the DBL input and output and ignore the i32s. Download File:post-4616-1167740730.vi Quote Link to comment
nongdy Posted January 2, 2007 Author Report Share Posted January 2, 2007 If I understand what you want, you should try the function "Integral X(t)" in the mathematics -> Integration and Differentiation Palette. But you have to have Professional edition(?) of LabView for that. If you only have basic Labview, try this (Labview 6.1); you'll want to use the DBL input and output and ignore the i32s. Download File:post-4616-1167740730.vi Firstly, Thanks to crelf and torekp, My labVIEW 8.0 is the professional edition. Now, I know how to integrate the acceleration. Thanks a lot to you all. But I had the new question about the acceleration signal offset and the digital filter configuration. I need to design a digital filter (band-pass) to remove DC offset and upper useless frequencies. I got some suggestion that I need to get the minimum and maximum acceleration, and use them to determine upper and lower cut-off frequencies. But I don't know how to get them? And after I get the minimum and maximum acceleration, how to determine upper and lower cut-off frequencies of the band-pass filter. Normally, which type of the digital filter that I should choose to offset the acceleration signal and removes the high frequency noise? Normally, how do you deal with the DC offset of the acceleration signal? And how do you design a digital filter? And for the acceleration signal, in the vertical direction, there is a 1g gravity always present, how do I deal with this problem? Has anybody the experiences about these? This is the first time that I use the NI labVIEW and process the acceleration signal of tri-axis accelerometer. I hope I could get help from you. Thank you very much in advance! Regards, Quote Link to comment
Neville D Posted January 2, 2007 Report Share Posted January 2, 2007 Firstly, Thanks to crelf and torekp, My labVIEW 8.0 is the professional edition. Now, I know how to integrate the acceleration. Thanks a lot to you all. But I had the new question about the acceleration signal offset and the digital filter configuration. I need to design a digital filter (band-pass) to remove DC offset and upper useless frequencies. I got some suggestion that I need to get the minimum and maximum acceleration, and use them to determine upper and lower cut-off frequencies. But I don't know how to get them? And after I get the minimum and maximum acceleration, how to determine upper and lower cut-off frequencies of the band-pass filter. Normally, which type of the digital filter that I should choose to offset the acceleration signal and removes the high frequency noise? Normally, how do you deal with the DC offset of the acceleration signal? And how do you design a digital filter? And for the acceleration signal, in the vertical direction, there is a 1g gravity always present, how do I deal with this problem? Has anybody the experiences about these? This is the first time that I use the NI labVIEW and process the acceleration signal of tri-axis accelerometer. I hope I could get help from you. Thank you very much in advance! Regards, One way to remove dc-offset, is to calculate the mean of the waveform and subtract it from the waveform (since your signal is sinusoidal). To remove higher frequency components, use the built-in VI's under signal processing pallet. A 5-pole butterworth filter with a low pass response of about 1kHz should do the trick. If you are doing the processing real-time i.e., point by point as the signal is acquired, then use the equivalent point-by-point filter function. You can use the Array Max Min function on the Array subpallet to determine your min and max acceleration values. For the vertical acceleration, measure g without vertical acceleration at start, and subtract this static value for every measurement thereafter. A proper description of your hardware and software (with attached VI's) would really help in trouble-shooting your issues. Are you using smart sensors (TEDS) ? Maybe there is a way to already set up the 1g subtraction automatically. Neville. Quote Link to comment
malef Posted January 3, 2007 Report Share Posted January 3, 2007 Some comments ... Integration is not a simple cumulation of values ! http://en.wikipedia.org/wiki/Integral Hardware configuration is most important for a correct Dynamic Signal Acquistition - even if 10 Hz is not very dynamic. Please give us some more information about hardware : - Sensor (type, frequency range, sensitivity) - amplifier - hardware filter - DAQ board (type, coupling, sampling rate, number of samples) To answer questions about software filtering and further more we need information like : - Do you need just time domain or also frequency domain information? - Do you need phase information between axes? - Or do you just want to measure and calculate amplitude of 10 Hz displacement? - ??? Manfred Links relating acceleration -> displacement conversion acc to displhttp://zone.ni.com/devzone/cda/tut/p/id/4093 example acc to displhttp://zone.ni.com/devzone/cda/epd/p/id/2495 Quote Link to comment
nongdy Posted January 3, 2007 Author Report Share Posted January 3, 2007 One way to remove dc-offset, is to calculate the mean of the waveform and subtract it from the waveform (since your signal is sinusoidal).To remove higher frequency components, use the built-in VI's under signal processing pallet. A 5-pole butterworth filter with a low pass response of about 1kHz should do the trick. If you are doing the processing real-time i.e., point by point as the signal is acquired, then use the equivalent point-by-point filter function. You can use the Array Max Min function on the Array subpallet to determine your min and max acceleration values. For the vertical acceleration, measure g without vertical acceleration at start, and subtract this static value for every measurement thereafter. A proper description of your hardware and software (with attached VI's) would really help in trouble-shooting your issues. Are you using smart sensors (TEDS) ? Maybe there is a way to already set up the 1g subtraction automatically. Neville. Thank you very much! I will try to use your suggestion tomorrow! about the sensors, those are PCB 3703G3FD3G accelerometer. http://www.pcb.com/contentstore/docs/PCB_C.../3703G3FD3G.pdf Quote Link to comment
Neville D Posted January 3, 2007 Report Share Posted January 3, 2007 Malef is absolutely right about the comment on integration. Earlier VI\'s seemed to be just accumulating values instead of adding up the area under the curve. Here is a picture of a VI that performs Numeric Integration using the Trapezoidal Rule. It assumes that dt (time spacing between each value in the waveform) is constant. Or this is slightly more elegant: Neville. Quote Link to comment
nongdy Posted January 3, 2007 Author Report Share Posted January 3, 2007 - Sensor (type, frequency range, sensitivity) (It is the PCB 3703G3FD3G accelerometer sensor. http://www.pcb.com/contentstore/docs/PCB_C.../3703G3FD3G.pdf - amplifier ( sorry, I don't know it. I will check it. The experiment was done by other people, the system could acquire the data, but the post processing has some problem. ) - hardware filter (we don't use hardware filter, I recommend to use a low pass anti-aliasing filter. But Quote Link to comment
torekp Posted January 3, 2007 Report Share Posted January 3, 2007 Do you want the whole displacement history during the experiment, or only the final displacement? Taking the simple cumulation of values and multiplying by dt gives you the "rectangle method" approximation of an integral. Unless you have very particular timing constraints at the start and end of your experiment, I don't see any reason to prefer the trapezoidal approximation to the rectangle approximation. (In other words you don't need to single out the first and last data points for special treatment. ) But if you know that the time period you care about begins exactly at the time that your first data point was taken and ends at exactly the time of your last, then the trapezoidal approach is more accurate, especially for a very short series of data. Quote Link to comment
nongdy Posted January 3, 2007 Author Report Share Posted January 3, 2007 Malef is absolutely right about the comment on integration. Earlier VI\'s seemed to be just accumulating values instead of adding up the area under the curve.Here is a picture of a VI that performs Numeric Integration using the Trapezoidal Rule. It assumes that dt (time spacing between each value in the waveform) is constant. Or this is slightly more elegant: Neville. Thanks a lot. I would try this method to process the experiment data. May you post the Vi to me? I really appreciated it. Regards, Nongdy Do you want the whole displacement history during the experiment, or only the final displacement?Taking the simple cumulation of values and multiplying by dt gives you the "rectangle method" approximation of an integral. Unless you have very particular timing constraints at the start and end of your experiment, I don't see any reason to prefer the trapezoidal approximation to the rectangle approximation. (In other words you don't need to single out the first and last data points for special treatment. ) But if you know that the time period you care about begins exactly at the time that your first data point was taken and ends at exactly the time of your last, then the trapezoidal approach is more accurate, especially for a very short series of data. I forgot to say, the real vibration amplitude only 0.4~1.6mm. It is very little. so the more precise method is the better. I want to get the whole displacement history during the experiment. so the efficiency is also a problem. the first experiment was done with measuring sine vibration, the sample period is 0.0001s. but may be we also try to use the system to measure other cycle vibration signal. the vibration amplitude is about 0.4~2mm. to abtain a so precise measurement value, so difficult. I haven't too much idea now. Thank you for your suggestion. It makes me understand the integration better. Regards, Nongdy Please post the VI you're using, as well as some of the data you've acquired to help us diagnose your problem more easily. I am sorry. the whole VI could not work properly. you could see the Integration.vi used for this system in the attachments. I am trying to fix the problem about the integration related problem. Thank you very much! Regards, Nongdy Download File:post-7362-1167861211.vi Quote Link to comment
Neville D Posted January 3, 2007 Report Share Posted January 3, 2007 Thanks a lot. I would try this method to process the experiment data. May you post the Vi to me? I really appreciated it.Thank you for your suggestion. It makes me understand the integration better. Regards, Nongdy Your welcome. Sorry, I am NOT going to post the VI. You can easily replicate the diagram on your side. After all, you do have to do SOME work to get your Master's degree! Neville. Quote Link to comment
nongdy Posted January 3, 2007 Author Report Share Posted January 3, 2007 Your welcome. Sorry, I am NOT going to post the VI. You can easily replicate the diagram on your side. After all, you do have to do SOME work to get your Master's degree! Neville. yes, I have to do a lot of things for it. hehe... , thank you for your suggestion. these idea are really very important for me. it give me a lot of hints. LAVA has a very good ambience to learn labVIEW . Nice to meet everybody in LAVA. Regards, Nongdy Quote Link to comment
nongdy Posted January 7, 2007 Author Report Share Posted January 7, 2007 Malef is absolutely right about the comment on integration. Earlier VI\'s seemed to be just accumulating values instead of adding up the area under the curve.Here is a picture of a VI that performs Numeric Integration using the Trapezoidal Rule. It assumes that dt (time spacing between each value in the waveform) is constant. Or this is slightly more elegant: Neville. May you tell me what is the function that I indicated in the drawing of attachment? I tried to replicate your integration vi, but I couldn't find this array funtion in my LabVIEW. I am sorry. I used the professional edition LabVIEW 8.0. Thank you very much! Regards, Nongdy Quote Link to comment
Neville D Posted January 8, 2007 Report Share Posted January 8, 2007 May you tell me what is the function that I indicated in the drawing of attachment? I tried to replicate your integration vi, but I couldn't find this array funtion in my LabVIEW. I am sorry. I used the professional edition LabVIEW 8.0.Thank you very much! Regards, Nongdy That is the "delete from Array" function in the array pallet. It can delete an element given its index (the 1st instance with index set to 0), OR the default is quite useful behaviour: if no index is given, it deletes the last element in the array (the 2nd instance of this function in my code). The "Add array elements" function is in a somewhat non-intuitive place in the Numeric subpallet. (You would think it should be included in the array subpallet). Just use the search tool on your pallets, and type in the name of the function.. it will take you directly to where the function is in your pallet. Neville. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.