In Gnuradio, we can see that the concept of sample rate is found in many modules.
And then see a description
Any processing block's ' s ' Sample rate ' parameter are used for DSP calculation, not for controlling the rate at which samples is produced. This was distinct from a hardware
(or throttle) block where it is used to control sample flow.
The sampling rate parameter of any processing module is only used for DSP calculation, and does not control the frequency of sample generation. This is different from hardware or valve modules.
As an example:
To get a sine-cosine signal at a specified frequency, we also need to know the sampling rate. Because in order to get a mathematical expression, we have to calculate the amplitude value of the sample at each point in time.
The actual sample frequency value can be arbitrary. Most of the time you'll be using the same values in your next flow graph, so that everything stays consistent. Run under the same sample rate.
In addition to the DSP calculation, the sampling frequency also refers to the rate at which the sample passes through the flow graph.
If there is no rate control (physical clock or valve mechanism), the sample will pass through this flow chart as soon as possible. (Rate is determined by CPU capacity)
This is good if you want to perform some fixed DSP on the stored data. (for example, read a file, resample, and write back).
Only some modules (Usrp,sound card) or valve modules (throttle) that represent physical hardware in the real world can be used to set the physical clock by sampling frequency (sample rate), so it is possible to control the sample frequency in the flow graph.
1.Throttle
Use host-based timing to control the frequency of generated samples.
2.hardware Sink
Receive samples at a fixed frequency
3.hardware source generates samples at a fixed frequency
Throttle block and hardware sink block will react to upstream modules, limiting the frequency of upstream modules, depending on throttling action.
In general, only one block in a flow graph is required to control the sample flow.
If you have multiple, out-of-sync sources, you need to be particularly careful because they are produced and consumed in different frequencies, and may eventually lose synchronization and cause overflow or under-loading.
To avoid this situation, we need to change the resampling frequency to adjust the clock offset.
Allow non-blocking I/O, and/or tweak resampling rates to account for the clock offsets
Sample Rate Understanding