How would a trigger works for on-off keying (OOK)? How would it differentiate between not receiving anything and zero?
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:
- Assemble bits into a frame of size X bits.
- 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.
- 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.
- 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.
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.
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.
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.
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.
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).