LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I generate a sinusoidal waveform for frequency<0,05Hz?

Hi everyone,

 

I  generate a sinusoidal waveform for different amplitude and frequencies. However, I can not obtain a waveform for frequency<0,05 Hz. For the frequency values under freq=0,05 Hz, the vi gives an error as can be seen from the attachment picture. I have changed the "buffer size", "scan rate", "total scan to acquire" and "count", but it failed again and gave the same error. Is there anyone who can deal with or experienced with something like this problem? Also, could you please the exact meaning of

scan rate=

total scan to acquire=

buffer size=

 

In order to prevent the aliasing, what should be these values? What kind of relations are there between them? Because, for different selected frequencies, I have to change these values, otherwise I detect wrong frequency value using "Tone Measurements.vi" that is located at the LabView library.

 

Also, could you please make a comment on filtering? I want to filter very small vibrations from the signal using express vi of "Filter.vi". Should I have to use lowpass filter, or highpass filter, or bandpass or, smoothing etc. and what value of "cuttoff frequency" should I use? Thanks a lot...

Download All
0 Kudos
Message 1 of 10
(3,586 Views)

Hi,

I have also attached two files. One is related with f=1 Hz. When I adjust the frequency to 1 Hz, I can obtain and detect the true frequency response. However, as can be seen the waveform graph in the 1 Hz.jpg, I do not want to save or analyse the data which I circled in green colour. Because, the hotwire begins from the zero value and there is a peak at the top.After the first period, the waveform comes through the periodic one. Start of period from zero and make a bit peak at the top will change my statistic analysisi of signal. So I want to omit the first period.

 

In the second attachement, (f=10Hz.jpg), ı changed the frequency of the signal from 1 Hz to 10 Hz. Now, the vi detected the wrong frequency as can be seen from the picture "Detected Frequency=0,1". Also, the waveform graph does not show the right periodic signal.

 

So, what is the wrong? The filtering? or the scan rate? , total scan to acquire?, buffer size????? or what?? I have tried many different combinations of these control values, but the vi always detected the wrong frequency and the waveform graph was always like that.

Download All
0 Kudos
Message 2 of 10
(3,574 Views)

Can you make a small VI which shows the problem?  Your diagram is so large and untidy that I will not take the time to attempt to figure out what is going on there.  You also did not include any of the subVIs.

 

Post a small VI with the 0.05 Hz problem and perhaps someone can help.

 

Lynn

0 Kudos
Message 3 of 10
(3,566 Views)

The peaking could be a filter artifact , just take more samples and cut away the 'head' according to filter length and type.

0.05Hz means a periode length of 20s. The tone detection works with fft (propably windowed) so you need to capture more periods , plus additional maybe two periods if you use a LP filter near that F

... time for a coffee 😉

 

Wait, you mentioned a hotwire ... Do you know the step response time of your sensor? Maybe your sensor (or the setup) is to slow to read 10Hz?

If the start of your trace is not a filter artifact, mean the response of your hotwire sensor.... your t(10%-90%) is in the range of 0.5s ... so that might be the answer why you don't see a 10Hz signal 🙂

 

If you tell us more about yout setup, type of DAQ used etc.. we might find more hooks

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 10
(3,557 Views)

Hi johnsold!

I have shortened my vi and attached the subvis. Could you please help me? and make a comment on buffer size, scan rate, total scan to acquire and loop count for any frequencies to avoid aliasing? For example, for frequency=0.05 Hz, what sould be these parameters? or for 10 Hz? Please help me. Thanks a lot.

0 Kudos
Message 5 of 10
(3,527 Views)

Hi Henrik Volkers,

 

Thanks for your comments.

 

The peaking could not be a filter artifact. Because, when I did not use filter, the same peak occurred. Addition to peak, the sensor begings to read from zero, so this starting point from zero will also affect the analysis. I want to delete the first period of the waveform and then analyse it. How can I cutt off/omit  the first period of any wave form? I have attached my shortened vi and subvis. Please help me.

 

 

Download All
0 Kudos
Message 6 of 10
(3,525 Views)

Hi,

 

I want to cut off / omit the first period ( I have circled with green colour as can be seen from the attachment). And then make any analysis of sinusoidal waveform. Please help..

0 Kudos
Message 7 of 10
(3,523 Views)

I will try to address some of your questions.

 

One way to determine the acquisition parameters is to work backwards from the usage of the data.  Your VI reads from the DAQ, does a transducer calibration (data scaling), and then measures the frequency and amplitude of the signals.  As Altenbach pointed out in one of your other threads, most math functions are polymorphic.  The Pressure Transducers' Calibration.vi can be simplified substantially by using scalars. See image below.  The frequency measurement is done by the Tone Measurements express VI.  If you open the front panel of that VI and dig down far enough, you find that ultimately it uses FFT.vi to make the measurement.  Although not well documented, the FFT works best if it has several complete cycles of the signal to be measured.  Three cycles is often enough but 10 or more is better. For three cycles at 0.05 Hz, you will need at least 60 seconds of data.  The sample rate should be fast enough to get a minimum of about 10 samples per cycle.  More is better, up to the point where the size of the data arrays or the FFT calculation times become an issue. The sample rate must also be fast enough to adequately sample the fastest component in your signals.

 

The optimum scan parameters may depend on the DAQ hardware and how it transfers data to the computer, so I cannot help with that.

 

Lynn

 

Pressure Cal.png

0 Kudos
Message 8 of 10
(3,482 Views)

Hi johnsold,

Thank you for your reply. I want to aska question for my problem.

 

I want to cut off / omit the first period ( I have circled with green colour as can be seen from the attachment). Because, the first period is scattering and different than other periods because of huge peaks and valleys.Then I want to make any analysis of sinusoidal waveform after cutting off the first period. Could you please help me? Please help..

0 Kudos
Message 9 of 10
(3,470 Views)

Use the Array Subset primitive and set the Index input to a value which excludes the first cycle.  In your image the value would correspond to about 1500-2000 on the horizontal axis.  I am not sure whether that axis is scaled fro the index numbers.  The length input to Array Subset defaults to the rest of the array so it does not need to be connected.

 

Lynn

0 Kudos
Message 10 of 10
(3,466 Views)