1.8 Relating Frequencies of Continuous and Discrete-Time Signals
When periodic sampling is used with sampling frequency , the frequencies that show up in are mapped into frequencies in and . This section discusses such mappings. We start by observing that angular frequencies are denoted as and , in continuous and discrete-time, respectively. This notation is important because they have different units and properties.
1.8.1 Units of continuous-time and discrete-time angular frequencies
In essence, a continuous-time signal (for instance, ) has radians per second (rad/s) as the unit of the angular frequency . Multiplying by , which is given in seconds, leads to an angle in radians. In contrast, the unit of the angular frequency of a discrete-time signal (for instance, ) is given in radians. Because is dimensionless, is an angle in radians. Similar to the interpretation of discrete-time as “time”, in spite of being an angle, will be interpreted as angular frequency.
The different units of (rad/s) and (rad) will play a fundamental role in discrete-time signal processing: a function of can assume distinct values when is varied in the range , while a function is periodic if is an angle. More specifically, when the variable is used to denote a discrete-time angular frequency, any function of will have a period of rad and be typically evaluated only in a range of , such as or .
In other words, whenever is an angular frequency (that is, an angle), the function is periodic and shows up as the argument of cosines or sines. For example, and are possible functions of an angular frequency . In fact, it is a common practice to use the notation to indicate that is a function of an angle (see, e. g. Eq. (2.34)). Therefore, one will never find something like because the periodicity is not observed in this case.
1.8.2 Mapping frequencies in continuous and discrete-time domains
In the following paragraphs, the main goal is not to prove, but to motivate the fundamental equation
| (1.36) |
where is the sampling frequency assumed to be in Hertz, is the continuous-time angular frequency given in radians per second and is the discrete-time angular frequency given in radians.
To better interpret Eq. (1.36), one can apply the S/D conversion to a single sinusoid, as exemplified in the next paragraphs.
Example 1.34. Example of using the fundamental equation for relating angular frequencies of continuous-time and discrete-time cosines. Assume is sampled with sampling interval to create the signal via the impulse sifting property of Eq. (1.31):
| (1.37) |
In this case, the S/D conversion of results in
Note that the original angular frequency radians/s was converted to the angular frequency in discrete-time radians, which corresponds to in Eq. (1.36).
For example, assuming Hz, the cosine with angular frequency rad/s (that is equivalent to the linear frequency Hz in this case) will be mapped to the angle rad. Using Eq. (1.36) in the other direction, a discrete-time angular frequency of rad is always mapped to . In the given example, rad is mapped into rad/s or, equivalently, Hz.
The previous example can be generalized. In summary, Eq. (1.36) is valid for all pairs of continuous-time and discrete-time signals that are related by a C/D or D/C conversion obtained with periodic sampling.
Example 1.35. Another example of conversion between discrete and continuous-time domains. Assume a discrete-time signal . It is possible to indicate that its angular frequency is rad because the signal repeats itself every samples. However, because is dimensionless, there is no information about time in this case. If it is stated that was obtained via sampling at Hz, would be representing a cosine of angular frequency rad/s. Instead, if Hz, then rad/s. As indicated in Eq. (1.36), the sampling frequency is needed when mapping the discrete-time angular frequency into the corresponding continuous-time angular frequency .
In summary, in Eq. (1.36) plays the role of a normalization factor that relates angular frequencies of continuous-time signals and their discrete-time counterparts obtained by C/D conversion. It leads to two distinct ways of simulating a continuous-time sinusoid using a discrete-time signal.
Example 1.36. Two approaches to simulate continuous-time sinusoids. Listing 1.14 indicates how to use Eq. (1.36) to create discrete-time sinusoids. The task is to generate a cosine of 600 Hz using Matlab/Octave. Two distinct approaches are:
- f 1.
- use “continuous-time” frequencies (in Hz) or (in rad/s), with discretized time in seconds, or
- f 2.
- use “discrete-time” frequencies (in rad), obtained via Eq. (1.36), and using a dimensionless “time” .
These two approaches are contrasted in Listing 1.14.
1Fs=8000; %sampling frequency (Hz) 2Ts=1/Fs; %sampling interval (seconds) 3N=20000; %number of desired samples 4f0=600; %cosine frequency (Hz) 5%%%%First alternative to generate a cosine of 600 Hz 6t=0:Ts:(N-1)*Ts; %discretized continuous-time axis (sec.) 7x1=5*cos(2*pi*f0*t); %amplitude=5 V and frequency = f0 Hz 8%%%%Second alternative: work directly in discrete-time 9w0=2*pi*f0*Ts; %w0 is in rad, convert from rad/s to rad 10n=0:N-1; %discrete-time axis (do not use Ts anymore) 11x2=5*cos(w0*n); %amplitude=5 V and frequency = w0 rad 12plot(x1-x2); %plot error between two alternative sequences 13soundsc(x1,Fs) %for fun: playback one of them to listen
Note that the sequences x1 and x2 are essentially the same, and there are only small numerical errors. In essence, one can simulate discrete-time signals representing the time evolution either with (an integer) or (in seconds), but properly using the corresponding angular frequencies (in radians) or (in rad/s), respectively.
Listing 1.14 compared signals created with versus (given that seconds), with the corresponding angular frequencies being rad or rad/s, respectively.
1.8.3 Nyquist frequency
As indicated by Eq. (1.30), if the sampling theorem is obeyed, the maximum frequency in the original continuous-time signal is restricted to Hz, where is called the Nyquist frequency.
Using Eq. (1.36), one can see that angle rad will be mapped into rad/s, which corresponds to the Nyquist frequency Hz. This is consistent with the fact that represents the highest frequency in discrete-time processing. This can be observed by plotting and varying until it reaches rad, which corresponds to a period of samples. Increasing from to , for instance, will slow down the signal (observe the angles: ), and increase the period to samples.
1.8.4 Frequency normalization in Python and Matlab/Octave
It is sometimes inconvenient to show graphs with the abscissa using in radians. For example, a graph in the range would have the last abscissa value as approximately , which could be annoying. To avoid that, the convention adopted by Matlab/Octave is to use, instead of in rad, a normalized frequency
| (1.38) |
This division by maps the discrete-time angular frequency range rad into the range of a normalized frequency .
Given the sampling frequency and the fact that (from Eq. (1.36)), Eq. (1.38) can be conveniently written as
| (1.39) |
Having a frequency in Hz, Eq. (1.39) can be used to map it to in the range as required by software such as Matlab/Octave and Python, and indicated in Eq. (1.38). For instance, if Hz, a frequency =4 Hz after the sampling process would be represented as in Matlab/Octave or Python, which can be quickly calculated via
| (1.40) |
i. e., is simply divided by the Nyquist frequency .
(Hz) | (rad/s) | (rad) | Matlab/Octave normalized () |
1 | |||
Table 1.5 and Figure 1.45 summarize the discussed information about versions of the Nyquist frequency in different domains, including its normalized version in Matlab/Octave. Figure 1.45 is also useful to observe the relation between the frequencies , , and .