06-07-2013 09:30 AM
Is there a way to Implement a bandstop filter within the NIVS framework?
I have a PID loop feedback channel with oscillations in a very specific frequency range. I would like to attenuate in just that range.The Lowpass functionality in the Calculated Channels will not help me out.
Thanks,
PatM
Solved! Go to Solution.
06-10-2013 04:55 PM
Hi Pat,
Do you have LabVIEW? If you do you can create a LabVIEW model as described in this white paper, http://www.ni.com/white-paper/11135/en , and implement a bandstop filter into Veristand from this model. You can find the Equi-Ripple BandStop.vi on your functions palette under Signal Processing>>Filters.
06-11-2013 06:06 AM
Equi-Ripple Banndstop.vi requires an array to be passed in and then passes an array of filtered data out.
My understanding of how the Veristand Engine works is that one datapoint per channel is passed between the Primary Control Loop and the Model Execution loops for every iteration of the PCL. If this is the case, how do you pass arrays of data?
...or am I misunderstanding how this works?
PatM
06-12-2013 01:59 PM
Hi Pat,
I checked into this and while you should be able to write arrays from your LabVIEW model to VeriStand and vice versa, there is currently a problem that is being worked on related to this. LabVIEW Models will generate an Nx1 array while VeriStand expects a 1XN array. However, this check does not occur when you are pulling values from a text file. Therefore, you can work around this problem by writing to and from a text file when you need to pass arrays of values between VeriStand and a LabVIEW model.
If you'd like to track the progress of this problem, you can watch for the number, 402293, in our bug fixes document we publish with each new release of VeriStand.
I hope this helps.
06-17-2013 04:59 PM
Hi Pat,
A colleague of mine pointed out something I missed here and I wanted to pass it on to you. A simpler and more effective implementation for you would be the Point by Point Filter VIs available in LabVIEW. You can see how to navigate to this palette in the picture below. This should make working with VeriStand much easier for you. I hope this helps, and I apologize for not bringing it up earlier.
06-25-2013 02:04 PM
I tried out using the point by point bandstop filter in my model. I stuck it in a Case structure so I could turn it on and off. When it is off the output matches the input as expected. When it is on the output goes to zero.
The x input is a millivolt level voltage channel scale to represent load. The other vi inputs are as follows:
higher pass frequency - 40 Hz
lower pass frequency - 0 Hz
higher stop frequency - 22
lower stop frequency - 17
# of taps - 33
sampling frequency - 600 Hz (first try)
- 100 Hz (second try)
PCL loop rate - 600
What is wrong?
Thanks,
PatM
06-26-2013 06:03 PM
Hi Pat,
Do you know what frequency the signal your getting in is? Have you tried running it through an FFT to see what frequencies are present in the signal in order to make sure it's not between your stop frequencies?
06-27-2013 06:37 AM
oops!
I read through the help file for the Pt. by Pt. Bandstop vi and discovered that setting the lower pass frequency to 0 will cause the the output to be 0. I changed the lpf to 1 and the problem was resolved. There is however, a pretty significant offset that varies with the amplitude of the input. Is there any adjustments I can make to the input parameters that will minimize the offset?
Thanks,
PatM
06-28-2013 02:36 PM
Hi Pat,
What kind of offset are you seeing? Is your signal showing a higher amplitude than the input, or lower than the input, or something else entirely? Could you show a side by side example of what you're expecting and what you're getting, or describe it?
07-01-2013 05:39 AM
I changed the location of the bandstop filter within my PID loop and that resolved the offset problem. Everything seems to be working well now.
Thanks for your help,
PatM