main content

measure modulation error ratio of received signal -凯发k8网页登录

measure modulation error ratio of received signal

description

the comm.mer system object™ computes a form of signal-to-noise ratio (snr) measurement that you can use to assess the ability of a receiver to accurately demodulate a signal. specifically, it returns the modulation error ratio (mer), minimum mer, and percentile mer for a received signal. you use the mer measurements to determine system performance in communications applications. for example, to determine compliance with applicable dvb-t system radio transmission standards conformance testing requires accurate mer measurements.

to measure the mer of a received signal:

  1. create the comm.mer object and set its properties.

  2. call the object with arguments, as if it were a function.

to learn more about how system objects work, see what are system objects?

creation

description

example

mer1 = comm.mer creates an mer system object with default property values.

example

mer1 = comm.mer(name=value) sets properties using one or more name-value arguments. for example, comm.mer(referencesignalsource="estimated from reference constellation") configures the object to measure the mer of a received signal relative to a reference constellation.

properties

unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. objects lock when you call them, and the function unlocks them.

if a property is tunable, you can change its value at any time.

for more information on changing property values, see .

reference signal source, specified as 'input port' or 'estimated from reference constellation'.

  • to specify the reference signal with the refsym input , set this property to 'input port'.

  • to specify the reference signal with the referenceconstellation property, set this property to 'estimated from reference constellation'.

reference constellation, specified as a vector. the default value corresponds to a quadrature phase-shift keying (qpsk) constellation with unit average power. you can derive constellation points by using modulation functions or objects.

example: to define the reference constellation as a 16-qam signal scaled so that the qam constellation points are separated by a minimum distance of two, set this property to qammod(0:15,16)

dependencies

to enable this property, set the referencesignalsource property to 'estimated from reference constellation'.

data types: double
complex number support: yes

measurement interval source for mer and minimum mer measurements, specified as one of these values.

  • 'input length' — measure mer using only the current samples.

  • 'entire history' — measure mer for all samples.

  • 'custom' — measure the mer by using a sliding window over an interval that you specify.

  • 'custom with periodic reset' — measure the mer over an interval that you specify and reset the block after measuring over each interval.

this property affects only the mer and minimum mer outputs.

measurement interval, specified as a positive integer.

dependencies

to enable this property, set the measurementintervalsource property to 'custom' or 'custom with periodic reset'.

data types: double

averaging dimensions over which the object averages the mer measurements, specified as a vector of integers in the range [1, 3]. for example, to average across the columns, set this property to 2.

this object supports variable-size inputs of the dimensions across which the averaging takes place. however, the input size for the nonaveraged dimensions must remain constant between calls to the object. for example, if the input has size [1000 3 2] and you set this property to [1 3], the output size is [1 3 1], and the number of elements in the second dimension must remain fixed at 3.

data types: double

option to return minimum mer measurements, specified as a logical 1 (true) or 0 (false).

data types: logical

option to return x-percentile mer measurements, specified as a logical 1 (true) or 0 (false). specify the value of x in the xpercentilevalue property. when you set this property to 1 (true), x-percentile mer measurements persist until you reset the object. the object performs these measurements by using all of the input frames since the last reset.

data types: logical

value below which x% of mer measurements fall, specified as a scalar in the range [0, 100].

dependencies

to enable this property, set the xpercentilemeroutputport property to true.

data types: double

option to return the number of accumulated symbols that the object uses to measure the x-percentile mer since the last reset, specified as a logical 1 (true) or 0 (false).

dependencies

to enable this property, set the xpercentilemeroutputport property to true.

data types: logical

usage

description

example

merdb = mer1(refsym,rxsym) returns the mer of received signal rxsym relative to reference signal refsym over the measurement interval specified in the measurementintervalsource and measurementinterval properties.

[merdb,minmer] = mer1(refsym,rxsym) also returns the minimum percentage mer over the configured measurement interval.

to use this syntax, set the minimummeroutputport property to true.

[___,pmer] = mer1(refsym,rxsym) also returns the value below which x% of mer measurements fall using all input frames since the last reset, regardless of measurement interval configuration. set the value of x in the xpercentilevalue property. for example, if you set the xpercentilevalue to 95, then 95% of all mer measurements since the last reset fall below the value of pmer.

to use this syntax, set the xpercentilemeroutputport property to true.

example

[___,pmer,numsym] = mer1(refsym,rxsym) also returns the number of symbols used to measure mer. to use this syntax, set the xpercentilemeroutputport and symbolcountoutputport to true.

example

[___] = mer1(rxsym) measures the mer of the received signal relative to the reference signal specified in the referenceconstellation property. you can use this syntax with any previous output argument combination.

to use this syntax, set the referencesignalsource property to "estimated from reference constellation".

input arguments

reference signal, specified as a scalar, vector, matrix, or 3-d array. if you specify this input, the object measures the mer of the rxsym input by using this input as a reference constellation. the dimensions of this input must match those of the rxsym input. the object uses each element of this input as the reference symbol for the corresponding element of the rxsym input.

data types: single | double | int8 | int16 | int32 | int64 | fi
complex number support: yes

received signal, specified as a scalar, vector, matrix, or 3-d array.

data types: single | double | int8 | int16 | int32 | int64 | fi
complex number support: yes

output arguments

percentage mer of the received signal over the configured measurement interval, returned as a scalar in units of decibels.

data types: double

minimum percentage mer over the configured measurement interval, returned as a scalar in units of decibels.

data types: double

value below which x% of mer measurements fall since the last reset, returned as a scalar in units of decibels. set the value of x in the xpercentilevalue property.

data types: double

number of symbols that the object uses to measure the pmer output, returned as a positive integer.

data types: double

object functions

to use an object function, specify the system object as the first input argument. for example, to release system resources of a system object named obj, use this syntax:

release(obj)
run system object algorithm
release resources and allow changes to system object property values and input characteristics
reset internal states of system object

examples

generate random data symbols and apply 8-psk modulation.

d = randi([0 7],2000,1);
refsym = pskmod(d,8,pi/8);

pass the modulated signal through an awgn channel.

rxsym = awgn(refsym,30);

create an mer object with default property values.

mer = comm.mer;

measure the mer using the transmitted signal as the reference.

rmsmer1 = mer(refsym,rxsym);

release the mer object.

release(mer)

configure the object to use a reference constellation for making mer measurements.

mer.referencesignalsource = "estimated from reference constellation";
mer.referenceconstellation = pskmod(0:7,8,pi/8);

measure the mer using only the received signal as an input. verify that the two mer measurements match.

rmsmer2 = mer(rxsym);
[rmsmer1 rmsmer2]
ans = 1×2
   30.0271   30.0271

specify the fft length, number of subcarriers, number of symbols, and cyclic prefix length.

nfft = 32;  % number of subcarriers
nsym = 4;   % number of ofdm symbols
cplen = 16; % cyclic prefix length

generate a random signal and apply qpsk modulation.

msg = randi([0 3],nfft,nsym);
refsym = pskmod(msg,4,pi/4);

ofdm modulate the qpsk symbols. pass the signal through an awgn channel. ofdm demodulate the noisy signal.

txsig = ofdmmod(refsym,nfft,cplen);
rxsig = awgn(txsig,10,"measured");
rxsym = ofdmdemod(rxsig,nfft,cplen);

configure an mer object to measure the average mer across the subcarriers. averaging across the rows returns mer measurements corresponding to each of the ofdm symbols.

mer = comm.mer(averagingdimensions=1);
merdb = mer(refsym,rxsym)
merdb = 1×4
    9.1136   11.7584    9.1921    9.8452

configure the mer object to measure the mer over the ofdm symbols. averaging across the columns returns mer measurements corresponding to each of the subcarriers.

mer = comm.mer(averagingdimensions=2);
merdb = mer(refsym,rxsym)
merdb = 32×1
    8.7805
    7.6542
    7.6455
    6.5291
   10.5659
    8.5554
   10.1859
   15.5139
    9.7574
    8.4784
      ⋮

averaging across the rows and columns returns one mer measurement for all the subcarriers and ofdm symbols.

mer = comm.mer(averagingdimensions=[1 2]);
merdb = mer(refsym,rxsym)
merdb = 9.8566

create an mer object to measure mer, minimum mer, 90-percentile mer, and the number of symbols.

mer = comm.mer(minimummeroutputport=true, ...
    xpercentilemeroutputport=true,xpercentilevalue=90, ...
    symbolcountoutputport=true);

generate random data, apply 16-qam with unit average power, and pass the signal through an awgn channel.

data = randi([0 15],1000,1);
refsym = qammod(data,16,unitaveragepower=true);
rxsym = awgn(refsym,20);

determine the mer, minimum mer, and 90th percentile mer values.

[merdb,minmer,pmer,nsym] = mer(refsym,rxsym)
merdb = 20.1071
minmer = 11.4248
pmer = 16.5850
nsym = 1000

measure the mer of a noisy 8-psk signal using two types of custom measurement interval and display the results.

define variables for the simulation.

nframe = 2;              % number of frames
nsubframe = 5;           % number of subframes per frame
spsf = 100;              % number of symbols per subframe
frmlen = nsubframe*spsf; % frame length

configure an mer object to use a custom measurement interval equal to the frame length and measure mer using an 8-psk reference constellation.

mer1 = comm.mer( ...
    measurementintervalsource="custom", ...
    measurementinterval=frmlen, ...
    referencesignalsource="estimated from reference constellation", ...
    referenceconstellation=pskmod(0:7,8,pi/8));

configure another mer object that uses a 500-symbol measurement interval with a periodic reset and measures mer using the same 8-psk reference constellation.

mer2 = comm.mer( ...
    measurementintervalsource="custom with periodic reset", ...
    measurementinterval=frmlen, ...
    referencesignalsource="estimated from reference constellation", ...
    referenceconstellation=pskmod(0:7,8,pi/8));

initialize the mer and signal-to-noise arrays.

mernoreset = zeros(nsubframe,nframe);
merreset = zeros(nsubframe,nframe);
snrdb = zeros(nsubframe,nframe);

measure the mer for a noisy 8-psk signal using both objects. the snr increases by 1 db from subframe to subframe. the mernoreset object uses the 500 most recent symbols to compute the estimate. this object uses a sliding window so that an entire data frame is the basis for the estimate. the merreset object clears the symbols each time it encounters a new frame.

for m = 1:nframe
    for k = 1:nsubframe
        data = randi([0 7],spsf,1);
        txsig = pskmod(data,8,pi/8);
        snrdb(k,m) = k (m-1)*nsubframe 7;
        rxsig = awgn(txsig,snrdb(k,m));
        mernoreset(k,m) = mer1(rxsig);
        merreset(k,m) = mer2(rxsig);
    end
end

display the mer measured using both approaches. the windowing used in the first case provides an averaging across the subframes. in the second case, the mer object resets after the first frame so that the calculated mer values more accurately reflect the current snr.

stairs(snrdb(:),[mernoreset(:) merreset(:)])
xlabel("snr (db)")
ylabel("mer (%)")
legend("no reset","periodic reset")

figure contains an axes object. the axes object with xlabel snr (db), ylabel mer (%) contains 2 objects of type stair. these objects represent no reset, periodic reset.

algorithms

mer is a measure of the snr in a modulated signal calculated in db. the mer over a burst containing n symbols is

mer=10×log10(k=1n(ik2 qk2)k=1n(ek))db,

where:

  • ek = ek=(iki˜k)2 (qkq˜k)2.

  • ik represents the in-phase component of the kth symbol in the burst.

  • qk represents the quadrature phase component of the kth symbol in the burst.

  • ik and qk represent ideal reference values.

  • i˜k and q˜k represent received symbols.

  • n represents the number of symbols in the burst.

the mer for the kth symbol is

merk=10×log10(1nk=1n(ik2 qk2)ek)db.

the minimum mer represents the minimum mer value in a burst, or

mermin=mink[1,...,n]{merk},

the algorithm computes the x-percentile mer by creating a histogram of all the incoming merk values. the output provides the mer value above which x% of the mer values fall.

references

[1] esti tr 101 290. digital video broadcasting (dvb): measurement guidelines for dvb systems. june 2020.

extended capabilities

version history

introduced in r2012a

see also

objects

functions

blocks

  • |

topics

    网站地图