main content

measure adjacent channel power ratio (acpr) -凯发k8网页登录

measure adjacent channel power ratio (acpr)

description

the comm.acpr system object™ measures the acpr of an input signal.

to measure the acpr of an input signal:

  1. create the comm.acpr 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

acpr = comm.acpr creates an acpr measurement system object.

example

acpr = comm.acpr(name,value) sets properties using one or more name-value arguments. for example, comm.acpr('normalizedfrequency',true) creates an acpr measurement object with normalized frequency values.

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 .

normalized frequency values, specified as one of these logical values.

  • 0 (false) — frequency values are measured in hz.

  • 1 (true) — frequency values are normalized in the range [-1, 1].

data types: logical | double

sample rate of input signal in hz, specified as a positive scalar.

dependencies

to enable this property, set the normalizedfrequency property to false.

data types: double

main channel center frequency, specified as a numeric scalar.

  • if you set the normalizedfrequency property to true, specify the center frequency as a normalized value in the range [−1, 1].

  • if you set the normalizedfrequency property to false, specify the center frequency in hz.

this property specifies where the object measures the main channel power in the bandwidth specified by the mainmeasurementbandwidth property. for more details on how to set these two properties, see algorithms.

data types: double

main channel measurement bandwidth, specified as a positive scalar.

  • if you set the normalizedfrequency property to true, specify the measurement bandwidth as a normalized value in the range [0, 1].

  • if you set the normalizedfrequency property to false, specify the measurement bandwidth in hz.

this property specifies the bandwidth in which the object measures the main channel power. the measurement is taken at the center of the frequency, specified by the mainchannelfrequency property. for more details on how to set these two properties, see algorithms.

data types: double

adjacent channel frequency offsets, specified as a numeric scalar or row vector comprising frequencies that define the location of adjacent channels of interest.

  • if you set the normalizedfrequency property to true, specify the adjacent channel frequency offsets as normalized values in the range [−1, 1].

  • if you set the normalizedfrequency property to false, specify the adjacent channel frequency offsets in hz.

the offset values indicate the distance between the main channel center frequency and adjacent channel center frequencies. positive offsets indicate adjacent channels to the right of the main channel center frequency. negative offsets indicate adjacent channels to the left of the main channel center frequency. for more details on how to set properties of the adjacent channels, see algorithms.

data types: double

measurement bandwidth for each adjacent channel, specified as one of these options.

  • numeric scalar — the object obtains all adjacent channel power measurements within equal measurement bandwidths.

  • numeric row vector of length equal to the number of offsets specified in the adjacentchanneloffset property — the object obtains each adjacent channel power measurement based on its specific bandwidth that is centered at the frequency defined by the corresponding frequency offset. the adjacentchanneloffset property defines this frequency offset.

set the values of this property with respect to the normalizedfrequency property.

  • if you set the normalizedfrequency property to true, specify the measurement bandwidth values as normalized values in the range [0, 1].

  • if you set the normalizedfrequency property to false, specify the measurement bandwidth values in hz.

for more details on how to set properties of the adjacent channels, see algorithms.

data types: double

source of the measurement filter, specified as one of these values.

  • 'none' — the object does not apply filtering to obtain acpr measurements.

  • 'property' — the object applies a measurement filter to the main channel before measuring the average power. specify the measurement filter coefficients by using the measurementfilter property. each of the adjacent channel bands also receives a measurement filter.

data types: char | string

measurement filter coefficients, specified as a numeric row vector containing the coefficients of an fir filter in descending polynomial powers. center the response of the filter at dc. the object automatically shifts and applies the filter response at each of the main and adjacent channel center frequencies before obtaining the average power measurements. the internal filter states persist between calls to the object. to clear the states, call the object function.

the default value specifies an all-pass filter that has no effect on the measurements.

dependencies

to enable this property, set the measurementfiltersource property to 'property'.

data types: double

spectral estimation control, specified as one of these values.

  • 'auto' — the object obtains power measurements with a welch spectral estimator with zero-percent overlap, a hamming window, and a segment length equal to the length of the input data vector. the spectral estimator set can achieve the maximum frequency resolution that is attainable with the input data length.

  • 'specify frequency resolution' — the object uses the value specified by the frequencyresolution property to automatically compute the size of the spectral estimator data window.

  • 'specify window parameters' — the object obtains power measurements with a welch spectral estimator determined by the segmentlength, overlappercentage, window, and sidelobeattenuation properties. in this setting, the frequencyresolution property does not apply, but you can use these properties to control also the resolution.

data types: char | string

segment length for the spectral estimator in samples, specified as a positive integer. the segment length enables you to make tradeoffs between frequency resolution and variance in the spectral estimates. a long segment length results in better resolution. a short segment length results in more averaging and a decrease in variance.

dependencies

to enable this property, set the spectralestimation property to 'specify window parameters'.

data types: double

overlap percentage between segments in the spectral estimator, specified as a numeric scalar in the range [0, 100].

dependencies

to enable this property, set the spectralestimation property to 'specify window parameters'.

data types: double

window function for the spectral estimator, specified as 'hamming', 'bartlett', 'bartlett-hanning', 'blackman', 'blackman-harris', 'bohman', 'chebyshev', 'flat top', 'hann', 'nuttall', 'parzen', 'rectangular', or 'triangular'.

the default hamming window has a sidelobe attenuation of 42.5 db. this attenuation can mask spectral content below this value, relative to the peak spectral content. choosing different windows enables you to make tradeoffs between resolution and sidelobe attenuation.

dependencies

to enable this property, set the spectralestimation property to 'specify window parameters'.

data types: char | string

sidelobe attenuation for the chebyshev window function in db, specified as a nonnegative scalar.

dependencies

to enable this property, set the spectralestimation property to 'specify window parameters' and the window property to 'chebyshev'.

data types: double

frequency resolution of the spectral estimator, specified as a numeric scalar.

  • if you set the normalizedfrequency property to true, specify the frequency resolution as a normalized value in the range [0, 1].

  • if you set the normalizedfrequency property to false, specify the frequency resolution in hz.

dependencies

to enable this property, set the spectralestimation property to 'specify frequency resolution'.

data types: double

number of fast fourier transform (fft) points that the spectral estimator uses, specified as one of these values.

  • 'next power of 2' — the object sets the number of fft points to the next power of 2 that is greater than max(segmentlength,256).

  • 'same as segment length' — the object sets the number of fft points to the value of the segmentlength property.

  • 'custom' — the object sets the number of fft points to the value of the customfftlength property.

data types: char | string

custom number of fft points, specified as a positive integer.

dependencies

to enable this property, set the fftlength property to 'custom'.

data types: double

maximum-hold setting control, specified as one of these logical values.

  • 0 (false) — the object obtains power measurements by using instantaneous power spectral density estimates.

  • 1 (true) — the object obtains power measurements by comparing two vectors. one vector is the current estimated power spectral density vector (obtained with the current input data frame). the object checks this vector against the previous maximum-hold accumulated power spectral density vector (obtained at the previous call of the object). the object stores the maximum values at each frequency bin and uses these values to compute average power measurements. to clear the maximum-hold spectrum, use the reset object function.

tunable: yes

data types: logical | double

power measurement units, specified as one of these values.

  • 'dbm' or 'dbw' — the object returns acpr measurements in a dbc scale (the adjacent channel power referenced to the main channel power).

  • 'watts' — the object returns acpr measurements in a linear scale.

data types: char | string

option to enable main channel power measurement output, specified as a logical 0 (false) or 1 (true). when you set this property to true, the object returns the main channel power measurement. the main channel power is the power of the input signal measured in the band specified by the mainchannelfrequency and mainmeasurementbandwidth properties. the object returns the power measurements in the unit specified by the powerunits property.

data types: logical | double

option to enable adjacent channel power measurements output, specified as a logical 0 (false) or 1 (true). when you set this property to true, the object returns a vector containing adjacent channel power measurements. the adjacent channel powers correspond to the power of the input measured in the bands specified by the adjacentchanneloffset and adjacentmeasurementbandwidth properties. the object returns the power measurements in the unit specified by the powerunits property.

data types: logical | double

usage

description

adjchpowratio = acpr(signal) measures the acpr in input data signal. the measurements are at the frequency bands specified by the mainchannelfrequency, mainmeasurementbandwidth, adjacentchanneloffset, and adjacentmeasurementbandwidth properties.

[adjchpowratio,mainchpow] = acpr(signal) measures the main channel power, mainchpow. to use this syntax, set the mainchannelpoweroutputport property to true. the main channel power is measured within the main channel frequency band specified by the mainchannelfrequency and mainmeasurementbandwidth properties.

[adjchpowratio,adjchpow] = acpr(signal) measures the adjacent channel powers, adjchpow. to use this syntax, set the adjacentchannelpoweroutputport property to true. the adjacent channel powers are measured at the adjacent frequency bands specified by the adjacentchanneloffset and adjacentmeasurementbandwidth properties.

[adjchpowratio,mainchpow,adjchpow] = acpr(signal) measures the acpr, the main channel power, and adjacent channel powers. to use this syntax, set the mainchannelpoweroutputport and adjacentchannelpoweroutputport properties to true.

input arguments

input signal, specified as a column vector of complex numbers.

data types: double
complex number support: yes

output arguments

acpr measurements, returned as a numeric row vector. the length of the vector equals the number of adjacent channels specified by the adjacentchanneloffset property.

data types: double

main channel power measurements, returned as a numeric scalar. the powerunits property specifies the units used for the returned value.

data types: double

adjacent channel power measurements, returned as a numeric row vector. the length of the vector equals the number of adjacent channels specified by the adjacentchanneloffset property. the powerunits property specifies the units used for the returned value.

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 data with an alphabet size of 16, and then modulate the data.

x = randi([0 15],5000,1);
y = qammod(x,16);

upsample the data by using a rectangular pulse shape.

l = 8;
ypulse = rectpulse(y,l);

create an acpr measurement object.

acpr = comm.acpr(...
    'samplerate',3.84e6*8, ...
    'mainchannelfrequency',0, ...
    'mainmeasurementbandwidth',3.84e6, ...
    'adjacentchanneloffset',[-5e6 5e6], ...
    'adjacentmeasurementbandwidth',3.84e6, ...
    'mainchannelpoweroutputport',true, ...
    'adjacentchannelpoweroutputport',true);

measure the acpr, main channel power, and adjacent channel powers of the modulated signal.

[adjchpowratio,mainchpow,adjchpow] = acpr(ypulse)
adjchpowratio = 1×2
  -14.3659  -14.3681
mainchpow = 38.8668
adjchpow = 1×2
   24.5010   24.4988

algorithms

to comply with the nyquist sampling theorem, these conditions must be satisfied when you set the frequencies and measurement bandwidths of the main and adjacent channels.

|mainchannelfrequency±mainmeasurementbandwidth2|<fmax|(mainchannelfrequency adjacentchanneloffset)±adjacentmeasurementbandwidth2|<fmax

if you set the normalizedfrequency property to false, fmax=fs/2, where fs is the sampling frequency specified by the samplerate property.

if you set the normalizedfrequency property to true, fmax=1.

extended capabilities

version history

introduced in r2012a

see also

objects

网站地图