Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to plot CSI amplitude vs Time #58

Open
abhinav2938 opened this issue Mar 28, 2019 · 7 comments
Open

How to plot CSI amplitude vs Time #58

abhinav2938 opened this issue Mar 28, 2019 · 7 comments

Comments

@abhinav2938
Copy link

Hi,
I am able to receive the CSI amplitude vs no. of packets graph. But I don't know how to plot it in time domain. I know that the graph of CSI amplitude vs no. of packets gives data in time domain, but I want it specifically to plot amplitude vs time because I need to further process it for generating spectrogram. I am attaching one screenshot of my plot.
Any help is highly appreciated.
amp vs packet

@shulinyang
Copy link

请问您是用路由器进行发送吗

@army-mehak
Copy link

Hi @abhinav2938
I wish I could help you!
I have a question. How did you manage to calculate amplitude vs packet number?
From @xieyaxiongfly tool, I have managed to read my ".dat" file on Matlab.
image

How did you calculate the amplitude?
Thank you!!

@abhinav2938
Copy link
Author

Hi,

Calculating the CSI amplitude is very easy once you get the CSI complex data. Just take the absolute value of the CSI amplitude and use db to convert it into the decibel scale. For plotting the CSI amplitude vs no. of packet just create a loop which runs n times(no. of packets collected). e.g. if you collected 100 packets, just create a loop which runs 100 times and calculates the value of CSI amplitude for each loop. Then you can plot the CSI amplitude.

@army-mehak
Copy link

As what I understood, I did this in matlab
image

Am I right?
How would I plot then?

@abhinav2938
Copy link
Author

Did you try looking at this page:
get_csi_streams it is really helpful and easily available.
First, you need to streamline the CSI data from each Tx-Rx pair, i.e. collect the CSI data from one pair(in your case it would be 4 as 2*2). Once you store it in a cell array, you can use proper indexing to get the CSI value from one pair, in a matrix form and then use plot function to plot the graph.

The above code converts the CSI complex values into db values and again store it in a cell array, you can't plot from a cell array. you will have to extract the CSI amplitude value in a matrix form and then you can plot function to plot it.

@vibhorrawal
Copy link

Still not able to plot, after implementing above solution

@SumaiyaRahmat
Copy link

can anyone please tell me how to plot csi amplitude vs no of packets in matlab?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants