linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Simulate Radio wave interference
@ 2020-03-16 15:42 Johannes Berg
  2020-03-18  8:17 ` Masashi Honma
  2020-03-22  0:34 ` Masashi Honma
  0 siblings, 2 replies; 6+ messages in thread
From: Johannes Berg @ 2020-03-16 15:42 UTC (permalink / raw)
  To: Masashi Honma; +Cc: linux-wireless

Hi,

It's a bit over three years ago you wrote this, so perhaps you won't
really remember, but I'm not sure I can make sense of the code and
wanted to ask if you can help out.

In particular, I'm wondering about the timing aspects of this
interference simulation.

The commit message says:

> In real space, there could be interference of radio waves. This commit
> considers a radio wave which has signal strength under
> CCA_THRESHOLD(-90) causes interference. This commit accumulates such
> radio wave signal strength and decreases it from tx power.

I don't see this - the signal strength is just taken as is, and
overwritten, so there's no accumulation going on?

And the timing is just odd - the duration of the interference is added
to at the *end* of each transmission, and every 10 ms the duration of
the interference is calculated into a probability?


I'd have expected this to be something like have a list of signals, with

 * transmitter (location)
 * signal strength

added to the list at the beginning and removed at the end. Or
alternatively, perhaps easier to use, for each destination station the
cumulative noise received at there from far away transmissions, already
weighed by distance (though that's tricky since stations can move).

Then, when actually "transmitting" the frame, check that value, or sum
up all the lists by location/fading by distance.


I guess my question really is how what's actually implemented is meant
to map to the physical world?


Thanks,
johannes


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

* Re: Simulate Radio wave interference
  2020-03-16 15:42 Simulate Radio wave interference Johannes Berg
@ 2020-03-18  8:17 ` Masashi Honma
  2020-03-22  0:34 ` Masashi Honma
  1 sibling, 0 replies; 6+ messages in thread
From: Masashi Honma @ 2020-03-18  8:17 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On 2020/03/17 0:42, Johannes Berg wrote:
> Hi,
> 
> It's a bit over three years ago you wrote this, so perhaps you won't
> really remember, but I'm not sure I can make sense of the code and
> wanted to ask if you can help out.

Please give me some time to answer.

Regards,
Masashi Honma.

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

* Re: Simulate Radio wave interference
  2020-03-16 15:42 Simulate Radio wave interference Johannes Berg
  2020-03-18  8:17 ` Masashi Honma
@ 2020-03-22  0:34 ` Masashi Honma
  2020-03-23  9:11   ` Johannes Berg
  1 sibling, 1 reply; 6+ messages in thread
From: Masashi Honma @ 2020-03-22  0:34 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On 2020/03/17 0:42, Johannes Berg wrote:
 > I don't see this - the signal strength is just taken as is, and
 > overwritten, so there's no accumulation going on?

Right. The signal strength is not accumulated. The commit log is wrong.
The interference model is accumulating frame duration to calculate
probabilities. About accumulation of signal strength, it could be
calculated as vector. I wrote about it in response to realistic
simulation.

I think I should explain the concept of this interference model.
The interference model assumes signals which strength is under CCA
threshold are interference signal. The model accumulates the duration
of such signals. The model assumes (accumulated duration / time slot)
is probability of occurrence of interference. When interference occurs,
the model reduce the max signal strength of interfering STA from
transmitting STA's signal strength.

Though the implementation is not among the concept of the model. The
signal strength from node A to B was calculated and wrongly accumulated
to interference duration of "A to all".

I fixed it to "A to B" and sent a Pull Request to wmediumd.
https://github.com/bcopeland/wmediumd/pull/22

 > I guess my question really is how what's actually implemented is meant
 > to map to the physical world?

To get closer to real world, it is necessary to consider the phase of
radio wave. A radio wave could be weakened by radio waves which has
opposite phase.

Calculation of radio wave phase of multi signals could be described by
electric field created by mesh node antenna. By using this electric
field model, we could accumulate some interference signals as vector.

I have an idea of implementation. Though I need some more time to
implement this.

Regards,
Masashi Honma.

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

* Re: Simulate Radio wave interference
  2020-03-22  0:34 ` Masashi Honma
@ 2020-03-23  9:11   ` Johannes Berg
  2020-03-24  9:55     ` Masashi Honma
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2020-03-23  9:11 UTC (permalink / raw)
  To: Masashi Honma; +Cc: linux-wireless

On Sun, 2020-03-22 at 09:34 +0900, Masashi Honma wrote:
> On 2020/03/17 0:42, Johannes Berg wrote:
>  > I don't see this - the signal strength is just taken as is, and
>  > overwritten, so there's no accumulation going on?
> 
> Right. The signal strength is not accumulated. The commit log is wrong.

OK.

> The interference model is accumulating frame duration to calculate
> probabilities.

But it's doing it on the *previous* interval, and then affects the
*next* interval, right? In terms of timing.

I don't really have any objection to this, just trying to understand it
- mostly because I'm trying to use wmediumd for simulation and want the
timing to be better at least in that case.

> I think I should explain the concept of this interference model.
> The interference model assumes signals which strength is under CCA
> threshold are interference signal. The model accumulates the duration
> of such signals. The model assumes (accumulated duration / time slot)
> is probability of occurrence of interference. When interference occurs,
> the model reduce the max signal strength of interfering STA from
> transmitting STA's signal strength.

Right. What threw me off was the fact that it's accumulated over a
previous period, and then affects the current period, which seemed odd
because I was thinking about my simulation more than just an arbitrary
model. I guess it's fine for whatever you were trying to achieve, and
simply doesn't fit what I'm trying to do.

I'll need to figure out how to reconcile the different ways of thinking
here.

> Though the implementation is not among the concept of the model. The
> signal strength from node A to B was calculated and wrongly accumulated
> to interference duration of "A to all".

Heh, ok.

> I fixed it to "A to B" and sent a Pull Request to wmediumd.
> https://github.com/bcopeland/wmediumd/pull/22

I _really_ didn't mean to coax you into fixing anything, just trying to
understand. That said, those changes look good to me.


> To get closer to real world, it is necessary to consider the phase of
> radio wave. A radio wave could be weakened by radio waves which has
> opposite phase.

While that's true, is it really necessary? Even if the signals are in
phase, you're going to have a hard time differentiating between the two,
and the frame will be lost either way, no?

I think from a timing aspect, checking if two signals are in phase will
be practically impossible - we're talking about less than 1us timing
differences (0.2 at 5 GHz), if I'm doing the math correctly?

> Calculation of radio wave phase of multi signals could be described by
> electric field created by mesh node antenna. By using this electric
> field model, we could accumulate some interference signals as vector.
> 
> I have an idea of implementation. Though I need some more time to
> implement this.

Again, for the record, I really just wanted to clarify that I was
understanding things correctly! Not to coax you into implementing
anything.

Thanks for the help!

johannes


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

* Re: Simulate Radio wave interference
  2020-03-23  9:11   ` Johannes Berg
@ 2020-03-24  9:55     ` Masashi Honma
  2020-03-24 12:36       ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Masashi Honma @ 2020-03-24  9:55 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1472 bytes --]

On 2020/03/23 18:11, Johannes Berg wrote:
 > But it's doing it on the *previous* interval, and then affects the
 > *next* interval, right? In terms of timing.

Yes.
This model using previous traffic to estimate next traffic.

 > I _really_ didn't mean to coax you into fixing anything,
 > just trying to understand.

Of course I recognize.
I fixed it because I happen to find a bug when I was studying the code.

 > While that's true, is it really necessary? Even if the signals are in
 > phase, you're going to have a hard time differentiating between the two,
 > and the frame will be lost either way, no?

 > I think from a timing aspect, checking if two signals are in phase will
 > be practically impossible - we're talking about less than 1us timing
 > differences (0.2 at 5 GHz), if I'm doing the math correctly?

I do not mean just in phase or opposite phase. Of course it could not
be happened in real world.

I mean two or more radio waves composes a mixed wave.

Refer attached pictures.
Assume horizontal axis represents distance, vertical axis represents
signal strength. f(x) is original wave, g(x) is interference wave
and h(x) = f(x) + g(x).
On wave1.png of the distance 2, h(x) is 0.5.
On wave2.png of the distance 2, h(x) is 0.2.
I mean signal strength varies with phase.

 > Again, for the record, I really just wanted to clarify that I was
 > understanding things correctly! Not to coax you into implementing
 > anything.

OK.

Regards,
Masashi Honma.

[-- Attachment #2: wave1.png --]
[-- Type: image/png, Size: 40529 bytes --]

[-- Attachment #3: wave2.png --]
[-- Type: image/png, Size: 38571 bytes --]

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

* Re: Simulate Radio wave interference
  2020-03-24  9:55     ` Masashi Honma
@ 2020-03-24 12:36       ` Johannes Berg
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2020-03-24 12:36 UTC (permalink / raw)
  To: Masashi Honma; +Cc: linux-wireless

Hi,

>  > I think from a timing aspect, checking if two signals are in phase will
>  > be practically impossible - we're talking about less than 1us timing
>  > differences (0.2 at 5 GHz), if I'm doing the math correctly?
> 
> I do not mean just in phase or opposite phase. Of course it could not
> be happened in real world.
> 
> I mean two or more radio waves composes a mixed wave.
> 
> Refer attached pictures.

Sure, but that's even worse? You need significantly less than
microsecond granularity to take this effect into account, and then you'd
have to probably also take distance into account for propagation time
etc.?

Anyway, I don't have a problem with the old model and don't have a need
for a different (even if perhaps better) one. Really what I'm mostly
thinking about is the MAC vs. air stuff, see my other email.

johannes


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

end of thread, other threads:[~2020-03-24 12:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 15:42 Simulate Radio wave interference Johannes Berg
2020-03-18  8:17 ` Masashi Honma
2020-03-22  0:34 ` Masashi Honma
2020-03-23  9:11   ` Johannes Berg
2020-03-24  9:55     ` Masashi Honma
2020-03-24 12:36       ` Johannes Berg

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).