I have a simulator that determines the power consumed of a ZigBee CC2420 based on different parameters. What I am currently trying to do is by inputting predetermined PN sequences into the simulator, to generate a trend of the bandwidth of the particular PN sequences vs. the power consumed of the circuit. The problem resides in calculating the frequency response and in turn the bandwidth of the PN sequences. First, I modulated a half-sine wave carrier with different PN sequence such that: if bit = 1 --> positive half cycle if bit = 0 --> negative half cycle and calculated the fft in matlab of the resulting waveform and found that the result only depended on the carrier frequency and not the PN sequences. Then, I just took the FFT (again in matlab) of just the PN sequences and got no frequency (DC). Maybe I am approaching this problem incorrectly. Is there a way of getting the bandwidth (0 --> pi/2) of a particular bit pattern, such that I can say that 010100100 has a particular bandwidth? I have run out of ideas and would greatly appreciate any help. Thank You Mohammed Billoo
Bandwidth of PN sequence
Started by ●July 26, 2006
Reply by ●July 26, 20062006-07-26
billoo wrote: ...> if bit = 1 --> positive half cycle > if bit = 0 --> negative half cycleThis is an extreme form of phase modulation and creates an RF signal of very great bandwidth. The power should be independent of the bit sequence. During a long series of ones or zeros, the lowest broadcast frequency will be twice that of the sinusoidal carrier, and there will be many harmonics. (It is the waveform of a full-wave rectifier: for RF, very ugly.) Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●July 26, 20062006-07-26
"billoo" <mohammed.billoo@gmail.com> wrote in message news:1153948710.244919.15290@h48g2000cwc.googlegroups.com...>I have a simulator that determines the power consumed of a ZigBee > CC2420 based on different parameters. > > What I am currently trying to do is by inputting predetermined PN > sequences into the simulator, to generate a trend of the bandwidth of > the particular PN sequences vs. the power consumed of the circuit. The > problem resides in calculating the frequency response and in turn the > bandwidth of the PN sequences. > > First, I modulated a half-sine wave carrier with different PN sequence > such that: > if bit = 1 --> positive half cycle > if bit = 0 --> negative half cycle > > and calculated the fft in matlab of the resulting waveform and found > that the result only depended on the carrier frequency and not the PN > sequences. Then, I just took the FFT (again in matlab) of just the PN > sequences and got no frequency (DC). Maybe I am approaching this > problem incorrectly. Is there a way of getting the bandwidth (0 --> > pi/2) of a particular bit pattern, such that I can say that 010100100 > has a particular bandwidth? I have run out of ideas and would greatly > appreciate any help. > > Thank You > Mohammed Billoo >I'm not sure if I understand the question exactly, but here it goes anyways. If you are talking about BPSK with a constant amplitude envelope (in the time domain), then varying the bit rate (bandwidth) should have little effect on the current consumption of the device. It simply spreads the available power over a greater spectrum (in the frequency domain). That is until the bit rate becomes so great that the phase transitions are a significant portion of the modulation waveform. This will load the output transistors and the output power will begin to roll off. What the current does at this point is really device dependant. Thomas
Reply by ●July 26, 20062006-07-26
billoo wrote:> I have a simulator that determines the power consumed of a ZigBee > CC2420 based on different parameters. > > What I am currently trying to do is by inputting predetermined PN > sequences into the simulator, to generate a trend of the bandwidth of > the particular PN sequences vs. the power consumed of the circuit. The > problem resides in calculating the frequency response and in turn the > bandwidth of the PN sequences. > > First, I modulated a half-sine wave carrier with different PN sequence > such that: > if bit = 1 --> positive half cycle > if bit = 0 --> negative half cycle > > and calculated the fft in matlab of the resulting waveform and found > that the result only depended on the carrier frequency and not the PN > sequences. Then, I just took the FFT (again in matlab) of just the PN > sequences and got no frequency (DC). Maybe I am approaching this > problem incorrectly. Is there a way of getting the bandwidth (0 --> > pi/2) of a particular bit pattern, such that I can say that 010100100 > has a particular bandwidth? I have run out of ideas and would greatly > appreciate any help.Hello Mohammed, A PN sequence can be viewed as simple binary PAM (pulse amplitude modulation) modulation. The power spectral density of binary PAM is derived in Proakis [proakiscomm] as Syy(f) = (1/T) * |G(f)|^2 * Sii(f), where Sii(f) is the PSD (power spectral density) of the information sequence, T is the symbol period, and G(f) is the spectrum of the pulse shape g(t). In your case g(t) is the half-sinusoid. In your case the information sequence I[n] is deterministic and periodic, so the autocorrelation sequence is just the symbol sequence and the power spectrum is the Fourier series of this periodic sequence. Thus Syy(f) will be a line spectrum with magnitudes that depend on the Fourier series Sii(f) (or Sii(k/T) and the pulse shape spectrum G(f). --Randy
Reply by ●July 26, 20062006-07-26
Randy Yates wrote:> [...] > In your case the information sequence I[n] is deterministic and > periodic, so the autocorrelation sequence is just the symbol sequenceI'm sorry Mohammed, but I made an error on this part. First of all, the autocorrelation sequence is not the symbol sequence. In fact, since this isn't a stationary signal, the autocorrelation sequence is a function of two variables and does not have a power spectrum. It is, however, cyclo-stationary, and I think there is a way to convert such a process into a stationary process so that you can obtain the PSD. If interested, reply for details. --Randy
Reply by ●July 27, 20062006-07-27
billoo wrote:> I have a simulator that determines the power consumed of a ZigBee > CC2420 based on different parameters. > > What I am currently trying to do is by inputting predetermined PN > sequences into the simulator, to generate a trend of the bandwidth of > the particular PN sequences vs. the power consumed of the circuit. The > problem resides in calculating the frequency response and in turn the > bandwidth of the PN sequences. > > First, I modulated a half-sine wave carrier with different PN sequence > such that: > if bit = 1 --> positive half cycle > if bit = 0 --> negative half cycle > > and calculated the fft in matlab of the resulting waveform and found > that the result only depended on the carrier frequency and not the PN > sequences. Then, I just took the FFT (again in matlab) of just the PN > sequences and got no frequency (DC). Maybe I am approaching this > problem incorrectly. Is there a way of getting the bandwidth (0 --> > pi/2) of a particular bit pattern, such that I can say that 010100100 > has a particular bandwidth? I have run out of ideas and would greatly > appreciate any help. > > Thank You > Mohammed Billoo >If you parse out the name 'PN' you'll see that it stands for 'Pseudo Noise', i.e. fake noise. It's fake because it's deterministic, but it's noise because it has statistics that approach 'perfect' noise. If you had a sequence of binary numbers that were completely random, they'd always take on values of 0 or 1 but each sample would be completely independent of all the other samples in the sequence. If you took the Fourier transform of such a sequence it'd have an impulse at f = 0 (because a sequence that takes on values of 0 and 1 must have some average value), but outside of that it'd have a constant power spectral density from -pi to pi. If your sequence of random binary numbers were completely random, if you changed it to take on values of -1 and 1, and if the probability of seeing -1 and 1 were each exactly 1/2, then the power spectral density would be constant across the board. This is sort of what you're doing when you modulate your carrier, except you're also stretching your numbers (which only exist at discrete points) into shaped pulses. If you use a pseudo random sequence instead of an actual random sequence, and if it's a _good_ pseudo random sequence, then its statistics will be close to a real random sequence. That means that its Fourier transform will also be flat (possibly with an impulse at DC because of the 0,1 thing). If you then use your PN sequence for modulation you'll end up multiplying the spectrum of your sequence (which is flat) by the spectral shaping of your pulse shape, which is just the Fourier transform of a half-sine. The upshot of all of this is that for a _true_ pseudo random sequence you're not going to do much frequency shaping! There are things that you _could_ do to shape the noise -- you can come up with sequences of 1's and 0's that have a lot of low frequency content, or that have _no_ low frequency content, but the result won't really be 'PN'. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by ●July 27, 20062006-07-27
Thank you for your perspectives, but I feel I have phrased the question improperly. By power consumption, I mean regarding the power consumption of the individual components (DAC, LPF, PLL) as I change the PN sequence, not a PSD of the PN sequence. I know for sure that the power consumption of the DAC will change based on the # of 1s and 0s in the PN sequence, since I have modelled the DAC as an R-2R ladder. My main concern is to determine the bandwidth of PN sequences that are predetermined (i.e. they're stored in a lookup table in ROM and I just map symbol to a PN sequence). I have tried tp just brute force it: x = [1 0 1 0 1 0 1 0]; fftx = abs(fft(x)); . . . in Matlab and gotten a frequency response of 0 (i.e. DC). Then I tried using the PN sequence to modulate a half-sine wave and gotten that the frequency response is just based on the carrier frequency and not the PN sequence at all: t = linspace(0,1,3000); s = sin(pi*30*t); % only want 1/2 cycle; pulse = ones(1,300); x = [1*pulse -1*pulse 1*pulse -1*pulse 1*pulse -1*pulse 1*pulse -1*pulse 1*pulse -1*pulse]; input = x.*s; fftin = abs(fft(input)); . . . So my question is there a way to find the bandwidth or a frequency response of a PN sequence or a digital signal (bit pattern)? By the way, all of this is just QPSK. Thank You Mohammed Billoo Randy Yates wrote:> Randy Yates wrote: > > [...] > > In your case the information sequence I[n] is deterministic and > > periodic, so the autocorrelation sequence is just the symbol sequence > > I'm sorry Mohammed, but I made an error on this part. First of > all, the autocorrelation sequence is not the symbol sequence. > In fact, since this isn't a stationary signal, the autocorrelation > sequence is a function of two variables and does not have > a power spectrum. It is, however, cyclo-stationary, and I > think there is a way to convert such a process into a > stationary process so that you can obtain the PSD. If > interested, reply for details. > > --Randy
Reply by ●July 27, 20062006-07-27
Okay, Tim you mentioned that I want a PN sequence with low frequency content or no frequency content (I dont mind the randomness at the moment). That's the thing that I am exactly looking for. Let's say I have a PN sequence, how do I know whether it has low frequency, high frequency, or no frequency content at all. I apologize because I am about to take DSP next semester and have very little knowledge regarding digital signals. Thank You Mohammed Billoo Tim Wescott wrote:> billoo wrote: > > > I have a simulator that determines the power consumed of a ZigBee > > CC2420 based on different parameters. > > > > What I am currently trying to do is by inputting predetermined PN > > sequences into the simulator, to generate a trend of the bandwidth of > > the particular PN sequences vs. the power consumed of the circuit. The > > problem resides in calculating the frequency response and in turn the > > bandwidth of the PN sequences. > > > > First, I modulated a half-sine wave carrier with different PN sequence > > such that: > > if bit = 1 --> positive half cycle > > if bit = 0 --> negative half cycle > > > > and calculated the fft in matlab of the resulting waveform and found > > that the result only depended on the carrier frequency and not the PN > > sequences. Then, I just took the FFT (again in matlab) of just the PN > > sequences and got no frequency (DC). Maybe I am approaching this > > problem incorrectly. Is there a way of getting the bandwidth (0 --> > > pi/2) of a particular bit pattern, such that I can say that 010100100 > > has a particular bandwidth? I have run out of ideas and would greatly > > appreciate any help. > > > > Thank You > > Mohammed Billoo > > > If you parse out the name 'PN' you'll see that it stands for 'Pseudo > Noise', i.e. fake noise. It's fake because it's deterministic, but it's > noise because it has statistics that approach 'perfect' noise. > > If you had a sequence of binary numbers that were completely random, > they'd always take on values of 0 or 1 but each sample would be > completely independent of all the other samples in the sequence. If you > took the Fourier transform of such a sequence it'd have an impulse at f > = 0 (because a sequence that takes on values of 0 and 1 must have some > average value), but outside of that it'd have a constant power spectral > density from -pi to pi. > > If your sequence of random binary numbers were completely random, if you > changed it to take on values of -1 and 1, and if the probability of > seeing -1 and 1 were each exactly 1/2, then the power spectral density > would be constant across the board. This is sort of what you're doing > when you modulate your carrier, except you're also stretching your > numbers (which only exist at discrete points) into shaped pulses. > > If you use a pseudo random sequence instead of an actual random > sequence, and if it's a _good_ pseudo random sequence, then its > statistics will be close to a real random sequence. That means that its > Fourier transform will also be flat (possibly with an impulse at DC > because of the 0,1 thing). > > If you then use your PN sequence for modulation you'll end up > multiplying the spectrum of your sequence (which is flat) by the > spectral shaping of your pulse shape, which is just the Fourier > transform of a half-sine. > > The upshot of all of this is that for a _true_ pseudo random sequence > you're not going to do much frequency shaping! There are things that > you _could_ do to shape the noise -- you can come up with sequences of > 1's and 0's that have a lot of low frequency content, or that have _no_ > low frequency content, but the result won't really be 'PN'. > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com > > Posting from Google? See http://cfaj.freeshell.org/google/ > > "Applied Control Theory for Embedded Systems" came out in April. > See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by ●July 27, 20062006-07-27
billoo wrote: (top posting fixed)> > Tim Wescott wrote: > >>billoo wrote: >> >> >>>I have a simulator that determines the power consumed of a ZigBee >>>CC2420 based on different parameters. >>> >>>What I am currently trying to do is by inputting predetermined PN >>>sequences into the simulator, to generate a trend of the bandwidth of >>>the particular PN sequences vs. the power consumed of the circuit. The >>>problem resides in calculating the frequency response and in turn the >>>bandwidth of the PN sequences. >>> >>>First, I modulated a half-sine wave carrier with different PN sequence >>>such that: >>>if bit = 1 --> positive half cycle >>>if bit = 0 --> negative half cycle >>> >>>and calculated the fft in matlab of the resulting waveform and found >>>that the result only depended on the carrier frequency and not the PN >>>sequences. Then, I just took the FFT (again in matlab) of just the PN >>>sequences and got no frequency (DC). Maybe I am approaching this >>>problem incorrectly. Is there a way of getting the bandwidth (0 --> >>>pi/2) of a particular bit pattern, such that I can say that 010100100 >>>has a particular bandwidth? I have run out of ideas and would greatly >>>appreciate any help. >>> >>>Thank You >>>Mohammed Billoo >>> >> >>If you parse out the name 'PN' you'll see that it stands for 'Pseudo >>Noise', i.e. fake noise. It's fake because it's deterministic, but it's >>noise because it has statistics that approach 'perfect' noise. >> >>If you had a sequence of binary numbers that were completely random, >>they'd always take on values of 0 or 1 but each sample would be >>completely independent of all the other samples in the sequence. If you >>took the Fourier transform of such a sequence it'd have an impulse at f >>= 0 (because a sequence that takes on values of 0 and 1 must have some >>average value), but outside of that it'd have a constant power spectral >>density from -pi to pi. >> >>If your sequence of random binary numbers were completely random, if you >>changed it to take on values of -1 and 1, and if the probability of >>seeing -1 and 1 were each exactly 1/2, then the power spectral density >>would be constant across the board. This is sort of what you're doing >>when you modulate your carrier, except you're also stretching your >>numbers (which only exist at discrete points) into shaped pulses. >> >>If you use a pseudo random sequence instead of an actual random >>sequence, and if it's a _good_ pseudo random sequence, then its >>statistics will be close to a real random sequence. That means that its >>Fourier transform will also be flat (possibly with an impulse at DC >>because of the 0,1 thing). >> >>If you then use your PN sequence for modulation you'll end up >>multiplying the spectrum of your sequence (which is flat) by the >>spectral shaping of your pulse shape, which is just the Fourier >>transform of a half-sine. >> >>The upshot of all of this is that for a _true_ pseudo random sequence >>you're not going to do much frequency shaping! There are things that >>you _could_ do to shape the noise -- you can come up with sequences of >>1's and 0's that have a lot of low frequency content, or that have _no_ >>low frequency content, but the result won't really be 'PN'. >> >>-- >> >>Tim Wescott >>Wescott Design Services >>http://www.wescottdesign.com >> >>Posting from Google? See http://cfaj.freeshell.org/google/ >> >>"Applied Control Theory for Embedded Systems" came out in April. >>See details at http://www.wescottdesign.com/actfes/actfes.html > >> Okay, Tim you mentioned that I want a PN sequence with low frequency > content or no frequency content (I dont mind the randomness at the > moment). That's the thing that I am exactly looking for. Let's say I > have a PN sequence, how do I know whether it has low frequency, high > frequency, or no frequency content at all. I apologize because I am > about to take DSP next semester and have very little knowledge > regarding digital signals. > Do a Fourier transform on the sequence itself, preferably after modifying it so it goes from -1 to 1 instead of 0 to 1 to get rid of the DC content. I can guarantee you, though, that any PN sequence that's considered 'good' in general is going to be pretty darn white -- if you want one with markedly different spectral characteristics you're going to have to make it yourself. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by ●July 27, 20062006-07-27
Random sequences contain all frequencies equally and are considered "white noise". This is true to a point when it comes to data modulation. Since most modulation schemes have a fixed bit width, it limits the highest fundamental frequency to 1/(2*bit width). So if you have a bit rate of 1 MBPS the highest fundamental frequency will be 1/(2*1E-6) or 500 KHz. And then depending on how fast you transition from bit to bit (phase rise & fall times) will determine the amount of harmonic content and spectral spreading in the frequency domain. Thomas "billoo" <mohammed.billoo@gmail.com> wrote in message news:1153973051.598813.204340@b28g2000cwb.googlegroups.com...> Okay, Tim you mentioned that I want a PN sequence with low frequency > content or no frequency content (I dont mind the randomness at the > moment). That's the thing that I am exactly looking for. Let's say I > have a PN sequence, how do I know whether it has low frequency, high > frequency, or no frequency content at all. I apologize because I am > about to take DSP next semester and have very little knowledge > regarding digital signals. > > Thank You > Mohammed Billoo > > Tim Wescott wrote: >> billoo wrote: >> >> > I have a simulator that determines the power consumed of a ZigBee >> > CC2420 based on different parameters. >> > >> > What I am currently trying to do is by inputting predetermined PN >> > sequences into the simulator, to generate a trend of the bandwidth of >> > the particular PN sequences vs. the power consumed of the circuit. The >> > problem resides in calculating the frequency response and in turn the >> > bandwidth of the PN sequences. >> > >> > First, I modulated a half-sine wave carrier with different PN sequence >> > such that: >> > if bit = 1 --> positive half cycle >> > if bit = 0 --> negative half cycle >> > >> > and calculated the fft in matlab of the resulting waveform and found >> > that the result only depended on the carrier frequency and not the PN >> > sequences. Then, I just took the FFT (again in matlab) of just the PN >> > sequences and got no frequency (DC). Maybe I am approaching this >> > problem incorrectly. Is there a way of getting the bandwidth (0 --> >> > pi/2) of a particular bit pattern, such that I can say that 010100100 >> > has a particular bandwidth? I have run out of ideas and would greatly >> > appreciate any help. >> > >> > Thank You >> > Mohammed Billoo >> > >> If you parse out the name 'PN' you'll see that it stands for 'Pseudo >> Noise', i.e. fake noise. It's fake because it's deterministic, but it's >> noise because it has statistics that approach 'perfect' noise. >> >> If you had a sequence of binary numbers that were completely random, >> they'd always take on values of 0 or 1 but each sample would be >> completely independent of all the other samples in the sequence. If you >> took the Fourier transform of such a sequence it'd have an impulse at f >> = 0 (because a sequence that takes on values of 0 and 1 must have some >> average value), but outside of that it'd have a constant power spectral >> density from -pi to pi. >> >> If your sequence of random binary numbers were completely random, if you >> changed it to take on values of -1 and 1, and if the probability of >> seeing -1 and 1 were each exactly 1/2, then the power spectral density >> would be constant across the board. This is sort of what you're doing >> when you modulate your carrier, except you're also stretching your >> numbers (which only exist at discrete points) into shaped pulses. >> >> If you use a pseudo random sequence instead of an actual random >> sequence, and if it's a _good_ pseudo random sequence, then its >> statistics will be close to a real random sequence. That means that its >> Fourier transform will also be flat (possibly with an impulse at DC >> because of the 0,1 thing). >> >> If you then use your PN sequence for modulation you'll end up >> multiplying the spectrum of your sequence (which is flat) by the >> spectral shaping of your pulse shape, which is just the Fourier >> transform of a half-sine. >> >> The upshot of all of this is that for a _true_ pseudo random sequence >> you're not going to do much frequency shaping! There are things that >> you _could_ do to shape the noise -- you can come up with sequences of >> 1's and 0's that have a lot of low frequency content, or that have _no_ >> low frequency content, but the result won't really be 'PN'. >> >> -- >> >> Tim Wescott >> Wescott Design Services >> http://www.wescottdesign.com >> >> Posting from Google? See http://cfaj.freeshell.org/google/ >> >> "Applied Control Theory for Embedded Systems" came out in April. >> See details at http://www.wescottdesign.com/actfes/actfes.html >






