Sample Rate Offset
Libraries:
Communications Toolbox /
RF Impairments and Components
Description
The Sample Rate Offset block applies a sample rate offset to the input signal. Applying a sample rate offset is equivalent to changing the ADC clock rate.
Examples
Apply Sample Rate Offset to 16-QAM Signal
Apply a sample rate offset to a 16-QAM modulated signal and compare the reference constellation with the signal with a sample rate offset.
Open the doc_apply_sample_rate_offset
model. The model generates random data using the Random Integer Generator block. To modulate the random data, the model uses the Rectangular QAM Modulator Baseband block with a modulation order of 16 and a constellation order set to Gray. Subsequently, the Sample Rate Offset block applies a sample rate offset of 50 parts per million to the modulated signal. The model displays the resulting constellation through the Constellation Diagram block.
Run the model. The constellation diagram shows the reference constellation and the signal that has a sample rate offset.
Ports
Input
In — Input signal
scalar | vector | matrix
Input signal, specified as a scalar, an NS element column vector, or an NS-by-NC matrix. NS is the number of time samples. NC is the number of channels. For matrix input signals, the sample rate offset is applied independently to each column.
Data Types: double
| single
Complex Number Support: Yes
Output
Out — Output signal
scalar | vector | matrix
Output signal, returned as a scalar, vector, or matrix. This output is the same data type as the input signal.
Parameters
To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.
Sample rate offset — Sample rate offset
10 (default) | scalar
Sample rate offset in parts per million (ppm), specified as a scalar greater than –1e6.
Simulate using — Type of simulation to run
Interpreted execution
(default) | Code generation
Type of simulation to run, specified as Interpreted
execution
or Code generation
.
Interpreted execution
— Simulate the model by using the MATLAB® interpreter. This option requires less startup time, but the speed of subsequent simulations is slower than with theCode generation
option. In this mode, you can debug the source code of the block.Code generation
— Simulate the model by using generated C code. The first time you run a simulation, Simulink generates C code for the block. The model reuses the C code for subsequent simulations unless the model changes. This option requires additional startup time, but the speed of the subsequent simulations is faster than with theInterpreted execution
option.
For more information, see Interpreted Execution vs. Code Generation (Simulink).
Block Characteristics
Data Types |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2022b
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.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)