Field of the Invention
The present invention generally relates to the generation of dual tone, multiple frequency (DTMF) signals and, more particularly, to DTMF generation using pre-summed tables of individually optimized length, tailored for bidirectional fixed rate scanning.
Description of the Prior Art
The art of generating waveforms through the use of look up tables is well known. For example, U.S. Pat. No. 4,058,805 to Lake is representative of systems which use look up table storage of the discrete dual frequencies necessary to generate a dual tone, multiple frequency (DTMF) tone. In such systems, the individual tone data must be separately read from their individual look up tables, and then the data must be summed either before or after digital-to-analog conversion in order to generate the desired DTMF signal.
In U.S. Pat. No. 3,706,855 to Pitroda et al discloses a method and apparatus for generating digital code signals representing dual frequency analog tones through the use of look up tables. Pitroda et al specifically teach the generation of fifteen dual frequency tones, all of which have an even one quarter period of ten milliseconds; that is, the one quarter period waveform repeats, with a change in sign or direction, every ten milliseconds. Thus, only the one quarter period waveform need be stored in memory to recreate the tone. To generate all fifteen tones, based on a sampling rate of 125 microseconds, one 80 digital samples of each tone need be stored. To recreate a specific tone, the memory containing its one quarter period sample is read cyclically in a predetermined manner.
As standardized in the communications industry, DTMF frequencies were originally designed not to be harmonics of one another so that they would not be accidently produced as in speech. As a result, they do not have coincident peaks within a small number of cycles. The standards for DTMF tones are published in Bell System Technical Reference PUB 61100 by AT&T dated January 1983.
The approach taken by Pitroda et al is to store and generate periodically related tones which does not conform to the industry standard for DTMF signals. Adapting the Pitroda et al technique to non-harmonically related frequency pairs would require a large number of samples to be stored in memory and a relatively high performance, and hence expensive, microprocessor to read out the samples in order to generate the DTMF signals. What is needed is a technique by which a low cost microprocessor, with minimal memory and relatively slow execution speed, could be made to generate high quality DTMF signals.
Summary of the Invention
It is therefore an object of this invention to provide an inexpensive signal generator which produces high quality DTMF signals.
It is another object of the present invention to provide a DTMF signal generator using digital storage techniques but requiring minimal processing by inexpensive circuits of the tone data read out of the digital storage.
It is a further object of the invention to provide a digital DTMF signal generator which the data is optimized to compensate for the actual circuit performance of inexpensive analog circuits used filter the generated DTMF signals.
According to the invention, pre-summed tables of individually optimized length, tailored for bidirectional fixed rate scanning, are used to generate DTMF signals of high quality. Pre-summed waveform tables are chosen to eliminate the need for real time summing, either internal or external. The novel aspect of the invention is to have each table be a unique length and to run between the points where both components have simultaneously reached their peak (positive or negative exteme). Specifying the end points this way and using different length tables for each tone pair allows the tables to be scanned bidirectionally at an essentially fixed rate while minimizing the lengths of the tables. While each table does not need its own scan rate, it is possible to optimize the design further by grouping the tables into two or three different scan rates.
A further aspect of the invention is the possibility of preweighting the two components before they are pre-summed. The relative amplitude difference between any two frequency components (twist) which make up a valid DTMF pair, as defined by AT&T PUB 61100, is restricted as follows: The maximum difference in levels between the two components must not exceed 4 dB, and the level of the high-frequency component must equal or exceed the level of the low frequency component. A low pass filter is needed to reduce the relative amplitude of extraneous signals produced by the digital sampling used in the method of DTMF signal generation according to the invention. This filter can be more efficient if it does not need to be completely flat over the range of valid frequency components. By preweighting the two components before they are pre-summed, a 2 dB twist can be achieved, and a less expensive filter can be used. This feature of the invention enhances the overall performance without any increase, and in some cases an actual decrease, in cost of the system.
Brief Description of the Drawings
The foregoing and other objects, aspects and advantages of the invention will be better understood from the following detailed description of the invention with reference to the drawings, in which:
FIG. 1 is a waveform diagram showing the components which make up a DTMF "1" tone pair;
FIG. 2 is a waveform diagram showing the same two components starting at their positive peaks with their subsequent peaks indicated by vertical lines;
FIG. 3 is a timing diagram showing some examples of sampling rates which could be used to store versions of the waveforms shown in FIG. 2 or their sum;
FIG. 4 is a waveform diagram showing the two components of FIG. 2 adjusted in frequency to match each other and a sample rate of 120 .mu.sec.;
FIG. 5 is a sampled waveform diagram showing the two components as they would appear if stored individually at the 120 .mu.sec. rate;
FIG. 6 is a waveform and sampled waveform diagram showing the summed DTMF signal and the final twenty-five step stored table, respectively, according to the invention;
FIG. 7 is a block diagram showing the hardware used to practice the invention; and
FIG. 8 is a graph showing the frequency response characteristics of an ideal low pass filter and an actual low pass filter.
FIGS. 9-11 illustrate flowcharts useful in understanding the invention.
Detailed Description of a Preferred Embodiment of the Invention
Referring now to the drawings, and more particularly to FIG. 1, there are shown the waveforms of two sinusoidal signals, one having a frequency of 697 Hz and the other having a frequency of 1209 Hz. These two signals are the components which, when summed, make up the DTMF tone pair for the digit "1" according to the industry standard. The invention will be described primarily with reference to these two components, but those skilled in the art will understand that the process described is readily applied to the other tones in the DTMF standard.
FIG. 2 shows the same two components both starting at their positive peaks with their subsequent peaks indicated by vertical lines. It is, of course, possible to generate either of these frequencies by scanning a table back and forth between their two peaks. In order to generate the sum of the two frequencies by a similar method, a pre-summed table is created starting and ending at points where scanning of each of the components could be reversed. Since DTMF frequencies are not harmonics, they do not "line up" perfectly, i.e. have coincident peaks, within a small number of cycles. They do, however, come close to lining up within a reasonable number of cycles. In order to store these two components pre-summed in one table, their frequencies are shifted slightly so that their end points become exactly coincident. This step eliminates distortion which would otherwise be difficult and expensive to filter out.
FIG. 3 shows some examples of sampling rates which could be used to store versions of the waveforms shown in FIG. 2 or their sum. In general, a lower sampling rate uses fewer steps to reach a given end point and therefore uses less memory; it also produces sampling distortion which is closer to the frequencies of interest and, therefore, more difficult and expensive to filter out. The frequencies shown in FIG. 2, however, need to be shifted not only so that their endpoints will match each other but also so that their endpoints will match the sampling rate, again to reduce distortion. Therefore, the amount of shift required is also a function of the sampling rate. The frequencies of FIG. 2 are allowed to shift no more than 1% and, as a result, the 120 microsecond sampling rate may be matched to the two components within twenty-four steps whereas the 140 microsecond sampling rate would take forty-one steps to achieve a similar match. Viewing FIGS. 2 and 3, possibly with the help of a straight edge, shows the reason for this to some extent.
The following is the listing for a BASIC program which calculates the number of steps (excluding end point) which need to be stored in order to reproduce a given DTMF pair. This program takes into account the frequency tolerance which is allowable and yields the number of steps required versus the sampling rate. The flowchart of FIG. 9 corresponds to the program steps of Program 1.
Tables I to XII show sample runs for all twelve DTMF tone pairs using a step increment of four microseconds. Dramatic differences in the number of steps required versus sampling rate can be seen in all the frequency pairs. The example shown in FIG. 2 of 1209 Hz and 697 Hz at 120 microseconds versus 140 microseconds can be seen in Table I. Notice here that an even greater difference occurs between 120 microseconds and 124 microseconds.
FIG. 4 shows the two components from FIG. 2 shifted in frequency so as to match each other at a sampling rate of 120 microseconds. More specifically, the 697 Hz signal has been shifted in frequency to 694.4445 Hz, and the 1209 Hz signal has been shifted in frequency to 1215.287 Hz. The two components are within 0.3% and 0.6%, respectively, of their original frequencies. This shift in frequencies eliminates the small end discontinuities which would occur if the end points of the two components did not occur exactly in synchronism with the sampling rate.
FIG. 5 shows the two components of FIG. 4 as they would appear if stored individually at the 120 microsecond sampling rate. Here it is assumed that the sampled waveform is stored with a one half sample time phase shift so that one half of each end sample makes up part of the reverse direction scan.
FIG. 6 shows the summed DTMF signal derived from the two components shown in FIG. 4 and the final twenty-five step stored table, each step being one byte or 8-bits.
The following is a listing for a BASIC program which calculates and prints the desired frequencies, number of steps, real time, actual resultant frequencies, number of half periods, and precentage of frequency error, given the step time and maximum allowable frequency error. The flowchart of FIG. 10 corresponds to the program steps of Program 2.
Tables XIII and XIV show two sample runs for 112 and 120 microsecond steps.
The following is a listing for a BASIC program which calculates and prints the value of each of the components and the summed "7-bit normalized" (0-127) amplitude for storing as the final table. The flowchart of FIG. 11 corresponds to the program steps of Program 3.
Table XV shows a smaple run for a DTMF "1" digit at a sampling rate of 120 microseconds.
Turning now to FIG. 7, there is shown a block diagram of hardware which may be used to practice the invention. The digital memory 10 contains twelve pre-summed tables for each of the DTMF digits "0" to "9" and "*" and "#". It will be noted by the dotted lines which represent each of the tables, that the tables are of different lengths. An up/down counter 12 is used to address the digital memory 10. A single counter 12 can be used to address each table in memory 10 by presetting the counter to the starting address for the desired table. The counter is then incremented by the clock 14 at a selected clock frequency until the entire table has been scanned at which time an end of table flag is output from the memory 10 to the counter 12. This end of table flag toggles the counter to decrement until the entire table has been scanned in the opposite direction at which time the process repeats.
Data is stored in the memory 10 in byte segments of 8-bits each. Seven bits of each byte represent sampled amplitude data, and the eighth bit is reserved for the end-of-table flag. The seven bits of data of each byte output from the memory 10 for each clock pulse from clock 14 are supplied to a digital-to-analog converter 16 which produces an analog voltage signal corresponding to the desired DTMF signal. The clock 14 may have one or two inputs to select the clock frequency for the readout of the table for the desired DTMF signal. One input allows the selection of one of two scan rate frequencies, while two inputs allow the selection of up to four scan rate frequencies. While each table does not need its own scan rate, it is possible to optimize the system by grouping the tables into two or at most three different scan rates.
The output of the digital-to-analog converter 16 must be filtered by a low pass filter in order to reduce the relative amplitude of extraneous signals produced by digital sampling. FIG. 8 shows the relative frequency response characteristics of an ideal filter and a typical actual filter. Given two tones f.sub.3 and f.sub.1 and an extraneous signal f.sub.2, the filter will attenuate f.sub.2 more relative to both f.sub.1 and f.sub.3 if the filter's cut off frequency, f.sub.c, is allowed to move closer to f.sub.1. However, moving f.sub.c closer to f.sub.1 will attenuate f.sub.1 with respect to f.sub.3. This is not permitted by the standard defined by AT&T PUB 61100 which requires that not only must the maximum difference in levels between the two components be no more than 4 dB, but the level of the high-frequency component, f.sub.1, must be equal to or exceed the level of the low-frequency component, f.sub.3.
According to one aspect of the invention, f.sub.c is moved closer to f.sub.1 and, to compensate for this, f.sub.1 is preweighted so that the final DTMF signal meets the twist specification defined by AT&T PUB 61100. Each frequency pair requires different and unique preweighting of the high-frequency component of the pair since all of the frequency pairs are filtered by the same low pass filter. The exact preweighting needed for each tone pair can be calculated from the filter characteristics, or tables can be run with no weighting, the results measured for a specific filter and then preweighting determined to compensate for actual circuit performance. As one example, line 80 of the BASIC program listing above which calculates and prints the value of each of the components and the summed "7-bit normalized" (0-127) amplitude for storing as the final table can be modified as follows: ##EQU1##
While the invention has been disclosed in terms of a preferred embodiment, those skilled in the art will recognize that modifications and variations can be made in the practice of the invention without departing from the scope of the invention as defined in the appended claims.