How to parse the received CSI data?

Guanxiong
Posts: 2
Joined: Mon Mar 21, 2022 4:41 pm

How to parse the received CSI data?

Postby Guanxiong » Mon May 09, 2022 11:47 pm

This is an example of my collected CSI: [79 112 4 0 -1 22 -1 23 0 21 0 21 0 22 1 21 1 21 2 21 3 20 6 21 5 20 5 20 6 21 6 20 6 22 6 21 5 23 4 22 3 21 2 21 1 20 1 20 1 21 0 19 -2 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 18 -4 19 -4 19 -5 20 -6 19 -8 20 -9 19 -10 19 -10 18 -10 18 -10 21 -10 20 -10 19 -9 18 -10 18 -8 19 -9 19 -7 18 -7 19 -7 19 -7 19 -5 20 -5 20 -3 22 -3 22 -3 23 ]

I found this description about CSI info. in ESP32 documentation: The CSI data corresponding to each Long Training Field (LTF) type is stored in a buffer starting from the buf field. Each item is stored as two bytes: imaginary part followed by real part. And the first four bytes are invalid due to ESP32 hardware limitations . :shock:

In my mind, this CSi should be re-formed like this: [-1j+22, -1j+23, 0j + 21, ------, -3j + 23.]. However, I can see some very large values (22, 23, 21, etc.) but theoretically, CSI amplitude should be around or smaller than 1. Is the CSI data scaled accordingly (I set 'manu_scale' to False in 'wifi_csi_config_t')? :cry:

My query is do I parse the CSI data correctly?

Songluu
Posts: 5
Joined: Fri Nov 04, 2022 4:26 am

Re: How to parse the received CSI data?

Postby Songluu » Fri Nov 04, 2022 4:31 am

Hello, I have encountered the same problem. How did you deal with it finally?

sayid_ehd
Posts: 1
Joined: Sun Nov 10, 2024 9:38 am

Re: How to parse the received CSI data?

Postby sayid_ehd » Sun Nov 10, 2024 9:55 am

Hi there,
I have found a way to get the Amplitude but not the phase. It's in the ESP-CSI repo https://github.com/espressif/esp-csi/bl ... d_parse.py
I tried to get the phase from the angle of each pair of data. But I don't think it's accurate, since it oscillates between Pi and -Pi no matter the environment.
If you have resolved the problem, please share your solution with us. Thanks :D

aliarifat794
Posts: 200
Joined: Sun Jun 23, 2024 6:18 pm

Re: How to parse the received CSI data?

Postby aliarifat794 » Mon Nov 11, 2024 12:42 pm

You can use numpy for this purpose.

Who is online

Users browsing this forum: No registered users and 145 guests