11-23-2010 06:24 AM
Hi
I am using LabVIEW 2010 to develop a control system and user interface for a test machine. The machine is basically a pneumatic piston which impacts a test sample.
I am using a load cell to monitor the applied force. I wish to measure the maximum amplitude for each impact event. I will then average the heights of approx 10 impacts and trim the air pressure in a feedback loop. However, I am struggling to measure the peak heights correctly.
I have attached a screens showing the signal. The frequency of this signal varies, as does the amplitude (depending on the test parameters). At present I measure the number of impacts using a trigger function which is also giving false readings due to (I think) the two close peaks at the start of each impact event. The trigger function threshold is set by the user at the desired test force.
I have developed some code which measures the maximum value in the whole of the signal array. However, I would like to programmatically write the maximum amplitude to an array and reset the system after each impact.
Can anyone help me with this please? I am thinking that although the maximum amplitude varies, I could use the fact that the signal drops to near zero with a gradient of zero to reset the measurement system.
Any help would be great
Many thanks
John
11-23-2010 06:32 AM
You are in luck. Go to help in the toolbar, select Find Examples. Search for peak. Open the example named "Peak Detection and Display.vi" That VI will give you a push in the correct direction. For your own sake remember to use SAVE AS after modifying the latter example. So you do not overwrite the example. Also stay away from using Express VIs in your project. Express VIs is just some flimflam that NI has glued ontop on Labview, using very cheap glue. Express VIs do always cause problems than they do good.
Perhaps some filtering will do good in your setup. And Labview have many options for digital filtering.
11-23-2010 07:00 AM
Thanks! I always forget to look in the examples! I'll have a look now. J
11-23-2010 07:28 AM
I had a look at that example and it is useful. But I do not know and cannot set an amplitude threshold in my situation. I need to scan each pulse for the maximum amplitude, record it and then scan the next pulse. I will look into the pulse measurement vi's to see if there is anything useful. The minimum value for each pulse will always be zero in this case which might help things.
Thanks. John
11-23-2010 07:38 AM
I do not know your measurement situation. But perhaps you can set the threshold to some percentages of the max value detected in your measurement.
11-23-2010 08:51 AM
I looked at using the transition measurements vi with no luck.
What I really need to do is window each "pulse", scan for the maximum, record this value and then repeat for the next pulse etc.
My thought process...
scan signal, do nothing if amplitude is lower than 100. As soon as amplitude exceeds 100, begin scanning for maximum value. Then, as soon as the signal drops below 100 for a defined period of time (to prevent the system being accidentally disabled during the pulse), the maximum value is recorded and the measurement system begins scanning for the next maximum.
This doesn't seem too hard but I can;t get it to work
cheers
John
11-23-2010 09:19 AM
John,
I read your description and looked at your signal image. I am not sure what you want.
In the signal image you posted are the peaks you want the two(+) narrow peaks with amplitude about 600 or the broad, later, lower, and quite noisy peaks around 250-300? If you want the higher peaks, I suspect that you may not be sampling fast enough to capture the true peak. If you want the broad later peak, how do you plan to deal with the noise?
You mentioned averaging. Are you triggering your averaging from the leading edge of the impact? How reproducible is the shape of the broad peak? It looks like there may be an early peak followed by a valley and then the later peak. Is that real or an artifact?
Lynn
11-23-2010 09:37 AM
Sorry for not being clear. I am trying to measure the highest data point on the signal in each pulse.
Yes, there are two very narrow positive peaks followed by a broad, noisy peak. The first peak is due to impact, the second due to vibration (I think) and the broad peak is a secondary impact.
When I refer to a pulse I am talking about the whole of the signal between the flat (ish) regions near zero
I want to find the maximum point on each "pulse" and store it in an array. I then want to measure the maximum point on the next pulse. I then want to average the stored maxima and make adjustments based on this result.
I have checked the signal with a 1GS/s tektronics digital scope which agrees with the DAQ system. I'll put a picture up later.
Thanks for the reply
John
11-23-2010 09:45 AM
I have attached a screenshot from the oscilloscope. The load cell has a configurable filter which is currently disabled. I plan to start testing the filter tomorrow but I still need to measure the maximum points.
Thanks
John
11-23-2010 09:57 AM
Thanks. What does the scope image look like if you turn the bandwidth limit off and set the sweep to 100 microseconds/division (or 10 us/div)? I am curious about the details in the first peak.
Lynn