Table of Contents
How to use FFT web
FFT Web is an Out-Of-Tree (OOT) block which sends a signal FFT by UDP to a websocket server. This websocket server packs and broadcasts this FFT data to websockets which can be opened by html/javascript code for real-time display of the fft in web-browsers (don't worry, we are providing that part ;) ).
The FFT Web block is part of the CorteXlab OOT module, but it can also be found on github.
How to use FFT Web block
FFT web is an FFT sink block you have to feed with the signal you want to analyze. For example you can put it just after a USRP Source block to act as a spectrum analyzer.
FFT Web can be tuned with several parameters :
- fft_size The size of the FFT ( 256 is a good start)
- power max The upper limit of the measured power in dB (-30 is a good start)
- power min The lower limit of the measured power in dB (-100 is a good start)
- port The port used to send the data. Useful when you are using multiple FFT Web blocks. (default is 6663)
- frame rate The frequency of the acquisition (10 is a good start)
- samp rate This corresponds to the bandwidth of the signal
- ip address The address of the websocket server the data will be sent to. The address of our server is “srvwww.cortexlab.fr”.
The resolution of the graph will be samp rate/fft size
.
How to see the result
To see the live results you can go to our web page http://xp.cortexlab.fr/fft/.
You will land on an empty page because you will have to configure the graphs corresponding to each of your FFT Web block. There are several parameters to set up before adding a new graph :
- host The address of the websocket server to connect to (except in special situations, you should not need to change the default value)
- port The port to use (except in special situations, you should not need to change the default value)
- UDP port This corresponds to the port set up in the FFT Web block
- width Width of the new graph
- height Height of the new graph
- rearrange halves This is needed to display properly the result of an FFT
- mean window Width of the sliding window used to compute a mean value to display
- title Title of the new graph
- x_min Label for the lower limit of the X axis
- x_max Label for the upper limit of the X axis
- y_min Label for the lower limit of the Y axis
- y_max Label for the upper limit of the Y axis