DSPRelated.com
Forums

basic DSP example & my confusion

Started by fredct October 18, 2007
Hi, I'm trying to pick up some more DSP understanding and I've been using
Richard Lyon's book, Understanding Digital Signal Processing. Its been
very helpful thus far, but there's one example that's driving me crazy.
I've bounced this off another couple people here, but they seem confused
as well.

Luckily, I've found an open online source that has the text and pictures
from the chapter, so you can see what I'm seeing.

Here's the section I'm reading:
http://www.informit.com/articles/article.aspx?p=345472&seqNum=3&rl=1

And I'm particularly looking at Figure 2-7:
http://www.informit.com/content/images/chap2_0131089897/elementLinks/02fig07.gif


My issue isn't with what he's doing in between Figure 2-7(a) and (b), but
rather I'm trying to equate it to what I'm doing with the signals I'm
dealing with in my work.

My hang up is, is Figure 2-7(a) a realistic picture of a signal on a
carrier? Everything I've dealt with are real signals, and therefore their
frequency domains are symmetric around 0 (the y axis). If you then
multiply it times a carrier, don't you get a copy of that pattern around
both fc and -fc?

The way he's drawn Figure 2-7(a) here, it looks like only half of it has
moved left and half has moved right. And then, in Figure 2-7(b) he
reconstructs it via undersampling. But wouldn't the whole, symmetric
pattern exist on both size, and being symmetric around fc and -fc?

To use a little ASCII art, if it helps... if you had a signal like:

     /|\
    | | |
------|---------

and then put it on a carrier fc, wouldn't you get...

     / \        |        / \
    |   |       |       |   |
----------------|----------------
     -fc        0         fc


If so, why does Figure 2-7(a) look like:

     /|         |         |\
    | |         |         | |
----------------|----------------
     -fc        0         fc


If I haven't explained it well, please let me know.

Thanks in advance,

Fred


fredct wrote:
> Hi, I'm trying to pick up some more DSP understanding and I've been using > Richard Lyon's book, Understanding Digital Signal Processing. Its been > very helpful thus far, but there's one example that's driving me crazy. > I've bounced this off another couple people here, but they seem confused > as well. > > Luckily, I've found an open online source that has the text and pictures > from the chapter, so you can see what I'm seeing. > > Here's the section I'm reading: > http://www.informit.com/articles/article.aspx?p=345472&seqNum=3&rl=1 > > And I'm particularly looking at Figure 2-7: > http://www.informit.com/content/images/chap2_0131089897/elementLinks/02fig07.gif > > > My issue isn't with what he's doing in between Figure 2-7(a) and (b), but > rather I'm trying to equate it to what I'm doing with the signals I'm > dealing with in my work. > > My hang up is, is Figure 2-7(a) a realistic picture of a signal on a > carrier? Everything I've dealt with are real signals, and therefore their > frequency domains are symmetric around 0 (the y axis). If you then > multiply it times a carrier, don't you get a copy of that pattern around > both fc and -fc?
You describe ordinary AM. The figure is more general; it makes no assumption of symmetry. The top of the spectrum os intentionally slanted to make that clear.
> The way he's drawn Figure 2-7(a) here, it looks like only half of it has > moved left and half has moved right. And then, in Figure 2-7(b) he > reconstructs it via undersampling. But wouldn't the whole, symmetric > pattern exist on both size, and being symmetric around fc and -fc?
He's showing the positive and negative frequencies that are needed to make up the exponential representation of a real sinusoid. (Counter-rotating vectors and all that. Engineers can get so deeply into that simplified mathematics that they can no longer see how it might obscure intuitive thought.)
> To use a little ASCII art, if it helps... if you had a signal like: > > /|\ > | | | > ------|--------- > > and then put it on a carrier fc, wouldn't you get... > > / \ | / \ > | | | | | > ----------------|----------------
Yes, but if you put |\ | | ------|--------- as single sideband on a carrier fc, you would get Figure 2-7(a)!
> If so, why does Figure 2-7(a) look like: > > /| | |\ > | | | | | > ----------------|---------------- > -fc 0 fc
> >
> If I haven't explained it well, please let me know.
If I misunderstood your puzzlement, let me know.
> Thanks in advance,
You're welcome, Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
On Thu, 18 Oct 2007 12:50:01 -0500, fredct wrote:

> Hi, I'm trying to pick up some more DSP understanding and I've been using > > Richard Lyon's book, Understanding Digital Signal Processing. Its been > > very helpful thus far, but there's one example that's driving me crazy. > > I've bounced this off another couple people here, but they seem confused > > as well. > > Luckily, I've found an open online source that has the text and pictures > > from the chapter, so you can see what I'm seeing. > > Here's the section I'm reading: > http://www.informit.com/articles/article.aspx?p=345472&seqNum=3&rl=1 > > And I'm particularly looking at Figure 2-7: > http://www.informit.com/content/images/chap2_0131089897/elementLinks/02fig07.gif > > > My issue isn't with what he's doing in between Figure 2-7(a) and (b), but > > rather I'm trying to equate it to what I'm doing with the signals I'm > > dealing with in my work. > > My hang up is, is Figure 2-7(a) a realistic picture of a signal on a > > carrier? Everything I've dealt with are real signals, and therefore their > > frequency domains are symmetric around 0 (the y axis). If you then > > multiply it times a carrier, don't you get a copy of that pattern around > > both fc and -fc? > > The way he's drawn Figure 2-7(a) here, it looks like only half of it has > > moved left and half has moved right. And then, in Figure 2-7(b) he > > reconstructs it via undersampling. But wouldn't the whole, symmetric > > pattern exist on both size, and being symmetric around fc and -fc? > > To use a little ASCII art, if it helps... if you had a signal like: > > /|\ > | | | > ------|--------- > > and then put it on a carrier fc, wouldn't you get... > > / \ | / \ > | | | | | > ----------------|---------------- > -fc 0 fc > > > If so, why does Figure 2-7(a) look like: > > /| | |\ > | | | | | > ----------------|---------------- > -fc 0 fc > > > If I haven't explained it well, please let me know. > > Thanks in advance, > > Fred
He's showing you a double-sideband signal with different sidebands (or perhaps a single sideband signal). At any rate, he's trying to show you that a bandwidth of X "up there" translates to a bandwidth of X "down here". Only if there is considerable redundancy (as in double sideband) does the bandwidth reduce going to baseband. -- Tim Wescott Control systems and communications consulting http://www.wescottdesign.com Need to learn how to apply control theory in your embedded system? "Applied Control Theory for Embedded Systems" by Tim Wescott Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
On Thu, 18 Oct 2007 21:21:42 -0500, Tim Wescott wrote:

> On Thu, 18 Oct 2007 12:50:01 -0500, fredct wrote: > >> Hi, I'm trying to pick up some more DSP understanding and I've been using >> >> Richard Lyon's book, Understanding Digital Signal Processing. Its been >> >> very helpful thus far, but there's one example that's driving me crazy. >> >> I've bounced this off another couple people here, but they seem confused >> >> as well. >> >> Luckily, I've found an open online source that has the text and pictures >> >> from the chapter, so you can see what I'm seeing. >> >> Here's the section I'm reading: >> http://www.informit.com/articles/article.aspx?p=345472&seqNum=3&rl=1 >> >> And I'm particularly looking at Figure 2-7: >> http://www.informit.com/content/images/chap2_0131089897/elementLinks/02fig07.gif >> >> >> My issue isn't with what he's doing in between Figure 2-7(a) and (b), but >> >> rather I'm trying to equate it to what I'm doing with the signals I'm >> >> dealing with in my work. >> >> My hang up is, is Figure 2-7(a) a realistic picture of a signal on a >> >> carrier? Everything I've dealt with are real signals, and therefore their >> >> frequency domains are symmetric around 0 (the y axis). If you then >> >> multiply it times a carrier, don't you get a copy of that pattern around >> >> both fc and -fc? >> >> The way he's drawn Figure 2-7(a) here, it looks like only half of it has >> >> moved left and half has moved right. And then, in Figure 2-7(b) he >> >> reconstructs it via undersampling. But wouldn't the whole, symmetric >> >> pattern exist on both size, and being symmetric around fc and -fc? >> >> To use a little ASCII art, if it helps... if you had a signal like: >> >> /|\ >> | | | >> ------|--------- >> >> and then put it on a carrier fc, wouldn't you get... >> >> / \ | / \ >> | | | | | >> ----------------|---------------- >> -fc 0 fc >> >> >> If so, why does Figure 2-7(a) look like: >> >> /| | |\ >> | | | | | >> ----------------|---------------- >> -fc 0 fc >> >> >> If I haven't explained it well, please let me know. >> >> Thanks in advance, >> >> Fred > > He's showing you a double-sideband signal with different sidebands (or > perhaps a single sideband signal). At any rate, he's trying to show you > that a bandwidth of X "up there" translates to a bandwidth of X "down > here". Only if there is considerable redundancy (as in double sideband) > does the bandwidth reduce going to baseband. >
Come to think of it, this isn't a DSP problem at all -- it's a sampling problem. I have a short discussion of undersampling buried in here: http://www.wescottdesign.com/articles/Sampling/sampling.html. You may find it helpful. -- Tim Wescott Control systems and communications consulting http://www.wescottdesign.com Need to learn how to apply control theory in your embedded system? "Applied Control Theory for Embedded Systems" by Tim Wescott Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
Thanks, Jerry, Tim,

You've been quite helpful.

First let me say that I understand what he's trying to show - that
undersampling can alias a signal down to baseband, or at least a lower
frequency.

I'm trying to use this book though to understand a few related things that
relate to my work. Let me explain what they are, and therefore why this
example confuses me (or, at least, why I'm not sure if its telling me
something, or if I get why its not applicable).


For starters, I just wanted to make sure I understood one thing about
Nyquist rate. I know that fs > 2B. If you have a signal that is frequency
limited from -x to x, most things I see would define B as x. Or if you had
a signal that was +-x around a carrier fc (fc-x to fc+x), B would again be
x. This matches what he says in the previous section 2.2.

However, that figure 2.7 (in section 2.3) appears to define B as the full
spread around the carrier (here's the link again, for reference:
http://www.informit.com/content/images/chap2_0131089897/elementLinks/02fig07.gif).


Long story short, if you have a signal with spectrum limited to -x from x,
is the Nyquist rate 2x or 2*(x-(-x))=4x?


I know it has nothing to do with what he's showing there, but it made me
think, wait, if I'm dealing with a signal that's +-5 MHz on a 50 MHz
carrier (numbers made up for simplicity), I thought my B was 5 MHz and my
Nyquist rate was 10 MHz. But that picture makes it look like B is 10 MHz
and my Nyquist is 20 MHz!


Okay, second, he then goes on in that chapter to define what fs you should
chose so that you move the sidebands down so they just butt up against each
other. In math terms, in his example, he's 'moving' the band down by fc-B/2
(using B as defined in that picture, regardless of the above answer)

But in a more typical example where each spectrum around +-fc are a
complete copy of the original centered on zero, wouldn't you want to move
it back down by a total amount of fc, not by fc-B/2. Therefore his
derivation for what fs to use to downconvert seems to only apply to his
special case, and not a more general, usual case of a +-x band around 0,
yes?


Thanks again,

Fred

fredct wrote:
> Thanks, Jerry, Tim, > > You've been quite helpful. > > First let me say that I understand what he's trying to show - that > undersampling can alias a signal down to baseband, or at least a lower > frequency. > > I'm trying to use this book though to understand a few related things that > relate to my work. Let me explain what they are, and therefore why this > example confuses me (or, at least, why I'm not sure if its telling me > something, or if I get why its not applicable). > > > For starters, I just wanted to make sure I understood one thing about > Nyquist rate. I know that fs > 2B. If you have a signal that is frequency > limited from -x to x, most things I see would define B as x. Or if you had > a signal that was +-x around a carrier fc (fc-x to fc+x), B would again be > x. This matches what he says in the previous section 2.2.
No. A signal from fc - x to fc + x has a bandwidth of 2x. (That's the amount of room needed by an AM signal whose baseband bandwidth is x.)
> However, that figure 2.7 (in section 2.3) appears to define B as the full > spread around the carrier (here's the link again, for reference: > http://www.informit.com/content/images/chap2_0131089897/elementLinks/02fig07.gif).
That's the way it's always defined. Don't confuse the bandwidth of the channel with the bandwidth of the modulating signal. Consider that the audio bandwidth of a mono FM signal is 15 KHz, but a broadcast FM RF channel is 150 KHz wide (plus guard bands).
> Long story short, if you have a signal with spectrum limited to -x from x, > is the Nyquist rate 2x or 2*(x-(-x))=4x?
Rethink, given what i wrote. You're almost there. ... Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Jerry Avins <jya@ieee.org> writes:

> No. A signal from fc - x to fc + x has a bandwidth of 2x. (That's the > amount of room needed by an AM signal whose baseband bandwidth is x.)
I prefer to think of it differently. I prefer to think of both the bandpass and baseband signals as having a bandwidth of 2x, but that, for a real signal, x of the baseband bandwidth is redundant. For a complex baseband signal, you really do have 2x bandwidth. I haven't been following the OP's problem, but perhaps this is their quandary in a nutshell? -- % Randy Yates % "I met someone who looks alot like you, %% Fuquay-Varina, NC % she does the things you do, %%% 919-577-9882 % but she is an IBM." %%%% <yates@ieee.org> % 'Yours Truly, 2095', *Time*, ELO http://www.digitalsignallabs.com
"fredct" <fredct@gmail.com> writes:
> [...] > My hang up is, is Figure 2-7(a) a realistic picture of a signal on a > carrier?
Yes. If you turned on a spectrum analyzer one day, the signal shown in 2.7(a) is one possible image you might see.
> Everything I've dealt with are real signals, and therefore their > frequency domains are symmetric around 0 (the y axis). If you then > multiply it times a carrier, don't you get a copy of that pattern around > both fc and -fc?
That's correct. However, Rick never said that Figure 2.7(a) is "a real baseband signal translated up to a carrier fc." It's just a (real) signal. That means that on one side of the spectrum (e.g., from 0 to +f) the signal can be any shape whatsoever.
> The way he's drawn Figure 2-7(a) here, it looks like only half of it has > moved left and half has moved right. And then, in Figure 2-7(b) he > reconstructs it via undersampling. But wouldn't the whole, symmetric > pattern exist on both size, and being symmetric around fc and -fc?
He's not "reconstructing" a signal. He's (bandpass) sampling an arbitrary real signal. When you bandpass sample, the signal that results from -f to +f (in the baseband) may not be anything that ever existed before. -- % Randy Yates % "With time with what you've learned, %% Fuquay-Varina, NC % they'll kiss the ground you walk %%% 919-577-9882 % upon." %%%% <yates@ieee.org> % '21st Century Man', *Time*, ELO http://www.digitalsignallabs.com
>> Nyquist rate. I know that fs > 2B. If you have a signal that is
frequency
>> limited from -x to x, most things I see would define B as x. Or if you
had
>> a signal that was +-x around a carrier fc (fc-x to fc+x), B would again
be
>> x. This matches what he says in the previous section 2.2. > >No. A signal from fc - x to fc + x has a bandwidth of 2x. (That's the >amount of room needed by an AM signal whose baseband bandwidth is x.) > >> However, that figure 2.7 (in section 2.3) appears to define B as the
full
>> spread around the carrier (here's the link again, for reference: >>
http://www.informit.com/content/images/chap2_0131089897/elementLinks/02fig07.gif).
> >That's the way it's always defined.
I found the earlier section online too, here it is: http://www.informit.com/articles/article.aspx?p=345472&seqNum=2 And here's the key picture, Figure 2.4: http://www.informit.com/content/images/chap2_0131089897/elementLinks/th02fig04.gif That's not the way they define bandwidth 'B' there. Its also not the way the wiki article on Nyquist defines it: http://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem That says: ---------- The signal x(t)\, is bandlimited to a one-sided baseband bandwidth B\, if: X(f) = 0 for all |f| > B (my note: this would mean if X(f) = 0 other than within +-5 MHz, then abs(f) > 5, so B = 5, not 10) Then the condition for exact reconstructability from samples at a uniform sampling rate f_s, (in samples per unit time) is: f_s > 2 B, (my note, so fs = 10, not 20) ---------- This defines B as x, not 2x. So does the earlier picture.
>> Long story short, if you have a signal with spectrum limited to -x from
x,
>> is the Nyquist rate 2x or 2*(x-(-x))=4x? > >Rethink, given what i wrote. You're almost there.
You seem to be saying that its 4x, but that doesn't match the earlier chapter, nor wiki. Nor does it match the idea behind aliasing that everything is aliased repeating at n*fs. This would mean that using a sampling frequency of fs we have a spectrum width of -fs/2 to fs/2 (which we'll call -x to x). So our sampling rate is 2*x, not 2*2x. I guess ultimately this concern comes down the fact that Figure 2-4: http://www.informit.com/content/images/chap2_0131089897/elementLinks/th02fig04.gif Defines 'B' differently than Figure 2-7: http://www.informit.com/content/images/chap2_0131089897/elementLinks/02fig07.gif My understanding of aliasing says to me that since fs gives us -fs/2 to fs/2, a signal from -B to B needs to have a sampling rate of 2B. But you seem to be saying differently. Yes? No? I'm getting more confused by the sentence ;)
Randy Yates <yates@ieee.org> writes:

> "fredct" <fredct@gmail.com> writes: >> [...] >> My hang up is, is Figure 2-7(a) a realistic picture of a signal on a >> carrier? > > Yes. If you turned on a spectrum analyzer one day, > the signal shown in 2.7(a) is one possible image you might see.
PS: It is also a perfect example of a SSB (single-sideband) AM signal. That is, the signal he ends up with in 2-7(b) could have been the original input signal to a SSB AM modulator with the output shown in Figure 2-7(a). So, again, 2-7(a) is a perfectly realistic possible signal. -- % Randy Yates % "Bird, on the wing, %% Fuquay-Varina, NC % goes floating by %%% 919-577-9882 % but there's a teardrop in his eye..." %%%% <yates@ieee.org> % 'One Summer Dream', *Face The Music*, ELO http://www.digitalsignallabs.com