How does the Simulink HDL Optimized FFT/IFFT block alter the data ordering when processing a multi-sample (4×1 vector) input, and what additional reordering steps needed?

6 vues (au cours des 30 derniers jours)
I am working on an OFDM system where I generate a time-domain signal using an IFFT and then aim to recover the original signal with an FFT. When I process the signal using a scalar (single-channel) input, the IFFT-to-FFT chain restores the original signal correctly because the FFT algorithm internally handles bit-reversal and reordering to output the data in natural order. However, when I use a 4×1 vector input—thereby processing multiple samples simultaneously—the recovered signal appears misordered, and the original signal is not accurately restored.
I suspect this issue arises because the Simulink HDL Optimized FFT/IFFT block treats multi-sample (or multi-channel) inputs differently, possibly employing a continuous versus interleaved ordering scheme or different bit/digit reversed output formats compared to the natural order used for scalar inputs. Consequently, the output ordering does not match the original input, causing the IFFT-to-FFT processing to fail in accurately reassembling the signal.
Could you kindly provide a detailed explanation of how the block handles the indexing and interleaving of multi-sample inputs? Additionally, I would appreciate guidance on what extra reordering steps or modifications to the OFDM code are needed to rearrange the FFT output back to natural order, ensuring that the original signal is correctly restored.
I am asking this question because, when using FFT/IFFT in LabVIEW, if multiple data points are input in vector form within a single clock cycle, the input and output vectors end up in different array orders, as shown in the figure below. I would like to know whether the same phenomenon occurs with Simulink’s HDL IFFT/FFT. If you have any resources or code that demonstrate this, I would be very grateful.
https://www.ni.com/docs/ko-KR/bundle/labview-nxg-fpga-module-cdl-api-ref/page/fft-single-channel-multiple-samples.html
Thank you for your assistance.

Réponses (1)

Bharath Venkataraman
Bharath Venkataraman le 28 Mai 2025
Modifié(e) : Bharath Venkataraman le 28 Mai 2025
An easy way to figure out if the data is the same is by feeding the data in as a scalar and as 4x1 - you can take the input and output data to the workspace and see if it is the same. An input of 4x1 does imply that these are 4 continuous samples (not 4 channels).
Did you set the Output in bit-reversed order setting on the FFT block appropriately? I think you want that option to be set so you get bit natural order data in.
It is also possible that you are feeding the 4x1 input data in the reverse order.
Take a look at this FFT example and see if that helps answer your question.
The FFT block help page provides information on the settings you can use to spoecify input/output order.

Produits


Version

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by