ath9k-devel.lists.ath9k.org archive mirror
 help / color / mirror / Atom feed
* [ath9k-devel] ath9k: spectral scan -vs- channel state information
@ 2016-04-12 22:05 Dan
  2016-04-12 22:20 ` Adrian Chadd
  0 siblings, 1 reply; 7+ messages in thread
From: Dan @ 2016-04-12 22:05 UTC (permalink / raw)
  To: ath9k-devel

Hi

I am having some trouble understanding the difference between 
channel state information (often requested on the mailing list)
 and what is currently available via spectral scan.


My understanding is as follows;
- spectral scan (once triggered via the debugfs) logs 
channel state estimation for each of the 56 ofdm subcarriers
 (HT20 case). In the spectral code (for ath9k), the channel state 
info is the I and Q values for the subcarriers.
For ath9k, the bulk of the code is in ath_process_fft 


Bits I dont understand :
Can channel state information be collected on a more general 
basis ? --- for example for each phy packet received.

Also, the calibration (ar9003_calib) seems to gather I and Q 
data also... but its not clear when this is run/collected and used.

Any help appreciated....

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ath9k-devel] ath9k: spectral scan -vs- channel state information
  2016-04-12 22:05 [ath9k-devel] ath9k: spectral scan -vs- channel state information Dan
@ 2016-04-12 22:20 ` Adrian Chadd
  2016-04-13  8:40   ` Dan
  0 siblings, 1 reply; 7+ messages in thread
From: Adrian Chadd @ 2016-04-12 22:20 UTC (permalink / raw)
  To: ath9k-devel

On 12 April 2016 at 15:05, Dan <aidan@plezica.com> wrote:
> Hi
>
> I am having some trouble understanding the difference between
> channel state information (often requested on the mailing list)
>  and what is currently available via spectral scan.
>
>
> My understanding is as follows;
> - spectral scan (once triggered via the debugfs) logs
> channel state estimation for each of the 56 ofdm subcarriers
>  (HT20 case). In the spectral code (for ath9k), the channel state
> info is the I and Q values for the subcarriers.
> For ath9k, the bulk of the code is in ath_process_fft

Right. And it's sent over as a PHY error frame.

> Bits I dont understand :
> Can channel state information be collected on a more general
> basis ? --- for example for each phy packet received.

No. There's not enough bandwidth available in the PHY->MAC connection
to also throw over that much data per packet. So, you get to trigger
it once, and then the next packet gets the CSI data dumped into a
memory region in the chip somewhere. Then you read it out.

> Also, the calibration (ar9003_calib) seems to gather I and Q
> data also... but its not clear when this is run/collected and used.

> Any help appreciated....

That's part of ADC calibration. The idea is to calibrate differences
in ADCs on the I and Q side of things.



-adrian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ath9k-devel] ath9k: spectral scan -vs- channel state information
  2016-04-12 22:20 ` Adrian Chadd
@ 2016-04-13  8:40   ` Dan
  2016-04-13 18:52     ` Adrian Chadd
  0 siblings, 1 reply; 7+ messages in thread
From: Dan @ 2016-04-13  8:40 UTC (permalink / raw)
  To: ath9k-devel

Adrian Chadd <adrian <at> freebsd.org> writes:

> 
> On 12 April 2016 at 15:05, Dan <aidan <at> plezica.com> wrote:
> > Hi
> >
> > I am having some trouble understanding the difference between
> > channel state information (often requested on the mailing list)
> >  and what is currently available via spectral scan.
> >
> >
> > My understanding is as follows;
> > - spectral scan (once triggered via the debugfs) logs
> > channel state estimation for each of the 56 ofdm subcarriers
> >  (HT20 case). In the spectral code (for ath9k), the channel state
> > info is the I and Q values for the subcarriers.
> > For ath9k, the bulk of the code is in ath_process_fft
> 
> Right. And it's sent over as a PHY error frame.
> 
> > Bits I dont understand :
> > Can channel state information be collected on a more general
> > basis ? --- for example for each phy packet received.
> 
> No. There's not enough bandwidth available in the PHY->MAC connection
> to also throw over that much data per packet. So, you get to trigger
> it once, and then the next packet gets the CSI data dumped into a
> memory region in the chip somewhere. Then you read it out.
> 
> > Also, the calibration (ar9003_calib) seems to gather I and Q
> > data also... but its not clear when this is run/collected and used.
> 
> > Any help appreciated....
> 
> That's part of ADC calibration. The idea is to calibrate differences
> in ADCs on the I and Q side of things.
> 
> -adrian
> 

Thanks. A few further questions...
For spectral scan, the I/Q values are 'estimations' based on the
 IFFT/FFT maths magic in the hardware - and not data that comes 
from transmitters (as might be the case in beam forming) 
- right ?

In the data structure for the FFT, I can't see (I may well be blind) 
where the 'phase' values are 
stored (Q).... it seems to mention only 'magnitude' 
which I am assuming is the magnitude of 
the signal (I)
thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ath9k-devel] ath9k: spectral scan -vs- channel state information
  2016-04-13  8:40   ` Dan
@ 2016-04-13 18:52     ` Adrian Chadd
  2016-05-09  1:42       ` Allen Welkie
  0 siblings, 1 reply; 7+ messages in thread
From: Adrian Chadd @ 2016-04-13 18:52 UTC (permalink / raw)
  To: ath9k-devel

On 13 April 2016 at 01:40, Dan <aidan@plezica.com> wrote:
> Adrian Chadd <adrian <at> freebsd.org> writes:
>
>>
>> On 12 April 2016 at 15:05, Dan <aidan <at> plezica.com> wrote:
>> > Hi
>> >
>> > I am having some trouble understanding the difference between
>> > channel state information (often requested on the mailing list)
>> >  and what is currently available via spectral scan.
>> >
>> >
>> > My understanding is as follows;
>> > - spectral scan (once triggered via the debugfs) logs
>> > channel state estimation for each of the 56 ofdm subcarriers
>> >  (HT20 case). In the spectral code (for ath9k), the channel state
>> > info is the I and Q values for the subcarriers.
>> > For ath9k, the bulk of the code is in ath_process_fft
>>
>> Right. And it's sent over as a PHY error frame.
>>
>> > Bits I dont understand :
>> > Can channel state information be collected on a more general
>> > basis ? --- for example for each phy packet received.
>>
>> No. There's not enough bandwidth available in the PHY->MAC connection
>> to also throw over that much data per packet. So, you get to trigger
>> it once, and then the next packet gets the CSI data dumped into a
>> memory region in the chip somewhere. Then you read it out.
>>
>> > Also, the calibration (ar9003_calib) seems to gather I and Q
>> > data also... but its not clear when this is run/collected and used.
>>
>> > Any help appreciated....
>>
>> That's part of ADC calibration. The idea is to calibrate differences
>> in ADCs on the I and Q side of things.
>>
>> -adrian
>>
>
> Thanks. A few further questions...
> For spectral scan, the I/Q values are 'estimations' based on the
>  IFFT/FFT maths magic in the hardware - and not data that comes
> from transmitters (as might be the case in beam forming)

Hm. Well, everything's based on whatever the signal source is, sure.
In this instance, it's based on estimations from the two ADC signals
(one I, one Q) for each of the OFDM buckets. What you get is the
magnitude of both combined, not separate I and Q values.

> - right ?
>
> In the data structure for the FFT, I can't see (I may well be blind)
> where the 'phase' values are
> stored (Q).... it seems to mention only 'magnitude'
> which I am assuming is the magnitude of
> the signal (I)

Well, there's magnitude and phase, and it gives you the values for
each. You have to run it through math to get a power level for each
bucket.

https://wiki.freebsd.org/dev/ath_hal%284%29/SpectralScan

You don't get separate readings for I and Q in spectral scan data.

-adrian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ath9k-devel] ath9k: spectral scan -vs- channel state information
  2016-04-13 18:52     ` Adrian Chadd
@ 2016-05-09  1:42       ` Allen Welkie
  2016-05-10  6:40         ` Robert Felten
  0 siblings, 1 reply; 7+ messages in thread
From: Allen Welkie @ 2016-05-09  1:42 UTC (permalink / raw)
  To: ath9k-devel

Adrian Chadd <adrian <at> freebsd.org> writes:


> 
> Well, there's magnitude and phase, and it gives you the values for
> each. You have to run it through math to get a power level for each
> bucket.
> 
> https://wiki.freebsd.org/dev/ath_hal%284%29/SpectralScan
> 
> You don't get separate readings for I and Q in spectral scan data.
> 
> -adrian
> 

I'm confused. You say that the spectral scan only gives the magnitude of the
I and Q values combined, not separate. But then you say that "there's
magnitude and phase, and it gives you the values for each." Doesn't that
mean that you do get both the I and Q values (after converting from
magnitude/phase values)?

Also, is this the same info that's logged in the "Atheros CSI Tool"
(https://github.com/xieyaxiongfly/Atheros-CSI-Tool)? Or is the spectral scan
data completely different?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ath9k-devel] ath9k: spectral scan -vs- channel state information
  2016-05-09  1:42       ` Allen Welkie
@ 2016-05-10  6:40         ` Robert Felten
  2016-05-18  8:56           ` Dan
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Felten @ 2016-05-10  6:40 UTC (permalink / raw)
  To: ath9k-devel

Hi Allen,

Spectral scan sum up I and Q for you and give you the magnitude it.
Since I and Q are "merged", no phase information is available.
As Adrian said, you have to run some math to get power in dBm from the
special spectral sample format.
If you are able to read Python code, here is an example for the transformation:
https://github.com/bcopeland/speccy/blob/master/spectrum_file.py#L57

If you prefer "real code", there is an implementation how to threat
the sample data in Adrians Radarlib:
https://github.com/erikarn/ath_radar_stuff/tree/master/lib/libradarpkt

The paper found on "Atheros CSI Tool" link states:
"The CSI measurements are complex values and hence contain two parts,
the amplitude and the phase."
So I guess that with CSI the I and Q values aren't merged. If you do
so, you should be able to calculate the power levels - then you should
end up with the same information like from spectral scan.
But I do not have any first hand experience with CSI, if you have any,
please share :)


If you want to play around with the spectral scan feature, I recommend
to to give Bob Copelands "Speccy" a try:
https://github.com/bcopeland/speccy


Hope this helps.

Robert

2016-05-09 3:42 GMT+02:00 Allen Welkie <allen.welkie@gmail.com>:
> Adrian Chadd <adrian <at> freebsd.org> writes:
>
>
>>
>> Well, there's magnitude and phase, and it gives you the values for
>> each. You have to run it through math to get a power level for each
>> bucket.
>>
>> https://wiki.freebsd.org/dev/ath_hal%284%29/SpectralScan
>>
>> You don't get separate readings for I and Q in spectral scan data.
>>
>> -adrian
>>
>
> I'm confused. You say that the spectral scan only gives the magnitude of the
> I and Q values combined, not separate. But then you say that "there's
> magnitude and phase, and it gives you the values for each." Doesn't that
> mean that you do get both the I and Q values (after converting from
> magnitude/phase values)?
>
> Also, is this the same info that's logged in the "Atheros CSI Tool"
> (https://github.com/xieyaxiongfly/Atheros-CSI-Tool)? Or is the spectral scan
> data completely different?
>
> _______________________________________________
> ath9k-devel mailing list
> ath9k-devel at lists.ath9k.org
> https://lists.ath9k.org/mailman/listinfo/ath9k-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ath9k-devel] ath9k: spectral scan -vs- channel state information
  2016-05-10  6:40         ` Robert Felten
@ 2016-05-18  8:56           ` Dan
  0 siblings, 0 replies; 7+ messages in thread
From: Dan @ 2016-05-18  8:56 UTC (permalink / raw)
  To: ath9k-devel

Robert Felten <robert.felten <at> googlemail.com> writes:

> 
> Hi Allen,
> 
> Spectral scan sum up I and Q for you and give you the magnitude it.
> Since I and Q are "merged", no phase information is available.
> As Adrian said, you have to run some math to get power in dBm from the
> special spectral sample format.
> If you are able to read Python code, here is an example for the transformation:
> https://github.com/bcopeland/speccy/blob/master/spectrum_file.py#L57
> 
> If you prefer "real code", there is an implementation how to threat
> the sample data in Adrians Radarlib:
> https://github.com/erikarn/ath_radar_stuff/tree/master/lib/libradarpkt
> 
> The paper found on "Atheros CSI Tool" link states:
> "The CSI measurements are complex values and hence contain two parts,
> the amplitude and the phase."
> So I guess that with CSI the I and Q values aren't merged. If you do
> so, you should be able to calculate the power levels - then you should
> end up with the same information like from spectral scan.
> But I do not have any first hand experience with CSI, if you have any,
> please share :)
> 
> If you want to play around with the spectral scan feature, I recommend
> to to give Bob Copelands "Speccy" a try:
> https://github.com/bcopeland/speccy
> 
> Hope this helps.
> 
> Robert
> 
> 2016-05-09 3:42 GMT+02:00 Allen Welkie <allen.welkie <at> gmail.com>:
> > Adrian Chadd <adrian <at> freebsd.org> writes:
> >
> >
> >>
> >> Well, there's magnitude and phase, and it gives you the values for
> >> each. You have to run it through math to get a power level for each
> >> bucket.
> >>
> >> https://wiki.freebsd.org/dev/ath_hal%284%29/SpectralScan
> >>
> >> You don't get separate readings for I and Q in spectral scan data.
> >>
> >> -adrian
> >>
> >
> > I'm confused. You say that the spectral scan only gives the magnitude of the
> > I and Q values combined, not separate. But then you say that "there's
> > magnitude and phase, and it gives you the values for each." Doesn't that
> > mean that you do get both the I and Q values (after converting from
> > magnitude/phase values)?
> >
> > Also, is this the same info that's logged in the "Atheros CSI Tool"
> > (https://github.com/xieyaxiongfly/Atheros-CSI-Tool)? Or is the spectral scan
> > data completely different?
> >
> > _______________________________________________
> > ath9k-devel mailing list
> > ath9k-devel <at> lists.ath9k.org
> > https://lists.ath9k.org/mailman/listinfo/ath9k-devel
> 


Hi Folks

I have been using both Spectral and CSI.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-05-18  8:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-12 22:05 [ath9k-devel] ath9k: spectral scan -vs- channel state information Dan
2016-04-12 22:20 ` Adrian Chadd
2016-04-13  8:40   ` Dan
2016-04-13 18:52     ` Adrian Chadd
2016-05-09  1:42       ` Allen Welkie
2016-05-10  6:40         ` Robert Felten
2016-05-18  8:56           ` Dan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).