LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

closed loop feedback on impact force

Solved!
Go to solution

Hi

 

I am using labview 8.5 and an Ni USB 6221 card to control the power output of an actuator and monitor the signal output from a load cell.  The actuator provides a force at 50 Hz which is measured by the load cell.

 

The signal from the load cell is basically a very narrow peak occuring at a 50 Hz.  I wish to measure the height of each peak, average the figure (the peak force varies by 2 or 3%) and then use this data to provide a feedback loop to keep the applied force constant.

 

[img]http://farm4.static.flickr.com/3067/3077344302_4b7bb5f2a3.jpg[/img]

 

I have tried using the 'amplitude and levels' vi in 'peak' mode and averaging the output.  However, this appears to give a widly fluctuating result that is useless for feedback purposes. I have tried increasing the sampling period of this vi with no luck.

 

Does anyopne have any suggestions on a way to accomplish this? Could i accomplish this using waveform peak detection?

 

Any help or advice would be greatly appreciated.

 

Many thanks.

0 Kudos
Message 1 of 5
(3,245 Views)

Dear,

 

Since it is not too complicated a problem, I would probably go with the brute force if you cannot figure out why the "amplitude and level" isn't working. The way I would approached this problem is the following:

1 - Continuousy sample the force (1kHz or the frequency you need)

2 - Grab the data and analyze at 40Hz (this garantees you will have at least 1 peak, begin slower than 50Hz)

3 - Transform your waveform to an array

4 - Get the maximum value

5 - Check to make sure it's above a certain threshold (just in case something is wrong with the device, to protect your average)

6 - Throw that value in a circular buffer (to get rid of the oldest measures and only keep the "n" most recent)

7 - Average your circular buffe and take corrective measurement based on this

 

Hope this help,

 

Olivier

Message 2 of 5
(3,228 Views)

Hi.

 

Many thanks for your help and sorry for my slow reply!

 

How do i program a circular buffer in LabView? Would you use this function?

 

[url]http://zone.ni.com/devzone/cda/tut/p/id/7188[/url]

 

cheers

 

John

0 Kudos
Message 3 of 5
(3,186 Views)
Solution
Accepted by eichlerjw

Hi John,

 

Thanks for your post and I hope your well. 

 

To create a circular buffer in LabVIEW you need to use a shift register. However, for large number of data points having a large shift register on the side of loop is silly and unpractical. Therefore you need to use an array, in which you update the oldest value with the newest value and you set the size of the array to the number of points you wish to have in the buffer. 

 

I have created an example of a buffer in LabVIEW 8.5 - please see attached VI.

 

Also, if your doing any sort of statical anylsis maybe consider using the point-by-point functions, which only require the most update value to calculate the newest mean (for example). This saves having the compute the entire array everytime.

 

Hope this helps,

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 4 of 5
(3,172 Views)

Many thanks!

 

cheers

 

John

0 Kudos
Message 5 of 5
(3,167 Views)