3

Update

I think I now better understand what is going on. My question is, for an OOK system:

How can I determine the optimum carrier frequency for a given bandwidth and BER?

I asked the question below and since than I learned a lot about OOK systems, one of being which, even the OOK system has a bandwidth. (Originally, I didn't understood this since the carrier frequency doesn't change but amplitude does, so I assumed it is fixed frequency but AM modulation has also bandwidth since amplitude change is reflected in the frequency domain as bandwidth)

I have also updated the question below.

Original Question

I am building an OOK system. See the image below.

enter image description here

The block diagram of the system I have in mind is as follows:

Receiver -> Amplifier -> BPF -> Demodulator

I use 5MHz as my primary carrier frequency. (My target data rate is 1Mbps, but if this is not possible, I am ok to reduce to 500Kbps)

I have built the receiver and the amplifier, both on simulation and circuit wise they are working and they are in agreement. I am now working on BPF and Demodulator circuits.

Question:

What is the best demodulator circuit for this? I have considered a few alternatives:
- classical envelope detector followed by RC filter but too slow, also diode eats up very valuable signal there - Synchronous detection (PSD), works in simulation but this also suffers from the slow trailing RC filter [This is using the reference clock fed to +/-1 multiplier using Opamp]. Time constant of the RC filter is the primary problem, I can use a smaller time constant but I am assuming better solutions out there and PSD is not my first choice.

[This still needs to be investigated, but I am trying to get the theory work out for now]

Ktc
  • 2,236
  • 3
  • 26
  • 50
  • There may be ways to stretch the limit, but in general if you want to transmit 1 MHz worth of data, you'll want your bandpass filter to have at least 1 MHz of bandwidth, not 400 kHz as in your proposal under item "1". What was the bandwidth of your original bandpass filter design? – The Photon Jan 26 '12 at 05:25
  • @ThePhoton I want BPF as narrow as possible, because the BW of the filter is not related to the data rate. The narrower the filter the less noise I will have in demodulator. I don't quite understand your comment. I am not very experienced in this but I think the data rate is depending on the quality of my demodulator. – Ktc Jan 26 '12 at 05:44
  • 2
    The bandwidth of the filter is related to the data rate. A 5 MHz carrier that is modulated by OOK has power at frequencies other than 5 MHz. In order to successfully receive that signal you have to capture all of those frequencies. – The Photon Jan 26 '12 at 05:50
  • @ThePhoton I guess I don't quite follow your logic. The purpose of that BPfilter is to remove all other frequencies other than the carrier frequency. Later we look at the presence of carrier (in demodulator) to see if 1 or 0. Carrier present 1, of not 0. To me, I should filter as narrow as possible to boost SNR. – Ktc Jan 26 '12 at 06:07
  • 1
    As I said, "A 5 MHz carrier that is modulated by OOK has power at frequencies other than 5 MHz". If you eliminate all frequencies other than 5 MHz all you will see is a continuously on 5 MHz carrier, which doesn't carry any information. – The Photon Jan 26 '12 at 06:23
  • @ThePhoton ok, my assumption was that the BPFilter will output zero if carrier is not detected and output 5MHz if carrier is detected. Is this logic wrong? When I look at the bode plot of the filter I see everything is massively attenuated due to the filter. So, if I don't have any carrier at the input, the BP filter should output zero, and when I have input, it outputs the 5MHz which we will use for demodulation. Sorry, I still don't get it. – Ktc Jan 26 '12 at 06:29
  • 2
    It will output zero if the carrier is absent, and 5 MHz if 5 MHz is input, but it will take a long time to switch between those two conditions if the carrier is switched on & off. How long depends on how narrow is the filter. – The Photon Jan 26 '12 at 06:46
  • @ThePhoton great, this is exactly my problem, because I cannot push the data rate due to filter not stabilizing fast enough. Now, what should I do? What is the usual approach to this problem. How people solving these issues in high speed systems ? (Naturally not using a very narrow filter. My primary concern is to have good SNR at acceptable speed min. 500K, hopefully 1M) – Ktc Jan 26 '12 at 06:51
  • 1
    Only 5 carrier cycles to detect high or low level in the receiver is very ambitious. That will require a wide bandwidth filter, which will decrease the signal to noise ratio significantly. You will need a relatively powerful signal at the receiver to make this work all all. All around, not a good idea. – Olin Lathrop Jan 26 '12 at 13:02
  • @OlinLathrop thanks Olin, what is the rule of thumb? 10 cycles, 20cycles? How do people deal with these problem in RF where there are high bitrates? – Ktc Jan 26 '12 at 13:11
  • 1
    There is no rule of thumb, but the more narrow you can make the RF band, the better the signal to noise ratio. Think about it. Consider the RF spectrum of the signal you propose. – Olin Lathrop Jan 26 '12 at 13:37
  • @OlinLathrop I see what you are saying. Could I approach this way? My maximum target data rate is 500Kbps and I want the highest possible SNR. Highest SNR is possible with the high Q filter. The highest Q possible filter with the settling time less than 1uSec (1/2 of my time/bit =2uSec). Design of this filter would be highly dependent on my carrier frequency which I have no idea how to choose given there is no rule of thumb. If I say 20 cycles, it is 10Mhz, 10 cycles would be 5Mhz. My system is optical. – Ktc Jan 26 '12 at 14:01
  • 2
    Another point to consider is that the signal formed by gating a 5MHz signal on and off at a uniform 500KHz rate will have significant spectral content at 5MHz+/-500KHz (unavoidable given your target data rate) but also at 5MHz+/-1.5Mhz, 5MHz+/-2.5Mhz, 5MHz+/-3.5MHz, etc. Modulating of arbitrary data may also add spectral content at other frequencies. If you hope to achieve any sort of regulatory approval, you need to switch your transmitter on and off more "gradually". – supercat Jan 26 '12 at 16:22

2 Answers2

2

How can I determine the optimum carrier frequency for a given bandwidth and BER [for an OOK optical communication system ]?

There is no optimum carrier frequency. It would be nice if you could avoid frequencies already in use -- for optical communication, most of the time that's only the constant light from the sun, 100 Hz / 120 Hz light coming from ancient flickery fluorescent lights, and 30,000 Hz - 40,000 Hz light coming from modern fluorescent lights.

What is the best demodulator circuit for this?

I'm not sure you even want a demodulator. Perhaps you can more-or-less directly transmit Manchester-coded data, then recover with a high-pass filter (to remove sunlight) and a comparator.

There are many demodulator circuits that would work fine for this application. There are several low-cost demodulator ICs available at the big suppliers, some even in easy-to-prototype DIP packages, that work similar to the part described in ON Semiconductor Application Note AN531: "MC1496 Balanced Modulator". ( Actual Implementation of a Multiplier ) such as the SA612 (also called the NE612, SA602, etc.), the SA614, the MC1496, the TDA9881, MAX2685, BGA2022, TFF1017, SA58640, SA58641, MAX2682, UPC2757, etc.

You'll have to pick a carrier frequency somewhere in the range your demodulator can handle. The SA612 seems to work well up to roughly 50 MHz.

What filter should I use?

The rule of thumb is to try to capture most of the energy of each pulse. Filters should pass (preferably with a flat passband) the stuff you're trying to deliberately transmit, and should block as much as possible interfering stuff. There's a transition band between the passband and the stopband. For optical communication, sometimes this transition band is really wide, so you can get away with using simple and low-cost RC filters. (The lower parts of the frequency radio frequency communication spectrum have so many people trying to communicate at the same time that it forces the transition band to be narrow, which forces them to use more complicated filters).

With randomly positioned on/off pulses of width L seconds, the frequency distribution looks like (1/L)sinc(f/L), where sinc(x) = sin(pix) / (pi*x). (I.e. the Fourier transform of a rectangle function is a sinc function).

The first zero (end of the main lobe) of that sinc frequency distribution is at 1/L Hertz. Most of the energy of the sinc frequency distribution is in the main lobe -- between 0 Hz and 1/L Hertz.

If you choose to modulate that baseband signal by some carrier frequency -- perhaps something like the way the RC-5 protocol converts each pulse to a burst of square waves -- the main lobe has a bandwidth (between zeros) of 2/L Hz.

At 1 Mb/s, L = 0.5 microsecond for Manchester-encoded data (half the full bit-time). So the bandpass filter in your receiver needs to handle at least 4 MHz of bandwidth between the IR detector and the demodulator.

After the demodulator the lowpass filter should pass (up to the first zero) at least up to 2 MHz. To pass a minimum f of 2 MHz with a simple RC low-pass filter, w = tauf =~= 12.6 Mradians/s; and the RC time constant T = 1/w = RC =~= 80 ns. So, for example, if I arbitrarily choose C = 1 nF, the maximum R is 80 Ohms.

The lowpass parts of your bandpass filter, being at a much higher frequency, requires an even smaller time constant, which implies a smaller R or C or both.

further comments

The Shannon–Hartley theorem and the Fourier transform revolutionized telecommunications.

Most EE programs run students through several semesters of classes to clear out common misunderstandings and to fully understand the ramifications of these simple-seeming ideas.

You might consider skimming through the relevant sections of a digital signal processing book.

Have I mentioned the RC-5 protocol? You could do worse than to try to speed up each part of that (approximately) 562 bit/second protocol by (approximately) 1000 or 2000 times faster to get (approximately) 500,000 bit/second or 1 Mbit/second. Each bit of data is Manchester coded into two half-bits, with 32 pulses in one half-bit and the LED turned off for the other half-bit. (That seems to require a 64 MHz clock to get a full 1 Mbit/second, and lots of hardware can't go that fast -- perhaps fewer pulses per half-bit, more like Ronja, or fewer data bits per second, would make it easier to use standard off-the-shelf hardware).

You might also consider looking at the the RONJA project, especially the schematics. They use some unusual clever tricks to get their data rate up to 10 Mbit/s using low-cost parts. The incoming 10BASE-T Ethernet has already Manchester coded each data bit into two half-bits, and Ronja transmits one or 2 pulses per data bit. (In effect, Ronja turns the LED on for 1 clock pulse per data bit, and the receiver watches to see if Ronja transmits another pulse or not to decide whether the data bit is a 1 or a zero).

Sounds like a fun and educational project. Good luck!

davidcary
  • 17,606
  • 11
  • 67
  • 117
1

The bandwidth of the OOK system is twice the bandwidth of the baseband signal because AM modulation translates the baseband spectrum \$H(f), -\infty < f < \infty,\$ to be centered at the carrier frequency, i.e., \$H(f-f_c) + H(f+f_c)\$. If \$|H(f)| = 0\$ for \$|f| > f_s\$, then the AM signal spectrum is nonzero in the range \$ f_c-f_s < f < f_c + f_s\$ (and of course also nonzero in the negative frequency range \$-f_c-f_s < f < -f_c + f_s\$). So, \$f_c > f_s\$ is a minimal requirement for the carrier frequency. As a practical matter, if \$f_s = 500\$ kHz, a \$1\$ MHz band at, say, \$70\$ MHz carrier frequency might be a better choice than a \$1\$ MHz band at \$5\$ MHz carrier frequency.

If you can manage shaping of the baseband pulse (i.e., you are not constrained to use the rectangular pulses shown in your figure), you might want to look into using a smoother pulse in order to reduce the bandwidth. Rectangular pulses with their \$\text{sinc}(fT)\$ spectra have quite large bandwidth, and while used quite commonly in communication theory texts for illustrative purposes, are not often used in practical systems. Finally, I suggest that you think a bit about the BPF in your diagram. You want it to be wide enough to capture most of the signal and narrow enough to reject most of the out-of-band noise, and the \$Q\$ of the filter (which is a crude measure of how long the filter output will continue to ring) will limit the data rate (or create intersymbol interference (ISI) issues that will need to be addressed.)

Dilip Sarwate
  • 544
  • 3
  • 10