info
Characteristic information about coarse frequency compensator
Description
returns characteristic information for the specified coarse frequency compensator.infostruct = info(coarseFreqComp)
Examples
Compensate for a 4 kHz frequency offset imposed on a noisy QPSK signal.
Set up the example parameters.
nSym = 2048; % Number of input symbols sps = 4; % Samples per symbol nSamp = nSym*sps; % Number of samples fs = 80000; % Sampling frequency (Hz)
Create a square root raised cosine transmit filter.
txfilter = comm.RaisedCosineTransmitFilter( ... RolloffFactor=0.2, ... FilterSpanInSymbols=8, ... OutputSamplesPerSymbol=sps);
Create a phase frequency offset object to introduce the 4 kHz frequency offset.
freqOffset = comm.PhaseFrequencyOffset( ... FrequencyOffset=-4000, ... SampleRate=fs);
Create a coarse frequency compensator object to compensate for the offset.
freqComp = comm.CoarseFrequencyCompensator( ... Modulation="qpsk", ... SampleRate=fs, ... FrequencyResolution=1);
Generate QPSK symbols, filter the modulated data, pass the signal through an AWGN channel, and apply the frequency offset.
data = randi([0 3],nSym,1);
modData = pskmod(data,4,pi/4);
txSig = txfilter(modData);
rxSig = awgn(txSig,20,"measured");
offsetData = freqOffset(rxSig);Compensate for the frequency offset using the coarse frequency compensator. For high frequency offsets, applying coarse frequency compensation prior to receive filtering is beneficial because filtering suppresses energy in the useful spectrum.
[compensatedData,estFreqOffset] = freqComp(offsetData);
Display the estimate of the frequency offset.
estFreqOffset
estFreqOffset = -4.0002e+03
Return information about the coarse frequency compensator System object. To obtain the FFT length, you must call the coarse frequency compensator System object prior to calling the info object function.
freqCompInfo = info(freqComp)
freqCompInfo = struct with fields:
FFTLength: 32768
Algorithm: 'FFT-based'
Create a spectrum analyzer object and plot the offset and compensated spectra. Verify that the compensated signal has a center frequency at 0 Hz and that the offset signal has a center frequency at -4 kHz.
sa = spectrumAnalyzer( ... SampleRate=fs, ... ShowLegend=true, ... ChannelNames=["Offset Signal","Compensated Signal"]); sa([offsetData compensatedData])

Input Arguments
Coarse frequency compensator specified as a comm.CoarseFrequencyCompensator
System object.
Output Arguments
Characteristic information about coarse frequency compensator, returned as a structure containing these fields.
Number of fast Fourier transform (FFT) samples, returned as a scalar. Appears
only when Algorithm is FFT-based.
Dependency
To enable this field, set the Algorithm property of the
coarseFreqComp input to
'FFT-based'.
Algorithm used to estimate frequency offset, returned as
'FFT-based' or 'Correlation-based'. This
value matches the Algorithm property of the
coarseFreqComp input.
Number of samples used to estimate the autocorrelation, returned as a positive integer.
Dependency
To enable this field, set the Algorithm property of the
coarseFreqComp input to
'Correlation-based'.
Data Types: struct
Version History
Introduced in R2015b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)