usrp-users@lists.ettus.com

Discussion and technical support related to USRP, UHD, RFNoC

View all threads

Input signal for ADC is at high level

MM
Muhammad Munir
Wed, Apr 19, 2017 5:16 AM

Dear USRP-users,
I am using USRP N200 and LFRX daughter-board. I am getting a lot of
unwanted signals that are armonics of some other signal in that band. In
other words, I am getting harmonics of most of the signals. When I measured
the input level at RF of USRP, it was giving 900mV Vpp. By the datasheet of
USRP N200, the max input required is +15Dbm. I think the ADC is distorting
with this large input signal.
My question is, what happens to the spectrum of a signal when ADC distorts
a signal? I searched a lot but could not get a satisfied answer. For
example, if I am receiving a spectrum of 5MHz and ADC is producing
harmonics. At what frequencies do I get harmonics as there are 5M
frequencies with different power levels?

Regards:
Munir

Dear USRP-users, I am using USRP N200 and LFRX daughter-board. I am getting a lot of unwanted signals that are armonics of some other signal in that band. In other words, I am getting harmonics of most of the signals. When I measured the input level at RF of USRP, it was giving 900mV Vpp. By the datasheet of USRP N200, the max input required is +15Dbm. I think the ADC is distorting with this large input signal. My question is, what happens to the spectrum of a signal when ADC distorts a signal? I searched a lot but could not get a satisfied answer. For example, if I am receiving a spectrum of 5MHz and ADC is producing harmonics. At what frequencies do I get harmonics as there are 5M frequencies with different power levels? Regards: Munir
MM
Marcus Müller
Wed, Apr 19, 2017 6:31 AM

Hi Munir,

that's an interesting question, and there's multiple ways to derive an
answer. Sadly, I'm running short on time and can't do one in depth, so
here's what you might want to consider:

The spectrum of a clipped cosine depends on the amount of clipping. To
illustrate this, let's first assume our system clips at +- 1.

There's two extreme cases: Feeding a system with a cosine of frequency
$f_0$ of such an amplitude that we get

  1. no clipping at all, or
  2. the system is always clipping

The trivial case is 1., where we immediately know the spectrum,
$\frac12\left(\delta(f_0-f)+\delta(f_0+f)\right)$.

In case 2., we get a simple square wave. The spectrum of a square wave
is also known, it contains every /odd/ ($n=2m+1,,,m\in\mathbb Z$)
harmonic (i.e. components at $f=nf_0$), weigthed inversely to the order
of that harmonic ($\frac 1n$).

But what happens in between?

Well, let's consider the point where we adjust the cosine's amplitude so
that it clips exactly half of the time.

Then, what we get is the cosine minus an error term. That error term is
the product of at shifted, scaled square wave, taking either the value 0
(when the signal is currently not clipping) or 1 (when the signal is
currently clipping) and the original tone. (I'd make a drawing, but I'm
out of time.)

Now, that square wave has a different frequeny: its period is half of
that of the original tone, so it has it's frequency components at $f=
n\frac{f_0}2$. Since we have multiplied that (modified) square wave with
the cosine to get the error term, the error term's spectrum is the
convolution of this spectrum with the cosine spectrum (which luckily
doesn't add new terms).

These are the easy cases. For everything that's not always, never, or
half of the time clipping, you can't simply represent the error term
with a square wave that's equal times on and off. You'd have to
understand this "clipping mask" as kind of a PWM-type signal – with the
usual derivation from an infinite sum of rect functions in time, via an
infinite sum of sincs in frequency domain to a discrete spectrum.

"Discrete Spectrum" is an important point here: since whatever you do to
clip a periodic function will always be periodic, your spectrum will be
discrete.

However, don't forget that you're only observing a finite amount of time
in practical applications. So, if you do a 256-point FFT to estimate the
PSD, it might not be quite as discrete-looking as you'd like.

Best regards,
Marcus

On 19.04.2017 07:16, Muhammad Munir via USRP-users wrote:

Dear USRP-users,
I am using USRP N200 and LFRX daughter-board. I am getting a lot of
unwanted signals that are armonics of some other signal in that band.
In other words, I am getting harmonics of most of the signals. When I
measured the input level at RF of USRP, it was giving 900mV Vpp. By
the datasheet of USRP N200, the max input required is +15Dbm. I think
the ADC is distorting with this large input signal.
My question is, what happens to the spectrum of a signal when ADC
distorts a signal? I searched a lot but could not get a satisfied
answer. For example, if I am receiving a spectrum of 5MHz and ADC is
producing harmonics. At what frequencies do I get harmonics as there
are 5M frequencies with different power levels?

Regards:
Munir


USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Hi Munir, that's an interesting question, and there's multiple ways to derive an answer. Sadly, I'm running short on time and can't do one in depth, so here's what you might want to consider: The spectrum of a clipped cosine depends on the amount of clipping. To illustrate this, let's first assume our system clips at +- 1. There's two extreme cases: Feeding a system with a cosine of frequency $f_0$ of such an amplitude that we get 1. no clipping at all, or 2. the system is always clipping The trivial case is 1., where we immediately know the spectrum, $\frac12\left(\delta(f_0-f)+\delta(f_0+f)\right)$. In case 2., we get a simple square wave. The spectrum of a square wave is also known, it contains every /odd/ ($n=2m+1,\,\,m\in\mathbb Z$) harmonic (i.e. components at $f=nf_0$), weigthed inversely to the order of that harmonic ($\frac 1n$). But what happens in between? Well, let's consider the point where we adjust the cosine's amplitude so that it clips exactly half of the time. Then, what we get is the cosine minus an error term. That error term is the product of at shifted, scaled square wave, taking either the value 0 (when the signal is currently not clipping) or 1 (when the signal is currently clipping) and the original tone. (I'd make a drawing, but I'm out of time.) Now, that square wave has a different frequeny: its period is half of that of the original tone, so it has it's frequency components at $f= n\frac{f_0}2$. Since we have multiplied that (modified) square wave with the cosine to get the error term, the error term's spectrum is the convolution of this spectrum with the cosine spectrum (which luckily doesn't add new terms). These are the easy cases. For everything that's not always, never, or half of the time clipping, you can't simply represent the error term with a square wave that's equal times on and off. You'd have to understand this "clipping mask" as kind of a PWM-type signal – with the usual derivation from an infinite sum of rect functions in time, via an infinite sum of sincs in frequency domain to a discrete spectrum. "Discrete Spectrum" is an important point here: since whatever you do to clip a periodic function will always be periodic, your spectrum will be discrete. However, don't forget that you're only observing a finite amount of time in practical applications. So, if you do a 256-point FFT to estimate the PSD, it might not be quite as discrete-looking as you'd like. Best regards, Marcus On 19.04.2017 07:16, Muhammad Munir via USRP-users wrote: > Dear USRP-users, > I am using USRP N200 and LFRX daughter-board. I am getting a lot of > unwanted signals that are armonics of some other signal in that band. > In other words, I am getting harmonics of most of the signals. When I > measured the input level at RF of USRP, it was giving 900mV Vpp. By > the datasheet of USRP N200, the max input required is +15Dbm. I think > the ADC is distorting with this large input signal. > My question is, what happens to the spectrum of a signal when ADC > distorts a signal? I searched a lot but could not get a satisfied > answer. For example, if I am receiving a spectrum of 5MHz and ADC is > producing harmonics. At what frequencies do I get harmonics as there > are 5M frequencies with different power levels? > > Regards: > Munir > > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
MM
Muhammad Munir
Wed, Apr 19, 2017 9:23 AM

Hi Marcus,
Thank you. It was very helpful answer. You talked about a single frequency
cosine wave. I would like to ask that if a time domain signal contains a
lot of frequencies (say 1MHz to 6MHz) with different amplitudes, it
produces a cosine wave with varying amplitude. The clipping will occur at
the high peaks only which means that the clipping effect is not same for a
complete signal duration. What are the considerations to analyse this kind
of signal?

Regards:
Munir

On Wed, Apr 19, 2017 at 11:31 AM, Marcus Müller via USRP-users <
usrp-users@lists.ettus.com> wrote:

Hi Munir,

that's an interesting question, and there's multiple ways to derive an
answer. Sadly, I'm running short on time and can't do one in depth, so
here's what you might want to consider:

The spectrum of a clipped cosine depends on the amount of clipping. To
illustrate this, let's first assume our system clips at +- 1.

There's two extreme cases: Feeding a system with a cosine of frequency [image:
$f_0$] of such an amplitude that we get

1. no clipping at all, or
2. the system is always clipping

The trivial case is 1., where we immediately know the spectrum, [image:
$\frac12\left(\delta(f_0-f)+\delta(f_0+f)\right)$].

In case 2., we get a simple square wave. The spectrum of a square wave is
also known, it contains every odd ([image: $n=2m+1,,,m\in\mathbb Z$])
harmonic (i.e. components at [image: $f=nf_0$]), weigthed inversely to
the order of that harmonic ([image: $\frac 1n$]).

But what happens in between?

Well, let's consider the point where we adjust the cosine's amplitude so
that it clips exactly half of the time.

Then, what we get is the cosine minus an error term. That error term is
the product of at shifted, scaled square wave, taking either the value 0
(when the signal is currently not clipping) or 1 (when the signal is
currently clipping) and the original tone. (I'd make a drawing, but I'm out
of time.)

Now, that square wave has a different frequeny: its period is half of that
of the original tone, so it has it's frequency components at [image: $f=
n\frac{f_0}2$]. Since we have multiplied that (modified) square wave with
the cosine to get the error term, the error term's spectrum is the
convolution of this spectrum with the cosine spectrum (which luckily
doesn't add new terms).

These are the easy cases. For everything that's not always, never, or half
of the time clipping, you can't simply represent the error term with a
square wave that's equal times on and off. You'd have to understand this
"clipping mask" as kind of a PWM-type signal – with the usual derivation
from an infinite sum of rect functions in time, via an infinite sum of
sincs in frequency domain to a discrete spectrum.

"Discrete Spectrum" is an important point here: since whatever you do to
clip a periodic function will always be periodic, your spectrum will be
discrete.

However, don't forget that you're only observing a finite amount of time
in practical applications. So, if you do a 256-point FFT to estimate the
PSD, it might not be quite as discrete-looking as you'd like.
Best regards,
Marcus

On 19.04.2017 07:16, Muhammad Munir via USRP-users wrote:

Dear USRP-users,
I am using USRP N200 and LFRX daughter-board. I am getting a lot of
unwanted signals that are armonics of some other signal in that band. In
other words, I am getting harmonics of most of the signals. When I measured
the input level at RF of USRP, it was giving 900mV Vpp. By the datasheet of
USRP N200, the max input required is +15Dbm. I think the ADC is distorting
with this large input signal.
My question is, what happens to the spectrum of a signal when ADC distorts
a signal? I searched a lot but could not get a satisfied answer. For
example, if I am receiving a spectrum of 5MHz and ADC is producing
harmonics. At what frequencies do I get harmonics as there are 5M
frequencies with different power levels?

Regards:
Munir


USRP-users mailing listUSRP-users@lists.ettus.comhttp://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Hi Marcus, Thank you. It was very helpful answer. You talked about a single frequency cosine wave. I would like to ask that if a time domain signal contains a lot of frequencies (say 1MHz to 6MHz) with different amplitudes, it produces a cosine wave with varying amplitude. The clipping will occur at the high peaks only which means that the clipping effect is not same for a complete signal duration. What are the considerations to analyse this kind of signal? Regards: Munir On Wed, Apr 19, 2017 at 11:31 AM, Marcus Müller via USRP-users < usrp-users@lists.ettus.com> wrote: > Hi Munir, > > that's an interesting question, and there's multiple ways to derive an > answer. Sadly, I'm running short on time and can't do one in depth, so > here's what you might want to consider: > > The spectrum of a clipped cosine depends on the amount of clipping. To > illustrate this, let's first assume our system clips at +- 1. > > There's two extreme cases: Feeding a system with a cosine of frequency [image: > $f_0$] of such an amplitude that we get > > 1. no clipping at all, or > 2. the system is always clipping > > The trivial case is 1., where we immediately know the spectrum, [image: > $\frac12\left(\delta(f_0-f)+\delta(f_0+f)\right)$]. > > In case 2., we get a simple square wave. The spectrum of a square wave is > also known, it contains every *odd* ([image: $n=2m+1,\,\,m\in\mathbb Z$]) > harmonic (i.e. components at [image: $f=nf_0$]), weigthed inversely to > the order of that harmonic ([image: $\frac 1n$]). > > But what happens in between? > > Well, let's consider the point where we adjust the cosine's amplitude so > that it clips exactly half of the time. > > Then, what we get is the cosine minus an error term. That error term is > the product of at shifted, scaled square wave, taking either the value 0 > (when the signal is currently not clipping) or 1 (when the signal is > currently clipping) and the original tone. (I'd make a drawing, but I'm out > of time.) > > Now, that square wave has a different frequeny: its period is half of that > of the original tone, so it has it's frequency components at [image: $f= > n\frac{f_0}2$]. Since we have multiplied that (modified) square wave with > the cosine to get the error term, the error term's spectrum is the > convolution of this spectrum with the cosine spectrum (which luckily > doesn't add new terms). > > These are the easy cases. For everything that's not always, never, or half > of the time clipping, you can't simply represent the error term with a > square wave that's equal times on and off. You'd have to understand this > "clipping mask" as kind of a PWM-type signal – with the usual derivation > from an infinite sum of rect functions in time, via an infinite sum of > sincs in frequency domain to a discrete spectrum. > > "Discrete Spectrum" is an important point here: since whatever you do to > clip a periodic function will always be periodic, your spectrum will be > discrete. > > However, don't forget that you're only observing a finite amount of time > in practical applications. So, if you do a 256-point FFT to estimate the > PSD, it might not be quite as discrete-looking as you'd like. > Best regards, > Marcus > > > On 19.04.2017 07:16, Muhammad Munir via USRP-users wrote: > > Dear USRP-users, > I am using USRP N200 and LFRX daughter-board. I am getting a lot of > unwanted signals that are armonics of some other signal in that band. In > other words, I am getting harmonics of most of the signals. When I measured > the input level at RF of USRP, it was giving 900mV Vpp. By the datasheet of > USRP N200, the max input required is +15Dbm. I think the ADC is distorting > with this large input signal. > My question is, what happens to the spectrum of a signal when ADC distorts > a signal? I searched a lot but could not get a satisfied answer. For > example, if I am receiving a spectrum of 5MHz and ADC is producing > harmonics. At what frequencies do I get harmonics as there are 5M > frequencies with different power levels? > > Regards: > Munir > > > _______________________________________________ > USRP-users mailing listUSRP-users@lists.ettus.comhttp://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > > > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > >
MM
Marcus Müller
Wed, Apr 19, 2017 10:02 AM

Well, the theory gets a bit more ugly if you're not dealing with a single cosine.

A mathematical tool here is to understand clipping as a function of the input value (as opposed to my simple case, where you could just consider it as a function of time). You can then find a description of that function in terms that make the Fourier transform easier.

Typically, this would be very similar to what we do to model intermodulation that happens on exponential nonlinearities, I.e. I'd recommend reading up on how semiconductor mixers mathematically work to have the tools to approximate the clipper e.g. as power series, and then figure out where your modulation products end up.

As a general rule of thumb: you'll get a lot of intermodulation between  basically all frequencies in your signal. That means that you'll probably see things get a lot "wider" in spectrum, and also, assuming sufficiently many moments of this process are random, and sufficiently uncorrelated as well as sufficiently similar, you'll end up with things that resemble Gaussians (CLT). But that is more of a gut feeling, and really depends on your signal model.

Best regards,
Marcus

Am 19. April 2017 11:23:40 MESZ schrieb Muhammad Munir mmmunir966@gmail.com:

Hi Marcus,
Thank you. It was very helpful answer. You talked about a single
frequency
cosine wave. I would like to ask that if a time domain signal contains
a
lot of frequencies (say 1MHz to 6MHz) with different amplitudes, it
produces a cosine wave with varying amplitude. The clipping will occur
at
the high peaks only which means that the clipping effect is not same
for a
complete signal duration. What are the considerations to analyse this
kind
of signal?

Regards:
Munir

On Wed, Apr 19, 2017 at 11:31 AM, Marcus Müller via USRP-users <
usrp-users@lists.ettus.com> wrote:

Hi Munir,

that's an interesting question, and there's multiple ways to derive

an

answer. Sadly, I'm running short on time and can't do one in depth,

so

here's what you might want to consider:

The spectrum of a clipped cosine depends on the amount of clipping.

To

illustrate this, let's first assume our system clips at +- 1.

There's two extreme cases: Feeding a system with a cosine of

frequency [image:

$f_0$] of such an amplitude that we get

1. no clipping at all, or
2. the system is always clipping

The trivial case is 1., where we immediately know the spectrum,

[image:

$\frac12\left(\delta(f_0-f)+\delta(f_0+f)\right)$].

In case 2., we get a simple square wave. The spectrum of a square

wave is

also known, it contains every odd ([image: $n=2m+1,,,m\in\mathbb

Z$])

harmonic (i.e. components at [image: $f=nf_0$]), weigthed inversely

to

the order of that harmonic ([image: $\frac 1n$]).

But what happens in between?

Well, let's consider the point where we adjust the cosine's amplitude

so

that it clips exactly half of the time.

Then, what we get is the cosine minus an error term. That error term

is

the product of at shifted, scaled square wave, taking either the

value 0

(when the signal is currently not clipping) or 1 (when the signal is
currently clipping) and the original tone. (I'd make a drawing, but

I'm out

of time.)

Now, that square wave has a different frequeny: its period is half of

that

of the original tone, so it has it's frequency components at [image:

$f=

n\frac{f_0}2$]. Since we have multiplied that (modified) square wave

with

the cosine to get the error term, the error term's spectrum is the
convolution of this spectrum with the cosine spectrum (which luckily
doesn't add new terms).

These are the easy cases. For everything that's not always, never, or

half

of the time clipping, you can't simply represent the error term with

a

square wave that's equal times on and off. You'd have to understand

this

"clipping mask" as kind of a PWM-type signal – with the usual

derivation

from an infinite sum of rect functions in time, via an infinite sum

of

sincs in frequency domain to a discrete spectrum.

"Discrete Spectrum" is an important point here: since whatever you do

to

clip a periodic function will always be periodic, your spectrum will

be

discrete.

However, don't forget that you're only observing a finite amount of

time

in practical applications. So, if you do a 256-point FFT to estimate

the

PSD, it might not be quite as discrete-looking as you'd like.
Best regards,
Marcus

On 19.04.2017 07:16, Muhammad Munir via USRP-users wrote:

Dear USRP-users,
I am using USRP N200 and LFRX daughter-board. I am getting a lot of
unwanted signals that are armonics of some other signal in that band.

In

other words, I am getting harmonics of most of the signals. When I

measured

the input level at RF of USRP, it was giving 900mV Vpp. By the

datasheet of

USRP N200, the max input required is +15Dbm. I think the ADC is

distorting

with this large input signal.
My question is, what happens to the spectrum of a signal when ADC

distorts

a signal? I searched a lot but could not get a satisfied answer. For
example, if I am receiving a spectrum of 5MHz and ADC is producing
harmonics. At what frequencies do I get harmonics as there are 5M
frequencies with different power levels?

Regards:
Munir


USRP-users mailing

listUSRP-users@lists.ettus.comhttp://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Well, the theory gets a bit more ugly if you're not dealing with a single cosine. A mathematical tool here is to understand clipping as a function of the input value (as opposed to my simple case, where you could just consider it as a function of time). You can then find a description of that function in terms that make the Fourier transform easier. Typically, this would be very similar to what we do to model intermodulation that happens on exponential nonlinearities, I.e. I'd recommend reading up on how semiconductor mixers mathematically work to have the tools to approximate the clipper e.g. as power series, and then figure out where your modulation products end up. As a general rule of thumb: you'll get a lot of intermodulation between basically all frequencies in your signal. That means that you'll probably see things get a lot "wider" in spectrum, and also, assuming sufficiently many moments of this process are random, and sufficiently uncorrelated as well as sufficiently similar, you'll end up with things that resemble Gaussians (CLT). But that is more of a gut feeling, and really depends on your signal model. Best regards, Marcus Am 19. April 2017 11:23:40 MESZ schrieb Muhammad Munir <mmmunir966@gmail.com>: >Hi Marcus, >Thank you. It was very helpful answer. You talked about a single >frequency >cosine wave. I would like to ask that if a time domain signal contains >a >lot of frequencies (say 1MHz to 6MHz) with different amplitudes, it >produces a cosine wave with varying amplitude. The clipping will occur >at >the high peaks only which means that the clipping effect is not same >for a >complete signal duration. What are the considerations to analyse this >kind >of signal? > >Regards: >Munir > >On Wed, Apr 19, 2017 at 11:31 AM, Marcus Müller via USRP-users < >usrp-users@lists.ettus.com> wrote: > >> Hi Munir, >> >> that's an interesting question, and there's multiple ways to derive >an >> answer. Sadly, I'm running short on time and can't do one in depth, >so >> here's what you might want to consider: >> >> The spectrum of a clipped cosine depends on the amount of clipping. >To >> illustrate this, let's first assume our system clips at +- 1. >> >> There's two extreme cases: Feeding a system with a cosine of >frequency [image: >> $f_0$] of such an amplitude that we get >> >> 1. no clipping at all, or >> 2. the system is always clipping >> >> The trivial case is 1., where we immediately know the spectrum, >[image: >> $\frac12\left(\delta(f_0-f)+\delta(f_0+f)\right)$]. >> >> In case 2., we get a simple square wave. The spectrum of a square >wave is >> also known, it contains every *odd* ([image: $n=2m+1,\,\,m\in\mathbb >Z$]) >> harmonic (i.e. components at [image: $f=nf_0$]), weigthed inversely >to >> the order of that harmonic ([image: $\frac 1n$]). >> >> But what happens in between? >> >> Well, let's consider the point where we adjust the cosine's amplitude >so >> that it clips exactly half of the time. >> >> Then, what we get is the cosine minus an error term. That error term >is >> the product of at shifted, scaled square wave, taking either the >value 0 >> (when the signal is currently not clipping) or 1 (when the signal is >> currently clipping) and the original tone. (I'd make a drawing, but >I'm out >> of time.) >> >> Now, that square wave has a different frequeny: its period is half of >that >> of the original tone, so it has it's frequency components at [image: >$f= >> n\frac{f_0}2$]. Since we have multiplied that (modified) square wave >with >> the cosine to get the error term, the error term's spectrum is the >> convolution of this spectrum with the cosine spectrum (which luckily >> doesn't add new terms). >> >> These are the easy cases. For everything that's not always, never, or >half >> of the time clipping, you can't simply represent the error term with >a >> square wave that's equal times on and off. You'd have to understand >this >> "clipping mask" as kind of a PWM-type signal – with the usual >derivation >> from an infinite sum of rect functions in time, via an infinite sum >of >> sincs in frequency domain to a discrete spectrum. >> >> "Discrete Spectrum" is an important point here: since whatever you do >to >> clip a periodic function will always be periodic, your spectrum will >be >> discrete. >> >> However, don't forget that you're only observing a finite amount of >time >> in practical applications. So, if you do a 256-point FFT to estimate >the >> PSD, it might not be quite as discrete-looking as you'd like. >> Best regards, >> Marcus >> >> >> On 19.04.2017 07:16, Muhammad Munir via USRP-users wrote: >> >> Dear USRP-users, >> I am using USRP N200 and LFRX daughter-board. I am getting a lot of >> unwanted signals that are armonics of some other signal in that band. >In >> other words, I am getting harmonics of most of the signals. When I >measured >> the input level at RF of USRP, it was giving 900mV Vpp. By the >datasheet of >> USRP N200, the max input required is +15Dbm. I think the ADC is >distorting >> with this large input signal. >> My question is, what happens to the spectrum of a signal when ADC >distorts >> a signal? I searched a lot but could not get a satisfied answer. For >> example, if I am receiving a spectrum of 5MHz and ADC is producing >> harmonics. At what frequencies do I get harmonics as there are 5M >> frequencies with different power levels? >> >> Regards: >> Munir >> >> >> _______________________________________________ >> USRP-users mailing >listUSRP-users@lists.ettus.comhttp://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >> >> >> >> _______________________________________________ >> USRP-users mailing list >> USRP-users@lists.ettus.com >> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >> >> -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
MM
Marcus Müller
Wed, Apr 19, 2017 11:06 AM

By the way, that would be something incredibly simple to simulate!

I'd recommend recording your non-clipping signal (by having a lot of
external attenuation in the signal path), and then using GNU Radio to
simulate clipping. I'd just recommend writing your own python block and
using out[:] = numpy.clip(in[:], -1,1) .

Best regards,
Marcus
On 04/19/2017 12:02 PM, Marcus Müller wrote:

Well, the theory gets a bit more ugly if you're not dealing with a
single cosine.

A mathematical tool here is to understand clipping as a function of
the input value (as opposed to my simple case, where you could just
consider it as a function of time). You can then find a description of
that function in terms that make the Fourier transform easier.

Typically, this would be very similar to what we do to model
intermodulation that happens on exponential nonlinearities, I.e. I'd
recommend reading up on how semiconductor mixers mathematically work
to have the tools to approximate the clipper e.g. as power series, and
then figure out where your modulation products end up.

As a general rule of thumb: you'll get a lot of intermodulation
between basically all frequencies in your signal. That means that
you'll probably see things get a lot "wider" in spectrum, and also,
assuming sufficiently many moments of this process are random, and
sufficiently uncorrelated as well as sufficiently similar, you'll end
up with things that resemble Gaussians (CLT). But that is more of a
gut feeling, and really depends on your signal model.

Best regards,
Marcus

Am 19. April 2017 11:23:40 MESZ schrieb Muhammad Munir
mmmunir966@gmail.com:

 Hi Marcus,
 Thank you. It was very helpful answer. You talked about a single
 frequency cosine wave. I would like to ask that if a time domain
 signal contains a lot of frequencies (say 1MHz to 6MHz) with
 different amplitudes, it produces a cosine wave with varying
 amplitude. The clipping will occur at the high peaks only which
 means that the clipping effect is not same for a complete signal
 duration. What are the considerations to analyse this kind of signal?

 Regards:
 Munir 

 On Wed, Apr 19, 2017 at 11:31 AM, Marcus Müller via USRP-users
 <usrp-users@lists.ettus.com <mailto:usrp-users@lists.ettus.com>>
 wrote:

     Hi Munir,

     that's an interesting question, and there's multiple ways to
     derive an answer. Sadly, I'm running short on time and can't
     do one in depth, so here's what you might want to consider:

     The spectrum of a clipped cosine depends on the amount of
     clipping. To illustrate this, let's first assume our system
     clips at +- 1.

     There's two extreme cases: Feeding a system with a cosine of
     frequency $f_0$ of such an amplitude that we get

      1. no clipping at all, or
      2. the system is always clipping

     The trivial case is 1., where we immediately know the
     spectrum, $\frac12\left(\delta(f_0-f)+\delta(f_0+f)\right)$.

     In case 2., we get a simple square wave. The spectrum of a
     square wave is also known, it contains every /odd/
     ($n=2m+1,\,\,m\in\mathbb Z$) harmonic (i.e. components at
     $f=nf_0$), weigthed inversely to the order of that harmonic
     ($\frac 1n$).

     But what happens in between? 

     Well, let's consider the point where we adjust the cosine's
     amplitude so that it clips exactly half of the time.

     Then, what we get is the cosine minus an error term. That
     error term is the product of at shifted, scaled square wave,
     taking either the value 0 (when the signal is currently not
     clipping) or 1 (when the signal is currently clipping) and the
     original tone. (I'd make a drawing, but I'm out of time.)

     Now, that square wave has a different frequeny: its period is
     half of that of the original tone, so it has it's frequency
     components at $f= n\frac{f_0}2$. Since we have multiplied that
     (modified) square wave with the cosine to get the error term,
     the error term's spectrum is the convolution of this spectrum
     with the cosine spectrum (which luckily doesn't add new terms).

     These are the easy cases. For everything that's not always,
     never, or half of the time clipping, you can't simply
     represent the error term with a square wave that's equal times
     on and off. You'd have to understand this "clipping mask" as
     kind of a PWM-type signal – with the usual derivation from an
     infinite sum of rect functions in time, via an infinite sum of
     sincs in frequency domain to a discrete spectrum.

     "Discrete Spectrum" is an important point here: since whatever
     you do to clip a periodic function will always be periodic,
     your spectrum will be discrete.

     However, don't forget that you're only observing a finite
     amount of time in practical applications. So, if you do a
     256-point FFT to estimate the PSD, it might not be quite as
     discrete-looking as you'd like.

     Best regards,
     Marcus


     On 19.04.2017 07:16, Muhammad Munir via USRP-users wrote:
     Dear USRP-users,
     I am using USRP N200 and LFRX daughter-board. I am getting a
     lot of unwanted signals that are armonics of some other
     signal in that band. In other words, I am getting harmonics
     of most of the signals. When I measured the input level at RF
     of USRP, it was giving 900mV Vpp. By the datasheet of USRP
     N200, the max input required is +15Dbm. I think the ADC is
     distorting with this large input signal.
     My question is, what happens to the spectrum of a signal when
     ADC distorts a signal? I searched a lot but could not get a
     satisfied answer. For example, if I am receiving a spectrum
     of 5MHz and ADC is producing harmonics. At what frequencies
     do I get harmonics as there are 5M frequencies with different
     power levels?

     Regards:
     Munir


     _______________________________________________
     USRP-users mailing list
     USRP-users@lists.ettus.com <mailto:USRP-users@lists.ettus.com>
     http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
     <http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com>
     _______________________________________________ USRP-users
     mailing list USRP-users@lists.ettus.com
     <mailto:USRP-users@lists.ettus.com>
     http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
     <http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com>

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

By the way, that would be something incredibly simple to simulate! I'd recommend recording your non-clipping signal (by having a lot of external attenuation in the signal path), and then using GNU Radio to simulate clipping. I'd just recommend writing your own python block and using out[:] = numpy.clip(in[:], -1,1) . Best regards, Marcus On 04/19/2017 12:02 PM, Marcus Müller wrote: > Well, the theory gets a bit more ugly if you're not dealing with a > single cosine. > > A mathematical tool here is to understand clipping as a function of > the input value (as opposed to my simple case, where you could just > consider it as a function of time). You can then find a description of > that function in terms that make the Fourier transform easier. > > Typically, this would be very similar to what we do to model > intermodulation that happens on exponential nonlinearities, I.e. I'd > recommend reading up on how semiconductor mixers mathematically work > to have the tools to approximate the clipper e.g. as power series, and > then figure out where your modulation products end up. > > As a general rule of thumb: you'll get a lot of intermodulation > between basically all frequencies in your signal. That means that > you'll probably see things get a lot "wider" in spectrum, and also, > assuming sufficiently many moments of this process are random, and > sufficiently uncorrelated as well as sufficiently similar, you'll end > up with things that resemble Gaussians (CLT). But that is more of a > gut feeling, and really depends on your signal model. > > Best regards, > Marcus > > > > Am 19. April 2017 11:23:40 MESZ schrieb Muhammad Munir > <mmmunir966@gmail.com>: > > Hi Marcus, > Thank you. It was very helpful answer. You talked about a single > frequency cosine wave. I would like to ask that if a time domain > signal contains a lot of frequencies (say 1MHz to 6MHz) with > different amplitudes, it produces a cosine wave with varying > amplitude. The clipping will occur at the high peaks only which > means that the clipping effect is not same for a complete signal > duration. What are the considerations to analyse this kind of signal? > > Regards: > Munir > > On Wed, Apr 19, 2017 at 11:31 AM, Marcus Müller via USRP-users > <usrp-users@lists.ettus.com <mailto:usrp-users@lists.ettus.com>> > wrote: > > Hi Munir, > > that's an interesting question, and there's multiple ways to > derive an answer. Sadly, I'm running short on time and can't > do one in depth, so here's what you might want to consider: > > The spectrum of a clipped cosine depends on the amount of > clipping. To illustrate this, let's first assume our system > clips at +- 1. > > There's two extreme cases: Feeding a system with a cosine of > frequency $f_0$ of such an amplitude that we get > > 1. no clipping at all, or > 2. the system is always clipping > > The trivial case is 1., where we immediately know the > spectrum, $\frac12\left(\delta(f_0-f)+\delta(f_0+f)\right)$. > > In case 2., we get a simple square wave. The spectrum of a > square wave is also known, it contains every /odd/ > ($n=2m+1,\,\,m\in\mathbb Z$) harmonic (i.e. components at > $f=nf_0$), weigthed inversely to the order of that harmonic > ($\frac 1n$). > > But what happens in between? > > Well, let's consider the point where we adjust the cosine's > amplitude so that it clips exactly half of the time. > > Then, what we get is the cosine minus an error term. That > error term is the product of at shifted, scaled square wave, > taking either the value 0 (when the signal is currently not > clipping) or 1 (when the signal is currently clipping) and the > original tone. (I'd make a drawing, but I'm out of time.) > > Now, that square wave has a different frequeny: its period is > half of that of the original tone, so it has it's frequency > components at $f= n\frac{f_0}2$. Since we have multiplied that > (modified) square wave with the cosine to get the error term, > the error term's spectrum is the convolution of this spectrum > with the cosine spectrum (which luckily doesn't add new terms). > > These are the easy cases. For everything that's not always, > never, or half of the time clipping, you can't simply > represent the error term with a square wave that's equal times > on and off. You'd have to understand this "clipping mask" as > kind of a PWM-type signal – with the usual derivation from an > infinite sum of rect functions in time, via an infinite sum of > sincs in frequency domain to a discrete spectrum. > > "Discrete Spectrum" is an important point here: since whatever > you do to clip a periodic function will always be periodic, > your spectrum will be discrete. > > However, don't forget that you're only observing a finite > amount of time in practical applications. So, if you do a > 256-point FFT to estimate the PSD, it might not be quite as > discrete-looking as you'd like. > > Best regards, > Marcus > > > On 19.04.2017 07:16, Muhammad Munir via USRP-users wrote: >> Dear USRP-users, >> I am using USRP N200 and LFRX daughter-board. I am getting a >> lot of unwanted signals that are armonics of some other >> signal in that band. In other words, I am getting harmonics >> of most of the signals. When I measured the input level at RF >> of USRP, it was giving 900mV Vpp. By the datasheet of USRP >> N200, the max input required is +15Dbm. I think the ADC is >> distorting with this large input signal. >> My question is, what happens to the spectrum of a signal when >> ADC distorts a signal? I searched a lot but could not get a >> satisfied answer. For example, if I am receiving a spectrum >> of 5MHz and ADC is producing harmonics. At what frequencies >> do I get harmonics as there are 5M frequencies with different >> power levels? >> >> Regards: >> Munir >> >> >> _______________________________________________ >> USRP-users mailing list >> USRP-users@lists.ettus.com <mailto:USRP-users@lists.ettus.com> >> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >> <http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com> > _______________________________________________ USRP-users > mailing list USRP-users@lists.ettus.com > <mailto:USRP-users@lists.ettus.com> > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > <http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com> > > > -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
MM
Muhammad Munir
Wed, Apr 19, 2017 11:26 AM

Hi Marcus,
Thanks a lot. It has directed me to a new way of thinking.
Now, I will try to first  simulate it in MATLAB/Gnuradio by generating
known signals and then I will deal with my real time signals. I need to use
low gain amplifier or attenuate it, but it is always good to understand the
effect of each problem you are facing and then finding the solution.

Regards:
Munir

On Wed, Apr 19, 2017 at 4:06 PM, Marcus Müller marcus.mueller@ettus.com
wrote:

By the way, that would be something incredibly simple to simulate!
I'd recommend recording your non-clipping signal (by having a lot of
external attenuation in the signal path), and then using GNU Radio to
simulate clipping. I'd just recommend writing your own python block and
using out[:] = numpy.clip(in[:], -1,1) .

Best regards,
Marcus

On 04/19/2017 12:02 PM, Marcus Müller wrote:

Well, the theory gets a bit more ugly if you're not dealing with a single
cosine.

A mathematical tool here is to understand clipping as a function of the
input value (as opposed to my simple case, where you could just consider it
as a function of time). You can then find a description of that function in
terms that make the Fourier transform easier.

Typically, this would be very similar to what we do to model
intermodulation that happens on exponential nonlinearities, I.e. I'd
recommend reading up on how semiconductor mixers mathematically work to
have the tools to approximate the clipper e.g. as power series, and then
figure out where your modulation products end up.

As a general rule of thumb: you'll get a lot of intermodulation between
basically all frequencies in your signal. That means that you'll probably
see things get a lot "wider" in spectrum, and also, assuming sufficiently
many moments of this process are random, and sufficiently uncorrelated as
well as sufficiently similar, you'll end up with things that resemble
Gaussians (CLT). But that is more of a gut feeling, and really depends on
your signal model.

Best regards,
Marcus

Am 19. April 2017 11:23:40 MESZ schrieb Muhammad Munir
mmmunir966@gmail.com mmmunir966@gmail.com:

Hi Marcus,
Thank you. It was very helpful answer. You talked about a single
frequency cosine wave. I would like to ask that if a time domain signal
contains a lot of frequencies (say 1MHz to 6MHz) with different amplitudes,
it produces a cosine wave with varying amplitude. The clipping will occur
at the high peaks only which means that the clipping effect is not same for
a complete signal duration. What are the considerations to analyse this
kind of signal?

Regards:
Munir

On Wed, Apr 19, 2017 at 11:31 AM, Marcus Müller via USRP-users <
usrp-users@lists.ettus.com> wrote:

Hi Munir,

that's an interesting question, and there's multiple ways to derive an
answer. Sadly, I'm running short on time and can't do one in depth, so
here's what you might want to consider:

The spectrum of a clipped cosine depends on the amount of clipping. To
illustrate this, let's first assume our system clips at +- 1.

There's two extreme cases: Feeding a system with a cosine of frequency [image:
$f_0$] of such an amplitude that we get

1. no clipping at all, or
2. the system is always clipping

The trivial case is 1., where we immediately know the spectrum, [image:
$\frac12\left(\delta(f_0-f)+\delta(f_0+f)\right)$].

In case 2., we get a simple square wave. The spectrum of a square wave
is also known, it contains every odd ([image: $n=2m+1,,,m\in\mathbb
Z$]) harmonic (i.e. components at [image: $f=nf_0$]), weigthed
inversely to the order of that harmonic ([image: $\frac 1n$]).

But what happens in between?

Well, let's consider the point where we adjust the cosine's amplitude so
that it clips exactly half of the time.

Then, what we get is the cosine minus an error term. That error term is
the product of at shifted, scaled square wave, taking either the value 0
(when the signal is currently not clipping) or 1 (when the signal is
currently clipping) and the original tone. (I'd make a drawing, but I'm out
of time.)

Now, that square wave has a different frequeny: its period is half of
that of the original tone, so it has it's frequency components at [image:
$f= n\frac{f_0}2$]. Since we have multiplied that (modified) square
wave with the cosine to get the error term, the error term's spectrum is
the convolution of this spectrum with the cosine spectrum (which luckily
doesn't add new terms).

These are the easy cases. For everything that's not always, never, or
half of the time clipping, you can't simply represent the error term with a
square wave that's equal times on and off. You'd have to understand this
"clipping mask" as kind of a PWM-type signal – with the usual derivation
from an infinite sum of rect functions in time, via an infinite sum of
sincs in frequency domain to a discrete spectrum.

"Discrete Spectrum" is an important point here: since whatever you do to
clip a periodic function will always be periodic, your spectrum will be
discrete.

However, don't forget that you're only observing a finite amount of time
in practical applications. So, if you do a 256-point FFT to estimate the
PSD, it might not be quite as discrete-looking as you'd like.
Best regards,
Marcus

On 19.04.2017 07:16, Muhammad Munir via USRP-users wrote:

Dear USRP-users,
I am using USRP N200 and LFRX daughter-board. I am getting a lot of
unwanted signals that are armonics of some other signal in that band. In
other words, I am getting harmonics of most of the signals. When I measured
the input level at RF of USRP, it was giving 900mV Vpp. By the datasheet of
USRP N200, the max input required is +15Dbm. I think the ADC is distorting
with this large input signal.
My question is, what happens to the spectrum of a signal when ADC
distorts a signal? I searched a lot but could not get a satisfied answer.
For example, if I am receiving a spectrum of 5MHz and ADC is producing
harmonics. At what frequencies do I get harmonics as there are 5M
frequencies with different power levels?

Regards:
Munir


USRP-users mailing listUSRP-users@lists.ettus.comhttp://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

_______________________________________________ USRP-users mailing list
USRP-users@lists.ettus.com http://lists.ettus.com/mailman
/listinfo/usrp-users_lists.ettus.com

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

Hi Marcus, Thanks a lot. It has directed me to a new way of thinking. Now, I will try to first simulate it in MATLAB/Gnuradio by generating known signals and then I will deal with my real time signals. I need to use low gain amplifier or attenuate it, but it is always good to understand the effect of each problem you are facing and then finding the solution. Regards: Munir On Wed, Apr 19, 2017 at 4:06 PM, Marcus Müller <marcus.mueller@ettus.com> wrote: > By the way, that would be something incredibly simple to simulate! > I'd recommend recording your non-clipping signal (by having a lot of > external attenuation in the signal path), and then using GNU Radio to > simulate clipping. I'd just recommend writing your own python block and > using out[:] = numpy.clip(in[:], -1,1) . > > Best regards, > Marcus > > On 04/19/2017 12:02 PM, Marcus Müller wrote: > > Well, the theory gets a bit more ugly if you're not dealing with a single > cosine. > > A mathematical tool here is to understand clipping as a function of the > input value (as opposed to my simple case, where you could just consider it > as a function of time). You can then find a description of that function in > terms that make the Fourier transform easier. > > Typically, this would be very similar to what we do to model > intermodulation that happens on exponential nonlinearities, I.e. I'd > recommend reading up on how semiconductor mixers mathematically work to > have the tools to approximate the clipper e.g. as power series, and then > figure out where your modulation products end up. > > As a general rule of thumb: you'll get a lot of intermodulation between > basically all frequencies in your signal. That means that you'll probably > see things get a lot "wider" in spectrum, and also, assuming sufficiently > many moments of this process are random, and sufficiently uncorrelated as > well as sufficiently similar, you'll end up with things that resemble > Gaussians (CLT). But that is more of a gut feeling, and really depends on > your signal model. > > Best regards, > Marcus > > > > Am 19. April 2017 11:23:40 MESZ schrieb Muhammad Munir > <mmmunir966@gmail.com> <mmmunir966@gmail.com>: >> >> Hi Marcus, >> Thank you. It was very helpful answer. You talked about a single >> frequency cosine wave. I would like to ask that if a time domain signal >> contains a lot of frequencies (say 1MHz to 6MHz) with different amplitudes, >> it produces a cosine wave with varying amplitude. The clipping will occur >> at the high peaks only which means that the clipping effect is not same for >> a complete signal duration. What are the considerations to analyse this >> kind of signal? >> >> Regards: >> Munir >> >> On Wed, Apr 19, 2017 at 11:31 AM, Marcus Müller via USRP-users < >> usrp-users@lists.ettus.com> wrote: >> >>> Hi Munir, >>> >>> that's an interesting question, and there's multiple ways to derive an >>> answer. Sadly, I'm running short on time and can't do one in depth, so >>> here's what you might want to consider: >>> >>> The spectrum of a clipped cosine depends on the amount of clipping. To >>> illustrate this, let's first assume our system clips at +- 1. >>> >>> There's two extreme cases: Feeding a system with a cosine of frequency [image: >>> $f_0$] of such an amplitude that we get >>> >>> 1. no clipping at all, or >>> 2. the system is always clipping >>> >>> The trivial case is 1., where we immediately know the spectrum, [image: >>> $\frac12\left(\delta(f_0-f)+\delta(f_0+f)\right)$]. >>> >>> In case 2., we get a simple square wave. The spectrum of a square wave >>> is also known, it contains every *odd* ([image: $n=2m+1,\,\,m\in\mathbb >>> Z$]) harmonic (i.e. components at [image: $f=nf_0$]), weigthed >>> inversely to the order of that harmonic ([image: $\frac 1n$]). >>> >>> But what happens in between? >>> >>> Well, let's consider the point where we adjust the cosine's amplitude so >>> that it clips exactly half of the time. >>> >>> Then, what we get is the cosine minus an error term. That error term is >>> the product of at shifted, scaled square wave, taking either the value 0 >>> (when the signal is currently not clipping) or 1 (when the signal is >>> currently clipping) and the original tone. (I'd make a drawing, but I'm out >>> of time.) >>> >>> Now, that square wave has a different frequeny: its period is half of >>> that of the original tone, so it has it's frequency components at [image: >>> $f= n\frac{f_0}2$]. Since we have multiplied that (modified) square >>> wave with the cosine to get the error term, the error term's spectrum is >>> the convolution of this spectrum with the cosine spectrum (which luckily >>> doesn't add new terms). >>> >>> These are the easy cases. For everything that's not always, never, or >>> half of the time clipping, you can't simply represent the error term with a >>> square wave that's equal times on and off. You'd have to understand this >>> "clipping mask" as kind of a PWM-type signal – with the usual derivation >>> from an infinite sum of rect functions in time, via an infinite sum of >>> sincs in frequency domain to a discrete spectrum. >>> >>> "Discrete Spectrum" is an important point here: since whatever you do to >>> clip a periodic function will always be periodic, your spectrum will be >>> discrete. >>> >>> However, don't forget that you're only observing a finite amount of time >>> in practical applications. So, if you do a 256-point FFT to estimate the >>> PSD, it might not be quite as discrete-looking as you'd like. >>> Best regards, >>> Marcus >>> >>> >>> On 19.04.2017 07:16, Muhammad Munir via USRP-users wrote: >>> >>> Dear USRP-users, >>> I am using USRP N200 and LFRX daughter-board. I am getting a lot of >>> unwanted signals that are armonics of some other signal in that band. In >>> other words, I am getting harmonics of most of the signals. When I measured >>> the input level at RF of USRP, it was giving 900mV Vpp. By the datasheet of >>> USRP N200, the max input required is +15Dbm. I think the ADC is distorting >>> with this large input signal. >>> My question is, what happens to the spectrum of a signal when ADC >>> distorts a signal? I searched a lot but could not get a satisfied answer. >>> For example, if I am receiving a spectrum of 5MHz and ADC is producing >>> harmonics. At what frequencies do I get harmonics as there are 5M >>> frequencies with different power levels? >>> >>> Regards: >>> Munir >>> >>> >>> _______________________________________________ >>> USRP-users mailing listUSRP-users@lists.ettus.comhttp://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >>> >>> _______________________________________________ USRP-users mailing list >>> USRP-users@lists.ettus.com http://lists.ettus.com/mailman >>> /listinfo/usrp-users_lists.ettus.com >> >> -- Sent from my Android device with K-9 Mail. Please excuse my brevity. > >