2
$\begingroup$

How would a trigger works for on-off keying (OOK)? How would it differentiate between not receiving anything and zero?

$\endgroup$
  • $\begingroup$ This does not apply to OOK only. If you assume for instance, a correlator followed by binary decisions, then one cannot know the output bitstream (both 0s and 1s) is data or garbage (noise). It only makes sense when the receiver already knows it should receive data on the specific timeslot (e.g. a packet preamble is already detected). $\endgroup$ – msm Oct 18 '16 at 2:44
4
$\begingroup$

A simple way to do it would be using a start bit like UART. When idle, don't transmit anything. When you want to transmit something, first transmit a start bit which is a '1' (ON). Then transmit a fixed number of bits known to both the transmitter and receiver. The receiver looks for the start bit and knows to begin demodulating after it receives the start bit.

A more rigorous way to do it would be the following:

  1. Assemble bits into a frame of size X bits.
  2. At the beginning of the frame, transmit a preamble sequence. This is some known sequence of bits that will be the same every time. This is what is done in Wi-Fi, Ethernet, etc.
  3. The receiver looks for that preamble sequence by correlating the received signal with the expected preamble signal. Once you get a high peak in the correlation, the receiver knows that is the start of the frame.
  4. The receiver is now synchronized and knows that it needs to demodulate X bits. After that, the receiver goes back to looking for the start of the next frame.

Raw modulation isn't really useful by itself; you need to add some extra stuff to have a practical communication system.

$\endgroup$
  • $\begingroup$ Thank you, so is there a way to detect the preamble sequence by looking at the signal ? I can see the digital sequence of my key fob with SDR. Is there a way to guess which part of the beginning of the sequence is preamble sequence by just looking at the signal? Is there a rule or it depends on the manufacturer? $\endgroup$ – Jack Oct 19 '16 at 2:16
  • $\begingroup$ The preamble will always be the same, so look for a sequence right at the beginning which is the same every time you press the key fob. You'll probably want to look at the raw received I/Q signal with your SDR. I personally have not played around with key fobs. $\endgroup$ – GordonFreeman Oct 20 '16 at 2:47
2
$\begingroup$

If in your particular application you need to differentiate between an idle channel (nothing being transmitted) and an off-state transmission, then you either do not use OOK, or replace the zero transmission with something nonzero, effectively resulting in a non OOK modulation...

For a wired channel an off state with 0 volts can be differentiated from an idle channel via the impedance. A high impedance could be used to denote an idle channel whereas a zero volts with normal impedance would then mean an off state. Bear in mind that channel impedance switching as well determination could be slow, hence limiting its transmission capacity.

$\endgroup$
2
$\begingroup$

Note that a modulation scheme such as OOK or BPSK is never used in isolation -- in order to have a working communications system, you need to solve a few problems besides raw information transmission, and you also typically need to add a few (ISO) layers on top of the physical layer.

Some examples:

  • In synchronous communication, there is always something being transmitted; an idle state is represented by idle flags. For instance, in HDLC, when there is no data to transmit a flag (0x7E IIRC) is always transmitted. Actual data always comes after a flag.

  • In asynchronous communication, data is preceded by "start bits" (as in RS-232).

  • Usually you want to be able to identify individual time slots, which means that the receiver must look for a framing pattern before handing bits to the upper layers. The framing pattern appears periodically in the data stream.

  • You also need a way to identify the end of the transmission; it's not enough to identify the start.

  • Many systems avoid long streams of constant bits by encoding, scrambling or otherwise modifying the data stream to force 0-1-0 or 1-0-1 transitions. For example T1 trunks in telephony use a line encoding that forces transitions for a long stream of 1's (alternate mark inversion), and B8ZS (bipolar 8 zero substitution) to force transitions for long streams of 0's.

All this means that, in practice, receiving 0 volts for a long time is equivalent to there being no signal at all to receive.

In practice, you can do the following. If your system is asynchronous, then look for the start bit before receiving data. If it is synchronous, then calculate the energy of the received signal over the last few symbol times. If the energy is above an (experimental) threshold, then start looking for your framing pattern or idle flags.

$\endgroup$
1
$\begingroup$

You can't. OOK is defined as something like the following:

  • For each symbol period:
    • To send a "1", transmit a sinusoid of constant amplitude.
    • To send a "0", transmit nothing.

The details of the above could be different depending upon the whims of the system designer (e.g. whether "no signal" refers to a "0" or "1"), but that's the general case. Note that there is no distinction whatsoever between the two cases you described (you receive a zero from the transmitter versus you don't receive anything). There is no difference in the observable conditions between the two cases, so there's not really anything you can do about it.

This is one reason why OOK is not commonly used.

$\endgroup$
  • $\begingroup$ ok, to be fair, you'd typically find an encoding scheme where "anything being transmitte" guarantees a state transmission every so and so many symbols (diff manchester with zerostuffing) $\endgroup$ – Marcus Müller Oct 17 '16 at 14:20
  • $\begingroup$ Indeed that's true. But OOK just doesn't have much to recommend it. There are other approaches that are still simple but more efficient and easier to synchronize to (e.g. BPSK). $\endgroup$ – Jason R Oct 17 '16 at 14:24
  • $\begingroup$ @JasonR Is this correct to assume that they always start with 1 so the receiver would know something is coming? $\endgroup$ – Jack Oct 17 '16 at 14:51
  • $\begingroup$ @Jack: That sounds like a reasonable thing to expect, absent some other means of synchronizing the transmitter and receiver. $\endgroup$ – Jason R Oct 17 '16 at 14:57
0
$\begingroup$

A "zero" would be recognized not in isolation, at a single point in time, but in statistical context to a sufficient amount of surrounding information, e.g. other stuff that looks sufficiently like a sufficient amount of "ones" and/or "zeros" (or other known signal types), at the sufficiently right time, both before and perhaps after the decision of the input being a "zero". There are a vast number of ways to gather the surrounding information in time, and do "the statistics" needed for a decision (all the way from a simple single one-shot after a start-bit to a multi-layer adaptive convolutional DNN).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.