08-12-2015 08:38 AM
I am simulating a sine wave at approximately 1000 Hz (i am varying the frequency using a slider), i wish to pass this signal through a low pass filter (butterworth) with a high cuttoff frequency of 2200 Hz and a low cut of frequency of 2900 Hz. However the output frequency after the filter appears to be lower in the order of a thousand. the output frequency is approximately 0.1 Hz.
Is there any one that can please guide me to solving this problem, i have tried various filters and i am still having this problem, could it be incorrect sampling?
I have attached the block diagram as well as the front panel
Solved! Go to Solution.
08-12-2015 09:21 AM
Because you are using express vis and the dynamic data type...
You convert the DDT signal (which contains timing information) into a DBL array to perform the filtering. The take a DBL array (which contains no timing data) and convert it into a DDT (which now contains no timing data). Hence when you try to display and analyse it you have lost all timing (frequency) data.
If you were to take the DBL array output of your filter and build a waveform and supply the dt for the waveform from the sampling frequency control then it will work.
Better still, ditch the DDT and use waveforms from the start 🙂
08-13-2015 04:14 AM
Hi Stuart.Parkins
I have tried this and it seems to be working well, i realised my error now, thank you for assisting me with this (and educating me in the process), however i am not entirely sure what you mean by use waveforms from the start? are you suggesting I should not simulate a signal using that specific vi?
Thank you again much appreciated
08-13-2015 05:33 AM
Hi Pritz,
Dynamic Data Type is used exclusively by the Express vis and was designed to 'make things easy' if all you are using is the Express vis. As soon as you want to use other vis (such as your filter) you need to convert the DDT to something else, and that can be slow and a nuisance.
You could have used the Filter express vi and fed your DDT straight into it and that would also have worked.
You can generate a sin Waveform type using the Waveform->Analog Wfm->Generation->Sine Waveform.vi (also on the Signal Processing pallette)
I would generally advise learning how to do things the 'long way round' without using the Express vis. They might be convenient for quick jobs but you get much more control over what is going on if you use the non-express vis.
08-13-2015 08:15 AM
yeah im still getting to know labview abit better and am still a novice so your advice has helped me tremendously, i have connected my labview vi to a signal generator using a usb 20-20 board however the response of the system to a change in frequency is rather 'slow' i see a change on my labview wavegraph approximately 10 seconds after i have turned te knob on the signal generator could this also be due to the changing of dynamic data?
08-13-2015 09:11 AM
No, thats not your problem I'm sure.
I would guess it is more to do with the sampling rate / number of samples you have set up. Can you post your vi and tell me what you have set for sampling rate and number of samples?
08-14-2015 03:00 AM
I took your advice and it seems to be working, i initially had equal sampling rate and samples per channel once i changed it to a higher sampling rate and lower samples per channel the response is now quicker, i have attached my vi and pasted a front panel below.