Measure Modulation Accuracy
Error vector magnitude (EVM) and modulation error ratio (MER) measure the accuracy of modulator and demodulator performance in the presence of signal transmission impairments. For more information on impairments, see Visualize RF Impairments.
EVM is the vector difference at a given time between the ideal (transmitted) signal and the measured (received) signal. These measurements help to identify sources of signal degradation, such as phase noise, IQ imbalance, amplitude nonlinearity, and filter distortion. Standards specify EVM performance requirements. For example, 3GPP radio transmission standards  specify RMS EVM, peak EVM, and 95th percentile for the EVM performance requirements.
MER is a form of signal-to-noise ratio (SNR) measurement for assessing the ability of a receiver to accurately demodulate a signal. MER measures symbol errors introduced by Gaussian noise and other uncorrectable impairments of the received constellation. If the only significant impairment in the signal is Gaussian noise, then MER and SNR are equivalent. For example, the DVB measurement guidelines  specify minimum MER and percentile MER performance requirements.
To measure modulation accuracy, you can use these Communications Toolbox™ System objects and blocks. The examples that follow show you how.
Modulation Accuracy Examples
Measure EVM and MER Using Simulink
This example shows how to compute error vector magnitude (EVM) and modulation error rate (MER) measurements using Simulink® blocks.
doc_mer_and_evm model adds IQ imbalance to a 16-QAM signal. The EVM Measurement and MER Measurement blocks perform EVM and MER measurements, respectively, on the impaired signal. The Constellation Diagram block displays the impaired signal constellation and signal quality measurements. The signal quality measurements displayed in the constellation diagram window approximate the measurements reported by the EVM Measurement and MER Measurement blocks.
In this model, the I/Q Imbalance block sets the amplitude imbalance to 1 dB, the phase imbalance to 15 degrees, and the DC offset to 0. The MER Measurement block is configured to output the mean MER and the 90th percentile MER. The EVM Measurement block is configured to output the RMS EVM (normalized to the average reference signal power), the maximum EVM, and the 75th percentile EVM.
Run Model and Display Measurements
Run the model to compute the EVM and MER measurements and to display the constellation diagram.
Average MER is 16.9 dB. 90 percentile MER is 14.0 dB. RMS EVM is 14.3%. Maximum EVM is 20.7%. 75 percentile EVM is 17.5%.
Change the I/Q Imbalance block setting for the amplitude imbalance to 2 dB. Because the modulation accuracy decreases when the impairment value increases, the reported average MER decreases and the reported average EVM increases. Run the model again to see the degraded EVM and MER metrics.
Average MER is 13.2 dB. 90 percentile MER is 10.2 dB. RMS EVM is 21.8%. Maximum EVM is 31.2%. 75 percentile EVM is 26.8%.
Measure EVM for 802.15.4 (ZigBee) System
This example shows how to measure the error vector magnitude (EVM) of a simulated IEEE® 802.15.4 [ 1 ] transmitter by using a
comm.EVM System object™. The EVM measurement quantifies the modulation accuracy of a transmitter by measuring the difference between an error-free modulated reference waveform and an impaired waveform. IEEE 802.15.4 specifies the protocols to use for ZigBee® wireless personal area networks. Section 22.214.171.124 of IEEE® 802.15.4 [ 1 ] specifies: "... An IEEE 802.15.4 transmitter shall have EVM values of less than 35% when measured for 1000 chips. The error-vector measurement shall be made on baseband I and Q chips after recovery through a reference receiver system. The reference receiver shall perform carrier lock, symbol timing recovery, and amplitude adjustment while making the measurements. ...". Here, the receiver processing does not require carrier lock, symbol timing recovery, and amplitude adjustment because the only impairment applied in the simulation is additive white Gaussian noise (AWGN).
Define System Parameters
Define system parameters for an 802.15.4 system for the 868 MHz band, direct sequence spread spectrum (DSSS) with binary phase-shift keying (BPSK) for chip modulation, and differential encoding for data symbol encoding.
The BPSK bit-to-chip mapping spreads each input bit with a 14 chip sequence. Input bits with value
0 are represented by the
chipValues parameter and input bits with value
1 are represented by
(1-chipValues). Use an oversampling rate of four for the transmitted signal and a filter span of eight symbols. To simulate transmitter and test hardware imperfections, use an SNR of 60 dB.
dataRate = 20e3; % Bit rate in Hz M = 2; % Modulation order (BPSK) chipValues = ... % Chip values for 0-valued input bits [1;1;1;1;0;1;0;1;1;0;0;1;0;0;0]; numSymbols = 1000; % Number of symbols required to measure EVM numFrames = 100; % Number of frames nSamps = 4; % Oversample rate filtSpan = 8; % Filter span in symbols SNR = 60; % Simulated signal-to-noise ratio in dB
Calculate the spreading gain, chip rate, final sampling rate, and the number of bits required to obtain one EVM measurement value. Include one extra bit in the simulation of the transmitted symbols to account for filter delays.
gain = length(chipValues); % Spreading gain (chips per symbol) chipRate = gain*dataRate; % Chip rate sampleRate = nSamps*chipRate; % Final sampling rate numBits = ... % Bits for one EVM measurement ceil((numSymbols)/gain)+1;
Obtain BPSK modulated symbols by using a simple mapping of 0 to +1 and 1 to -1. To allow use of matrix math and to write efficient MATLAB® code, map the chip values so that modulation can be applied before bit-to-chip conversion. To apply the pulse shape filtering specified for ZigBee, define a pair of square-root-raised-cosine filters with a roll-off factor of 1.
chipValues = 1 - 2*chipValues; % Map chip values rctFilt = comm.RaisedCosineTransmitFilter( ... RolloffFactor=1, ... OutputSamplesPerSymbol=nSamps, ... FilterSpanInSymbols=filtSpan); rcrFilt = comm.RaisedCosineReceiveFilter( ... RolloffFactor=1, ... InputSamplesPerSymbol=nSamps, ... FilterSpanInSymbols=filtSpan, ... DecimationFactor=nSamps);
Configure EVM Measurements
As defined in section 6.7.3 of IEEE® 802.15.4, the EVM calculation method normalizes the average error of the measured I and Q samples by the power of a symbol. Since the power of both constellation symbols is the same for a BPSK system, configure the EVM measurement object to use peak constellation power normalization. For more information on EVM calculation methods and normalization options, see the
comm.EVM System object reference page.
evm = comm.EVM(Normalization='Peak constellation power');
Simulate Transmission and Reception
Generate random data bits, differentially encode these bits by using a
comm.DifferentialEncoder System object, and apply BPSK modulation. Spread the modulated symbols by using a matrix multiplication with the mapped chip values. Pass the spread symbols through a pulse shaping filter.
The EVM object assumes that the received and reference symbols are synchronized and sampled at the same rate. The received signal must be downsampled and synchronized with the reference signal.
To ensure sufficient averaging, simulate 100 frames with 1000 symbols in each frame. Save the maximum measured EVM check that satisfies the requirement of EVM 35%.
Since the transmit and receive filters are identical and the delay from each equals half the filter span, the total delay equals the span of one filter.
refSigDelay = rctFilt.FilterSpanInSymbols; diffenc = comm.DifferentialEncoder; simNumSymbols = numBits*gain; % Number of symbols in a frame peakRMSEVM = -inf; % Initialize peak RMS EVM value
for-loop to process transmission frames. On the transmit side, generate random data, apply differential encoding, apply BPSK modulation, spread the chip, apply pulse shaping and add noise to the transmitted signal. On the receive side, downsample and filter the signal, account for the signal delay, measure the EVM, update the peak EVM to save the maximum value measured. After processing all frames of data, display the maximum EVM value.
for p=1:numFrames % Transmit side b = randi([0 M-1],numBits,1); d = diffenc(b); x = 1-2*d; % Modulate c = reshape(chipValues*x',simNumSymbols,1); % Spread data cUp = rctFilt(c); r = awgn(cUp,SNR,"measured"); % Receive side rd = rcrFilt(r); % Downsample and filter rmsEVM = evm( ... complex(rd(refSigDelay+(1:numSymbols))), ... complex(c(1:numSymbols))); % Update peak RMS EVM calculation if (peakRMSEVM < rmsEVM) peakRMSEVM = rmsEVM; end end % Display results fprintf(' Worst case RMS EVM (%%): %1.2f\n',peakRMSEVM)
Worst case RMS EVM (%): 0.19
You can add more impairments to the transmitted signal, such as IQ imbalance, by using the
iqimbal2coef function. For more examples and information, see the Measure Modulation Accuracy and Visualize RF Impairments topics.
1. IEEE Standard 802.15.4, Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks, 2003.
Measure EVM for EDGE Transmissions in Simulink
This example shows how to measure modulation error impairments for an EDGE transmitter design by using EVM measurements. The EVM Measurement block compares an ideal reference signal to a measured signal, and then computes RMS EVM, maximum EVM, and percentile EVM values.
doc_evm model includes an EDGE transmitter, impairments, and EVM calculations.
Transmitter --- The doc_evm_init helper file initializes a parameter structure that the model uses to generate the EDGE transmission bursts. The Random Integer Generator block simulates random data generation. The EDGE standard specifies that the transmitter performs measurements during the useful part of the burst (excluding tail bits) over at least 200 bursts. In this mode, the transmitter produces 435 symbols per burst (9 additional symbols account for filter delays). The Phase/Frequency Offset block provides continuous phase rotation to the signal. For synchronization purposes, the Upsample block oversamples the signal by a factor of 4. The Discrete FIR Filter (Simulink) block provides GMSK pulse linearization, which is the main component in a Laurent decomposition of the GMSK modulation . A helper function computes the filter coefficients and uses a direct-form FIR digital filter to create the pulse shaping effect. The filter normalization provides unity gain at the main tap. The I/Q Imbalance Compensator block simulates transmitter impairments. This block adds rotation to the signal, simulating a defect in the transmitter under test.
Amplitude imbalance = 0.25 dB Phase imbalance = 0.75 degrees
Receiver --- The Receiver Thermal Noise block represents receiver impairments. This model assumes 290 K of thermal noise, representing imperfections of the hardware under test.
EVM calculation --- The EVM measurement block computes the vector difference between an ideal reference signal and an impaired signal. The output of the FIR filter provides the Reference input for the EVM block. The output of the Noise Temperature block provides the impaired signal at the Input port of the EVM block. While the block has different normalization options available, the EDGE standard requires normalizing by the Average reference signal power. For illustration purposes in this example, the EVM block outputs RMS, maximum, and percentile measurement values.
EDGE standard EVM specifications --- According to the EDGE standard , the error vector magnitude of the received signal, calculated relative to the transmitted waveform, must not exceed these values:
T = 3x4 table MS Normal MS Extreme BS Normal BS Extreme _________ __________ _________ __________ RMS EVM 9% 10% 7% 8% Peak EVM 30% 30% 22% 22% 95th Percentile EVM 15% 15% 11% 11%
The computed EVM for the configured EDGE transmitter are:
Measured values RMS EVM = 10.03% Peak EVM = 19.77% 95th percentile EVM = 15.19% Number of symbols processed = 85626
In this table,
true indicates tests passed by the configured EDGE transmitter and
false indicates tests the transmitter failed.
T = 3x4 table MS Normal MS Extreme BS Normal BS Extreme _________ __________ _________ __________ RMS EVM false false false false Peak EVM true true true true 95th Percentile EVM false false false false
Adjust Impairments and Recompute EVM
Increase the IQ imbalance and recompute the EVM, this simulated EDGE transmitter fails the EVM test for a mobile station under all conditions. The computed EVM for the reconfigured EDGE transmitter are:
Amplitude imbalance = 2.0 dB Phase imbalance = 0.75 degrees Measured values RMS EVM = 16.06% Peak EVM = 34.63% 95th percentile EVM = 25.52% Number of symbols processed = 85626
true indicates tests passed by the reconfigured EDGE transmitter and
false indicates tests the transmitter failed.
T = 3x4 table MS Normal MS Extreme BS Normal BS Extreme _________ __________ _________ __________ RMS EVM false false false false Peak EVM false false false false 95th Percentile EVM false false false false
 3GPP TS 45.004 V7.2.0 (2008–02). "Radio Access Networks; Modulation".
 3GPP TS 45.005 V8.1.0 (2008–05). "Radio Access Network: Radio transmission and reception".
 Laurent, Pierre. "Exact and approximate construction of digital phase modulation by superposition of amplitude modulated pulses (AMP)." IEEE Transactions on Communications. Vol. COM-34, #2, Feb. 1986, pp. 150–160.
 ESTI TR 101 290. Digital Video Broadcasting (DVB): Measurement guidelines for DVB systems. June 2020.
 IEEE Standard 802.15.4, Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks, 2003.
- LTE Uplink EVM and In-Band Emissions Measurements (LTE Toolbox)
- EVM Measurement of 5G NR Downlink Waveforms with RF Impairments (5G Toolbox)
- 802.11ac Transmitter Measurements (WLAN Toolbox)