# How does an AM radio filter out only the desired frequency?

I understand that electromagnetic waves in the air induce an alternating current in the antenna. I also understand how, once you filter the signal to obtain the desired frequency, you can get the envelope of the signal and drive a speaker.

What I don't understand is the bit in the middle, where the radio takes the signal from the antenna and filters out just the desired frequency. Say it's a very simple radio that only cares about a single frequency. Can you explain how this works in electronics, and how this would work if you were trying to write a radio in software based on discretely sampled data?

• Please add more description what you are looking for in a "software-defined radio". Assuming you still mean receiving analog radio stations, that would be more of a software question than an electronics question, basically software controlling some kind of digital oscillators and filters. – user3169 May 9 '15 at 3:21
• @user3169 I'm just trying to bring the question into a realm where I have some intuition. Once it's in a computer and in the language of software, I can make sense of it. The resources I've found take the answer, call it a "band pass filter," maybe show some circuit diagrams that are meaningless to me, and leave it at that. I'm trying to understand what's really happening rather than getting lost in the implementation details. For example, is it generating a signal with the carrier frequency and phase, and then mixing them somehow? That kind of intuitive explanation. – Brian Gordon May 9 '15 at 5:09
• I cannot explain from your point of view without seeing the "resources" you are looking at. I can only explain what modern analog AM radios are doing. – user3169 May 9 '15 at 5:23
• I'd like to touch on the software portion of your question, do you have a sample of this discretely sampled data you can post? Or, in my answer, do I give an example of some data that could be used for a software radio implementation? – MDMoore313 May 9 '15 at 17:52

It uses something called a filter. You can build filters out of all sorts of different things.

RC filters made out of resistors and capacitors are probably the simplest to understand. Basically, the capacitor acts as a resistor, but with a different resistance at different frequencies. When you add a resistor, you can build a voltage divider that is frequency dependent. This is called an RC filter. You can make high pass and low pass filters with one resistor and one capacitor. A low pass filter is designed to pass low frequencies and block high frequencies, while a high pass filter does the opposite. A low pass in series with a high pass forms a bandpass, which passes frequencies within some range and blocks other frequencies. Note that the operation of an RC filter (and most filters, for that matter) will depend on the source and load impedance. This is especially important when cascading simple filter stages to construct larger filters as the operation of each stage will be affected by the impedance of the adjacent stages.

simulate this circuit – Schematic created using CircuitLab

Filters can also be made with other components, such as inductors. Inductors also act like resistors, but they change in the opposite direction as capacitors. At low frequencies, an inductor looks like a short while a capacitor looks like an open. At high frequencies, an inductor looks like an open while a capacitor looks like a short. LC filters are a type of filter built with inductors and capacitors. It is possible to make a rather sharp LC filter that cuts off quickly and is easy to tune with a variable capacitor. This is what is normally done for simple radios like crystal radios.

simulate this circuit

You can make bandpass filters out of anything that has a resonant frequency. A capacitor and an inductor in series or in parallel form a resonant tank circuit that can be used as a bandpass or bandstop filter, depending on precisely how you hook it up. An antenna is also a bandpass filter - it will only receive frequencies well that have wavelengths around the size of the antenna. Too large or too small and it won't work. Cavities can also be used as filters - a sealed metal box has various standing wave modes, and these can be exploited to use as filters. Electronic waves can also be converted to other waves, such as acoustic waves, and filtered. SAW (surface acoustic wave) filters and crystal filters both work by mechanical resonance and use the piezoelectric effect to interface with the circuit. It is also possible to build filters out of transmission lines by exploiting their inherent inductance and capacitance as well as by exploiting constructive and destructive interference that results from reflections. I have seen a number of microwave band filters that are made out of a crazily shaped piece of copper printed on a PCB. These are called distributed element filters. Incidentally, most of these other filters can all be modeled as LC or RLC circuits.

Now, a software defined radio is a different animal altogether. Since you are working with digital data, you can't just throw some resistors and capacitors at the problem. Instead, you can use some standard filter topologies like FIR or IIR. These are built out of a cascade of multipliers and adders. The basic idea is to create a time-domain representation of the filter you need, and then convolve this filter with the data. The result is filtered data. It is possible to build low pass and bandpass FIR filters.

Filtering goes hand in hand with frequency conversion. There is a parameter that you will see all over the place called Q. This is the quality factor. For bandpass filters, it is related to the bandwidth and center frequency. If you want to make a 100 Hz wide filter at 1 GHz, you would need a filter with an astronomically high Q. Which is infeasible to build. So instead, what you do is filter with a low Q (wide) filter, downconvert to a lower frequency, and then filter with another low Q filter. However, if you convert 1 GHz to, say, 10 MHz, a 100 Hz filter has a much more reasonable Q. This is often done in radios, and possibly with more than one frequency conversion. Additionally, this method makes it very easy to tune the receiver as you can just change the frequency of the oscillator used for the frequency translation to tune the radio instead of changing the filters.

In the case of digital filters, the longer the filter, the higher the Q and the more selective the filter becomes. Here is an example of an FIR bandpass filter:

The top curve is the frequency response of the filter and the bottom curve is a plot of the filter coefficients. You can think of this type of filter as a way of searching for matching shapes. The filter coefficients contain specific frequency components. As you can see, the response oscillates a bit. The idea is that this oscillation will match up with the input waveform. Frequency components that match closely will appear in the output and frequency components that do not will get cancelled out. A signal is filtered by sliding the filter coefficients along the input signal one sample at a time, and at each offset the corresponding signal samples and filter coefficients are multiplied and summed. This ends up basically averaging out signal components that do not match the filter.

Frequency conversion is also performed both in software and in hardware. In hardware, this is required to get the band you're interested in inside of the ADC IF bandwidth. Say, if you want to look at a signal at 100 MHz but your ADC can only receive 5 MHz of bandwidth, you will have to downconvert it by around 95 MHz. Frequency conversion is performed with a mixer and a reference frequency, generally called the local oscillator (LO). Mixing exploits a trig identity, $$\cos(A)\cos(B) = \frac{1}{2}(\cos(A+B)+\cos(A-B))$$. Mixing requires a component that multiplies the amplitudes of the two input signals together, and the result are frequency components at the sum and difference of the input frequencies. After mixing, you'll need to use a filter to select the mixer output that you want.

• Basically, the capacitor acts as a resistor, but with a different resistance at different frequencies. When you add a resistor, you can build a voltage divider that is frequency dependent. +1 for that alone. 4th year EE student, and somewhat comfortable w/ filters, and that is the simplest and most effective definition I've heard for describing an RC filter. Whether the OP knows what a voltage divider is though is a different story :) – MDMoore313 May 9 '15 at 17:34
• I mentioned mixing at the bottom, but I suppose I could give a few more details. – alex.forencich May 9 '15 at 19:27
• Sorry, didn't read that far, +1. – Matt Young May 9 '15 at 21:01
• That description of digital filters is blowing my mind. It can only identify frequency components, right? So it's exploiting the fact that human ears can't really tell a difference in phase? If that's true, that's exactly the shortcut I was looking for. – Brian Gordon May 10 '15 at 4:32
• Well...sort of. The phase is preserved in the passband, more or less, but you will get a phase shift as the filter response cuts off. The idea is that components in the input signal with frequencies that match those in the filter will be passed through with minimal modification both in amplitude and phase while components that fall outside the passband will be attenuated/blocked. – alex.forencich May 10 '15 at 4:37

This is done using a Heterodyne tuning system. For example, let's say you want to tune in a station at 1200kHZ. You set your tuning dial to "1200", which sets a local oscillator to generate a frequency of 745kHz. When you mix them, one of the resulting frequencies is the difference (the freq. you want to tune - 745kHz).

The next stage is a narrow band amplifier tuned to 455kHz. What is now at 455kHZ was 455+745 or 1200kHZ incoming, the station you wanted to receive. This (455kHz) gets amplified and detected, resulting in the audio for that station being heard.
Other frequencies still are received, of course. But their resulting frequency will be different than 455kHz, so they will not be amplified.

Using 455kHZ intermediate frequency (in the US) was decided because it was below the standard AM band (535kHZ to 1610kHz) so there would be no interference with any station you were trying to receive.

This is for analog radio signal reception. For additional details, you might check Heterodyne, Why the conversion to Intermediate Frequency? and Intermediate frequency.

• This is not true for very simple crystal radios. – alex.forencich May 9 '15 at 4:15
• In fact there are many possible configurations in between the simple crystal set and the complexity of the superhet; although I understand the latter is very frequently used in modern commercial designs. – peterG May 9 '15 at 13:47

A radio's antenna will receive many signals equally. what we want is to filter out the other stations, and only permit the signal of the station we are tuned to. the way this was initially done was to use both an inductor and a variable capacitor. At some frequency, the inductive reactance will equal the capacitive reactance, Xl=Xc, giving the least amount of impedance to that signal. that signal is then sent on to be amplified by the remaining circuitry in the radio, while the other frequencies are suppressed because they are not at that resonant frequency. As long as the Q of the filter is high enough, you can eliminate the other stations from being amplified. Also of interest, this inductive / capacitive circuit oscillates, in the true sense of oscillators... meaning it has a gain of above 1 and is driven by a current.

in my opinion the AMPLITUDE MODULATED wave (containing the carrier wave and the data (voice),is mixed with the intermediate frequency which is out of phase by 180 degrees, thus yeilding the (voice) information. remember in ac theory that waves out of phase subtract and waves inphase add? same idea here.

• The intermediate frequency doesn't get mixed with anything. It is the result of mixing the RF frequency and the oscillator frequency. Talking about the relative phase of two different frequencies is completely meaningless. – user207421 May 9 '15 at 23:07
• Unless you are using synchronous detection at the IF, in which case a synchronous / reference oscillator is mixed with the IF signal. – david May 11 '15 at 2:25