Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

myRIO FPGA FFT Express VI timing analysis for multiple input mode - trying to perform fft's on a 3-axis accelerometer

Hi Everyone!

 

Project Background:

I've been working with the myRIO FPGA in an attempt to generate an application capable of sampling a tri-axis accelerometer and performing an fft on each axis. I've successfully developed an application for a single axis, but attempting to duplicate the code to sample the second and third axes in parallel results in an estimated 150% resource utilization for the tiny FPGA's LUT's. Additionally, I'm looking to avoid sequentially processing each accelerometer input using triggers and a single fft block because that reduces my fft update frequency significantly (e.g. I can't calculate another fft for input 1 until I calculate an fft for inputs 2 and 3).

 

After reading up on the fft vi, I'm thinking that I can use the M-interval input indexes / Continuous output indexes Input/Output Index Pattern mode. My thought is that I can edit the vi to remove any math that "recombines" these three vectors into a single fft, resulting in 3 separate fft's. I'm also hoping that this process requires less time than using the sequential method described above. 

 

The Questions:

1. Has anyone done an fft on three inputs using the myRIO at sampling rates > 20kHz and fft sizes of 1024 or larger? If so, I may just be lacking some proper resource management.

2. Does anyone know where to find timing information on the M-interval input indexes / Continuous output indexes Input/Output Index Pattern mode? The manual only provides timing diagrams for singel channel / single input modes. I don't want to waste my time modifying the vi if it will still take 3x as long (assuming modifying the vi is even a possibility).

 

Further Information:

I already have an application written that samples the accelerometers at >20kHz and then performs the fft on the main processor, but now I'm looking to see if it is possible to perform all signal processing on the FPGA side. The processor performs decently enough, but the timing is not as consistent as I would like it to be. Lastly, I am aware that the myRIO itself has a built in accelerometer, but I need to mount the accelerometer in an environment where the myRIO would probably be damaged and definitely cannot fit.

 

Any thoughts are much appreciated! The excessive FPGA compile times for this thing make the old guess and check method less appealing.

 

-Chris 

0 Kudos
Message 1 of 4
(5,558 Views)

Hi Chris,

 

Thanks for posting and the detailed background on the project! To answer some of your questions:

 

1. The FFT Express VI does use a significant amount of space. The FPGA on the myRIO is somewhat limited space-wise. Your best option may to implement the FFT for 1 channel on the FPGA and the other two on the RT side.

 

2. I converted the FFT Express VI to a subVI and I am not sure if you can trim too much code from it. The subVI is also very complex so re-working it would be a significant amount of work. I could not find much documentation on M-interval input indexes / Continuous output indexes Input/Output Index Pattern mode timing. 

 

I hope that this helps!

0 Kudos
Message 2 of 4
(5,526 Views)
Dear Chris I will be thankful to you, if you please send me your one axis accelerometer FFT on FPGA ,here or on my mail, this may help me in my problem.
Eng M Samy
Teaching Assistant faculty of engineering
Eng_M.Samy_m2@hotmail.com
0 Kudos
Message 3 of 4
(4,917 Views)

Hi Eng,

 

Thanks for posting on the forums looking for help with your application. Because Chris's code is his own intellectual property, it's generally better practice to ask for guidance on your own code instead of trying to modify other programmer's code. If you have a specific question on your FPGA code, you can always make a new post in the LabVIEW forum and get help from other contributors.

 

If you're looking for a starting spot to write LabVIEW code with FPGA and the FFT, there are some great examples in the NI Example Finder that demonstrate this functionality. I would recommend looking in the Hardware Input and Output folder, and then opening CompactRIO --> Signal Generation and Processing --> Analog --> Measurement --> FFT and viewing the code contained in the FFT project. 

 

 

Austin H.
Chief Product Manager
Test Software
0 Kudos
Message 4 of 4
(4,886 Views)