End-to-End QAM Simulation with RF Impairments and Corrections
This example provides visualization capabilities to see the effects of RF impairments and corrections in a satellite downlink. The link employs 16-QAM modulation in the presence of AWGN and uses a High Power Amplifier (HPA) to overcome the losses associated with satellite communications. The HPA introduces nonlinear behavior that, when combined with other RF impairments, requires the use of mitigation techniques.
This example includes:
- A MATLAB® GUI, QAMwithRFImpairmentsExample.
- A MATLAB-based simulator function, QAMwithRFImpairmentsSim.m, which receives its input parameters from the GUI.
Keywords: QAM, RF impairments, I/Q imbalance, nonlinearity, RF correction.
The simulation allows you to configure the parameters shown in the GUI.
Open the GUI to:
- Modify the parameters
- Run the simulation with MATLAB
- Visualize signal constellations and spectra
- View the underlying MATLAB code
- Generate C code and run the simulation (with a valid MATLAB Coder™ license)
The Simulate button simulates the configured link using interpreted MATLAB code. Some parameters can be modified while the simulation is running, while others are disabled. This is shown on the GUI, where the locked parameters are grayed out. For these parameters, changes cannot be made until the simulation is stopped. For the parameters that can be modified during execution, the impact of the changes is immediately observable on the Results panel or on the plots.
The View MATLAB Code button opens the simulator code in the editor allowing for visual inspection and further exploration of the underlying functions used in the simulation.
The Run Generated Code button compiles the MATLAB function into an executable MEX-file and runs the simulation once the compiling process is complete. The MEX version of the simulation runs much faster though there is a time penalty from the compiling process itself. You can modify the same parameters when running from either interpreted mode or from the MEX-file.
The Stop Simulation button stops the simulation during execution. This works for both interpreted MATLAB and the MEX-file. The button is active only when a simulation is running.
The Help button brings up this HTML page.
The simulation executes the following steps:
- Generate random integers
- Modulate with 16-QAM
- Root raised cosine (RRC) transmit filter
- Pass through an HPA
- Apply transmit antenna gain
- Apply path loss based on atmospheric condition
- Pass the signal through an AWGN channel with RF impairments
- Apply receive antenna gain
- Remove DC offset
- Apply automatic gain control
- Compensate for I/Q amplitude and phase imbalance
- Correct for the Doppler shift
- RRC receive filter
- Demodulate 16-QAM
- Calculate the bit error rate
You can specify the following signal impairments:
- Receiver noise temperature in the range [0, 600] K
- Doppler error in the range [-3, 3] Hz
- DC offset, expressed as a percentage of the maximum signal voltage, in the range [0, 20] %
- Phase noise in the range [-100, -48] dBc/Hz
- I/Q amplitude imbalance in the range [-5, 5] dB
- I/Q phase imbalance in the range [-30, 30] degrees
- HPA backoff level in the range [1, 30] dB
An HPA backoff of 30 dB corresponds to negligible distortion because the amplifier is operating in its linear region, while 1 dB corresponds to severe distortion. A Saleh model used to simulate the behavior of the HPA. Further information is available on the memoryless nonlinearity page.
The GUI provides the ability to enable or disable corrections for Doppler error, I/Q imbalance, and DC offset. These corrections are provided by three System objects. The carrier synchronizer compensates for the frequency offset due to Doppler, the I/Q imbalance compensator corrects the amplitude and phase imbalance, and the DC blocker compensates for the DC offset.
Results and Displays
The simulation can display the spectrum of the transmitted and received signals, where the transmitted signal is measured at the output of the transmit RRC filter and the received signal is measured at the input of the receive RRC filter. A constellation diagram of the received signal is also available. Lastly, constellation diagrams of the HPA input and output signals can be displayed. Use the GUI to control the display of these plots.
A typical spectrum plot, using the default parameters, is shown. The effects of AWGN are most easily seen in the out-of-band signal spectrum, where the noise floor of the received signal is 20 dB higher than the transmitted signal spectrum.
A plot of the constellation diagram is shown for the case in which the I/Q imbalance correction is disabled. The red + symbols denote the 16-QAM reference constellation. The constellation is scaled and rotated by the uncorrected imbalance.
The effects of nonlinear HPA behavior are shown in the HPA In and HPA Out constellation diagrams. The diagrams show the effects of AM/AM and AM/PM distortion when the amplifier operates 7 dB below saturation. The 'rounded' appearance of the HPA output signal constellation is due to AM/AM distortion, while AM/PM causes the constellation to rotate.
The bit error rate, number of errors, total number of transmitted symbols, path loss, and the Eb/No are displayed directly on the results panel of the GUI.
Use the GUI to change the parameters listed below.
- Link gains and losses: Vary the noise temperature between 0 to 290 K (typical) to view the effects on the received signal spectrum analyzer plot. Likewise, change the link distance, atmospheric condition and carrier frequency to view the impact on the received signal spectrum. Changes in the link margin are also reflected in the calculated path loss and Eb/No.
- HPA AM-to-AM and AM-to-PM conversion: Vary the HPA Backoff between 30 dB (negligible nonlinearity) to 1 dB (severe nonlinearity). A value of 7 dB corresponds to moderate nonlinearity. View the effects on the spectrum plot, the HPA output constellation, the received signal constellation diagram, and on the bit error rate. Increasing nonlinearity increases spectral regrowth and causes the HPA output constellation to become 'rounder' and rotate. The HPA Backoff parameter can be adjusted while the simulation is executing.
- Phase noise: Set the Phase Noise to -48 dBc/Hz (high) and observe the increased variance in the tangential direction in the received signal constellation diagram. This level of phase noise is sufficient to cause errors in an otherwise error-free channel. Set the Phase Noise to -55 dBc/Hz (low) and observe that the variance in the tangential direction has decreased. This level of phase noise does not significantly increase the error rate. Now, set the HPA Backoff level parameter to 7 dB (moderate nonlinearity). Note that even though the moderate HPA nonlinearity and the moderate phase noise do not cause many bit errors when applied individually, they do cause significantly more bit errors when applied together. The Phase Noise parameter can be adjusted only when the simulation is stopped.
- DC offset and DC offset correction: Set the DC offset to 10 and disable the DC offset correction by unchecking the DC Offset checkbox. The constellation diagram changes significantly. Re-enable the DC Offset correction and view the received signal constellation diagram and signal spectrum to verify that the DC offset is removed. Both the DC offset and the DC offset correction parameters can be modified during simulation execution.
- I/Q imbalance: Disable the Amplitude and phase imbalance box to view the effects of an I/Q imbalance on the received constellation diagram. Modify the amplitude and phase imbalance fields to observe the effects of different values on the received signal constellation diagram. Re-enable the I/Q Imbalance correction to verify that the receive constellation aligns with its reference points. These parameters can be modified during execution.
- Doppler and Doppler compensation: Set Doppler error to 0.7 Hz and disable the Doppler error correction to show the effect of uncorrected Doppler on the received signal. Note that the BER is close to 0.5. Re-enable the Doppler error correction to correct for the Doppler error. Verify that the BER decreases. These parameters are available only when the simulation is stopped.
- Code Generation: Run the simulation by clicking the Run Generated Code button. The first time this is done, the simulation compiles before executing, which makes the process take longer than it does when simulating with interpreted MATLAB. Change the HPA backoff level and rerun the simulation. Note that the results panel updates very quickly. Now, change the Phase noise and click the Run Generated Code button. The code is recompiled because the phase noise is a nontunable parameter. Enable the Rx constellation option and rerun the simulation. You can see that when the scope is activated, the bit error results accumulate more slowly but the scope updates much faster than it does when running with interpolated MATLAB.
- BER estimation: By default, the Number of bit errors parameter is set to Inf so that the effects of the impairments and corrections can be easily visualized on the scopes. For BER estimation, it is typically sufficient to collect 50 to 200 errors; consequently, disable the scopes and change the Number of bit errors parameter from Inf to 100. It is important to leave the modifiable parameters unchanged when the simulation is running to obtain a valid BER estimate.
 Saleh, Adel A.M., "Frequency-Independent and Frequency-Dependent Nonlinear Models of TWT Amplifiers," IEEE® Transactions on Communications, Vol. COM-29, No. 11, November 1981.
 Kasdin, N.J., "Discrete Simulation of Colored Noise and Stochastic Processes and 1/(f^alpha); Power Law Noise Generation," The Proceedings of the IEEE, Vol. 83, No. 5, May, 1995.
 Kasdin, N. Jeremy, and Todd Walter, "Discrete Simulation of Power Law Noise," 1992 IEEE Frequency Control Symposium.
 Sklar, Bernard, Digital Communications: Fundamentals and Applications, Englewood Cliffs, N.J., Prentice Hall, 1988.