ChannelMeasurementsConfiguration
Compute and display occupied bandwidth or adjacent channel power ratio on the spectrum analyzer
Since R2022a
Description
Use the ChannelMeasurementsConfiguration
object to compute and
display the occupied bandwidth or adjacent channel power ratio on the spectrum
analyzer.
You can specify the occupied bandwidth or adjacent channel power ratio (ACPR) settings,
frequency span, center frequency, and start and stop frequencies, and control the channel
measurement settings from the spectrum analyzer toolstrip or from the command line. Both the
spectrumAnalyzer
object and the SpectrumAnalyzerBlockConfiguration
object support
the ChannelMeasurementsConfiguration
object in the command line.
To modify the channel measurement settings on the spectrum analyzer toolstrip, click the Channel Measurements tab.
Creation
Description
channMeas = ChannelMeasurementsConfiguration()
creates a channel
measurements configuration object channMeas
.
Properties
All properties are tunable.
Type
— Type of measurement data to display
"occupied-bandwidth"
(default) | "acpr"
Type of measurement data to display, specified as either
"occupied-bandwidth"
or "acpr"
.
Scope Window Use
Click the Channel Measurements tab on the spectrum analyzer
toolstrip. In the Channel Measurements section, set
Type to either Occupied BW
or
ACPR
.
The Channel Measurements tab appears when you select Spectrum in the Scope tab.
Data Types: char
| string
FrequencySpan
— Frequency span mode
"span-and-center-frequency"
(default) | "start-and-stop-frequencies"
Frequency span mode, specified as one of the following:
"span-and-center-frequency"
–– Measure over a frequency range specified inSpan
Hz and around the frequency value specified inCenterFrequency
property."start-and-stop-frequencies"
–– Measure over the frequency range [StartFrequency
,StopFrequency
].
Scope Window Use
Click the Channel Measurements tab on the spectrum analyzer
toolstrip. In the Frequency Options section, set
Frequency Span to either Span and Center
Frequency
or Start and Stop
Frequencies
.
The Channel Measurements tab appears when you select Spectrum in the Scope tab.
Data Types: char
| string
Span
— Frequency span
2000
(default) | positive scalar
Frequency span over which the object computes the channel measurements, specified as a positive scalar in Hz.
Dependency
To enable this property, set the FrequencySpan
property to
"span-and-center-frequency"
.
Scope Window Use
Click the Channel Measurements tab on the spectrum analyzer
toolstrip. In the Frequency Options section, set
Frequency Span to Span and Center
Frequency
and Span (Hz) to a positive
scalar.
The Channel Measurements tab appears when you select Spectrum in the Scope tab.
Data Types: double
CenterFrequency
— Center frequency of span
0
(default) | real scalar
Center frequency of the span over which the object computes the channel measurements, specified as a real scalar in Hz.
Dependency
To enable this property, set the FrequencySpan
property to
"span-and-center-frequency"
.
Scope Window Use
Click the Channel Measurements tab on the spectrum analyzer
toolstrip. In the Frequency Options section, set
Frequency Span to Span and Center
Frequency
and Center Frequency (Hz) to a real
scalar.
The Channel Measurements tab appears when you select Spectrum in the Scope tab.
Data Types: double
StartFrequency
— Start frequency
-1000
(default) | real scalar
Start frequency over which the object computes the channel measurements, specified as a real scalar in Hz.
Dependency
To enable this property, set the FrequencySpan
property to
"start-and-stop-frequencies"
.
Scope Window Use
Click the Channel Measurements tab on the spectrum analyzer
toolstrip. In the Frequency Options section, set
Frequency Span to Start and Stop
Frequencies
and Start Frequency (Hz) to a real
scalar.
The Channel Measurements tab appears when you select Spectrum in the Scope tab.
Data Types: double
StopFrequency
— Stop frequency
1000
(default) | real scalar
Stop frequency over which the object computes the channel measurements, specified as a real scalar in Hz.
Dependency
To enable this property, set the FrequencySpan
property to
"start-and-stop-frequencies"
.
Scope Window Use
Click the Channel Measurements tab on the spectrum analyzer
toolstrip. In the Frequency Options section, set
Frequency Span to Start and Stop
Frequencies
and Stop Frequency (Hz) to a real
scalar.
The Channel Measurements tab appears when you select Spectrum in the Scope tab.
Data Types: double
PercentOccupiedBW
— Percentage of power to compute occupied bandwidth
99
(default) | positive scalar
Percentage of power over which the object computes the occupied bandwidth, specified as a positive scalar.
Dependency
To enable this property, set the Type
property to
"occupied-bandwidth"
.
Scope Window Use
Click the Channel Measurements tab on the spectrum analyzer
toolstrip. In the Channel Measurements section, set
Type to Occupied BW
and
Occupied BW (%) to a positive scalar.
The Channel Measurements tab appears when you select Spectrum in the Scope tab.
Data Types: double
AdjacentBW
— Adjacent channel bandwidth
1000
(default) | positive scalar
Adjacent channel bandwidth, specified as a positive scalar.
Dependency
To enable this property, set the Type
property to
"acpr"
.
Scope Window Use
Click the Channel Measurements tab on the spectrum analyzer
toolstrip. In the Channel Measurements section, set
Type to ACPR
. In the
Adjacent Channels section, set Adjacent BW
(Hz) to a positive scalar.
The Channel Measurements tab appears when you select Spectrum in the Scope tab.
Data Types: double
FilterShape
— Filter shape
"none"
(default) | "gaussian"
| "rrc"
Filter shape for main and adjacent channels, specified as "none"
,
"gaussian"
, or "rrc"
.
Dependency
To enable this property, set the Type
property to
"acpr"
.
Scope Window Use
Click the Channel Measurements tab on the spectrum analyzer
toolstrip. In the Channel Measurements section, set
Type to ACPR
. In the
Adjacent Channels section, set Filter
Shape.
The Channel Measurements tab appears when you select Spectrum in the Scope tab.
Data Types: char
| string
FilterCoeff
— Channel filter coefficient
0.5
(default) | real scalar in range [0
, 1
]
Channel filter coefficient, specified as a real scalar in the range
[0
, 1
].
Dependency
To enable this property, set the Type
property to
"acpr"
and the FilterShape
property to
either "gaussian"
or "rrc"
.
Scope Window Use
Click the Channel Measurements tab on the spectrum analyzer
toolstrip. In the Channel Measurements section, set
Type to ACPR
.
In the Adjacent Channels section, set:
Filter Shape to
RRC
and specify Roll-off Factor as a real scalar in the range [0,1].Filter Shape to
Gaussian
and specify BT Product as a real scalar in the range [0,1].
The Channel Measurements tab appears when you select Spectrum in the Scope tab.
Data Types: double
NumOffsets
— Number of adjacent channel pairs
2
(default) | positive integer in range [1
, 64
]
Number of adjacent channel pairs, specified as a positive integer in the range
[1
, 64
].
Dependency
To enable this property, set the Type
property to
"acpr"
.
Scope Window Use
Click the Channel Measurements tab on the spectrum analyzer
toolstrip. In the Channel Measurements section, set
Type to ACPR
. In the
Adjacent Channels section, set Num Pairs
to a positive integer in the range [1
,
64
].
The Channel Measurements tab appears when you select Spectrum in the Scope tab.
Data Types: double
ACPROffsets
— Frequency of adjacent channel relative to center frequency of main channel
[2000 3500]
(default) | vector
Frequency of the adjacent channel relative to the center frequency of the main
channel, specified as a real vector of length equal to the number of offset pairs
specified in NumOffsets
.
Dependency
To enable this property, set the Type
property to
"acpr"
.
Scope Window Use
Click the Channel Measurements tab on the spectrum analyzer
toolstrip. In the Channel Measurements section, set
Type to ACPR
. In the
Adjacent Channels section, set Offset
(Hz).
The Channel Measurements tab appears when you select Spectrum in the Scope tab.
Data Types: double
Enabled
— Channel measurements flag
false
(default) | true
Channel measurements flag, specified as true
or
false
.
Scope Window Use
Click the Channel Measurements tab on the spectrum analyzer toolstrip. In the Channel Measurements section, select Channel Measurements.
The Channel Measurements tab appears when you select Spectrum in the Scope tab.
Data Types: logical
Examples
Obtain Measurements Data Programmatically for spectrumAnalyzer
object
Compute and display the power spectrum of a noisy sinusoidal input signal using the spectrumAnalyzer
MATLAB® object. Measure the peaks, cursor placements, adjacent channel power ratio, and distortion values in the spectrum by enabling these properties:
PeakFinder
CursorMeasurements
ChannelMeasurements
DistortionMeasurements
Initialization
The input sine wave has two frequencies: 1000 Hz and 5000 Hz. Create two dsp.SineWave
System objects to generate these two frequencies. Create a spectrumAnalyzer
object to compute and display the power spectrum.
Fs = 44100; Sineobject1 = dsp.SineWave(SamplesPerFrame=1024,PhaseOffset=10,... SampleRate=Fs,Frequency=1000); Sineobject2 = dsp.SineWave(SamplesPerFrame=1024,... SampleRate=Fs,Frequency=5000); SA = spectrumAnalyzer(SampleRate=Fs,SpectrumType="power",... PlotAsTwoSidedSpectrum=false,ChannelNames={'Power spectrum of the input'},... YLimits=[-120 40],ShowLegend=true);
Enable Measurements Data
To obtain the measurements, set the Enabled
property to true
.
SA.CursorMeasurements.Enabled = true; SA.ChannelMeasurements.Enabled = true; SA.PeakFinder.Enabled = true; SA.DistortionMeasurements.Enabled = true;
Use getMeasurementsData
Stream in the noisy sine wave input signal and estimate the power spectrum of the signal using the spectrumAnalyzer
object. Measure the characteristics of the spectrum. Use the getMeasurementsData
function to obtain these measurements programmatically. The isNewDataReady
function returns true
when there is new spectrum data. Store the measured data in the variable data
.
data = []; for Iter = 1:1000 Sinewave1 = Sineobject1(); Sinewave2 = Sineobject2(); Input = Sinewave1 + Sinewave2; NoisyInput = Input + 0.001*randn(1024,1); SA(NoisyInput); if SA.isNewDataReady data = [data;getMeasurementsData(SA)]; end end
The panes at the bottom of the scope window display the measurements that you have enabled. The values in these panes match the values in the last time step of the data
variable. You can access the individual fields of data
to obtain the various measurements programmatically.
Compare Peak Values
Use the PeakFinder
property to obtain peak values. Verify that the peak values in the last time step of data
match the values in the spectrum analyzer plot.
peakvalues = data.PeakFinder(end).Value
peakvalues = 3×1
26.3957
22.7830
-57.9977
frequencieskHz = data.PeakFinder(end).Frequency/1000
frequencieskHz = 3×1
4.9957
0.9905
20.6719
Version History
Introduced in R2022a
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)