# ASK Modulations

This article focus on Amplitude Shift Keying (ASK), which belongs to a digital modulation scheme available to transmit digital data.

Note:The article combines mathematical expressions with visuals with the goal to help understanding the concepts from different perspectives. The goal by presenting math equations is not to overwhelm the reader but rather an attempt to connect the theory with the practical world.

**ASK Modulation**

As discussed in the *Angle Modulations* article there are 3 possible ways to modulate information signals into the carrier.

The digital version of AM is called Amplitude Shift Keying (ASK). With ASK schemes, the carrier amplitude is still varied in proportion to the information signal (m(t)), but this signal is now a digital signal rather than analog.

**On-Off Keying (OOK) Modulation**

When the information signal is an on-off signal (binary data), this modulation scheme can also be called On-Off Keying (OOK). OOK modulation is most commonly used to transmit Morse code over radio frequencies (also known as Continuous Wave (CW) operation), ISM bands to transfer data between computers, remote garage doors and gate keys.

Let's go over an example on how to do OOK modulation with GNURadio. The information signal (m(t)) is implemented by two blocks: the *Vector Source* block and *Repeat *block. The importance of the *Repeat *block is to control the information signal frequency (fm) properly. Remember that the carrier frequency should be higher than the information signal frequency. If we connect the *Vector Source* block directly to the *Multiply *block, you will have the information signal running at the sample rate of this project (32kHz), way higher than the carrier frequency (100 Hz). We need to include a *Repeat *block to lower the information signal frequency.

The example below sets the *Repeat *block at 320, which gives a m(t) frequency of 100 Hz (sample_rate/fm). We should use a value greater than 320, but with a lower fm it is easier to see what is going on and identify the zeros and ones on the ASK signal.

If we set the *fm *variable to 3200, the information signal frequency is now 10 Hz and we get the ASK signal below. A more realistic ASK result.

**M-ary ASK**

The OOK modulation transmits one bit of information at the time. To enable the transmission of two or more bits, multi-level M-ary modulation techniques are used. M-ary signaling allows more than two modulation levels happen at the same time, making this technique bandwidth efficient.

To achieve different levels of digital signals, the amplitude of the information signal needs to be split into different voltage levels. The numbers of bits necessary to produce a given number of voltage levels is expressed as N = log_{2}(M), where N is the number of bits and M is the number of voltage levels. The equation can also be re-arranged to 2^{N} = M.

Figure below shows an M = 4 M-ary ASK modulated signal example.

The GNURadio flowgraph for the M-ary ASK is very similar to the OOK flowgraph. The main difference is on the *Vector Source* block. For this particular example, since we are grouping the bits in sets of 2, we have N = 2, and we divide the amplitude of the information signal into M=2^{2}= 4 levels: 0.25 (0b00), 0.5 (0b01), 0.75 (0b10), and 1.0 (0b11).

**GNURadio Files**

- OOK Modulation Example
- M-ary ASK Example

**References**

**[Ref 1]***“PySDR: A Guide to SDR and DSP using Python”*, PySDR Website [Articles]**[Ref 2]***“Tutorial 17: Frequency Modulation (FM), FSK, MSK and more”*, Complex to Real Website, Charan Langton [Article]**[Ref 3]***“Tutorials on Digital Communications”*, Complex to Real Website, Charan Langton**[Ref 4]***“Summary of Trigonometric Identities”*, Clark University [Article]**[Ref 5]***“Modern Digital and Analog Communication Systems”*, B. P. Lathi and Zhi Ding [Book]