08-27-2016 10:06 AM - edited 08-27-2016 10:07 AM
Hi,
I am implementing my control algorithm using Compact RIO-9022, and I have to know the velocity and acceleration from the position signals (1st and 2nd derivative of position).
I have used the Savitsky-Golay filter to calculate derivatives and smooth signals in Scan mode, and it performs a nice job. But the max scan speed is too slow, scan period >=1ms, in this mode.
So, I am transferring files to FPGA style. But there is no exsiting S-G VIs like in scan mode.
Is there any advance to implement S-G filter on FPGA for beginner? or is it possible?
Thank you in advance.
Wang
08-27-2016 11:43 AM - edited 08-27-2016 11:46 AM
I haven't done a lot with FPGA, and am not up-to-date on how well it handles non-integer arithmetic currently, but I see no reason you couldn't program a Savitzky-Golay Filter in a manner comparable to the Point-by-Point functions on the Signal Processing Palette. If it's not obvious how these work, put the Median Point-by-Point filter on an empty Block Diagram and simply "open it up" -- it is coded in "ordinary LabVIEW" with a helper sub-VI, also coded in LabVIEW. It shows how to initialize a point-by-point operation and what to do when the "next point" comes in.
Of course, you'll need code to implement the specific S-G filter you want. There are some good references on how to do this on the Web. And, will you look at that, there's an S-G filter in the Point-by-Point Palette -- if you can't use it directly in FPGA, maybe you could "adapt" its code ...
Bob Schor
08-29-2016 02:47 AM
Thank you for your reply.
I have tried to implement the S-G filter followed the exsiting subVIs, but I failed to transfer the data format... array format cannot be used in FPGA mode...
I used the butterworth filter to do rough smoothing in the last... Hope I can get more information during the FPGA studying..