9

I have implemented a simple V.23-like FSK modem in C here.

The peculiarity of the chosen modulation is such that 0's and 1's are sent as tones of two different frequencies (2100 Hz and 1300 Hz respectively) and the duration of each symbol is 1/1200th of a second, which is between one and two full periods of the symbol tone frequency.

The band-pass filter that I used in the receiver is from about 875 Hz to about 2350 Hz. This range was determined empirically.

The question is, how do you calculate this frequency range for a signal like that from the tone frequencies and symbol duration?

EDIT: A similarity with amplitude modulation has been suggested, where the modulated signal falls into the band from Fcarrier - Message Bandwidth to Fcarrier + Message Bandwidth Hz.

If I try to apply this logic directly to my case, then I should expect the bandwidth of my FSK signal to be the union of:

F1 - bit rate to F1 + bit rate
F0 - bit rate to F0 + bit rate

Or, if I plug in the numbers, the union of:

1300-1200=100 to 1300+1200=2500
2100-1200=900 to 2100+1200=3300

Or, simply, from 100 to 3300 Hz.

If I look at the spectrum of my FSK signal, however, it looks like it's roughly contained in the band from 2100-1200=900 to 1300+1200=2500 Hz instead of from 1300-1200=100 to 2100+1200=3300 Hz. Can this empirical result be explained and proven?

EDIT2: Here's the spectrum as I'm seeing it in Audacity:

enter image description here

Alexey Frunze
  • 358
  • 3
  • 9
  • -1 The calculation of the spectrum of a frequency-modulated signal has been well-studied: searching for "FSK spectrum" on Google throws up over 700,000 hits, many tutorial in nature. As even the beginning sentences of most of the hits on the first page say, the calculation requires quite a bit of work. The final answer depends a _lot_ on details that you do not provide in your description, such as, is the FSK signal continuous-phase, what is the transfer function of the bandpass filter, etc. Yes, someone could read your C code and figure out the details, but why should we bother? – Dilip Sarwate Jul 04 '12 at 12:23
  • 1
    @DilipSarwate You could ask, if you're interested. And if you are, the phase is continuous. The filter is FIR, 1 for the frequencies in the pass band, 0 elsewhere. The reason why I'm asking is because this is a special case and there's probably a relatively simple logic leading to the answer, not requiring to understand the general case and then specialize it. Could you provide a relevant link other than just pointing at Google? I can see a lot of related stuff there too. – Alexey Frunze Jul 04 '12 at 12:39
  • You have an **FIR filter** that gives you a **brick-wall frequency response**, passing all frequencies between 875 Hz and 2350 Hz with unit gain and blocking all other frequencies? Run as quickly as you can to the nearest Patent Office and file your patent application! – Dilip Sarwate Jul 04 '12 at 12:44
  • @DilipSarwate You're not being constructive. Pedantic, sure. – Alexey Frunze Jul 04 '12 at 12:52
  • If I get your question right, you'd like to determine the signal bandwidth **before** the bandpass filter anyway. Otherwise the answer simply is "825 Hz to about 2350 Hz" – Deve Jul 04 '12 at 12:57
  • @Deve Yeah, I can look at the spectrogram or just use a trial and error and see which values work, IOW empirically, but I'd like to be able to calculate the bandwidth analytically based just on the 3 values (F0, F1 and bit rate). – Alexey Frunze Jul 04 '12 at 13:11
  • Ok, then I got it right. It also means that the transfer fucntion of your bandpass is irrelevant for the answer to your question. – Deve Jul 04 '12 at 13:13
  • @Deve It is exactly irrelevant. – Alexey Frunze Jul 04 '12 at 13:16
  • I'm thinking this way: You could in theory implement a double bandpass filter at 1300 and 2100, only the bands would have to be wide enough to pass 1200 baud. As a first cut, this would mean 100 to 2500 and 900 to 3300, but one could presumably use SSB and get that down to 900-2500 (after merging). But I'm sure there are some second-order effects in there I'd never be able to grasp. – Daniel R Hicks Jul 04 '12 at 22:21
  • @DanielRHicks I'm not following your idea. The range 2100-1200=900 to 1300+1200=2500 looks like a reasonable hypothesis, but how do we prove it analytically? – Alexey Frunze Jul 04 '12 at 22:43
  • Alex, that's the thing -- my math is weak, I'm just going based on engineering "rule of thumb". The band width of a pure sine wave at frequency F is essentially zero, but modulate it with a signal of frequency M and the width becomes F-M to F+M. But all the information is in one sideband, so you could go F-M to F or F to F+M. The thing I'm fuzzy on is whether effectively having two carrier frequencies vs one has any non-obvious effects on the computations. – Daniel R Hicks Jul 04 '12 at 23:24
  • I'll also observe that one could, in theory, filter away one of the two frequencies, resulting in a CW signal rather than FSK. This would produce a bandwidth of, eg, 100 to 1300, and the data would still be theoretically recoverable. – Daniel R Hicks Jul 04 '12 at 23:28
  • @DanielRHicks In regular AM radios we have carrier frequency +/- voice bandwidth, true. – Alexey Frunze Jul 04 '12 at 23:29
  • @DanielRHicks However, it's not clear why the bandwidth isn't wider, from 1300-1200=100 to 2100+1200=3300. – Alexey Frunze Jul 05 '12 at 01:46
  • You can (with proper precautions) eliminate one of the two "sidebands" when you modulate a carrier. So I selected the upper sideband on the lower signal and the lower sideband on the upper signal. – Daniel R Hicks Jul 05 '12 at 02:39
  • @DanielRHicks That's deviating from the question. The modulated signal is a sequence of sinewaves at either 1300 or 2100 Hz of 833.3 ms duration each stitched together with a continuous phase. The question is about the spectrum of this signal. It appears that it's not using the entire band from 1300-1200=100 to 2100+1200=3300 Hz, but rather a narrower one from about 2100-1200=900 to about 1300+1200=2500 Hz. Why is that? – Alexey Frunze Jul 05 '12 at 02:46
  • 900 is the lower sideband of the upper frequency. 2500 is the upper sideband of the lower frequency. You don't need both sidebands of both frequencies. – Daniel R Hicks Jul 05 '12 at 04:08
  • @DanielRHicks Again, the question is not about what I need or needn't, it's about what there is and isn't. – Alexey Frunze Jul 05 '12 at 04:10
  • What I'm saying is that there *is* a signal produced that spans from about 100 to 3300, but you only *need* from about 900 to 2500 to decode the signal. – Daniel R Hicks Jul 05 '12 at 04:16
  • @DanielRHicks True, but how do I calculate this necessary band (from, say, about 900 to about 2500) and why I calculate it in that way? What's the logic here? – Alexey Frunze Jul 05 '12 at 04:31
  • I'm sorry, I've explained it about as well as I know how. – Daniel R Hicks Jul 05 '12 at 11:56
  • (But I guess I should note that I'm saying "about" for two reasons: 1) I'm uncertain of the implications of having two "carriers" vs one, and 2) no filter is perfect -- the edges are always sloped, not sharp.) – Daniel R Hicks Jul 05 '12 at 11:58
  • Having long discussions in comments makes posts very unreadable and is generally discouraged. A better way would be for the two of you to talk in a chat room. I [created one you can join](http://chat.stackexchange.com/rooms/info/3999/room-for-alex-and-daniel-r-hicks?tab=general) and continue with your discussion. – Phonon Jul 05 '12 at 13:24

2 Answers2

3

With Frequency Shift Keying, the modulation (digital data) takes up bandwidth, so you can't just keep only the frequencies of the mark and space tones. A firm lower bound on how little bandwidth you can use is the distance between the mark and space frequencies, plus half the baud rate on either side. So for 1200 baud with frequencies of 1300 hertz and 2100 hertz, the absolute minimum bandwidth is (1300-(1200/2)) [700 hertz] to (2100+(1200/2)) [2700 hertz] which is a bandwidth of 2 kHz. People have tried to filter it tighter but if the reception still provides the correct data, it is only because of chance. Usually there is also some pulse shaping in the FSK signal before modulation to make the filter's job easier.

1

You design and use bandpass filter to filterout noise and unwanted signal out of band. Since your signal has two components: 1300 Hz and 2100 Hz, your bandpass filter has to pass these frequencies. However since your actual signal has some side lobes, you can not practically generate signal that has only these two frequency components, then you need some gaurd band on both sides of these frequencies. It ooks the gaurd band you have chosen in non symmetric, you could choose a filter with pass band frequency of 1000 Hz to 2400 Hz for example.

TJ1
  • 177
  • 5
  • Seems to me the real question would be what filter would produce the minimum bandwidth while still allowing the demodulator to properly discriminate between the two frequencies. That would depend in part on the demodulator. – Daniel R Hicks Jul 04 '12 at 18:57
  • I know I need to include more frequencies than just 1300 and 2100. The question is how I calculate which based on 3 values: 1300 Hz, 2100 Hz, 1200 bits/second. Your answer isn't answering it. – Alexey Frunze Jul 04 '12 at 21:31