So one of my ambitions is to design and construct my own transceiver, mostly from discrete, analogue parts. That is going to feature in a lot of these 'blog entries, since it is a big subject and I only have a certain amount of free time.
My ambition is to have a transceiver where the radio part is small and simple, and the amplification, selectivity, modulation and demodulation all occur at kilohertz (audio) frequency. This should enable me to keep the radio part modular, minimising interference and spurious emission, and also allow me to add a new frequency band quite easily by attaching a new radio module to the existing audio-frequency logic. The separation of radio into separate modules is a common design pattern: the part that runs at low frequency is normally referred to as the baseband.
GNURadio Companion is a tool that allows digital signal processing designs to be implemented and tested rapidly, using a graphical design called flowgraphs. Data flows through the design from various sources to various sinks. One type of source is a Software Defined Radio dongle, which contains the radio components between the antenna and the baseband. Other sources and sinks include signal generators, graphical display tools for oscilloscope and spectrum scope, and audio connections that can be linked to sound cards. By connecting the external sources and sinks — especially the audio sources and sinks — to external electronics, it should be possible to verify the components of the transceiver as it takes shape.
The receiver baseband design is shown below.

There is a lot going on there, but it is not too hard to break down into components. Ignore everything at the top: the options, variables and GUI inputs are just there to configure things. Start with the box marked RTL-SDR Source. This is the actual radio part which, in my shack, is connected to my skyloop or, via an attenuator, to my Kenwood transceiver.
The radio is configured as a direct conversion receiver. This means that, when tuned into an unmodulated carrier, the carrier signal would come out of the radio as an unvarying, DC signal. This in turn means that the modulation output comes out of the radio as low frequencies, not exceeding the frequency of the modulating signal. For this reason the output of the radio passes through a Low Pass Filter and then goes to the GUI Waterfall Sink, which displays it as a spectrum graph. In the finished radio this will come out of the back as an audio signal of up to 96kHz or so, to be captured by a high-end soundcard and used to produce a panadapter-type display on a computer.
One thing to notice is that the output of the RTL-SDR Source, Low Pass Filter and the input of the GUI Waterfall Sink are blue. This is because they represent complex numbers: numbers that have a "real" and "imaginary" component. Rather than getting into the mathematics of complex numbers, remember the output of the radio is a "quadrature" output. This is very important for the baseband: the "real" part of the signal is the In-phase or I signal, and the "imaginary" part is the Quadrature or Q signal.
When the SDR dongle is tuned into a frequency, four samples are taken of the input voltage for each cycle of the received signal. The difference between the first and third samples is the I signal, called "real," and the difference between the second and fourth samples is the Q signal, called "imaginary." If a signal is slightly higher frequency than the sample rate, the I samples will be large then the Q samples will be large, then the I samples will be large and negative, then the Q samples will be large and negative (I+ Q+ I- Q-.) If the signal is slightly lower frequency than the sample rate, the sequence is reversed: I samples will be large, then Q samples will be large and negative, then I samples will be large and negative, then Q samples will be large (I+ Q- I- Q+.) We will see this difference later when we come to single sideband demodulation. The point is that the I and Q signals in the complex data stream separately encode signals above and below the sample frequency of the SDR source, which is how the GUI Waterfall Sink displays frequencies above and below the centre frequency.
The initial Low Pass Filter reduces the sample rate from the RF_rate of millions of samples per second to the baseband samp_rate of thousands of samples per second — a process called decimation. The reduced rate signal passes through the Band Pass Filter and then to the AGC3 component, which acts as an amplifier. In the real radio these would be replaced with audio filters and an adjustable gain control.
To select the type of modulation there are two Selector components, which are basically switches. The first one chooses how the quadrature part of the signal is used. For upper-sideband and FM demodulation, the quadrature signal passes through. For AM demodulation, it is ignored. For lower-sideband demodulation, it is negated. Negating reverses the order of I and Q peaks, causing the high and low sidebands to be reversed: the I+ Q+ I- Q- signal becomes I+ Q- I- Q+, and vice versa.
After this, the signal is re-modulated by multiplying (mixing) it with an 8kHz local oscillator (called Signal Source,) to re-create the signal at an 8kHz carrier. A High Pass Filter removes the unwanted sideband, then another multiply (mixer) and Low Pass Filter perform an AM demodulation. A separate FM Demod is used in the case of FM signals. Finally the second Selector is used to choose between the decoded FM or the decoded AM/SSB audio.
Actual listening tests both with generated test signals and with real signals off-air show that the rejection of other modulation types (especially the other sidebands for SSB) is good. The baseband functions used here are easily reduced to simple components (two four-way switches, mixers, filters, and a local oscillator) and so it can be seen that the baseband receiver can be implemented using simple electronic circuitry, and can be expected to perform well.
When the baseband receiver is constructed, feeding the output from the RTL-SDR Source into the line output of a sound-card should allow real reception to be verified: the I and Q signals received by the RTL-SDR Source, if the circuitry is correct, should be decoded to AM, FM or single-sideband audio outputs.
In future postings I will discuss the RF "front end" for the receiver, as well as the transmit baseband and front end circuitry.
GnuRadio file for HF from RTL-SDR3
GnuRadio file for VHF from RTL-SDR3