07-03-2007 02:14 PM
07-05-2007 09:09 AM
07-05-2007 10:51 AM
Hi Lynn,
Thanks for your reply, I was manipulating the filter parameters using the properties function of the Butterworth filter (and at times setting them to my desired default).
I think the problem I was having might have more to do with the fact that I am unsure what the frequency of my signal is. I tried using the Tone Express VI, but I wasn't able to have it update every 0.01 s (so it wasn't very helpful). Maybe you could answer these questions for me:
1) Is there a way to have the tone VI or another frequency measuring VI read into my spreadsheet file 100 times a second?
2) When I am using a lowpass filter do I have to specify high and low cutoff? If not, do I specify the high cutoff to "cut off" the high frequency in my lowpass filter?
The context window does help me to realize some things in my VI, but I often find that since I am not an expert at LabView (or programming for that matter) troubleshooting becomes more reliant on trial and error. Reading threads on this website, along with some posts has been most helpful.
Thanks again
Jenna
07-05-2007 11:46 AM
07-06-2007 09:18 AM
07-06-2007 10:41 AM
07-10-2007 12:48 PM
Hi Lynn,
The purpose of my LabView program is to read in a variable sine wave (which represents a swinging leg), measure the torque, position and angles over time and be able to adjust a motor on the fly. My purpose in filtering is to allow for a smoothly differentiated signal. If I differentiate without a filter… my signal is a mess. The nominal waveshape is a sine wave and the frequencies and magnitudes of the signal vary with each trial. Generally though, the frequency of the signal is 1.5 Hz or less. The peak to peak amplitude for the analog out channel from an optical encoder (which measures the leg angle) is approximately 70 degrees (1.94V). It is necessary to have the differentiated and filtered “angular velocity” in sync with the other channels to know the effect of the change in the motor speed at different points in the cycle. I will be analyzing this data mainly after it has been collected, so the precision on the charts while it is running is not too important.
I’ve tried modifying my VI so that you will be able to see it, but since my signal is continuous “making the current values default” freezes my VI at one point in time... so my simplified VI doesn’t run as the more complete one did.
I have also briefly looked into a Savitzky Golay filter that differentiates and filters simultaneously, but I haven’t had much luck getting it to work.
Any suggestions?
Thanks
Jenna07-10-2007 12:59 PM
07-10-2007 01:37 PM
Hi Lynn,
I am using an optical encoder as the sensor that measures the leg angles... so I will need to differentiate that signal to get the angular velocity. Eventually the motor voltage will be made to change at different points of the swinging leg cycle as well as at different angular velocities of the swinging leg. So you're right in that we will be controlling the torque throughout the motion. This is why it is important to have very little delay from the filters and a 180 degree phase shift with the differentiated signal.
The Butterworth filter that I used works well with a cutoff at 10 and order of 3 before differentiation, and a cutoff of 3 and order of 3 after the differentiation.
Thanks
Jenna