Reply by Matt Boytim September 29, 20032003-09-29
Randy Yates wrote:

> There can be good reasons to AGC even in a digital discriminator, e.g., if the > arctan() function is performed via a lookup table.
CORDIC has problems for very small magnitudes as well.
> Here's another example of a signal that is clearly bandlimited but > produces an infinite phase spectrum: > > z(t) = sin(2*pi*f*t). > > Clearly this signal is bandlimited to f Hz. The IQ diagram would be a > horizontal line, but as the point moved through the origin, the phase > will instantaneously shift. Pretty basic at one level, but from the > phase (phase in the IQ plane, that is) POV, shows how a simple signal > can result in a discontinuous phase and therefore an infinite phase > spectrum.
Yes, the complex angle of any real signal is 0 or 180 degrees.
> > It may be of practical significance to the original poster that > the phase problem caused by wrapping can be overcome by a) sampling > the signal at a sufficient rate that the *intended* (transmitted) > phase change never exceeds some maximum delta, 0 < delta <= 180, and > b) unwrapping the result.
As our examples show, there really is no sample rate that is 'fast enough' unless you know that you are always well above threshold. But while the angle (arctan) has discontinuities, the delta angle is well behaved, so if you are interested in FM then the derivative can be computed without being oversampled relative to the modulated bandwidth and without an arbitrary delta. The continuous derivative can be approximated with the first difference, or any reasonable approximation to the continuous derivative can be factored into a first difference and a 'correction' filter. For a discrete time signal, the delta angle (first difference) is always bounded by +/- 180 degrees (to be precise, you have your choice to call this [-180.180) or (-180,180] depending on whether you represent -fs/2 or +fs/2 but that's another thread). Atan returns the principal value; all you need is a first difference that returns the principal value as well and you're in (just a modulo operation which is free in fixed point if you choose the right representaion for angles which happens to be the obvious one). For true angle (PM) yo can actually differentiate the phase in this way and then re-integrate to get rid of the discontinuities (extended range CORDIC). There are other applications for the bounded first difference. Matt
Reply by Randy Yates September 28, 20032003-09-28
Matt Boytim wrote:
> > Randy Yates wrote: > > > > Matt Boytim wrote: > > > > > > Randy Yates <yates@ieee.org> wrote in message news:<3F73B451.83543DF7@ieee.org>... > > > > Matt Boytim wrote: > > > > > > > > > > Well, if for example a bandlimited i(t)+jq(t) has a trajectory through > > > > > the origin, phi(t) will instantaneously flip 180 degrees which would > > > > > have infinite bandwidth. > > > > > > > > I don't agree. In order for phi(t) to instantaneously flip, so must > > > > i(t) and or q(t). > > > > > > A bandlimited signal is allowed to pass through zero, but the flip in > > > phi is a discontinuity. > > > > Matt (... sigh ...), > > > > I must've had the biggest stupid hat on I've had for years when I responded > > to this. I might as well have said 2+2=5. Yes, of course you are right in > > this respect. I have embarassed myself here. > > > > > A complex carrier exp(j*w0*t)=cos(w0*t)+j*sin(w0*t) is clearly > > > bandlimited, then phi(t)=w0*t (also bandlimited if taken for all t). > > > Now, add a DC offset 1+exp(j*w0*t)=1+cos(w0*t)+j*sin(w0*t) (so that it > > > rotates about 1 instead of the origin), still clearly bandlimited but > > > phi(t) is now periodic with a 180 degree discontinuity every cycle so > > > obviously not bandlimited. > > > > Well, sorry, but I have to disagree here. The phase angle of a > > trajectory that is a circle centered at (1, 0) instead of (0, 0) > > with radius 1 would be between +/- A (A near 45 degrees), right? > > If you zoom in very very very close to the origin, the imaginary axis > and the cirlce are indistinguisable, hence the angle is +/- 90 degrees.
Once again I stand corrected. You are right. I was thinking of a circle at (1, 0) with a radius < 1; when the circle butts right up against the origin, you get this discontinuity problem. This is a good example - thank you for it. See the end of this message for another example based on your "through the origin" idea that is even simpler.
> > I think the point you were making could be made with just the simple > > complex exponential (simple complex??) e^{j*w*t}. Its angle will jump > > from -180 to +180 periodically using plain arctan. The issue here > > is phase unwrapping. With phase unwrapping, this type of discontinuity > > goes away. And it's not a bandwidth issue either - you could sample > > at a google Hz and still have this problem. > > Your simplified example is not the same.
Yeah, I see that now. No need to explain in detail, but thanks for the attempt to be clear.
> > Nevertheless, I do see your original point and now I agree. However, > > there are some interesting things going on that I haven't gotten my > > mind (hopefully the one without the stupid hat) around here. For > > example, most FM detectors AGC the signal before operating on it, > > so the signal would never go through the origin. > > AGC'ing doesn't really help because zero times any finite gain is still > zero.
How often is the input going to be precisely zero? It seems like you can't treat this like a one-dimensional signal, which is frequently going through zero.
> Detectors that convert FM to AM need a normalized signal which > can be obtained using an AGC or (in continuous time) a limiter/filter. > There may be other reasons for an AGC in an FM detector, I'm not sure.
There can be good reasons to AGC even in a digital discriminator, e.g., if the arctan() function is performed via a lookup table.
> An FM signal itself (at complex baseband) cannot go through the origin - > it would take noise or interference for this to happen. But I was using > this only as an example to demonstrate that a signal which is > bandlimited in its rectangular form is not necessarily bandlimited in > its polar form.
Yes. Point well-made. Here's another example of a signal that is clearly bandlimited but produces an infinite phase spectrum: z(t) = sin(2*pi*f*t). Clearly this signal is bandlimited to f Hz. The IQ diagram would be a horizontal line, but as the point moved through the origin, the phase will instantaneously shift. Pretty basic at one level, but from the phase (phase in the IQ plane, that is) POV, shows how a simple signal can result in a discontinuous phase and therefore an infinite phase spectrum. It may be of practical significance to the original poster that the phase problem caused by wrapping can be overcome by a) sampling the signal at a sufficient rate that the *intended* (transmitted) phase change never exceeds some maximum delta, 0 < delta <= 180, and b) unwrapping the result. -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO http://home.earthlink.net/~yatescr
Reply by Matt Boytim September 27, 20032003-09-27
Randy Yates wrote:
> > Matt Boytim wrote: > > > > Randy Yates <yates@ieee.org> wrote in message news:<3F73B451.83543DF7@ieee.org>... > > > Matt Boytim wrote: > > > > > > > > Well, if for example a bandlimited i(t)+jq(t) has a trajectory through > > > > the origin, phi(t) will instantaneously flip 180 degrees which would > > > > have infinite bandwidth. > > > > > > I don't agree. In order for phi(t) to instantaneously flip, so must > > > i(t) and or q(t). > > > > A bandlimited signal is allowed to pass through zero, but the flip in > > phi is a discontinuity. > > Matt (... sigh ...), > > I must've had the biggest stupid hat on I've had for years when I responded > to this. I might as well have said 2+2=5. Yes, of course you are right in > this respect. I have embarassed myself here. > > > A complex carrier exp(j*w0*t)=cos(w0*t)+j*sin(w0*t) is clearly > > bandlimited, then phi(t)=w0*t (also bandlimited if taken for all t). > > Now, add a DC offset 1+exp(j*w0*t)=1+cos(w0*t)+j*sin(w0*t) (so that it > > rotates about 1 instead of the origin), still clearly bandlimited but > > phi(t) is now periodic with a 180 degree discontinuity every cycle so > > obviously not bandlimited. > > Well, sorry, but I have to disagree here. The phase angle of a > trajectory that is a circle centered at (1, 0) instead of (0, 0) > with radius 1 would be between +/- A (A near 45 degrees), right?
If you zoom in very very very close to the origin, the imaginary axis and the cirlce are indistinguisable, hence the angle is +/- 90 degrees.
> > I think the point you were making could be made with just the simple > complex exponential (simple complex??) e^{j*w*t}. Its angle will jump > from -180 to +180 periodically using plain arctan. The issue here > is phase unwrapping. With phase unwrapping, this type of discontinuity > goes away. And it's not a bandwidth issue either - you could sample > at a google Hz and still have this problem.
Your simplified example is not the same. Atan is defined to return the principal value and there is a point of discontinuity but these jumps are 360 degrees, not 180 degrees, and although the simple atan may have jumps of 360 degrees the true phase of a complex tone rotating about the origin will not have the 360 jumps. In my example, the tone rotating about the point 1+j0 goes through the origin; as it approaches the origin the angle approaches 90 degrees, just after it passes through the origin the phase is -90 degrees (or 270 degrees, if it truly went through the origin you really don't know what to call it on the other side), hence the 180 degree jump or discontinuity (there's a 180 degree jump if we call it -90 or 270). If the amplitude of the complex tone is just less than one (still rotating about 1+j0) then the situation is similar except the jump from 90 degrees to -90 degrees is sharp but continuous and unambiguous. If the amplitue is just greater than one then the jump is from 90 degrees to 270 degrees and is unambiguous (not -90 degrees). These are the conditions around FM threshold. (Actually, since true phase runs from -infinity to +infinity (not -180 to +180) the angles in my examples can have any multiple of 360 degrees added to them.)
> > Nevertheless, I do see your original point and now I agree. However, > there are some interesting things going on that I haven't gotten my > mind (hopefully the one without the stupid hat) around here. For > example, most FM detectors AGC the signal before operating on it, > so the signal would never go through the origin.
AGC'ing doesn't really help because zero times any finite gain is still zero. Detectors that convert FM to AM need a normalized signal which can be obtained using an AGC or (in continuous time) a limiter/filter. There may be other reasons for an AGC in an FM detector, I'm not sure. An FM signal itself (at complex baseband) cannot go through the origin - it would take noise or interference for this to happen. But I was using this only as an example to demonstrate that a signal which is bandlimited in its rectangular form is not necessarily bandlimited in its polar form. Matt
> -- > % Randy Yates % "...the answer lies within your soul > %% Fuquay-Varina, NC % 'cause no one knows which side > %%% 919-577-9882 % the coin will fall." > %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO > http://home.earthlink.net/~yatescr
-- matt@boytim.org
Reply by Randy Yates September 27, 20032003-09-27
Matt Boytim wrote:
> > Randy Yates <yates@ieee.org> wrote in message news:<3F73B451.83543DF7@ieee.org>... > > Matt Boytim wrote: > > > > > > Well, if for example a bandlimited i(t)+jq(t) has a trajectory through > > > the origin, phi(t) will instantaneously flip 180 degrees which would > > > have infinite bandwidth. > > > > I don't agree. In order for phi(t) to instantaneously flip, so must > > i(t) and or q(t). > > A bandlimited signal is allowed to pass through zero, but the flip in > phi is a discontinuity.
Matt (... sigh ...), I must've had the biggest stupid hat on I've had for years when I responded to this. I might as well have said 2+2=5. Yes, of course you are right in this respect. I have embarassed myself here.
> A complex carrier exp(j*w0*t)=cos(w0*t)+j*sin(w0*t) is clearly > bandlimited, then phi(t)=w0*t (also bandlimited if taken for all t). > Now, add a DC offset 1+exp(j*w0*t)=1+cos(w0*t)+j*sin(w0*t) (so that it > rotates about 1 instead of the origin), still clearly bandlimited but > phi(t) is now periodic with a 180 degree discontinuity every cycle so > obviously not bandlimited.
Well, sorry, but I have to disagree here. The phase angle of a trajectory that is a circle centered at (1, 0) instead of (0, 0) with radius 1 would be between +/- A (A near 45 degrees), right? I think the point you were making could be made with just the simple complex exponential (simple complex??) e^{j*w*t}. Its angle will jump from -180 to +180 periodically using plain arctan. The issue here is phase unwrapping. With phase unwrapping, this type of discontinuity goes away. And it's not a bandwidth issue either - you could sample at a google Hz and still have this problem. Nevertheless, I do see your original point and now I agree. However, there are some interesting things going on that I haven't gotten my mind (hopefully the one without the stupid hat) around here. For example, most FM detectors AGC the signal before operating on it, so the signal would never go through the origin. -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO http://home.earthlink.net/~yatescr
Reply by Matt Boytim September 26, 20032003-09-26
Randy Yates <yates@ieee.org> wrote in message news:<3F73B451.83543DF7@ieee.org>...
> Matt Boytim wrote: > > > > Well, if for example a bandlimited i(t)+jq(t) has a trajectory through > > the origin, phi(t) will instantaneously flip 180 degrees which would > > have infinite bandwidth. > > I don't agree. In order for phi(t) to instantaneously flip, so must > i(t) and or q(t).
A bandlimited signal is allowed to pass through zero, but the flip in phi is a discontinuity. A complex carrier exp(j*w0*t)=cos(w0*t)+j*sin(w0*t) is clearly bandlimited, then phi(t)=w0*t (also bandlimited if taken for all t). Now, add a DC offset 1+exp(j*w0*t)=1+cos(w0*t)+j*sin(w0*t) (so that it rotates about 1 instead of the origin), still clearly bandlimited but phi(t) is now periodic with a 180 degree discontinuity every cycle so obviously not bandlimited. Matt
> > > But, in general, the FM modulation of a bandlimited signal produces a > > signal which has infinite bandwidth, > > I agree with this, but this doesn't make your point. Your point was > that phi(t) is infinite-bandwidth even when z(t) = I(t) + i*Q(t) is > not. > > > which we typically approximate as > > finite bandwidth. The truncation of bandwidth is equivalent to adding > > modulation components that cancel the truncated components; these > > components extend to infinite frequency. > > That's a very interesting way to look at it. Could be true. Got anything > a little more concrete? > > > Does this help? > > A little. Thanks Matt. > > > > > Matt > > > > Randy Yates <yates@ieee.org> wrote in message news:<3F6FD798.9CB600BD@ieee.org>... > > > Matt Boytim wrote: > > > > > > > > Even if the signal > > > > i(t)+j*q(t) is bandlimited to nyquist, the signal phi(t)=arg(i+jq) is > > > > not (except in trivial cases) > > > > > > Hey Matt, > > > > > > Really? I can't off-the-cuff think of why this may or may not be. Are > > > you sure? Do you have a pointer? This (FM demodulation) is actually > > > of significant interest to me as well.
Reply by Randy Yates September 26, 20032003-09-26
Matt Boytim wrote:
> > Well, if for example a bandlimited i(t)+jq(t) has a trajectory through > the origin, phi(t) will instantaneously flip 180 degrees which would > have infinite bandwidth.
I don't agree. In order for phi(t) to instantaneously flip, so must i(t) and or q(t).
> But, in general, the FM modulation of a bandlimited signal produces a > signal which has infinite bandwidth,
I agree with this, but this doesn't make your point. Your point was that phi(t) is infinite-bandwidth even when z(t) = I(t) + i*Q(t) is not.
> which we typically approximate as > finite bandwidth. The truncation of bandwidth is equivalent to adding > modulation components that cancel the truncated components; these > components extend to infinite frequency.
That's a very interesting way to look at it. Could be true. Got anything a little more concrete?
> Does this help?
A little. Thanks Matt.
> > Matt > > Randy Yates <yates@ieee.org> wrote in message news:<3F6FD798.9CB600BD@ieee.org>... > > Matt Boytim wrote: > > > > > > Even if the signal > > > i(t)+j*q(t) is bandlimited to nyquist, the signal phi(t)=arg(i+jq) is > > > not (except in trivial cases) > > > > Hey Matt, > > > > Really? I can't off-the-cuff think of why this may or may not be. Are > > you sure? Do you have a pointer? This (FM demodulation) is actually > > of significant interest to me as well.
-- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO http://home.earthlink.net/~yatescr
Reply by Tom September 25, 20032003-09-25

Alasdair wrote:

> Hi, > > I have no experience of 'software radio', however I am now trying to > model a digital FM radio. I am using a simple arctan of the I and Q to > generate the instantaneous phase and then differentiating by > subtracting successive phases and dividing by the sample interval to > give the FM output. > > My questions are: > What if any low pass filtering should I put on the output of my FM > demodulation circuit, e.g. what spurii might I get? > What would be the consequences if I had no filtering on the output of > the demodulator? > > The reason I ask is ordinarily if I knew my demodulated signal was > going to have a frequency no greater than X, then I would filter the > output to reject anything outside of X. However the sample rate at the > input of the demodulator is much greater (>100 times) than the > frequency the demodulated signal can be. With my demodulator the > sample rate at the output is the same as the input, hence a simple low > pass FIR filter is not so simple, but I still want to decimate the > output waveform and avoid folding in any spurii. > > Thanks, > > Al
Why not use a PLL? Tom
Reply by Matt Boytim September 23, 20032003-09-23
alcmarsh@hotmail.com (Alasdair) wrote in message news:<404614f2.0309230300.41fcbee8@posting.google.com>...
> Thanks Matt, > > So I think what you are telling me is that I can not do without a > 'proper' LPF and decimate - only that there are efficient and > inefficient ways of doing this.
Yes, and yes.
> > It seems to me that in the general case even if decimation is done > efficiently if the FM modulation is quite wide compared to the > bandwidth of the audio signal, then this decimation will be a > significant part of the overall complexity of the demodulator. > > Would you agree I am correct in thinking this, or do I have a > misunderstanding somewhere?
The decimation filter will be non-trivial. Your pre-detection filter (if you have one) may dominate throughput because it must run at the high rate and may have no special properties; the decimation filter benefits from the rate reduction, don't care regions, etc. For large (composite) decimation factors, a cascade of CIC's, half-bands, and FIR's is typical and efficient. Matt
> > > Thanks, > > > Al
Reply by Alasdair September 23, 20032003-09-23
Thanks Matt, 

So I think what you are telling me is that I can not do without a
'proper' LPF and decimate - only that there are efficient and
inefficient ways of doing this.

It seems to me that in the general case even if decimation is done
efficiently if the FM modulation is quite wide compared to the
bandwidth of the audio signal, then this decimation will be a
significant part of the overall complexity of the demodulator.

Would you agree I am correct in thinking this, or do I have a
misunderstanding somewhere?


Thanks, 


Al
Reply by Matt Boytim September 23, 20032003-09-23
Well, if for example a bandlimited i(t)+jq(t) has a trajectory through
the origin, phi(t) will instantaneously flip 180 degrees which would
have infinite bandwidth.

But, in general, the FM modulation of a bandlimited signal produces a
signal which has infinite bandwidth, which we typically approximate as
finite bandwidth.  The truncation of bandwidth is equivalent to adding
modulation components that cancel the truncated components; these
components extend to infinite frequency.  It is like making a sine
wave from square waves - you start with the fundamental, then add a
square wave to cancel the 3rd harmonic, then one to cance what's left
at the 5th, and so on.  It doesn't matter if we explicity go through
the special fm construction or just truncate the spectrum, the
demodulated result will be the same - a detected signal of infinite
bandwidth.

Because arctan is memoryless, the arctan(i(nT)+jq(nT)) will be
identical to arctan(i(t)+jq(t)) at all nT but if you reconstruct
phihat(t) from arctan(i(nT)+jq(nT)) then phi(t) and phihat(t) will
disagree between the sample points because of aliasing (the usual
infinitely many signals have the identical sample points but only one
is bandlimited).  So the phi(nT) that you get corresponds to an
aliased phit(t) and not a bandlimited phi(t).

To minimize the aliasing you want to be oversampled relative to the
message bandwidth, which for large index fm you probably already are
but for phase modulation maybe not.

Because angle modulation is non-linear this doesn't seem surprising to
me.  I don't have any references.  The guy who taught me about fm has
died.

Does this help?

Matt

Randy Yates <yates@ieee.org> wrote in message news:<3F6FD798.9CB600BD@ieee.org>...
> Matt Boytim wrote: > > > > Even if the signal > > i(t)+j*q(t) is bandlimited to nyquist, the signal phi(t)=arg(i+jq) is > > not (except in trivial cases) > > Hey Matt, > > Really? I can't off-the-cuff think of why this may or may not be. Are > you sure? Do you have a pointer? This (FM demodulation) is actually > of significant interest to me as well.