Below is a plot that shows the transmitted signal for 8-ASK. Here the amplitude level of the carrier signal represents 3-bits of digital data. Zero amplitude represents 000 , and the highest amplitude represents 111. The other levels are at intervals between.
Open “simple_ask_transceiver.vi” and inspect the front panel. It allows the user to choose the number of symbols that will be used (M-ASK), pulse shaping filter, symbol rate, and carrier rate. Additionally, there is a control for the amount of simulated channel noise in this system. There is a Tab Control which shows graphs of the raw and modulated waveforms on one tab and the constellation plot on the other (which is ideally a single line with ASK).
The block diagram consists of a while loop that will iterate once every 100 milliseconds. Inside this loop, we will generate, modulate, demodulate and display digital data.
![]()
1) Place a “Generate System Parameters” VI on the block diagram and select the polymorphic instance ASK (M). Connect the wire coming from the M-ASK control to the corresponding input terminal on this VI. This VI will create an ASK symbol map based on the M-ASK value selected on the front panel.
2) Place an “MT Bit Generation” VI on the block diagram and wire the output of the multiplication function to the total bits input. This VI will generate a digital bit stream that will later be modulated using ASK.
3) Place a “Generate Filter Coefficients” VI on the block diagram. Right click on the modulation type terminal and create a constant, then select ASK. Wire the pulse shaping filter control into the appropriate input. This VI will generate filter coefficients that will be used during modulation to reduce the bandwidth of the modulated signal.
4) Place a “Modulate ASK” VI on the block diagram and wire in the system parameters, bit stream, and pulse shaping coefficients from the three previous VIs. Also wire the Boolean value from the Reset Control into reset? input. This VI will perform APSK modulation on the input bit stream using the system parameters and filter coefficients specified.
5) Place an “Add AWGN” VI on the block diagram and wire the Noise Impairments control to the Eb/N0 input. Also wire the Boolean value from the Reset Control into the reset? input. This VI will subject the modulated signal to Additive White Gaussian Noise based on the “noise impairments” control on the front panel.
6) Place a “Demodulate ASK” VI on the block diagram and wire the system parameters, filter coefficients and input complex waveform form previous VIs. Also wire the Boolean value from the Reset Control into the reset? input. This VI will demodulate the input signal and return the recovered bit stream.
Finally, wire the error out of each VI to the error in of the next to handle any errors that occur and enforce dataflow between the VIs. Return to the front panel and run the VI to see ASK modulation in action. Experiment with the ASK (M), pulse shaping filter, and Noise impairments controls. This simple transceiver demonstrates modulation and demodulation using Amplitude Shift Keying.
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.