Abstract:
The present invention relates to frequency generation of digital type, said frequencies being able to take values included in the 0.4000 Hz band. The invention consists in using the periodicity of the sine function on (0,2 π), in making samples correspond to each frequency f, each sample being represented by a triplet P, Q, S, P representing the rank, Q being a function of the quadrant to which said sample belongs on (0,2 π) S the sign, in memorizing 1/4T samples of the sine wave of frequency 1 Hz on (0,π/2), T being the sampling period, and in causing to correspond to any sample Y N  indicative of the frequency f (Y N  =sin 2πP T) a sample of triplet (P, Q, S) of rank Nf chosen from the 1/4T samples, said correspondence being biunivocal. The invention is applicable to the generation of tones, to inter-exchange signalling in particular.

Description:
This is a continuation of application Ser. No. 410,079, filed Aug. 20, 1982 which in turn is: abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     The present invention relates to the generation of frequencies of digital type, particulary for the generation of tones, inter-exchange signalling, equipment testing. 
     Such frequencies are used in particular for the emission of multi-frequency signals, tones, etc. 
     Tones result from frequencies by timing, whereas multi-frequency signals, for example those in accordance with the &#34;MF SOCOTEL, R 2  or keyboard&#34; codes, result from the combination of various frequencies. 
     The signal to be generated is a signal of the general form E=sin 2 π ft. 
     In the PCM (pulse code modulation) systems, any signal characterised by a frequency f is indicated by a sequence of samples x n . Each sample x p  is written: x p  =sin 2 π f p  T=sin 2 Nt where p is the rank of the sample and T, equal to 1/F, the sampling period. 1/T=8000 Hz is preferably selected in the PCM systems, which limits f to 4000 Hz, according to Shannon&#39;s theorem. 
     A multi-frequency signal generator device has already been described in the Journal Commutation et Electronique No. 59, October 1977, pages 99 to 115. This generator aims at using the periodicity of the sine function on the interval (0,2 π), considering, on this interval, M values sin α, with α=(2πi)/M. These M values are numbered and inscribed in a table, or read-only memory. This makes it possible to memorize only M&#39;=M/4 values corresponding to the interval (0, π/2). If the samples of the memory are read at frequency F, a sequence of samples indicative of a sinusoid of frequency F/M is obtained. 
     Read-out of the same memory, but retaining only one value every k values, k being a real number between 0 and M/2, furnishes a sequence of samples representative of a sinusoid of frequency f=kf/M. 
     However, when k is a mixed number, only the whole part of the number is taken into account for readout. 
     In other words, one does not therefore always read what one was supposed to read, so that an error in read-out, or a distortion, is introduced. Such a process of read-out causes a poor definition in the sequence of samples having to represent the desired frequency. 
     It is an object of the present invention to overcoe this drawback. 
     SUMMARY OF THE INVENTION 
     Due to the invention, it is therefore sufficient to inscribe in the table the values of a sine function of frequency equal to 1 Hz. In addition, the sampling frequency F being a constant of the process of the invention, sampling of the signal at whole frequency to be generated is effected biunivocally from the only samples in predetermined number inscribed in the table, therefore without distorsion, all that remains being the inevitable noise of quantification inherent in sampling. 
     In a preferred embodiment of the process of the invention, n values of the function sin 2 π t, such that n=F/4, are inscribed in the table. 
     Thus, F/4, or 2000, samples will be inscribed in the table. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The invention will be more readily understood on reading the following description with reference to the accompanying drawings, in which: 
     FIG. 1 is an illustration of the properties of the sine function, in the interval (0, 2 π). 
     FIG. 2 shows the block diagram of the generating device according to the invention. 
     FIG. 3 shows the flow chart for calculating the triplet (P&#39;, Q&#39;, S&#39;) from triplet (P, Q, S). 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Referring now to the drawings, FIG. 1 shows the trigonometric circle in whose four quadrants may be represented the properties of the sine function. 
     With each quadrant is associated a number K, such that 0≦K≦3. The samples Y N  associated with each of the quadrants are such that the sample of rank N+8000 q is identical to this sample Y N . 
     
         Y(N+8000q)=Y.sub.N 
    
     Another sample of rank P may easily be made to correspond to any sample of rank N. 
     If F is the sampling frequency, taken in the present case to be equal to 8000 Hz, T the sampling period, 8000 samples of rank NT, spaced in two&#39;s by 2πT, correspond to the interval (0-2π) of the trigonometric circle: 
     to 0 corresponds 0×T×2π, 
     to π/2 corresponds 2000×T×2π, 
     to π corresponds 4000×T×2π, 
     to 3π/2 corresponds 6000×T×2π, 
     to 2π corresponds 8000×T×2π, 
     In the first quadrant (0, π/2) we therefore have 
     
         0≦N≦2000, 
    
     in the second quadrant (π/2, π), we therefore have 
     
         2000≦N≦4000, 
    
     in the third quadrant (π, 3π/2) we therefore have 
     
         4000≦N≦6000, 
    
     and in the fourth quadrant (3π/2, 2π) we therefore have 
     
         6000≦N≦8000. 
    
     In the first quadrant (0, π/2), K is taken to be equal to 0, and we can put down ##EQU1## therefore P=N, and 0≦P≦2000 
     In the second quadrant (π/2, π), K=1, and we can put down ##EQU2## therefore P=4000-N 
     As 2000≦N≦4000, we have 
     
         0≦P≦2000. 
    
     In the third quadrant (π, 3π/2), K=2, and we can put down ##EQU3## therefore P=N-4000 
     As 4000≦N≦6000 ##EQU4## 
     In the fourth quadrant (3π/2, 2π), K=3 and we can put down ##EQU5## therefore P=8000-N 
     As 6000≦N≦8000 ##EQU6## 
     Thus, any sample Y N  may be characterized by the quadrant to which it belongs, said quadrant defined by a number K (0≦K≦3), by a number P enabling the absolute value of the sample to be determined, and by its sign, such that: 
     
         |Y.sub.N |=sin 2 πPT 
    
     with 0≦P≦2000. 
     Any frequency f included, in the present case, between 1 Hz and 4000 Hz, should therefore be coded by three parameters S, Q, P, where S represents the sign of the sample memorised, Q its parity and P the number defining its absolute value ssn 2π PT. 
     The parameters (P, Q, S) constitute the dynamic definition of the sample Y N . To any new sample to be generated there corresponds another triplet (P&#39;, Q&#39;,S&#39;). An algorithm for calculation enables the new triplet (P&#39;, Q&#39;, S&#39;) to be defined from the frequency f to be generated and from the preceding state (P, Q, S) as will be explained hereinbelow. 
     With the sample of rank n of the signal to be generated E=A m  sin 2 πf t, may be associated the sample Y N  defined by the triplet (P, Q, S) such that E n  =A m  Y N , where A m  is the appropriately selected maximum amplitude which may be exploited by the system: 
     
         |E.sub.n |=A.sub.m sin 2 πPT 
    
     FIG. 2 shows the preferred embodiment of the tone generator carrying out the process of the invention. 
     The samples of frequency 1 Hz are stored in a memory 1 of capacity 1/4T. 2000 samples are in this case memorized since the sampling frequency is equal to 8 kHz. 
     In practice, 2048 words will advantageously be selected as memory capacity, this simplifying the algorithm for calculating the new triplet (P&#39;, Q&#39;, S&#39;). 
     The process of frequency generation according to the invention enables tones in particular to be produced. It is well known that a tone TON is expressed as a function of time as a sum of signals of frequencies f 1  and f 2   
     
         TON={A.sub.1 sin 2 πf.sub.1 t+A.sub.2 sin 2 πf.sub.2 t}·h(t), 
    
     where A 1  and A 2  are the respective amplitudes of the components of frequencies f 1  et f 2  and h(t) is a function of period (t 1  +t 2 ) such that 
     h(t)=1 on interval 0, t 1 , 
     h(t)=0 on interval t 1 , t 1  +t 2   
     t 2  possibly being zero. This function h(t) corresponds to the timing of certain telephone tones. 
     In the same way as for a simple frequency, to each frequence f 1  or f 2  there corresponds a triplet of dynamic parameters (P 1 , Q 1 , S 1 ) or (P 2 , Q 2 , S 2 ) which are stored in a read-write memory 2. 
     The various parameters A 1 , A 2 , f 1 , f 2 , t 1 , t 2   are stored in a read-only memory 3. Two new dynamic parameters D and C are thus associated with the signal in the case of a tone, D representing the emission state or the blocked state, and C representing the current value of a counter measuring the duration of emission (t 1 ) or of non-emission (t 2 ). 
     The device of FIG. 2 essentially comprises three memories, a read-only memory 1 for the samples of the sinusoid sin 2 πt, of frequency 1 Hz, a read/write memory 2 for parameters P, Q, S, C, D of each frequency forming the tone, and finally a read-only memory 3 for the characteristics A 1 , A 2 , f 1 , f 2 , t 1 , t 2  of the same tone or of the frequency f to be generated. The memory 2 furnishes at the input of the memory 1 an address indicative of the rank P of the sample Y N . 
     This sample Y N  issuing from memory 1 is applied to register 4 which itself furnishes it to the input of a computer unit 5. A register 6 receives the sign S of samples as well as the characteristics of the tones enabling the type of operation (pure frequency or bifrequency code) to be effected to be defined. This result, applied to the input of the computing unit 5, defines the operation, addition or subtraction, effected by this unit 5. The data of memory 1, the samples of the sinusoid at 1 Hz, are addressed by the rank P of the samples furnished by the memory 2. This sample Y N  issuing from memory 1 is applied to the input of the register 4 of the samples before being applied to the input of the computing unit 5. This sample RECH contained in the register 4 must in fact undergo a number of shifts and additions equivalent to a multiplication. 
     The dynamic parameter P issuing from memory 2 is also applied to the input of a register 9 memorizing the rank P of the preceding sample. The parameter Q is applied to the input of a device 11 for definition of the sequence of operations. It is this parameter Q which triggers off running of the algorithm, which will be explained in detail hereinbelow; the device 11 furnishes at the output an indication of operation intended for a computing unit 13. 
     A timing device 10 also receives at its input the width characteristic of the non-ringing period or of the ringing period, corresponding to frequency f or to frequencies f 1 , f 2  of the tone concerned, issuing from the read-only memory 3. At the output of the timing device 10, the non-ringing or ringing characteristic is applied, on the one hand, to the input of a multiplexer 12, on the other hand to the input of the device 11 for definition of the sequence of operations. 
     The output of the multiplexer 12 corresponds to the input of the read/write memory 2 where the dynamic states P, Q, S, C, D of the signals to be produced are logged. 
     As has already been mentioned, any sample is generated from the preceding state. The algorithm for computing makes it possible to define the new parameters P&#39;, Q&#39;, S&#39;, C&#39;, D&#39; from the former ones P, Q, S, C, D. This algorithm is effected by means of various registers. 
     The rank of the preceding sample introduced into register 9 is applied to the input of a computing unit 13 which effects the operation defined by the device 11. The unit 13 also receives the characteristic of frequency issuing from the read-only memory 3 after memorization in a register 14. At the output, the computing unit 13 furnishes an intermediate result which is applied to the input of a multiplexer 15 which multiplexes this result with the rank P of the preceding sample issuing from the memory 2. The register 9 thus does not exactly memorise the rank P of the preceding sample issuing from memory 2, but the result of the multiplexer issuing from multiplexer 15, such multiplexing connected with the running of the algorithm for computing. 
     The result elaborated by the computing unit 13 which is the rank P&#39; of the new sample is also applied to the input of the multiplexer 12. 
     The parameters Q&#39; and S&#39;, respectively of quadrants and of signs of samples, are furnished at the output of the device 11 for definition of the sequence of operations. 
     In this way, the multiplexer 12 receives the new parameter P&#39; issuing from unit 13, the parameters Q&#39; and S&#39; issuing from the device 11 as well as the parameters C&#39; and D&#39; issuing from the device 10. All these new parameters are applied to the input of the read/write memory 2. At the output of the memory 2, the sign S is also applied to the input of the register 6 for defining the operations. 
     A device 7 for processing the amplitudes receives at the input the characteristics of frequency issuing from the memory 3 and corrects the result stored in a register 8 containing the result of computing furnished by the computing unit 5. The intermediate results furnished by this register 8 are reintroduced at the input of the computing unit 5 up to the end of the operations defined by the device 6, consequently effecting multiplications, by a series of shifts and additions. 
     The final result further undergoes a linear compression by logarithm by means of a device 16, before being emitted at the output in PCM code in accordance with the specifications inherent in this code. 
     Referring now to FIG. 3, the calculation for deducing any sample Y N , knowing the preceding sample Y N  represented by the couple (K, P), K being the quadrant and P the rank, is illustrated by a flow chart. 
     The new sample Y N  is defined by the couple (K&#39;, P&#39;). With regard to the data of the table which follows, rank N&#39; of the new sample is placed apart from the rank N of the preceeding sample by the amount f, according to the formula N&#39;=N+f, since N=nf and N&#39;=(h+1) f=hf+f=N+f. We saw previously that 1≦f≦4000.  We shall study the 4 differentiated possibilities for the value of K associated with sample Y N . 
     Thus, when K=0, Y N  is in the 1st quadrant, we have N=P therefore N&#39;=N+f=P+f. 
     CASE a 
     0≦P+f≦2000 
     Y N&#39;  is in the first quadrant, therefore 
     K&#39;=0, P&#39;=P+f 
     and sin 2 π N&#39;T=sin 2 π P&#39; T 
     CASE b 
     2000&lt;P+f&lt;4000 
     Y N  &#39; is in the 2nd quadrant 
     N&#39;=4000-P&#39;=P+f therefore 
     K&#39;=1,P&#39;=4000-(P+f) 
     and sin 2 π N&#39; T=sin 2 π P&#39; T 
     CASE c 
     4000≦P+f≦6000 
     Y N&#39;  is in the 3rd quadrant 
     N&#39;=4000+P&#39;=P+f therefore 
     K&#39;=2, P&#39;=(P+f)-4000 
     and sin 2 π N&#39; T=-sin 2 π P&#39; T 
     when K=1, Y N  is in the 2nd quadrant. We have 
     N=4000-P 
     N&#39;=N+f=4000-P+f 
     CASE a 
     2000&lt;4000-P+f&lt;4000 
     Y N&#39;  is in the 2nd quadrant 
     N&#39;=4000-P&#39;=4000-P+f therefore 
     (K&#39;=1, P&#39;=P-f 
     (sin 2 π N&#39;t=sin 2 π P&#39; T 
     CASE b 
     4000≦4000-P+f≦6000 
     Y N&#39;  is in the 3rd quadrant 
     N&#39;=4000+P&#39;=4000-P+f therefore 
     (K&#39;=2, P&#39;=f-P 
     (sin 2 π N&#39; T=-sin 2 π P&#39; T 
     CASE c 
     6000&lt;4000-P+f&lt;8000 
     Y N&#39;  is in the 4th quadrant 
     N&#39;=8000-P&#39;=4000-P+f therefore 
     (K&#39;=3, P&#39;=4000+P-f 
     (sin 2 π N&#39; T=-sin 2 π P&#39; T 
     Then, where K=2, Y N  is in the 3rd quadrant, we have: 
     N=4000+P 
     N&#39;=N+f=4000+P+f 
     CASE a 
     4000≦4000+P+f≦6000 
     Y N&#39;  is in the 3rd quadrant 
     N&#39;=4000+P&#39;=4000 P+f therefore 
     (K&#39;=2, P&#39;=P+f 
     (sin 2 π N&#39; T=-sin 2 π P&#39; T 
     CASE b 
     6000&lt;4000+P+f&lt;8000 
     Y N&#39;  is in the 4th quadrant 
     N&#39;=8000-P&#39;=4000+P+f 
     therefore 
     (K&#39;=3, P&#39;=4000-(P+f) 
     (sin 2 π N&#39; T=-sin 2 π P&#39; T 
     CASE c 
     8000≦4000+P+f≦2000+8000 
     Y N&#39;  is in the 1st quadrant 
     N&#39;=P&#39;+k 8000 with k=1 
     N&#39;=P&#39;+8000=4000+P+f therefore 
     (K&#39;=0, P&#39;=P+f-4000 
     (sin 2 π N&#39; T=sin 2 π P&#39; T 
     For K+3, Y N  is in the 4th quadrant, we have: 
     N=8000-P 
     N&#39;=N+f=8000-P+f 
     CASE a 
     6000&lt;8000-P+f&lt;8000 
     Y N&#39;  is in the 4th quadrant 
     N&#39;=8000-P&#39;=8000-P+f therefore 
     (K&#39;=3, P&#39;=P-f 
     (sin 2 π N&#39; T=-sin 2 π P&#39; T 
     CASE b 
     8000≦8000-P+f≦2000+8000 
     Y N&#39;  is in the first quadrant 
     N&#39;=P&#39;+8000 with k=1 
     N&#39;=P&#39;+8000=8000-P+f therefore 
     (K&#39;=0, P&#39;=f-P 
     (sin 2 π N&#39; T=sin 2 π P&#39; T 
     CASE c 
     2000+8000&lt;8000-P+f&lt;4000=8000 
     Y N&#39;  is in the 2nd quadrant 
     N&#39;=4000-P&#39;+8000 with k=1 
     N&#39;=4000-P&#39;+8000=8000-P+f therefore 
     (K&#39;=1, P&#39;=4000+P-f 
     (sin 2 π N&#39; T=sin 2 π P&#39; T 
     We can deduce from the cases set forth hereinabove that, for K=0 and K=2 the passage from couple (K, P) to couple (K&#39;, P&#39;) follows the same law, viz. 
     case a: K&#39;=K, P&#39;=P+f 
     case b: K&#39;=K+1, P&#39;=4000-(P+f) 
     case c: K&#39;=K+2, P&#39;=(P+f)-4000 
     for K=1 and K=3 the passage from couple (K, P) to couple (K&#39;, P&#39;) follows the same law, viz. 
     case a: K&#39;=K, P&#39;=P-f 
     case b: K&#39;=K+1, P&#39;=f-P 
     czse c: K&#39;=K+2, P&#39;=4000+P-f 
     for K&#39;=0 and K&#39;=1 
     Sample Y N&#39;  is positive 
     for K&#39;-2 and K&#39;=3 
     Sample Y N&#39;  is negative. 
     These observations lead us to code K in the following manner: 
     
         ______________________________________K                S     Q______________________________________0                0     01                0     12                1     03                1     1______________________________________ 
    
     S represents the sign of the sample associated with the couple (K, P), namely 
     S=0 for a positive sample, S=1 for a negative sample, 
     Q, binary element of parity of K, defines the operations giving the couple (K&#39;, P&#39;). 
     FIG. 3 summarises the flow chart for deducing each triplet (P&#39;, Q&#39;, S&#39;) from the preceding triplet (P, Q, S). 
     The relation between the flow chart of FIG. 3 and the above cases is established in the following Table. 
      ○1 : 
     K even (0,2), case a 
      ○2 : 
     K even, case b 
     K odd (1,3), case a 
      ○3 : 
     K even, case c 
     K odd, case b 
      ○4 : 
     K odd, case c