Re: explaining i/q

2020-12-08 Thread Jeff Long
Nice! I especially like the use of dogs as local oscillators.

On Tue, Dec 8, 2020 at 10:29 AM Qasim Chaudhari 
wrote:

> Hi everyone
> Hope you're doing well. Someone pointed me towards this discussion on
> the mailing list and I thought that it's a great topic to explain without
> complex numbers, phasors, orthogonality, etc. So I wrote about it for a
> true beginner.
>
>  Instead of focusing on a small length, my main purpose was to produce
> some beautiful figures that can help one grasp why both I and Q samples are
> required.
>
> https://wirelesspi.com/i-q-signals-101-neither-complex-nor-complicated
>
> Cheers,
> Qasim
>
> From: Kristoff 
> To: discuss-gnuradio@gnu.org
> Subject: Re: explaining i/q
>
> Hi all,
>
>
> I was watching the webinar of Heather on GNU Radio today, when it came to
> me that one of the most difficult part doing a presentation of GNU Radio
> is the data-types, .. and especially these 'complex numbers'. The
> problem, or at least for me, is that when you mention 'GNU Radio complex
> numbers', you also have to mention iq-signals, which is a topic that is
> very difficult to explain in 10 seconds to an audience who has never seen
> anything about i/q sampling before. I have been thinking on how to
> explain the concept of I/Q signalling in just a few lines, e.g. in the
> context of -say- a workshop on GR.
>
> I have this idea in my head:
>
> Statement:
>
> The main difference between sampling with reals ('floats') and i/q sampling
> with complex numbers, is that the latter does not only provide the
> instantaneous value (voltage) of a signal at a certain point of time, but
> also includes phase information (i.e. the slope of the signal at that
> point).
>
> To make this visual:
> Take half a sine-wave and plot it out for every 45 degrees.
>
> This gives you 5 points: 0 (0 degrees), sqrt(2)/2 (45 degrees), 1 (90 
> degrees),
> sqrt(2)/2 (135 degrees) and 0 (180 degrees). Now look at the 2nd and the
> 4th point (45 degrees and 135 degrees), if you sample this using only
> real/float values, these two points are exactly the same (sqrt(2)/2).
> Just based on these values by themselves (i.e. remove all other points
> from the graph), there is no way you can tell that at the first point (45
> degrees) the graph was going up, while at the 135-degrees point the graph
> was going down. So, ... what i/q sampling does, is for every point "x",
> it not only provide the value of the graph at that point of time, but
> also information of the slope of the graphs at that time. This also
> explains while i/q sampling is done by not just taking the value of a
> signal at point "t", but also at 1/4 period later (which is the
> information you need to determine the 'slope' of that graph at point 't')
>
> So, ... is this statement correct?
>
>
> If it is more-or-less correct and it can help provide a basic mental image
> of the concept of i/q sampling, I would be more then happy! :-)
>
> 73
> kristoff - ON1ARF
>
>


Re: explaining i/q

2020-12-08 Thread Qasim Chaudhari
Hi everyone
Hope you're doing well. Someone pointed me towards this discussion on
the mailing list and I thought that it's a great topic to explain without
complex numbers, phasors, orthogonality, etc. So I wrote about it for a
true beginner.

 Instead of focusing on a small length, my main purpose was to produce
some beautiful figures that can help one grasp why both I and Q samples are
required.

https://wirelesspi.com/i-q-signals-101-neither-complex-nor-complicated

Cheers,
Qasim

From: Kristoff 
To: discuss-gnuradio@gnu.org
Subject: Re: explaining i/q

Hi all,


I was watching the webinar of Heather on GNU Radio today, when it came to
me that one of the most difficult part doing a presentation of GNU Radio is
the data-types, .. and especially these 'complex numbers'. The problem, or
at least for me, is that when you mention 'GNU Radio complex numbers', you
also have to mention iq-signals, which is a topic that is very difficult to
explain in 10 seconds to an audience who has never seen anything about i/q
sampling before. I have been thinking on how to explain the concept of I/Q
signalling in just a few lines, e.g. in the context of -say- a workshop on
GR.

I have this idea in my head:

Statement:

The main difference between sampling with reals ('floats') and i/q sampling
with complex numbers, is that the latter does not only provide the
instantaneous value (voltage) of a signal at a certain point of time, but
also includes phase information (i.e. the slope of the signal at that
point).

To make this visual:
Take half a sine-wave and plot it out for every 45 degrees.

This gives you 5 points: 0 (0 degrees), sqrt(2)/2 (45 degrees), 1 (90 degrees),
sqrt(2)/2 (135 degrees) and 0 (180 degrees). Now look at the 2nd and the
4th point (45 degrees and 135 degrees), if you sample this using only
real/float values, these two points are exactly the same (sqrt(2)/2). Just
based on these values by themselves (i.e. remove all other points from the
graph), there is no way you can tell that at the first point (45 degrees)
the graph was going up, while at the 135-degrees point the graph was going
down. So, ... what i/q sampling does, is for every point "x", it not
only provide
the value of the graph at that point of time, but also information of the
slope of the graphs at that time. This also explains while i/q sampling is
done by not just taking the value of a signal at point "t", but also at 1/4
period later (which is the information you need to determine the 'slope' of
that graph at point 't')

So, ... is this statement correct?


If it is more-or-less correct and it can help provide a basic mental image
of the concept of i/q sampling, I would be more then happy! :-)

73
kristoff - ON1ARF


Re: explaining i/q

2020-11-05 Thread Fons Adriaensen
On Wed, Nov 04, 2020 at 07:13:09PM -0600, David Hagood wrote:
> 
> On 11/4/20 6:26 PM, david vanhorn wrote:
> > "Twice the bandwidth" but that doesn't account for the 0 Hz "hole" where
> > the incoming signal is exactly at the sampling rate.
> > Or am I missing something?

With complex samples at rate R, the frequency domain is periodic modulo R.
So DC and the R map to the same signal.

It's just a matter of interpretation. You could look at the complex signal
bandwidth as ranging from -0.5 R to +0.5 R, or as 0 to R, any in many other
ways.  
 
> What "hole" are you referring to? There is the "zero bang", which occurs
> because most systems aren't perfect and have a DC component to the LOs and
> mixing system, but a "perfect" system with zero DC in the LOs will resolve a
> DC signal. The imperfection of the implementation doesn't mean the concept
> is imperfect.

If the complex signal is created in the analog domain you can get all sorts
of problems at DC. And others as well if gains or phases are not exactly
matched.

But there are more robust ways to produce a complex signal given a real one.

A popular one takes a real signal at rate R, and maps 1/4 R to DC, producing
a complex signal at rate R/2 with a frequency range -1/4 R to +1/4 R.
Any DC offset in the input is translated to the lower edge at -1/4 R which
is usually out of the region of interest. Such a system will not have any
anomaly at DC. 

-- 
FA





Re: explaining i/q

2020-11-04 Thread David Hagood


On 11/4/20 6:26 PM, david vanhorn wrote:
"Twice the bandwidth" but that doesn't account for the 0 Hz "hole" 
where the incoming signal is exactly at the sampling rate.

Or am I missing something?

What "hole" are you referring to? There is the "zero bang", which occurs 
because most systems aren't perfect and have a DC component to the LOs 
and mixing system, but a "perfect" system with zero DC in the LOs will 
resolve a DC signal. The imperfection of the implementation doesn't mean 
the concept is imperfect.





OpenPGP_0x5B9DC79986207D69.asc
Description: application/pgp-keys


OpenPGP_signature
Description: OpenPGP digital signature


Re: explaining i/q

2020-11-04 Thread david vanhorn
"Twice the bandwidth" but that doesn't account for the 0 Hz "hole" where
the incoming signal is exactly at the sampling rate.
Or am I missing something?

On Wed, Nov 4, 2020 at 3:28 PM Fons Adriaensen  wrote:

> On Wed, Nov 04, 2020 at 05:14:00PM +0100, Kristoff wrote:
>
> > For us, "even if we would be able to look at a rotating object up-front
> and
> > from a 90 degrees angle at the same time, if the object would be frozen
> in
> > time we would still not be able to determine if the doll rotates left of
> > right".
>
> The way complex samples are treated in theory means that the I and Q
> parts refer to the same time, They are considered to be a single
> sample having a complex value.
>
> But you can never detect rotation (or a frequency in DSP terms) from
> a single sample, be it real or complex. You always need a sequence.
>
> A sequence of real valued samples (either I or Q separately) allows
> you to detect the rotation, but the sense remains ambiguous. Having
> both the I and Q sequences resolves that ambiguity.
>
> You could object that using complex samples requires twice the
> memory for the same sample rate, since every sample consists of
> two numerical values. But since you can now separate positive
> and negative frequencies, you get twice the bandwidth as well.
> So there is no penalty for using complex signals.
>
> --
> FA
>
>
>

-- 
K1FZY (WA4TPW) SK  9/29/37-4/13/15


Re: explaining i/q

2020-11-04 Thread Fons Adriaensen
On Wed, Nov 04, 2020 at 05:14:00PM +0100, Kristoff wrote:
 
> For us, "even if we would be able to look at a rotating object up-front and
> from a 90 degrees angle at the same time, if the object would be frozen in
> time we would still not be able to determine if the doll rotates left of
> right".

The way complex samples are treated in theory means that the I and Q
parts refer to the same time, They are considered to be a single
sample having a complex value.

But you can never detect rotation (or a frequency in DSP terms) from
a single sample, be it real or complex. You always need a sequence.

A sequence of real valued samples (either I or Q separately) allows
you to detect the rotation, but the sense remains ambiguous. Having
both the I and Q sequences resolves that ambiguity. 

You could object that using complex samples requires twice the 
memory for the same sample rate, since every sample consists of
two numerical values. But since you can now separate positive
and negative frequencies, you get twice the bandwidth as well. 
So there is no penalty for using complex signals.

-- 
FA




Re: explaining i/q

2020-11-04 Thread david vanhorn
You can lead a horse to water...

Then there's hams like this: https://g3rbj.co.uk/


On Wed, Nov 4, 2020 at 12:04 PM Kristoff  wrote:

> Don,
>
>
> A small (slightly) remark about this video, and about hams.
>
> When I gave my first video-presentation for the Belgian SDR Meetup (in
> September), I have a presentation on GR (an example of an RTTY decoder).
> But, to keep the presentation on topic, I first posted a "list of
> interesting things to view so you can better understand the
> presentation" (the video you mentioned, three of the videos by Michael
> Ossmann, ...).
>
> When I asked the audience during the presentation who had taken the time
> to actually do this, I did not get any positive answers.
>
> You know,, ...last time when we did a workshop in a hackerspace on a
> certain topic and asked the people to do some preparation, I think that
> more then 3/4 did do that.
> The same when I organise a workshop at work.
>
>
> Yeah ... Hams .. (sigh) :-(
>
>
>
> 73
> kristoff - ON1ARF
>
>
> On 4/11/2020 15:22, Don Wade wrote:
> > Here’s a YouTube video that’s got a bit of pencil math (so it doesn’t
> > drone on) and oscilloscopes (for the ham guys), so it’s got a bit for
> > everyone .
> >
> >
> https://m.youtube.com/watch?list=PLvOgjCaG0WzDAF1Um894vv95mrcyortOB=h_7d-m1ehoY
> >
> >> On Nov 4, 2020, at 7:52 AM, Kristoff  wrote:
> >>
> >> Jef,
> >>
> >>
> >> Concerning the term "slope". Well, I also have my doubts about it. I
> >> think that for a lot of people, this would create the assumption that
> >> the signal then goes from the 'i' value to the 'q' value in a
> >> straight line, which is -as we know- not the case.
> >>
> >> Sometimes it helps to -at first- give a very basic mental image of
> >> something, and -at the end, when people understand the topic-
> >> "correct" that image with a more correct one, or just point them to
> >> some youtube video that explains the topic in more detail.
> >>
> >>
> >> Anycase,this is indeed all an interesting exercise in braking down
> >> concepts into very small steps.
> >>
> >> The amateur-radio community is a bit strange as most people do have a
> >> technical background, but for a large number of hams, that is mainly
> >> based on assumptions or "that's what they said in the ham-radio
> >> courses", without understanding the full technical details,
> >> especially topics that are highly based on math.
> >> For most hams, "SDR" is just "that piece of software you install on
> >> your computer to look at  waterfall graphs".
> >>
> >> So we have a very long way to go. :-)
> >>
> >>
> >> 73
> >> kristoff - ON1ARF
> >>
> >>
> >>
> >> On 4/11/2020 02:21, Jeff Long wrote:
> >>> It's more important to give people some mental picture than to make
> >>> sure it's completely correct. But, I would not use the "slope"
> >>> terminology. The important things are, as you've said, (1) with the
> >>> complex type, you can have a signal at baseband that is not
> >>> symmetric, and (2) the price for this is doubling the amount of data
> >>> needed. The signal you deal with at baseband is the same signal that
> >>> is seen centered on the RF carrier.
> >>>
> >>> I don't see a great way to talk about "phase" without going into the
> >>> math. It is important to get into "phase" when you talk about any
> >>> modulation fancier than slow FSK.
> >>>
> >>> Good luck. Hope you find the right balance between useful,
> >>> digestible, and correct.
> >>>
> >>> On Tue, Nov 3, 2020 at 7:20 PM David Hagood  >>> > wrote:
> >>>
> >>>I am sorrowful that you have decided you are going to stick with an
> >>>explanation that is fundamentally incorrect. I know how direct
> >>>conversion systems work - I design the software for them for a
> >>>living.
> >>>What you are basing your mental model on is an optimization for
> >>>the case
> >>>where the system is both sub-sampling the signal and going digital
> in
> >>>the same operation. However, in many extremely high sample rate
> >>>systems,
> >>>the signal is brought down to baseband by mixing it with analog
> >>>quadrature signals - that's the place where I and Q come from - and
> I
> >>>assure you the only "delay by 90 degrees" is in the creation of the
> >>>quadrature LO signals, not in the sampling of the actual data. But
> >>>I've
> >>>been around the Sun enough times to know that since you have decided
> >>>upon this course and don't seem to want to change, there's no
> >>>point in
> >>>continuing to try to help.
> >>>
> >>>
> >>
> >>
>
>

-- 
K1FZY (WA4TPW) SK  9/29/37-4/13/15


Re: explaining i/q

2020-11-04 Thread Kristoff

Don,


A small (slightly) remark about this video, and about hams.

When I gave my first video-presentation for the Belgian SDR Meetup (in 
September), I have a presentation on GR (an example of an RTTY decoder).
But, to keep the presentation on topic, I first posted a "list of 
interesting things to view so you can better understand the 
presentation" (the video you mentioned, three of the videos by Michael 
Ossmann, ...).


When I asked the audience during the presentation who had taken the time 
to actually do this, I did not get any positive answers.


You know,, ...last time when we did a workshop in a hackerspace on a 
certain topic and asked the people to do some preparation, I think that 
more then 3/4 did do that.

The same when I organise a workshop at work.


Yeah ... Hams .. (sigh) :-(



73
kristoff - ON1ARF


On 4/11/2020 15:22, Don Wade wrote:
Here’s a YouTube video that’s got a bit of pencil math (so it doesn’t 
drone on) and oscilloscopes (for the ham guys), so it’s got a bit for 
everyone .


https://m.youtube.com/watch?list=PLvOgjCaG0WzDAF1Um894vv95mrcyortOB=h_7d-m1ehoY


On Nov 4, 2020, at 7:52 AM, Kristoff  wrote:

Jef,


Concerning the term "slope". Well, I also have my doubts about it. I 
think that for a lot of people, this would create the assumption that 
the signal then goes from the 'i' value to the 'q' value in a 
straight line, which is -as we know- not the case.


Sometimes it helps to -at first- give a very basic mental image of 
something, and -at the end, when people understand the topic- 
"correct" that image with a more correct one, or just point them to 
some youtube video that explains the topic in more detail.



Anycase,this is indeed all an interesting exercise in braking down 
concepts into very small steps.


The amateur-radio community is a bit strange as most people do have a 
technical background, but for a large number of hams, that is mainly 
based on assumptions or "that's what they said in the ham-radio 
courses", without understanding the full technical details, 
especially topics that are highly based on math.
For most hams, "SDR" is just "that piece of software you install on 
your computer to look at  waterfall graphs".


So we have a very long way to go. :-)


73
kristoff - ON1ARF



On 4/11/2020 02:21, Jeff Long wrote:
It's more important to give people some mental picture than to make 
sure it's completely correct. But, I would not use the "slope" 
terminology. The important things are, as you've said, (1) with the 
complex type, you can have a signal at baseband that is not 
symmetric, and (2) the price for this is doubling the amount of data 
needed. The signal you deal with at baseband is the same signal that 
is seen centered on the RF carrier.


I don't see a great way to talk about "phase" without going into the 
math. It is important to get into "phase" when you talk about any 
modulation fancier than slow FSK.


Good luck. Hope you find the right balance between useful, 
digestible, and correct.


On Tue, Nov 3, 2020 at 7:20 PM David Hagood > wrote:


   I am sorrowful that you have decided you are going to stick with an
   explanation that is fundamentally incorrect. I know how direct
   conversion systems work - I design the software for them for a
   living.
   What you are basing your mental model on is an optimization for
   the case
   where the system is both sub-sampling the signal and going digital in
   the same operation. However, in many extremely high sample rate
   systems,
   the signal is brought down to baseband by mixing it with analog
   quadrature signals - that's the place where I and Q come from - and I
   assure you the only "delay by 90 degrees" is in the creation of the
   quadrature LO signals, not in the sampling of the actual data. But
   I've
   been around the Sun enough times to know that since you have decided
   upon this course and don't seem to want to change, there's no
   point in
   continuing to try to help.









Re: explaining i/q

2020-11-04 Thread David Hagood


Now, unless I am completely wrong, the model you use captures both the 
I and the Q samples at the same time. This means that there is no 
element of 'time'.
In electronics, this works fine, due to the nature of mixing and a 
difference of phase of the two Local-Oscillators.
But that's not how people see the spinning doll. Our eyes do not see a 
difference in phase of light. For us humans, the object is spinning 
due to the element of "time": multiple observations.


Do you have 2 eyes? or one?

You see the model from 2 perspectives at once - left eye, right eye. 
Just like you have I and Q. Each eye sees the model from a different 
perspective - maybe not as dramatic as 90 degrees, but a different 
perspective.


I made that point repeatedly.

Did it not sink in?

Or are you just trying to argue against anything that isn't what you 
already planned on doing?





OpenPGP_0x5B9DC79986207D69.asc
Description: application/pgp-keys


OpenPGP_signature
Description: OpenPGP digital signature


Re: explaining i/q

2020-11-04 Thread Kristoff

David, all,


Well, I had also been thinking about this.

I do like the idea of the spinning doll. It provides a model for 
positive and negative frequencies: if it spins one way, the frequency is 
positive, if it spins in the other direction, it is a negative frequency.


And, it does also give a 'hint' at the issue that a frequency in the 
"real" domain is both a positive and a negative frequency in the complex 
frequency domain>




However, the problem is that people associate "spinning" with movement, 
i.e. a change of the location of an object in time, or -in this case- a 
rotation around an axis -which also includes an element of time-.


Now, unless I am completely wrong, the model you use captures both the I 
and the Q samples at the same time. This means that there is no element 
of 'time'.
In electronics, this works fine, due to the nature of mixing and a 
difference of phase of the two Local-Oscillators.
But that's not how people see the spinning doll. Our eyes do not see a 
difference in phase of light. For us humans, the object is spinning due 
to the element of "time": multiple observations.



For us, "even if we would be able to look at a rotating object up-front 
and from a 90 degrees angle at the same time, if the object would be 
frozen in time we would still not be able to determine if the doll 
rotates left of right".
(except perhaps that we will probably make a assumptions as the doll 
leans slightly backwards). (*)


(*) https://en.wikipedia.org/wiki/Spinning_dancer



Now, I completely agree that the model I used (taking two samples, 1/4 
sample-period apart), is indeed based on only one of the architectures 
of a SDR-receiver.  And, yes, other SDR receiver architectures exist 
that are not based on that model. But at least it provides something 
that is not that far from our daily experience: detecting the direction 
of a movement by two observations at difference times.


Small sidenote:
That particular receiver-architecture does happen to be one that is used 
in most amateur-radio DIY receiver-kits. So if a student of the workshop 
gets to see a schematics of an SDR receiver- it IQ mixing-part should at 
least ring a bell.




Anycase, don't get me wrong. I really appreciate your feedback.

What you say is completely correct.
The question however is how to "package" your model into something that 
is easy to understand.




73
kristoff - ON1ARF



On 4/11/2020 02:58, David Hagood wrote:

Like I said previously:

Think of the spinning dancer illusion. It works because you only see 
from one vantage point. If you saw a real doll spinning, and assuming 
you have two eyes and normal binocular vision, you will have parallax, 
and that will allow you to determine in reality which way the figure 
is spinning, because each eye will have a different view of what is 
going on, and so can work out what direction the figure is spinning in.


I/Q is like that - it allows the SDR to see have "parallax" - to have 
2 points of view on the signal at the same time, and so it can "see" 
which way the signal is rotating - whether the signal is spinning 
clockwise (negative frequencies, cause math) or counter-clockwise 
(positive frequencies).


There - no advanced math, short, and yet accurate.







Re: explaining i/q

2020-11-04 Thread Don Wade
Here’s a YouTube video that’s got a bit of pencil math (so it doesn’t drone on) 
and oscilloscopes (for the ham guys), so it’s got a bit for everyone .

https://m.youtube.com/watch?list=PLvOgjCaG0WzDAF1Um894vv95mrcyortOB=h_7d-m1ehoY

> On Nov 4, 2020, at 7:52 AM, Kristoff  wrote:
> 
> Jef,
> 
> 
> Concerning the term "slope". Well, I also have my doubts about it. I think 
> that for a lot of people, this would create the assumption that the signal 
> then goes from the 'i' value to the 'q' value in a straight line, which is 
> -as we know- not the case.
> 
> Sometimes it helps to -at first- give a very basic mental image of something, 
> and -at the end, when people understand the topic- "correct" that image with 
> a more correct one, or just point them to some youtube video that explains 
> the topic in more detail.
> 
> 
> Anycase,this is indeed all an interesting exercise in braking down concepts 
> into very small steps.
> 
> The amateur-radio community is a bit strange as most people do have a 
> technical background, but for a large number of hams, that is mainly based on 
> assumptions or "that's what they said in the ham-radio courses", without 
> understanding the full technical details, especially topics that are highly 
> based on math.
> For most hams, "SDR" is just "that piece of software you install on your 
> computer to look at  waterfall graphs".
> 
> So we have a very long way to go. :-)
> 
> 
> 73
> kristoff - ON1ARF
> 
> 
> 
>> On 4/11/2020 02:21, Jeff Long wrote:
>> It's more important to give people some mental picture than to make sure 
>> it's completely correct. But, I would not use the "slope" terminology. The 
>> important things are, as you've said, (1) with the complex type, you can 
>> have a signal at baseband that is not symmetric, and (2) the price for this 
>> is doubling the amount of data needed. The signal you deal with at baseband 
>> is the same signal that is seen centered on the RF carrier.
>> 
>> I don't see a great way to talk about "phase" without going into the math. 
>> It is important to get into "phase" when you talk about any modulation 
>> fancier than slow FSK.
>> 
>> Good luck. Hope you find the right balance between useful, digestible, and 
>> correct.
>> 
>> On Tue, Nov 3, 2020 at 7:20 PM David Hagood > > wrote:
>> 
>>I am sorrowful that you have decided you are going to stick with an
>>explanation that is fundamentally incorrect. I know how direct
>>conversion systems work - I design the software for them for a
>>living.
>>What you are basing your mental model on is an optimization for
>>the case
>>where the system is both sub-sampling the signal and going digital in
>>the same operation. However, in many extremely high sample rate
>>systems,
>>the signal is brought down to baseband by mixing it with analog
>>quadrature signals - that's the place where I and Q come from - and I
>>assure you the only "delay by 90 degrees" is in the creation of the
>>quadrature LO signals, not in the sampling of the actual data. But
>>I've
>>been around the Sun enough times to know that since you have decided
>>upon this course and don't seem to want to change, there's no
>>point in
>>continuing to try to help.
>> 
>> 
> 
> 


Re: explaining i/q

2020-11-04 Thread Anon Lister
Oops small correction, prior to decimate by 2 in the conversion, you have to 
low pass filter by fs/4. (Or use a decimating filter)

Whoops.

-
Anon

> On Nov 4, 2020, at 08:47, Anon Lister  wrote:
> 
> Now decimate by two since you have two empty halves of visible bandwidth at 
> the edges.



Re: explaining i/q

2020-11-04 Thread Anon Lister



> On Nov 4, 2020, at 07:13, Fons Adriaensen  wrote:
> 
> Whenever I have to explain some DSP principles, I start with
> the complex valued version, and then showing the real-valued
> one as a special case.

This is absolutely correct here. If they are learning gnuradio, they obviously 
want to do digital signal processing. Much of DSP is far easier when you have a 
center frequency of 0hz and your visible bandwidth is = to your sample rate. 
(Not 2x as required by real sampling)

How about a view of how you convert one representation to the other:
Take the real values(sampled to meet nyquist, at 2x the desired bandwidth, or 
max frequency), and insert a 0 every other sample. Treat every pair real, 0 as 
a one complex sample.

There is fundamentally no change here yet except to double the data storage 
requirement. These however are now complex values. 

Now, since you can “use” the negative frequency space, since it no longer is 
required to be mirror image of the positive, you can(circularly!) shift all 
frequencies by -1/4 the sampling rate. 

This will give still not alter the actual information present, merely shift all 
frequencies present halfway into the now usable negative frequency axis. They 
are NO LONGER MIRRORS. 

Now decimate by two since you have two empty halves of visible bandwidth at the 
edges. You now represent a range (complex)[-bandwidth/2, bandwidth/2] as 
opposed to (real)[0, bandwidth*2]

This process is entirely reversible, just do the steps backwards, (interpolate 
by 2, shift by Fs/4, drop the complex part (now 0)).

Both require the same storage, and can view the same bandwidth. Real needs 2x 
samples per bandwidth, in complex visible bandwidth = sample rate, but you 
store two values per sample. 

From a storage perspective, they are entirely equivalent. It’s not that you are 
taking extra samples or whatever you said. To use ham numbers: instead of 
storing a 48khz real file representing 24khz of visible bandwidth from 0 to 
48000hz, you store a 24k file representing -12k to 12k. In both cases you have 
24k of usable bandwidth, and use the same number of bytes to store it. 

The advantage of using complex is that the maths behind many DSP operations are 
vastly simplified by having the center frequency at 0 and bandwidth = to sample 
rate(and due to other properties of complex numbers). For example, most 
filtering now is simply a low pass filter, symmetric around 0 as opposed to 
band pass(composed of a low and a high). 
Am detect is just squaring the complex samples.
Fm detect is just calling atan2 on the quardrature components (and optionally 
rescaling)
Etc...

(Weather you think one representation or the other is more fundamental is 
largely due to your background. I’m of the opinion that complex is the more 
fundamental representation of an electromagnetic wave, the quantum mechanical 
representation is complex too, real is just an inconvenient projection in the 
middle introduced by the fact that we measure via electrical voltage on a wire, 
necessitating doubling our sample rate to recover the underlying wave(still 
with a phase ambiguity), but that’s opinion)

-
Anon




Re: explaining i/q

2020-11-04 Thread Christophe Seguinot

  
  
Hi 

I do agree with Jeff Long. 

You will have to distinguish Sampling and IQ: 


  Complex signal are not related to sampling, even if sampled
signals in GR are generally complex 
  
  Complex signal come from the baseband equivalent
representation of  passband signal (modulated). Explaining that
with at least some background in complex number, phase of a
modulated signal, and/or ID modulator and demodulator.
  
  Sampling is an operation which  aims at giving an approximate
representation of time continuous signals. It is applied to real
signal as well as complex signals. Continuous signal can't be
represented in a computer. 
  

Regards, Christophe 



On 04/11/2020 13:50, Kristoff wrote:

Jef,
  
  
  
  Concerning the term "slope". Well, I also have my doubts about it.
  I think that for a lot of people, this would create the assumption
  that the signal then goes from the 'i' value to the 'q' value in a
  straight line, which is -as we know- not the case.
  
  
  Sometimes it helps to -at first- give a very basic mental image of
  something, and -at the end, when people understand the topic-
  "correct" that image with a more correct one, or just point them
  to some youtube video that explains the topic in more detail.
  
  
  
  Anycase,this is indeed all an interesting exercise in braking down
  concepts into very small steps.
  
  
  The amateur-radio community is a bit strange as most people do
  have a technical background, but for a large number of hams, that
  is mainly based on assumptions or "that's what they said in the
  ham-radio courses", without understanding the full technical
  details, especially topics that are highly based on math.
  
  For most hams, "SDR" is just "that piece of software you install
  on your computer to look at  waterfall graphs".
  
  
  So we have a very long way to go. :-)
  
  
  
  73
  
  kristoff - ON1ARF
  
  
  
  
  On 4/11/2020 02:21, Jeff Long wrote:
  
  It's more important to give people some
mental picture than to make sure it's completely correct. But, I
would not use the "slope" terminology. The important things are,
as you've said, (1) with the complex type, you can have a signal
at baseband that is not symmetric, and (2) the price for this is
doubling the amount of data needed. The signal you deal with at
baseband is the same signal that is seen centered on the RF
carrier.


I don't see a great way to talk about "phase" without going into
the math. It is important to get into "phase" when you talk
about any modulation fancier than slow FSK.


Good luck. Hope you find the right balance between useful,
digestible, and correct.


On Tue, Nov 3, 2020 at 7:20 PM David Hagood
 wrote:


    I am sorrowful that you have decided you are going to stick
with an

    explanation that is fundamentally incorrect. I know how
direct

    conversion systems work - I design the software for them for
a

    living.

    What you are basing your mental model on is an optimization
for

    the case

    where the system is both sub-sampling the signal and going
digital in

    the same operation. However, in many extremely high sample
rate

    systems,

    the signal is brought down to baseband by mixing it with
analog

    quadrature signals - that's the place where I and Q come
from - and I

    assure you the only "delay by 90 degrees" is in the creation
of the

    quadrature LO signals, not in the sampling of the actual
data. But

    I've

    been around the Sun enough times to know that since you have
decided

    upon this course and don't seem to want to change, there's
no

    point in

    continuing to try to help.



  
  
  

  




Re: explaining i/q

2020-11-04 Thread Kristoff

Jef,


Concerning the term "slope". Well, I also have my doubts about it. I 
think that for a lot of people, this would create the assumption that 
the signal then goes from the 'i' value to the 'q' value in a straight 
line, which is -as we know- not the case.


Sometimes it helps to -at first- give a very basic mental image of 
something, and -at the end, when people understand the topic- "correct" 
that image with a more correct one, or just point them to some youtube 
video that explains the topic in more detail.



Anycase,this is indeed all an interesting exercise in braking down 
concepts into very small steps.


The amateur-radio community is a bit strange as most people do have a 
technical background, but for a large number of hams, that is mainly 
based on assumptions or "that's what they said in the ham-radio 
courses", without understanding the full technical details, especially 
topics that are highly based on math.
For most hams, "SDR" is just "that piece of software you install on your 
computer to look at  waterfall graphs".


So we have a very long way to go. :-)


73
kristoff - ON1ARF



On 4/11/2020 02:21, Jeff Long wrote:
It's more important to give people some mental picture than to make 
sure it's completely correct. But, I would not use the "slope" 
terminology. The important things are, as you've said, (1) with the 
complex type, you can have a signal at baseband that is not symmetric, 
and (2) the price for this is doubling the amount of data needed. The 
signal you deal with at baseband is the same signal that is seen 
centered on the RF carrier.


I don't see a great way to talk about "phase" without going into the 
math. It is important to get into "phase" when you talk about any 
modulation fancier than slow FSK.


Good luck. Hope you find the right balance between useful, digestible, 
and correct.


On Tue, Nov 3, 2020 at 7:20 PM David Hagood > wrote:


I am sorrowful that you have decided you are going to stick with an
explanation that is fundamentally incorrect. I know how direct
conversion systems work - I design the software for them for a
living.
What you are basing your mental model on is an optimization for
the case
where the system is both sub-sampling the signal and going digital in
the same operation. However, in many extremely high sample rate
systems,
the signal is brought down to baseband by mixing it with analog
quadrature signals - that's the place where I and Q come from - and I
assure you the only "delay by 90 degrees" is in the creation of the
quadrature LO signals, not in the sampling of the actual data. But
I've
been around the Sun enough times to know that since you have decided
upon this course and don't seem to want to change, there's no
point in
continuing to try to help.







Re: explaining i/q

2020-11-04 Thread Fons Adriaensen
On Wed, Nov 04, 2020 at 12:38:27AM +0100, Kristoff wrote:
 
> So, what is iq-sampling?
> IQ-sampling is like sampling a normal ("real") signal -i.e. what most people
> are familiar with-, ... except that you sample the data twice for each
> period: once at timer "t" and a second time 1/4 sampling period later. (*)

This is fundamentally wrong, and you will do your audience
a very bad service.

What are you going the answer if anyone in your audience
asks the obvious question:

   So, it's the same as having four times the sample rate,
   and then throwing away half of the samples ? Why would
   I want to do that ?

The 'spinning dancer' is really the right intuitive model.

You look at a rotating object from two points, the second at
90 degrees from the first. This allows you to find out in 
which sense it rotates.

For example it allows you to know if some frequency is in
the upper or lower sideband, even if the signal shifted to
zero carrier frequency.

There is another good reason to use complex-valued signals:
it really simplifies all DSP theory. A lot of strange factors
of 2, corner cases at or around DC,  and other anomalies that
occur with real-valued signals just disappear.  

Whenever I have to explain some DSP principles, I start with
the complex valued version, and then showing the real-valued
one as a special case.

-- 
FA




Re: explaining i/q

2020-11-03 Thread David Hagood

Like I said previously:

Think of the spinning dancer illusion. It works because you only see 
from one vantage point. If you saw a real doll spinning, and assuming 
you have two eyes and normal binocular vision, you will have parallax, 
and that will allow you to determine in reality which way the figure is 
spinning, because each eye will have a different view of what is going 
on, and so can work out what direction the figure is spinning in.


I/Q is like that - it allows the SDR to see have "parallax" - to have 2 
points of view on the signal at the same time, and so it can "see" which 
way the signal is rotating - whether the signal is spinning clockwise 
(negative frequencies, cause math) or counter-clockwise (positive 
frequencies).


There - no advanced math, short, and yet accurate.




OpenPGP_0x5B9DC79986207D69.asc
Description: application/pgp-keys


OpenPGP_signature
Description: OpenPGP digital signature


Re: explaining i/q

2020-11-03 Thread Jeff Long
It's more important to give people some mental picture than to make sure
it's completely correct. But, I would not use the "slope" terminology. The
important things are, as you've said, (1) with the complex type, you can
have a signal at baseband that is not symmetric, and (2) the price for this
is doubling the amount of data needed. The signal you deal with at baseband
is the same signal that is seen centered on the RF carrier.

I don't see a great way to talk about "phase" without going into the math.
It is important to get into "phase" when you talk about any modulation
fancier than slow FSK.

Good luck. Hope you find the right balance between useful, digestible, and
correct.

On Tue, Nov 3, 2020 at 7:20 PM David Hagood  wrote:

> I am sorrowful that you have decided you are going to stick with an
> explanation that is fundamentally incorrect. I know how direct
> conversion systems work - I design the software for them for a living.
> What you are basing your mental model on is an optimization for the case
> where the system is both sub-sampling the signal and going digital in
> the same operation. However, in many extremely high sample rate systems,
> the signal is brought down to baseband by mixing it with analog
> quadrature signals - that's the place where I and Q come from - and I
> assure you the only "delay by 90 degrees" is in the creation of the
> quadrature LO signals, not in the sampling of the actual data. But I've
> been around the Sun enough times to know that since you have decided
> upon this course and don't seem to want to change, there's no point in
> continuing to try to help.
>
>
>


Re: explaining i/q

2020-11-03 Thread Kristoff

David,



On 4/11/2020 01:18, David Hagood wrote:
I am sorrowful that you have decided you are going to stick with an 
explanation that is fundamentally incorrect. I know how direct 
conversion systems work - I design the software for them for a living. 
What you are basing your mental model on is an optimization for the 
case where the system is both sub-sampling the signal and going 
digital in the same operation. However, in many extremely high sample 
rate systems, the signal is brought down to baseband by mixing it with 
analog quadrature signals - that's the place where I and Q come from - 
and I assure you the only "delay by 90 degrees" is in the creation of 
the quadrature LO signals, not in the sampling of the actual data. But 
I've been around the Sun enough times to know that since you have 
decided upon this course and don't seem to want to change, there's no 
point in continuing to try to help.



As mentioned, the goal here is to explain I/q sampling in 5 minutes to a 
group of average hams (i.e. who have limited knowledge of advanced 
electronics and even less of math).

The question to answer is this:
what is i/q sampling and why does it it matters for him/her when 
creating a GNU Radio flowgraph.



So, you do not have to convince me how i/q sampling works, you have to 
convince this audience.



So, feel free to explain in semi-tech (no math) talk in 5 minutes *why* 
SDR uses i/q sampling.

What is the PURPOSE of i/q sampling?



73
kristoff - ON1ARF





Re: explaining i/q

2020-11-03 Thread David Hagood
I am sorrowful that you have decided you are going to stick with an 
explanation that is fundamentally incorrect. I know how direct 
conversion systems work - I design the software for them for a living. 
What you are basing your mental model on is an optimization for the case 
where the system is both sub-sampling the signal and going digital in 
the same operation. However, in many extremely high sample rate systems, 
the signal is brought down to baseband by mixing it with analog 
quadrature signals - that's the place where I and Q come from - and I 
assure you the only "delay by 90 degrees" is in the creation of the 
quadrature LO signals, not in the sampling of the actual data. But I've 
been around the Sun enough times to know that since you have decided 
upon this course and don't seem to want to change, there's no point in 
continuing to try to help.





OpenPGP_0x5B9DC79986207D69.asc
Description: application/pgp-keys


OpenPGP_signature
Description: OpenPGP digital signature


Re: explaining i/q

2020-11-03 Thread Kristoff

Jef, Fabian, Aditya, Anon, David,

I'll just reply to this one message so not to spam the list to much but 
please consider this a "thank you" to all for replying.



As said, this is for a limited and very specific goal:
I will probably be giving a workshop on GRC in a couple of weeks and I 
want to give a quick explanation of iq-sampling and how this impacts 
designing a GR flowgraphs.



I want to keep the workshop focused on that one topic. So I really want 
to avoid going "wondering around" trying to explain everything that is 
related to DSP or SDR. After all, it's a workshop on using GRC, not a 
generic presentation on SDR or signal-processing.



The reason I do want to mention iq sampling in the workshop, is simply 
that does is one of the basic datatypes of GNU Radio and it is an 
important element that affects how to build a flowgraph.



I think I will summarise it like this:

* complex numbers is one of the datatypes of GR, It is the format to 
store signals generated by a process called "i/q sampling".


So, what is iq-sampling?
IQ-sampling is like sampling a normal ("real") signal -i.e. what most 
people are familiar with-, ... except that you sample the data twice for 
each period: once at timer "t" and a second time 1/4 sampling period 
later. (*)


This 2nd sampling-action provides information about the 'direction' a 
signal is going (up or down). (I think the proper term here is its 'slope')

(thx David for the correction about 'phase' vs 'slope')

(*) Just look at the design of a direct-conversion SDR receiver.

The first sample is called the "in phase" sample, the 2nd sample is the 
"quadrature" sample; hence "i/q" sampling.



* as was also mentioned by Heather in the RSGB/BATC presentation, the 
use of iq-signals has a number of consequences on GNU Radio flow-graphs.

The most important ones are:

->  Mixing two complex signals (with a frequency of "f1" and "f2") will 
produce one new signal with a frequency of f1+f2 Hz.


This is in contrast to a mixer of "real" signals which -as most people 
know- produces two new signals (frequencies: f1+f2 and f1-f2)



-> In the "real" frequency-domain, only the frequencies from 0 up to 
sampling-rate / 2 is defined. The frequencies below zero are a mirror of 
the radio-spectrum above DC.


Using complex i/q sampling, both positive and negative frequencies exist 
and are independent of each other.



-> A signal with a "negative" frequency?
Yes, a complex signal can have a 'negative' frequency. This is basically 
the same as a signal with the equivalent positive frequency, but 
mirrored around the x-axis (**).


If you look at such a signal, you see that flipping a signal upside down 
will  inverse the sign of the value of every sample (something that does 
affect the value of the signal, but no its frequency), ... and inverse 
the "direction" of that signal.
And remember that the goal of i/q sampling is ...  to determine the 
direction of a signal?


(**) note: there do are other ways to negate the frequency of a complex 
signal.



-> Combine the two last points, and you get this:

If you mix (multiply) an incoming signal with frequency "f1" with a 
second signal that has a negative-frequency "-f2" will generate a new 
signal with a frequency of f1-f2, effectively moving a signal down in 
the radio-spectrum. (i.e. 'down-converting')



* And finally, ... certain hardware peripherals deals with 'real' 
signals (e.g. an audio-card or a speaker), other hardware create or read 
complex 'iq' signals (like most dedicated SDR peripherals)





Again, the goal is not a full detailed discussion about I/Q signals.
The goal is to give people who are not to SDR, new to GNU Radio and have 
never heard of i/q sampling before some idea of what it is, and how it 
will impact them when they start playing around with GRC.


But I do want my information to be factual correct, so .. if somebody 
sees factual errors in this, feel free to reply! :-)





73
kristoff - ON1ARF




On 3/11/2020 12:47, Jeff Long wrote:
This is a great thing to try to figure out. If we can come up with an 
answer that gives someone a feel for why I/Q is used in SDR in 10 
minutes, and does not include phasors, exponentials to a complex 
power, a derivation of any equation, the concept of orthogonality, 
etc. ... it will win a Nobel prize in education.


On Tue, Nov 3, 2020 at 4:56 AM gilles rubin > wrote:


Hello,

You can have a look here
The Concept of Frequency | Wireless Pi






The Concept of Frequency | Wireless Pi



Qasim Chaudhari CEO of Wireless Pi is great ! You will find plenty
of information on his website.

Gil.


Le mardi 3 novembre 2020 à 00:06:02 UTC+1, Kristoff
mailto:krist...@skypro.be>> a écrit :


Hi all,

I was watching the webinar of Heather on GNU Radio today, 

Re: explaining i/q

2020-11-03 Thread Jeff Long
This is a great thing to try to figure out. If we can come up with an
answer that gives someone a feel for why I/Q is used in SDR in 10 minutes,
and does not include phasors, exponentials to a complex power, a derivation
of any equation, the concept of orthogonality, etc. ... it will win a Nobel
prize in education.

On Tue, Nov 3, 2020 at 4:56 AM gilles rubin  wrote:

> Hello,
>
> You can have a look here
> The Concept of Frequency | Wireless Pi
> 
>
> The Concept of Frequency | Wireless Pi
> 
>
> Qasim Chaudhari CEO of Wireless Pi is great ! You will find plenty of
> information on his website.
>
> Gil.
>
>
> Le mardi 3 novembre 2020 à 00:06:02 UTC+1, Kristoff 
> a écrit :
>
>
> Hi all,
>
> I was watching the webinar of Heather on GNU Radio today, when it came
> to me that one of the most difficult part doing a presentation of GNU
> Radio is the data-types, .. and especially these 'complex numbers'.
> The problem, or at least for me, is that when you mention 'GNU Radio
> complex numbers', you also have to mention iq-signals, which is a topic
> that is very difficult to explain in 10 seconds to an audience who has
> never seen anything about i/q sampling before.
>
>
> I have been thinking on how to explain the concept of I/Q signalling in
> just a few lines, e.g. in the context of -say- a workshop on GR.
>
>
> I have this idea in my head:
>
> Statement:
> The main difference between sampling with reals ('floats') and i/q
> sampling with complex numbers, is that the latter does not only provide
> the  instantaneous value (voltage) of a signal at a certain point of
> time, but also includes phase information (i.e. the slope of the signal
> at that point).
>
>
> To make this visual:
> Take half a sine-wave and plot it out for every 45 degrees.
> This gives you 5 points: 0 (0 degrees), sqrt(2)/2 (45 degrees), 1 (90
> degrees), sqrt(2)/2 (135 degrees) and 0 (180 degrees).
>
> Now look at the 2nd and the 4th point (45 degrees and 135 degrees), if
> you sample this using only real/float values, these two points are
> exactly the same (sqrt(2)/2). Just based on these values by themselves
> (i.e. remove all other points from the graph), there is no way you can
> tell that at the first point (45 degrees) the graph was going up, while
> at the 135-degrees point the graph was going down.
>
> So, ... what i/q sampling does, is for every point "x", it not only
> provide the value of the graph at that point of time, but also
> information of the slope of the graphs at that time.
>
>
> This also explains while i/q sampling is done by not just taking the
> value of a signal at point "t", but also at 1/4 period later (which is
> the information you need to determine the 'slope' of that graph at point
> 't')
>
>
> So, ... is this statement correct?
>
> If it is more-or-less correct and it can help provide a basic mental
> image of the concept of i/q sampling, I would be more then happy! :-)
>
>
>
>
> 73
> kristoff - ON1ARF
>
>
>
>
>


Re: explaining i/q

2020-11-03 Thread Fabian Schwartau
Hi Kristoff,

As some people already pointed out here, it is always good to give
multiple views for the concept of complex numbers, as different minds
work differently and some explanation may push the right buttons for
someone, but not for someone else. Especially for such a complex (pun
intended) and quite theoretical topic. So, here is an other view which I
like to use when I teach the concept to students and it is based on a
frequency point of view:
If you have a purley real valued signal (like all signals in reality
are) they have a mirrored spectrum. So the positive frequencies are the
same as the negative ones (except for inverse phase values). This is
logical, as there is no real intuitive concept of negative frequencies
in reality. Let's assume a signal at (and around) a carrier frequency
fc. This will show up as two "hills" of signals around fc and -fc in the
spectrum. One definition of complex signals is now that I use a
(complex) mixer to mix the signal from the positive frequencies down to
zero, so that fc is now at zero frequency (in time domain I multiply by
exp(-j*2*pi*fc), which is the one-sided version of a cosine). -fc is now
at -2fc. Then I use an ideal low pass filter to remove the part at -2fc
and I am left with a signal around zero frequency, which is not
symmetrical any more (in general). As the original real-values signal is
symmetrical I do not remove any information with the low pass filter, so
the original signal is reconstructable by mixing it back up to fc and
taking the real part of the complex result to get the real-values
two-sided spectrum again (and I have to multiply the amplitudes by 2 to
compensate the "lost" energy due to the low pass filtering and taking
only the real part of the result).
Hope that is clear, but when your audience does not come from an
electrical engineering point of view it might be even more confusing to
introduce the concept of a spectrum - although it is a vital part of
signal processing and you will have to introduce it at somepoint anyway.

Best regards,
Fabian


Am 03.11.20 um 00:02 schrieb Kristoff:
> Hi all,
> 
> I was watching the webinar of Heather on GNU Radio today, when it came
> to me that one of the most difficult part doing a presentation of GNU
> Radio is the data-types, .. and especially these 'complex numbers'.
> The problem, or at least for me, is that when you mention 'GNU Radio
> complex numbers', you also have to mention iq-signals, which is a topic
> that is very difficult to explain in 10 seconds to an audience who has
> never seen anything about i/q sampling before.
> 
> 
> I have been thinking on how to explain the concept of I/Q signalling in
> just a few lines, e.g. in the context of -say- a workshop on GR.
> 
> 
> I have this idea in my head:
> 
> Statement:
> The main difference between sampling with reals ('floats') and i/q
> sampling with complex numbers, is that the latter does not only provide
> the  instantaneous value (voltage) of a signal at a certain point of
> time, but also includes phase information (i.e. the slope of the signal
> at that point).
> 
> 
> To make this visual:
> Take half a sine-wave and plot it out for every 45 degrees.
> This gives you 5 points: 0 (0 degrees), sqrt(2)/2 (45 degrees), 1 (90
> degrees), sqrt(2)/2 (135 degrees) and 0 (180 degrees).
> 
> Now look at the 2nd and the 4th point (45 degrees and 135 degrees), if
> you sample this using only real/float values, these two points are
> exactly the same (sqrt(2)/2). Just based on these values by themselves
> (i.e. remove all other points from the graph), there is no way you can
> tell that at the first point (45 degrees) the graph was going up, while
> at the 135-degrees point the graph was going down.
> 
> So, ... what i/q sampling does, is for every point "x", it not only
> provide the value of the graph at that point of time, but also
> information of the slope of the graphs at that time.
> 
> 
> This also explains while i/q sampling is done by not just taking the
> value of a signal at point "t", but also at 1/4 period later (which is
> the information you need to determine the 'slope' of that graph at point
> 't')
> 
> 
> So, ... is this statement correct?
> 
> If it is more-or-less correct and it can help provide a basic mental
> image of the concept of i/q sampling, I would be more then happy! :-)
> 
> 
> 
> 
> 73
> kristoff - ON1ARF
> 
> 
> 
> 




Re: explaining i/q

2020-11-03 Thread gilles rubin
 Hello,
You can have a look hereThe Concept of Frequency | Wireless Pi


|  |  | 
The Concept of Frequency | Wireless Pi
 |


Qasim Chaudhari CEO of Wireless Pi is great ! You will find plenty of 
information on his website.

Gil.

Le mardi 3 novembre 2020 à 00:06:02 UTC+1, Kristoff  a 
écrit :  
 
 Hi all,

I was watching the webinar of Heather on GNU Radio today, when it came 
to me that one of the most difficult part doing a presentation of GNU 
Radio is the data-types, .. and especially these 'complex numbers'.
The problem, or at least for me, is that when you mention 'GNU Radio 
complex numbers', you also have to mention iq-signals, which is a topic 
that is very difficult to explain in 10 seconds to an audience who has 
never seen anything about i/q sampling before.


I have been thinking on how to explain the concept of I/Q signalling in 
just a few lines, e.g. in the context of -say- a workshop on GR.


I have this idea in my head:

Statement:
The main difference between sampling with reals ('floats') and i/q 
sampling with complex numbers, is that the latter does not only provide 
the  instantaneous value (voltage) of a signal at a certain point of 
time, but also includes phase information (i.e. the slope of the signal 
at that point).


To make this visual:
Take half a sine-wave and plot it out for every 45 degrees.
This gives you 5 points: 0 (0 degrees), sqrt(2)/2 (45 degrees), 1 (90 
degrees), sqrt(2)/2 (135 degrees) and 0 (180 degrees).

Now look at the 2nd and the 4th point (45 degrees and 135 degrees), if 
you sample this using only real/float values, these two points are 
exactly the same (sqrt(2)/2). Just based on these values by themselves 
(i.e. remove all other points from the graph), there is no way you can 
tell that at the first point (45 degrees) the graph was going up, while 
at the 135-degrees point the graph was going down.

So, ... what i/q sampling does, is for every point "x", it not only 
provide the value of the graph at that point of time, but also 
information of the slope of the graphs at that time.


This also explains while i/q sampling is done by not just taking the 
value of a signal at point "t", but also at 1/4 period later (which is 
the information you need to determine the 'slope' of that graph at point 
't')


So, ... is this statement correct?

If it is more-or-less correct and it can help provide a basic mental 
image of the concept of i/q sampling, I would be more then happy! :-)




73
kristoff - ON1ARF




  

Re: explaining i/q

2020-11-02 Thread Aditya Arun Kumar
So did that answer your question?



[image: Mailtrack]

Sender
notified by
Mailtrack

11/03/20,
08:23:36 AM

On Tue, Nov 3, 2020 at 7:50 AM Anon Lister  wrote:

> I always come back to the Lyons explaination: the pictures really help for
> the visual learners among us. If you did a workshop I’d definitely include
> a link to this in reference material:
>
> http://www.dspguru.com/files/QuadSignals.pdf
>
> There’s actually some of us who don’t come from formal electrical
> engineering backgrounds who learned this first and find equations and such
> more difficult when expressed in the “real“ interpretation of a signal. Heh.
>
>
>
> On Nov 2, 2020, at 18:06, Kristoff  wrote:
>
> Hi all,
>
> I was watching the webinar of Heather on GNU Radio today, when it came to
> me that one of the most difficult part doing a presentation of GNU Radio is
> the data-types, .. and especially these 'complex numbers'.
> The problem, or at least for me, is that when you mention 'GNU Radio
> complex numbers', you also have to mention iq-signals, which is a topic
> that is very difficult to explain in 10 seconds to an audience who has
> never seen anything about i/q sampling before.
>
>
> I have been thinking on how to explain the concept of I/Q signalling in
> just a few lines, e.g. in the context of -say- a workshop on GR.
>
>
> I have this idea in my head:
>
> Statement:
> The main difference between sampling with reals ('floats') and i/q
> sampling with complex numbers, is that the latter does not only provide
> the  instantaneous value (voltage) of a signal at a certain point of time,
> but also includes phase information (i.e. the slope of the signal at that
> point).
>
>
> To make this visual:
> Take half a sine-wave and plot it out for every 45 degrees.
> This gives you 5 points: 0 (0 degrees), sqrt(2)/2 (45 degrees), 1 (90
> degrees), sqrt(2)/2 (135 degrees) and 0 (180 degrees).
>
> Now look at the 2nd and the 4th point (45 degrees and 135 degrees), if you
> sample this using only real/float values, these two points are exactly the
> same (sqrt(2)/2). Just based on these values by themselves (i.e. remove all
> other points from the graph), there is no way you can tell that at the
> first point (45 degrees) the graph was going up, while at the 135-degrees
> point the graph was going down.
>
> So, ... what i/q sampling does, is for every point "x", it not only
> provide the value of the graph at that point of time, but also information
> of the slope of the graphs at that time.
>
>
> This also explains while i/q sampling is done by not just taking the value
> of a signal at point "t", but also at 1/4 period later (which is the
> information you need to determine the 'slope' of that graph at point 't')
>
>
> So, ... is this statement correct?
>
> If it is more-or-less correct and it can help provide a basic mental image
> of the concept of i/q sampling, I would be more then happy! :-)
>
>
>
>
> 73
> kristoff - ON1ARF
>
>
>
>
>

-- 
S. Aditya Arun Kumar
Security Researcher, Comms
+919123517465


Re: explaining i/q

2020-11-02 Thread Anon Lister
I always come back to the Lyons explaination: the pictures really help for the 
visual learners among us. If you did a workshop I’d definitely include a link 
to this in reference material:

http://www.dspguru.com/files/QuadSignals.pdf

There’s actually some of us who don’t come from formal electrical engineering 
backgrounds who learned this first and find equations and such more difficult 
when expressed in the “real“ interpretation of a signal. Heh.



> On Nov 2, 2020, at 18:06, Kristoff  wrote:
> 
> Hi all,
> 
> I was watching the webinar of Heather on GNU Radio today, when it came to me 
> that one of the most difficult part doing a presentation of GNU Radio is the 
> data-types, .. and especially these 'complex numbers'.
> The problem, or at least for me, is that when you mention 'GNU Radio complex 
> numbers', you also have to mention iq-signals, which is a topic that is very 
> difficult to explain in 10 seconds to an audience who has never seen anything 
> about i/q sampling before.
> 
> 
> I have been thinking on how to explain the concept of I/Q signalling in just 
> a few lines, e.g. in the context of -say- a workshop on GR.
> 
> 
> I have this idea in my head:
> 
> Statement:
> The main difference between sampling with reals ('floats') and i/q sampling 
> with complex numbers, is that the latter does not only provide the  
> instantaneous value (voltage) of a signal at a certain point of time, but 
> also includes phase information (i.e. the slope of the signal at that point).
> 
> 
> To make this visual:
> Take half a sine-wave and plot it out for every 45 degrees.
> This gives you 5 points: 0 (0 degrees), sqrt(2)/2 (45 degrees), 1 (90 
> degrees), sqrt(2)/2 (135 degrees) and 0 (180 degrees).
> 
> Now look at the 2nd and the 4th point (45 degrees and 135 degrees), if you 
> sample this using only real/float values, these two points are exactly the 
> same (sqrt(2)/2). Just based on these values by themselves (i.e. remove all 
> other points from the graph), there is no way you can tell that at the first 
> point (45 degrees) the graph was going up, while at the 135-degrees point the 
> graph was going down.
> 
> So, ... what i/q sampling does, is for every point "x", it not only provide 
> the value of the graph at that point of time, but also information of the 
> slope of the graphs at that time.
> 
> 
> This also explains while i/q sampling is done by not just taking the value of 
> a signal at point "t", but also at 1/4 period later (which is the information 
> you need to determine the 'slope' of that graph at point 't')
> 
> 
> So, ... is this statement correct?
> 
> If it is more-or-less correct and it can help provide a basic mental image of 
> the concept of i/q sampling, I would be more then happy! :-)
> 
> 
> 
> 
> 73
> kristoff - ON1ARF
> 
> 
> 
> 


Re: explaining i/q

2020-11-02 Thread David Hagood


The main difference between sampling with reals ('floats') and i/q 
sampling with complex numbers, is that the latter does not only 
provide the  instantaneous value (voltage) of a signal at a certain 
point of time, but also includes phase information (i.e. the slope of 
the signal at that point).


The phase is not the slope of the signal - the slope of the signal is 
the first derivative with respect to time of the signal.



The phase is something completely different - it's the angle of the 
signal. So, what does "angle" mean?


Imagine a sine wave - it's zero at zero degrees, 1 at ninety degrees, 0 
at 180 degrees, and -1 at 270 degrees. OK, so if I tell you the signal 
is 1, you know the phase angle is 90, because that's the only place 
sin(x) = 1. But what if I tell you it's at 0 - is the angle 0, or 180? 
There's literally no way to tell. But, what if I also give you the 
cosine of the angle? Cosine is 1 at zero, zero at ninety, -1 at 180, and 
zero again at 270. If I tell you that sin(x) is 1, and cos(x) is zero, 
the angle HAS to be 90. I and Q, or in phase and quadrature, are sine 
and cosine (or rather, usually cosine and sine, due to the way math 
works). Getting rid of that ambiguity about what the angle of the signal 
does all sorts of nice things when doing the math - it allows you to get 
rid of the negative frequency part of a signal (or more accurately, it 
allows you to unambiguously represent a negative frequency vs. a 
positive frequency).


Another way to visualize it - you may have seen the GIF of the ballet 
dancer silhouette , which can appear to be spinning left-to-right or 
right-to-left, just depending upon how you choose to interpret it. 
That's because you only have one part of the signal - you have the X 
part, or the in-phase part, but you don't have the Y part or quadrature 
part. Now, if you had both parts - if you saw not only the image along 
the Y axis (you see x and z), but you also saw the image along the X 
axis (seeing y and z - seeing the figure from the left or right side), 
then you would immediately know which way she was spinning.





OpenPGP_0x5B9DC79986207D69.asc
Description: application/pgp-keys


OpenPGP_signature
Description: OpenPGP digital signature


explaining i/q

2020-11-02 Thread Kristoff

Hi all,

I was watching the webinar of Heather on GNU Radio today, when it came 
to me that one of the most difficult part doing a presentation of GNU 
Radio is the data-types, .. and especially these 'complex numbers'.
The problem, or at least for me, is that when you mention 'GNU Radio 
complex numbers', you also have to mention iq-signals, which is a topic 
that is very difficult to explain in 10 seconds to an audience who has 
never seen anything about i/q sampling before.



I have been thinking on how to explain the concept of I/Q signalling in 
just a few lines, e.g. in the context of -say- a workshop on GR.



I have this idea in my head:

Statement:
The main difference between sampling with reals ('floats') and i/q 
sampling with complex numbers, is that the latter does not only provide 
the  instantaneous value (voltage) of a signal at a certain point of 
time, but also includes phase information (i.e. the slope of the signal 
at that point).



To make this visual:
Take half a sine-wave and plot it out for every 45 degrees.
This gives you 5 points: 0 (0 degrees), sqrt(2)/2 (45 degrees), 1 (90 
degrees), sqrt(2)/2 (135 degrees) and 0 (180 degrees).


Now look at the 2nd and the 4th point (45 degrees and 135 degrees), if 
you sample this using only real/float values, these two points are 
exactly the same (sqrt(2)/2). Just based on these values by themselves 
(i.e. remove all other points from the graph), there is no way you can 
tell that at the first point (45 degrees) the graph was going up, while 
at the 135-degrees point the graph was going down.


So, ... what i/q sampling does, is for every point "x", it not only 
provide the value of the graph at that point of time, but also 
information of the slope of the graphs at that time.



This also explains while i/q sampling is done by not just taking the 
value of a signal at point "t", but also at 1/4 period later (which is 
the information you need to determine the 'slope' of that graph at point 
't')



So, ... is this statement correct?

If it is more-or-less correct and it can help provide a basic mental 
image of the concept of i/q sampling, I would be more then happy! :-)





73
kristoff - ON1ARF