[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Silly question or is it?
- Subject: RE: Silly question or is it?
- From:leif.asbrink@xxxxxxxxxxxxxxxx>
- Date: Mon, 13 Jan 2003 16:10:48 +0100
Hi All,
This page contains a discussion about the baseband
(and some other things):
http://ham.te.hik.se/~sm5bsz/pcdsp/genradio.htm
or
http://www.g7rau.co.uk/sm5bsz/pcdsp/genradio.htm
There is a simple answer, but there is more behind
the question.
When we mix to the baseband by use of a single mixer
and then sample at 96kHz, the bandwidth is 48kHz for
the audio signal, BUT the bandwidth is 96 kHz for
the RF signal. An RF signal anywhere between LO-48kHz
and LO+48kHz will give audio in the range 0 to 48kHz.
Actually frequencies close to 48kHz will be attenuated
and they also contain alias signals so the practical
bandwidth may be 45kHz.
If we have a single channel and hear a 10kHz tone,
there is no way of knowing whether it is because of
a transmission at LO-10kHz or if it is at LO+10kHz.
A mixer always has a dual frequency response. It
produces sum frequencies and difference frequencies.
The undesired one is usually called the mirror image.
There are two ways of handeling this situation.
We may put a filter in the RF section to eliminate
the signals on one side of the LO so they can not reach
the mixer. With this method one will loose a few kHz
at the low frequency side because from the lowest frequency,
say 3kHz the IF filter has to go from very low attenuation
to the full attenuation needed 3kHz into the mirror image side.
A filter that slopes by 100dB or more over 6KHz with a
bandwidth of 42 kHz is a very good filter. The filter
method is limited to perhaps 42kHz.
The other way is to use two mixers in quadrature to produce
two audio signals, both representing an audio bandwidth of
45kHz and both representing an RF bandwidth of 90kHz.
If the RF signal is say 10kHz above the LO, the instantaneous
phase of the LO and the RF signal will be equal 10000 times
each second. Each time this happens the output of the
in phase mixer will have its maximum value. The output
of the I mixer will be cos(w) where w is the phase angle.
w is rotating 10000 turns per second which is 3600000 degrees
per second or 2PI*10000 radians per second.
At the precise moment of time when the I-signal has its maximum,
the Q-signal is zero. The relative phase between RF and LOis
shifted by 90 degrees. Very soon after, the voltage will no
longer be zero, it will grow or fall depending on whether the
RF signal is above or below the LO. The Q signal will be
sin(w) or possibly sin(-w) depending on the phase shift.
If the LO is shifted 90 degrees before the RF or vice versa.
There is actually no difference between I and Q. Both sound
exactly the same if analysed alone. Only when the two are
treated as a pair and are analyzed together they form a
baseband with unambigous signals of twice the audio bandwidth.
One way of analysing I and Q is to phase shift Q by 90 degrees
and then add it to I. Signals on one side of the LO will then
cancel while signals at the other side will add. The same
mechanism as used in SSB generation with the phasing method.
I and Q is a complex signal pair. You may see it as a voltage
with a real part and an imaginary part. Just bringing the
complex signal pair into the computer in digital form will
give the dsp processes the data format ideal to them. The
dsp algorithms are preferrably written by use of complex
numbers so the A/D data fits directly to the processes
of Linrad. When you use a filter to get rid of the mirror
image, the first step of Linrad is to convert the signal
from a real signal sampled at a frequency F to a complex
signal sampled at the frequency F/2.
> Also my uncalibrated system at the moment shows a big nasty spur
> at 48khz or so, does the calibration routine remove it? If so how?
Big nasty?????
Then something is wrong. You should have an ugly looking peak
at 48kHz but it should not be big. How it looks depends on the
bandwidth. It should be somewhere 10 to 30 dB above the noise floor.
There is 1/F noise (flicker noise) in the A/D converter. In a Delta44
there is a digital filter that removes signals below about 10 Hz
but still there is a lot of noise at very low frequencies.
Ill designed soundcards (original shape of Delta44) may pick up
low frequency interference, 50Hz and other low frequencies that
are present in the form of currents in the PC chassis.
If you set a bandwidth of 10 Hz, deselect fft2 and zoom in the
spectrum you will see if there are narrowband components like
50 Hz or if there is only the 1/F noise.
The above is for Conrads original posting.
Roger wrot on the subject:
> I can tell you my experience with the RX2500 and the center
> discontinuity. With Leif's latest version of the software my experience
> here is that the center discontinuity is minimal. I am copying this to
> Leif as I always have it a bit wrong, and leave out a bit I shouldn't.
The center discontinuity is created by the calibration process. The way
Linrad is calibrated with a pulse generator causes a discontinuity.
The purpose of the calibration is to set up a digital filter that
accurately compensates for the amplitude errors (non flattness) and the
phase errors (deviation from linear phase response) of the analog hardware.
In order to get accuracy, the average of many pulses is used. The pulses
themself can not be averaged, the phase relative to the LO (how much in
I and how much in Q) The phase relative to the sampling clock (is the
maximum right on a sample or somewhere in between) will vary from pulse
to pulse. These phase angles have to be determined and compensated for
before the pulses are averaged. One simple way of doing it is to take
the fourier transform of each pulse and average the transforms.
As it turns out, the amplitudes can be averaged directly but not the phases.
The phase has an uncertainty in whole turns and it is not self evident
how the phase behaviour is across the center notch. The center notch is not
only the 20Hz coming from the hardware, it is widened by the pulse repetition
frequency of the calibration pulses. The fft of a single pulse must contain
no contamination from surrounding pulses. The fft size is therefore limited
by the separation in time between the calibration pulses to produce a transform
that can not represent lower frequencies that one period in the transform
time span. Linrad averages the second derivative of the phase function
because there is not any uncertainty of whole turns in the second derivative.
The phase will simply never change so drastically between two very close
frequencies. The discontinuity comes back when the derivative is integrated.
It is not possible to integrate the phase across the center region where
the phase is undetermined. The phase is undetermined not only because the
amplitude is near zero, but also because of the 1/F noise which adds random
errors to the phase at very low frequencies. Besides the phase jump at
the center frequency there are oscillations in the phase and the amplitude
in the spectrum determined from the pulses caused by the effect of
limiting the fft size around each pulse. This is a sharp high pass filter
and therefore it causes an oscillatory behaviour close to the cutoff
frequency.
Before adding the filter deduced from pulse averages the center discontinuity
should be removed. Linrad has a function for it and it will eliminate
the artifacts caused by the method of measuring filter responses by
pulse averaging. Once the center discontinuity is removed, the phase and
amplitude vary continously across the center notch of the hardware and
the filter function determined from pulse averaging will produce the desired
spectral response of the whole filter chain. Flat within much better than 0.1dB
and with absolutely linear phase.
The noise close to frequency zero, 1/F noise and 50/60Hz hum will be present
as ordinary signals surrounding the very deep notch at the center frequency
that one can see easily by use of narrow enough bin width in the spectra.
> What I mean by 'minimal' is that when I am operating it is of no
> consequence.
>
> I have enclosed 3 gif files to help me explain.
>
> w3szcenterdisc1.gif is with me receiving a beacon on 144.283. The
> center of the spectrum, where the disconuity would occur, is at 50000.
> You can see that the discontinuity is invisible with my usual settings.
This is as it should be. The 20Hz wide notch is invisible with 90kHz
across the screen, a single pixel covers a wide spectral range across
the notch.
The 1/F noise and the 60Hz hum is invisible because the noise floor is
so high. In w3szcenterdisc1.gif the noise floor in one channel is at
+33dB while it is at +27dB in the other. With the noise floor this
high above the Delta44 noise floor, the 1/F noise is invisible.
With about 10dB lower signal level the dynamic range will be 10dB better
but then one might see a small spur at the center frequency.
> w3szcenterdisc2.gif. Same as #1, but I set the waterfall zero to zero,
> so that you could see the weak center discontinuity that is present. It
> is totally invisible on #1 and I removed the input to the mixers for a
> bit to show it here. You can see that the whole waterfall is whited out
> during those periods when there was signal input at this setting.
What you see is not the discontinuity, you do not have one after going
through the whole calibration procedure. The white rather broad spur that
you can see when there is no input to the mixers is the spur caused by
all the low frequency noise in your system. 1/F noise, maybe 60Hz sidebands
and possibly some other things. How much you see here and how much signal
level you need to hide it completely depends strongly on the quality of your
hardware.
> w3szcenterdisc3.gif Same as #1, but most of the waterfall was acquired
> during a period when the external noise level pushed the baseline from
> 38 dB (noiseless baseline is around 28-30 dB) to over 40 dB. When the
> noise baseline was over 40 dB one could see a faint trace from the
> center discontinuity. When the noise fell back to below 38 as it did
> here you can see the center discontinuity again disappeared. There is
> an explanation for this I am sure, but I don't recall it.
>
> In any event, with Leif's hardware and software the center discontinuity
> is not an issue here after calibration ;)
>
> As long as I am reporting things I have one other interesting thing
> along the lines of the TIme Delays shown using the "T" function we
> talked about yesterday.
>
> Changing Just Second Forward FFT routine from [2] to [1] to [0]:
>
> [2] gives 17.2 second total delay, 10.92 sec FFT2 delay, 59.4% CPU load
>
> [1] gives 6.89 second total delay, 2.73 sec FFT2 delay, 61.5% CPU load
>
> [0] gives 6.90 second total delay, 2.73 sec FFT2 delay, 63.9% CPU load
>
> the delay with [2] really surprised me! (though I know there is a simple
> reason it shoudn't have done so).
Are you sure that nothing was changed in the AFC or baseband parameters?
There should be nearly no difference at all in total delay depending
on the different fft versions.
If the total delay really is different (by more than 0.1 second) on
your fast computer, please give me detailed information because then
you have (again) detected a bug;)
73
Leif / SM5BSZ
LINRADDARNIL