IE48164B1 - A digital generator for producing a sinewave - Google Patents

A digital generator for producing a sinewave

Info

Publication number
IE48164B1
IE48164B1 IE1309/79A IE130979A IE48164B1 IE 48164 B1 IE48164 B1 IE 48164B1 IE 1309/79 A IE1309/79 A IE 1309/79A IE 130979 A IE130979 A IE 130979A IE 48164 B1 IE48164 B1 IE 48164B1
Authority
IE
Ireland
Prior art keywords
sinewave
generator
generator according
correction factor
values
Prior art date
Application number
IE1309/79A
Other versions
IE791309L (en
Original Assignee
Cit Alcatel
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from FR7821006A external-priority patent/FR2431221A1/en
Application filed by Cit Alcatel filed Critical Cit Alcatel
Publication of IE791309L publication Critical patent/IE791309L/en
Publication of IE48164B1 publication Critical patent/IE48164B1/en

Links

Landscapes

  • Digital Transmission Methods That Use Modulated Carrier Waves (AREA)

Description

A DIGITAL GENERATOR FOR PRODUCING A SINEWAVE This invention relates to a digital generator for producing a sinewave in the form of a succession of digitallyencoded samples.
Digital generators may be used in digital equipment as substitutes for analogue oscillators. An example of such equipment is a modulator/demodulator (modem) for sending and receiving digitally encoded data via telephone lines, i.e. via a transmission medium with a bandwidth limited to about 3kHz. Various complex modulation techniques have been devised to enable high rates of data transmission via telephone lines in spite of the limited bandwidth, e.g. the CCITT recommendation V29 for data transmission at a rate of 9,600 bits/sec. These modulation techniques are more easily performed using digital circuits than analogue circuits, and it is therefore convenient to generate sinewaves for modulation or demodulation in a form directly suitable for digital processing.
In some circumstances it is possible to generate a succession of samples of a sinewave simply by looking up values in a table. For example, if the sinewave is generated in the form of samples at successive 90° phase intervals, only the values +1,0,-1 and 0 need be stored. Further, multiplication by such numbers is very simple. In other circumstances, no such easy relationship exists between the sampling rate and the frequency desired for the generated sinewave, in which cases sample values need to be calculated each time they are required since storage of enough sample values to sufficient accuracy becomes prohibitively expensive.
A known digital generator calculates successive digitally encoded sample values of a sinewave of amplitude R, with a sampling period T corresponding to a phase difference φ between two successive samples, by performing the following algorithm : Ak+l = ^-k - bBk Bk+1 = bAk + aBk where a = cos*, b sin*, AQ = R and BQ = 0 , k = 0 , 1, 2, ... and the sinewave is defined at the instant k by the vector sum Ak * jBk = Rejk*· By substituting values into the equations of the algorithm above it can be seen that it is based on the trigonometric identities : Rcos(k+1)* = Rcos*cosk* - Rsin*sink* Rsin(k+1)* = Rsin*cosk* + Rcos*sink* Figure 1 of the accompanying drawings is a block diagram of such a generator. It comprises two delay lines 1 and 2 (e.g. buffer storage registers) providing a delay equal to T, two adders 3 and 4, four multipliers 5 to 8 and two outputs 9 and 10. Further, the figure shows two sources 11 and 12 (e.g. registers) for storing respective constants, and means 13 and 14 for initializing the generator with values Αθ = 1 and Βθ = 0, (i.e. in this case R = 1).
The sources 11 and 12 are each connected to two multipliers (6 and 7, and 5 and 8 respectively) and they supply constant sin* and cos* values respectively.
The multipliers also receive in pairs the signals delivered by the respective delay lines 1 and 2. Each of the adders 3 and 4 sums values from a pair of multipliers connected to receive different constants. Thus the adder 3 is connected to the outputs of the multipliers 5 and 7, while the adder 4 is connected-to the outputs of the multipliers 6 and 8. The outputs of the adders are connected to respective ones of the outputs 9 and 10 as well as to the input of the corresponding delay line 1 or 2.
To explain the operation of this generator put : a = cos* b = sin* (where * is the phase difference between two successive samples of the sinewave to be produced).
Initialize the generator with A = 1 and B = 0, and assume, for the moment, that its calculating and data storage units have infinite precision. The generator will then produce successive samples of the wave : Ak + jBk = eJk* where A^ = coskifi, Bk = sink'i’' and k = 0, 1, 2, ...
It can be observed that the amplitude of the wave is constant and equal to unity.
To obtain a wave of any desired amplitude and A and B samples may be post-multiplied by the desired amplitude value.
Now, for the digital generator shown in figure 1, if calculation errors, and in particular truncation errors, are to be taken into account and if an even number is used as the number base for calculation, the following identity : a2 + b2 = 1 can no longer be exactly true.
The result of this is that the amplitude of the wave delivered by the generator cannot remain stable.
The algorithm performed in figure 1 is : Ak+1 = aAk - bBk B^+1 = bA^ + aB^/ from which it can be deduced : Ak+1 + Bk+1 = (Ak + Bk> la2 + b2) whence, taking the initialization into account : Ak + Bk = (a2 + b2,k which indicates that the amplitude of the wave produced will tend exponentially towards infinity or zero depending on whether (a2 + b2) is greater than or less than unity.
The aim of the present invention is to mitigate this drawback and to supply a digital generator which is less sensi30 tive to such cumulative error.
The present invention provides a digital generator for producing a sinewave in the form of a succession of digitally encoded samples produced with a sampling period T, the sinewave having an amplitude R and a phase difference φ between two successive samples, the generator comprising adding means, »8164 multiplying means and storage means for performing the following general algorithm : Ak+1 = ^k - bBk Bk+1 = bAk + aBk where a = cosip, b = θίηφ , AQ = R and BQ = 0, k = 0, 1, 2, ... and the sinewave being defined at the instant k by the vector sum Ak + jBfc = Re^k*, wherein the precise algorithm is the following : Ak+1 = (aAk " bBk5 (1 ^Ek+1}Bk+1 = (bAk + aBk) (1 " ^k+P where eR+1 = (aAk - bBk)2 + (bAR + aBk) 2 This correction converges rapidly making it possible to stabilize the amplitude on the desired value.
A preferred embodiment of the invention comprises a IS digital generator for producing a sinewave in the form of a succession of digitally encoded sample values Ak and Bk at successive instants k = 0, 1, 2, ... regularly separated by periods T, such that Ak + jBk = ReJ where R is the amplitude of the sinewave and Φ is its phase difference between two 20 successive samples, the generator comprising : - primary calculation means including two registers for storing’the current values of Ak and Bk, two registers for storing constants a and b such that a = cos$ and b = βΐηφ, multiplying means for calculating the products: aAk, bAk, aBk and bBk, 25 and adding and subtracting means for calculating approximations Ak+1 and B£+1 to the next sample values Ak+1 and Bk+1 where : Ai+1 = aAk - bBk Bk+1 = bAk + aBk ' - correction factor calculation means arranged to receive 30 the approximations Ak+1 and Bk+1 and including multiplying/ dividing means and adding/subtracting means to calculate a correction factor (1 - ^ek+1) therefrom, where ek+1 = I (Α^χ + B·- 1 ; R - multiplication means arranged to receive the said correction factor and the approximations Ak+1 and 3k+1 to calculate the next sample values : Ak+1 = Ak+l(1 " ^ek+lJBk+1 = W1 - *ek+l’ ; 311,2 ~ means for replacing the previous sample values by the next sample values in the said storage means for storing the previously calculated sample values in order to begin a further cycle of calculation ; said primary calculation means being associated with initialization means for ensuring that the modulus of the starting values AQ and Bq is greater than 0 and not greater than r/5.
Two embodiments of the invention are described below in more detail with reference to the block diagrams of figures 2 and 3 respectively of the accompanying drawings.
Figure 2 shows a generator in accordance with the invention in which primary calculation means are substantially identical with the prior art generator shown in figure 1 and comprise components that have the same reference numerals. It can be seen that the delay lines 1 and 2 are no longer supplied directly from the respective outputs 9 and 10 of the pair of adders 3 and 4, but instead they are supplied from the outputs of respective supplementary multipliers 22 and 23, whose inputs are connected firstly to receive the value present on respective ones of the outputs 9 and 10, and secondly to receive a correction value present on a terminal 26. The outputs 20 and 21 of these two multipliers constitute the outputs of the generator and supply the values Ak+1 and 3^+1' an<2, these values which are applied to the inputs of the delay lines 1 and 2 respectively.
In noting the non-corrected i.e. approximate values supplied by the adders 3 and 4 as A1 and B1 respectively, and because of truncation and the errors associated with digital u 1 r · calculation, Α,2+Β'2=1+ε, where e / 0, and may be positive or negative. From which it follows,in order to obtain A and B such that they are components of a wave of unit amplitude, i.e. such that A2 + B2 = 1 A - (1 + e)^.A' B = (1 + e)*\b' To simplify implementation, a first order approximation to the correction factor is chosen using Newton's formula, i.e.: (1 + e)~^ = 1 - ie The means for calculating the correction factor (1 - ^ε) shown in figure 2 comprises three adders 15, 16 and 17 and two multipliers 18 and 19. One of the multipliers receives the value (output 9) on both its inputs and the other receives the value B^+i (output 10) on both its inputs. The output of the multiplier 18 thus provides the value A'£+1 which is applied together with the value B'^+j to the first adder 15.
This adder is followed by the second adder 16 which receives the value ONE, and which provides the value : - (A'2 1 tAk+l + Bk+1> - (1 + ε) = -ε This value is divided by 2 using a multiplier 24 (i.e. multiplication by and it is then applied to the third adder 17 which adds unity thereto.
It can be easily deduced that the numerical value at the output of the adder 17 is identical to the approximate correction factor : (1 " ^k+l’ By multiplying this approximate correction factor with the values Aj_+1 and Β^+1 in the multiplier 22 and 23, values A and B are obtained such that : A2Ak+1 + Bk+1 . 3 " 1 " 4£k+l —e3 4ek+l it can be proved that the algorithm defined by these correction equations converges rapidly and that it therefore provides amplitude stability in the output wave, even in the presence of large calculation errors and regardless of the 8 16 4 source of errors. If the amplitude of the output wave lies between 0 and /5, each error is less than the square of the preceding error, i.e. there is exponential convergence at twice the calculation rate.
While the digital generator shown in figure 2 provides a wave of unit amplitude, figure 3 shows, in contrast, an embodiment of the invention which provides a sinewave of anydesired amplitude R. This embodiment avoids the necessity of post-multiplication of an output value when it is desired to obtain a wave of amplitude other than unity.
In this embodiment, the generator is initialized using: Aq = R, and Bo = 0.
The ideal waves as would be provided in the absence of any error and any correction, would be : A + jB = R.e2^*.
The generator shown in this figure includes all the elements 1 to 24 of the preceding figure in the same arrangement. However, the adders 16 and 17 do not receive the value 1 as before, but the value R2 from a source 27. Between the output of the adder 17 and the point 26 a further multiplier 25 is inserted, which receives the value 1/R2 from a constant source 28. These modifications are sufficient to supply the correction factor (1 - ^ει.+ι) at the point 26 for the case where the amplitude is R, the error being such that : sk+l = "2(aAk - bBk)2+ A (bAk + aBk)2 - 1 R R In this case the algorithm converges provided the amplitude lies between 0 and r/5.
By way of concrete example, the Applicants' presently preferred embodiment of the present invention is a figure 2 embodiment used in a modem for demodulation of 9,600 bits/sec signals encoded on a nominal 1,700 Hz carrier according to CCITT recommendation V29. A local carrier frequency wave is generated in the form of a succession of sine and cosine values encoded in twos complement 16-bit words using 2900 series sliced micro35 processor with a hard wired program. The actual received carrier frequency is measured during an initialization period and may ^8164 lie anywhere in the range 1,700 Hz ± 12 Hz (which is a somewhat wider tolerance than laid down by the CCITT) and the local carrier frequency is adjusted to match the received frequency. Sampling is at a frequency of 4,800 Hz (i.e. at 208-^- us inter5 vals) giving a value of φ lying in the range 127.5° * 0.8°. For any one reception run the values of the constants a and b (cos$ and sin*) remain fixed at the value appropriate to the initially measured received frequency, and thereafter small drifts (less than ±lHz) in received frequency are compensated by a self adaptive equalizer.
Naturally the invention is applicable to other situations where digitally encoded values of successive samples of a sinewave may be required, and where hardware exists that is fast enough e.g. for digital processing of signals in a PCM system.
Separate units can be used for each operation as shown in the block diagrams instead of using a processor to perform the operations sequentially as outlined above. Only the real part A of the sinewave may be of interest in some situations. In this case the output 21 is not used externally to the generator, although the imaginary component is still calculated for internal use.

Claims (5)

1. / A digital generator for producing a sinewave in the form of a succession of digitally encoded samples produced with a sampling period T, the sinewave haviftg an amplitude R and a phase difference Φ between two successive samples, the generator 5 comprising adding means, multiplying means and storage means for performing the following general algorithm : A k+i = ^k - bB k B k+1 = bA k + aB k where a = cose),, b = sintji, A q = R and B Q = 0, k=0, 1, 2, ... 10 and the sinewave being defined at the instant k by the vector sum A^ + jB^ = Re- 1 ^, wherein the precise algorithm is the following : A k+1 = (aA k ’ “k 1 (1 ^k+1 5 B k+1 = (bA k + ^k’ {1 ' ^k+l’ where e R+1 = (aA R - bB R ) 2 + k + aB k )* - 1 15 2/ A generator according to claim 1, wherein R = I, thereby simplifying the circuit. 3/ A digital generator for producing a sinewave in the form of a succession of digitally encoded sample values A^ and B^ at successive instants k = 0, 1, 2, ... regularly separated by periods T, such that A^ + jB k = Re· 1 ^, where R is the amplitude of the sinewave and φ is its phase difference between two successive samples, the generator comprising : - primary calculation means including two registers for storing the current values of A^ and two registers for storing constants a and b such that a = σοβφ and b = sin®, multiplying means for calculating the products : aA^, bA^, aB^ and bB^, and adding and subtracting means for calculating approximations A k+1 and B k+ j to the next sample values A k+1 and B k+i where : 4-81b4 A k+1 * “ bB k B k+1 = bA k + aB k ' - correction factor calculation means arranged to receive the approximations Α^ +χ and B k+1 and including multiplying/ dividing means and adding/subtracting means to calculate a correction factor (1 - ^ε^ +χ ) therefrom, where ε χ+χ = ~ 2 (Α^| χ + Β^ χ ) - 1 ; - multiplication means arranged to receive the said correction factor and the approximations Α^ +χ and Β^ +χ to calculate the next sample values : A k+1 ” A k+l (1 ‘ ^k+l* B k+1 ~ B k+l (1 and - means for replacing the previous sample values by the next sample values in the said storage means for storing the previously calculated sample values in order to begin a further cycle of calculation ; said primary calculation means being associated with initialization means for ensuring that the modulus of the starting values A q and B Q is greater than 0 and not greater than R/5 - . 4/ A generator according to claim 3, wherein the initialization means sets one of A and B to R and the other to zero, o o 5/ A generator according to claim 3 or 4, wherein the correction factor calculation means is arranged to calculate the correction factor (1 - %e k+1 ) hy the following steps : - squaring the approximate values to obtain A/?, and - summing the said squares to obtain (Α^ 2 χ + B k+P ' - subtracting the sum of the squares from the expected value, namely R 2 , to obtain R 2 - (Α^ 2 χ + Β^ 2 χ) ; 4 8 16 4 - halving the difference thus obtained to obtain 5R 2 - adding the halved difference to R 2 to obtain 3 T T R2 - ^1 + B ^l>' and _ multiplying by 1/R 2 to obtain —-i (A 12 +B' 2 )
2. 2 ~ 2 k+1 B k+1 =1+^-¾. R 2 (A, ι 2 k+1 k+1' = 1 - + - 1} R 2 k+1' k+1 as required. 10 6/ A generator according to claim
3. ,
4. Or 5, wherein the value of R is chosen to be unity thereby simplifying calculation steps involving R, R 2 and 1/R 2 . 7/ A generator according to any one of claims 3 to 6, wherein the adding/subtracting and multiplying /dividing calculation 15 means of the primary calculation means, of the correction factor calculation means and the multiplication means are all constituted by a single, program-controlled processor, which performs all the said operations sequentially within each period T. 8/ A generator according to any preceding claim, wherein 20 the period T corresponds to a sampling frequency of not less than 4,800 Hz. 9/ A generator according to any preceding claim wherein the calculations are performed in binary using 16 bit twos complement arithmetic. 25 10/ A digital generator for producing a sinewave in the form of a succession of digitally encoded samples, substantially as herein described with reference to figure 2 or figure 3 of the accompanying drawings. 11/ A modem for receiving data over a telephone line and including a generator according to any preceding claim for use as a local oscillator for demodulating signals received over
5. The telephone line.
IE1309/79A 1978-07-13 1979-08-08 A digital generator for producing a sinewave IE48164B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
FR7821006A FR2431221A1 (en) 1978-07-13 1978-07-13 DIGITAL SAMPLE SINE WAVE GENERATOR
GB7923573A GB2025668B (en) 1978-07-13 1979-07-05 Digital generator for producing a sinewave

Publications (2)

Publication Number Publication Date
IE791309L IE791309L (en) 1980-01-13
IE48164B1 true IE48164B1 (en) 1984-10-17

Family

ID=26220675

Family Applications (1)

Application Number Title Priority Date Filing Date
IE1309/79A IE48164B1 (en) 1978-07-13 1979-08-08 A digital generator for producing a sinewave

Country Status (1)

Country Link
IE (1) IE48164B1 (en)

Also Published As

Publication number Publication date
IE791309L (en) 1980-01-13

Similar Documents

Publication Publication Date Title
US4285044A (en) Digital generator for producing a sinewave
CA1078030A (en) Digital phase detector
EP0892520A2 (en) Elliptic curve calculation apparatus capable of calculating multiples at high speed
US4652832A (en) Frequency resolution in a digital oscillator
RU2128399C1 (en) General-purpose demodulator
FI75075B (en) ANORDINATION FOR ALTERNATED AV STORLE HOS VECTORUM AV TVAO VECTOR SIGNALER.
US4363100A (en) Detection of tones in sampled signals
US5737253A (en) Method and apparatus for direct digital frequency synthesizer
Ramírez et al. Fast RNS FPL-based communications receiver design and implementation
US4048572A (en) Adaptive correction of phase errors in noncoherent demodulation of carrier asymmetrically modulated with digital signals
JP3340919B2 (en) Numerical voltage controlled oscillator
US4246654A (en) Digital coherent phase demodulator
US5062123A (en) Kalman predictor for providing a relatively noise free indication of the phase of a carrier laden with noise
US6128766A (en) High speed cyclic redundancy check algorithm
JPH0210451B2 (en)
US4577287A (en) Method and apparatus for generating digital signals representing periodic samples of a sine wave
US4100369A (en) Device for numerically generating a wave which is phase modulated and which is free from unwanted modulation products
JPS6326131A (en) Multiplication device
IE48164B1 (en) A digital generator for producing a sinewave
US4709345A (en) Apparatus for executing Chinese remainder theorem for residue decoding through quotient-remainder conversion
CA1083227A (en) Method and apparatus for performing binary equalization in voice-band phase-modulation modems
US6757336B1 (en) Device and method for performing a carrier recovery
WO1994014245A1 (en) A device for conversion of a binary floating-point number into a binary 2-logarithm or the opposite
JP2698507B2 (en) AFC circuit
GB2185606A (en) Linear approximation circuit for curve generation

Legal Events

Date Code Title Description
MM4A Patent lapsed