Copyright Notice

Copyright 2001 by Barry Sanderson

Permission is hereby granted for the verbatim reproduction, or storage, of this document, including this copyright notice, and its accompanying images. All other rights are reserved.

Abstract

Using both 1024 point and 4096 point Discrete Fourier Transforms (DFT), together with a simple differential phase modulation pattern during the leader portion of a transmission, permits measurement of tuning errors greater than half the spacing between subcarriers and simultaneous clock rate differences greater than 6000 parts per million to be made from a received signal, that has also been modulated by the channel between the transmitter and the receiver.

Background

Proper demodulation of signal with differential phase modulation requires a demodulator, using a local oscillator, to have the local oscillator fairly close to the ideal value. The magnitude of the frequency error of a local oscillator corresponding to half of a phase change unit depends on the baud rate of the symbols, and the size of a phase change unit.

  For:
  	T = symbol period, in seconds;
  	P = one phase change unit, in degrees;
  	F = frequency error corresponding to half of a phase change unit, in Hz;

                  P  	
  	F = --------------
  	      2 * T * 360
  

The above equation shows that lengthening the symbol period (using a lower baud rate) requires a smaller frequency error in order for the demodulator to avoid producing the wrong phase change, due to the frequency error alone.

For example, in the case of 31.25 symbols per second and a phase change unit of 90 degrees, as is used in the QPSK mode of PSK 31, a frequency error of 3.90625 Hz corresponds to half of a phase change unit. In the case of 10 symbols per second and a phase change unit of 180 degrees, as is used in mt63, a frequency error of 2.5 Hz corresponds to half of a phase change unit. In the case of 114.84375 symbols per second and a phase change unit of 42.35294 degrees, as used in the April 2001 HDSSTV tests between Australia and the United States, a frequency error of 6.7555 Hz corresponds to half of a phase change unit. These examples show the values of frequency errors that, in and of themselves, would cause wrong values to be generated by a demodulator operating with a local oscillator having such a frequency error.

For the case of the modulated signal being generated by the sound card of one computer, transmitted through a radio channel, using single sideband RF modulation, and recorded by the sound card of a different computer, there are two sources of "static" frequency error. Generally, the larger of these is due to the radio receiver being tuned to a different frequency than that required for no frequency error. The generally smaller error is due to the difference in clock rates of the two sound cards.

"Dynamic" frequency errors (which vary during the course of a single transmission) my be introduced by frequency instabilities in either the transmitter or the receiver, as well as by things that happen to the signal as it propagates from transmitter to receiver.

This paper focuses on how to determine the frequency offset error, due to miss-tuning of the receiver, for the case of multiple subcarriers transmitted simultaneously, as was used in the April 2001 HDSSTV tests between Australia and the United States.

Method Used

A portion of the signal, called the leader, specifically provides data for each receiver to use to estimate the frequency errors. Two different leaders were used in the subject tests. The first leader tested consisted of all 8 subcarriers being unmodulated (by anything except for the channel) for a 0.6 second interval. Identifying the 8 subcarriers by the numbers 0, 1, ..., 7, from lowest frequency to highest frequency, the second leader left subcarriers 0, 1, 6, and 7 unmodulated (except for what the channel did to the signal). The second leader applied a constant modulation of -2 phase change units to subcarriers 2, and 3. The second leader applied a constant modulation of +2 phase change units to subcarriers 4, and 5.

The energy of the first leader, hereinafter called "pm7b", is concentrated at the following subcarrier frequencies (which are spaced 230 Hz apart), by the modulator.

      Subcarrier Number     Frequency (Hz)
      -----------------     --------------
              0                  590
              1                  820
              2                 1050
              3                 1280
              4                 1510
              5                 1740
              6                 1970
              7                 2200
  

The energy of the second leader, hereinafter called "pm8a", is concentrated at the following frequencies, by the modulator. Note that, due to the modulation of subcarriers: 2, 3, 4, and 5, their energy is divided between two different frequencies. The unmodulated subcarriers for this case are also spaced 230 Hz apart, and are shifted lower in frequency by 15 Hz, than they are for the pm7b case.

      Subcarrier Number     Frequency (Hz)
      -----------------     --------------
              0                  575
              1                  805
              2               1006, 1129
              3               1236, 1359
              4               1401, 1524
              5               1631, 1754
              6                 1955
              7                 2185
  

Ideal Spectra for pm7b and pm8a Leaders

A plot showing the linear magnitude of the spectrum for: the pm7b case, in red, and the pm8a case, in blue, is just below.

spectra for ideal leaders

Determining the "static" frequency errors is essentially a search in a three dimensional space for a point close to the actual operating conditions. The first of these dimensions is time; the receiver needs to find the 0.6 second leader portion of the signal. The second of these dimensions is frequency offset; this corresponds to tuning offset of the radio receiver. The third dimension is frequency scale; this corresponds to the clock rate difference between the two sound card oscillators.

Determining Frequency Offset Error

By calculating the Discrete Fourier Transform (DFT) of various portions of the received signal and comparing it to the DFT of the leader section for an "ideal" (not transmitted over the air) case, an estimate of the desired values in the first two dimensions can be made. Determining the value along the time dimension means determining where, in time, the DFT of the received signal best matches the DFT for an "ideal" signal. The amount of shift, in frequency, required for the best match between these two DFTs provides the initial estimate along the frequency offset dimension.

Plots for pm7b Case, Received by W8ZCF

Below is a plot showing the cross-correlation of the DFT of a stored pattern and: the DFT of an ideal case, in red; and the DFT of a signal received by W8ZCF, in blue, from a transmission by VK3CQE. This plot is for the pm7b leader, and for 4096 point DFTs.

pm7b 4096 point Rx by W8ZCF

Note that the red trace in the above plot shows a peak value of 1 at an offset of 0 Hz, as it should, but the peaks at integer multiples of 230 Hz away from 0 Hz are relatively close to 1.

Note that the peaks of the blue trace, in the above plot, are all less than 0.6, and that they are all nearly equal in value. Thus, this plot does not make it easy to choose which of the blue peaks is "the right one".

Below is a plot of the same case, with 1024 point DFTs used, rather than 4096 point DFTs.

pm7b 1024 point Rx by W8ZCF

Note that the peak values of the blue trace, in the above plot are now near 0.8, but all of them are still relatively close, in value, to each other.

Plots for pm8a Case, Received by W8ZCF

About 30 seconds after the data for the pm7b case above were transmitted, the data for the pm8a case were transmitted. Below is a plot showing the cross-correlation of the DFT of a stored pattern and: the DFT of an ideal case, in red; and the DFT of a signal received by W8ZCF, in blue, from a transmission by VK3CQE. This plot is for the pm8a leader, and for 4096 point DFTs.

pm8a 4096 point Rx by W8ZCF

Note that the red trace in the above plot shows a peak value of 1 at an offset of 0 Hz, as it should, and the peaks at integer multiples of 230 Hz away from 0 Hz are much farther from 1, than they are in the pm7b case.

Note that the peaks of the blue trace, in the above plot, are still all less than 0.6, but they are not as nearly equal in value to each other, as they are in the pm7b case.

Below is a plot of the same pm8a case, with 1024 point DFTs used, rather than 4096 point DFTs.

pm8a 1024 point Rx by W8ZCF

Note that the peak value of the blue trace, in the above plot is above 0.75, and the next highest peak is below 0.5. This makes it easy to choose "the right" blue peak (frequency offset). In this case the signal represented by the blue trace is about 170 Hz low.

Links to Plots for Data Received by KB4YZ and W9NTP

The same transmission by VK3CQE recorded by W8ZCF was also recorded by KB4YZ and W9NTP. Links to the corresponding plots from these recordings by KB4YZ and W9NTP are below. These data recorded by KB4YZ and W9NTP lead to the same conclusions as do the data recorded by W8ZCF.

Why 1024 Point DFT Works Better than 4096 Point DFT

Due to the relatively large frequency scale error in the transmission from VK3CQE (in excess of 6000 parts per million), the frequency axis seems, from the point of view of: W8ZCF, KB4YZ, and W9NTP, to have been stretched. Thus, there is no amount of shift in frequency that will align all 8 subcarriers, in the pm7b case, with the ideal pattern, when 4096 point DFTs are used.

4096 Point DFT Plots

Shifting the data received by W8ZCF up by 168.22 Hz provides good alignment for the middle two subcarriers, as shown in the plot below.

pm7b mid 4096 point shifted

The above plot shows the DFT data used for the cross-correlation operation. Red shows the ideal case. Blue shows the "shifted by 168.22 Hz" data from the signal actually received. Relatively good alignment of the peaks means a relatively high cross-correlation value will result.

However, with this same 168.22 Hz shift, the lowest two subcarriers are both lower in frequency than the ideal case (blue peaks left of red peaks), as shown in the plot below.

pm7b lo 4096 point shifted

With this same 168.22 Hz shift, the two highest subcarriers are both higher in frequency than the ideal case (blue peaks right of red peaks), as shown in the plot below.

pm7b hi 4096 point shifted

The inability to find any shift in frequency that will simultaneously provide good alignment with the ideal case means that the peak cross-correlation value will be relatively low.

1024 Point DFT Plots

Because the frequency resolution of the 1024 point DFTs is one quarter that of the 4096 point DFTs, the amount of apparent stretch in the frequency axis is not as well resolved, when using 1024 point DFTs (as it is when using 4096 point DFTs). Thus, a shift in frequency can be found that simultaneously provides a better match between the peaks for all 8 received subcarriers and the ideal case, when 1024 point DFTs are used, than when 4096 point DFTs are used. The result is a greater cross-correlation value, when 1024 point DFTs are used, than when 4096 point DFTs are used.

The three plots below show, for 1024 point DFTs, the corresponding data, to the three plots above.

Determining Frequency Scale Error

Once initial estimates for the values along the first two dimensions are made, a 4096 point DFT can be used to better estimate the received frequency of each peak in the leader portion of the signal. Those local maximums "close enough" to the proper locations, based on the initial estimates of values along the first two dimensions, (time, and frequency offset) are then used to simultaneously refine the value along the frequency offset dimension, and to determine an initial estimate of the proper value along the frequency scale dimension. This is accomplished by fitting the best straight line (using the least squares method) to the measured frequencies of the "close enough" local maximums vs the corresponding ideal frequencies. The intercept parameter from this best fit straight line is the refined value along the frequency offset dimension. The slope parameter from this best fit straight line is the initial estimate of the value along the frequency scale dimension.

Refining Initial Estimates

Attempting to further refine the measurements of the received frequencies during the leader portion of the signal produced unreliable results, due to "dynamic" errors. An example of this failure to better determine received frequencies follows.

An attempt to refine the frequencies received during the leader portion of the signal was made by multiplying the received signal by the sin and cos of a local oscillator at the frequency determined by the initial method described above. These products were then lowpass filtered and combined to yield values for the angle between the local oscillator and the received frequency. When these angles are plotted vs time, the slope of the plot is a measure of the frequency difference between the local oscillator and the received frequency.

Below is a plot showing angles vs time for the top 6 frequencies where energy is concentrated in a pm8a case.

fine tuning counter-example

The green trace in the above plot shows an indeterminate case. The first part of the green trace has a positive slope. The middle part of the green trace has zero slope. The last part of the green trace has a negative slope. Thus, part of the time the received frequency seems to be greater than the local oscillator frequency; part of the time the two frequencies seem to be the same; part of the time the received frequency seems to be less that the local oscillator. For this case, the receiver can't pick a different local oscillator frequency, that will uniformly be better than the one already used.

Procedures actually used to improve the estimate of the frequency scale error will be described in a subsequent paper.

Conclusions

  1. Lowering the frequency resolution of the DFTs used to provide a pattern and data to be cross-correlated results in greater correlation, for cases where the frequency axis appears to have been stretched.

  2. Modulating some of the subcarriers allows unambiguous determination of frequency offsets greater than half the spacing between subcarriers. This is particularly important in cases where some of the subcarriers have been effectively lost by attenuation in passing through the channel.


15 August 2001, Barry Sanderson.