Patent Publication Number: US-2006010184-A1

Title: Superposition of waves using the cordic algorithm

Description:
The invention relates to a method for creating a waveform composed by superposition of N waves using a Coordinate Rotation Digital-Computer (CORDIC).  
      The invention further relates to a circuit arrangement comprising a CORDIC, a software product implementing a CORDIC and the use of a CORDIC.  
      A Coordinate Rotation Digital Computer (CORDIC), introduced by Jack Volder, “The CORDIC trigonometric computing technique”, IRE Trans. Electron. Comput., vol. EC-8, no. 3, pp. 330-334, September 1959, is a computing technique to solve relationships involved in plane coordinate rotation.  
      By calculating coordinate rotation, digital sine and cosine waves may be generated.  FIG. 1  depicts a circuit arrangement with a CORDIC  2  for digital generation of a harmonic sine or cosine wave. The CORDIC  2  comprises inputs  4  for cartesian vector coordinates X in  and Y in . The circuit arrangement further comprises input  6  for receiving a phase value PH, and outputs  8  for putting out rotated cartesian vector coordinates X out  and Y out . The coordinates X in  and Y in , represent a vector P with the magnitude of (X in   2 +Y in   2 ) −1/2 . The initial angle by which the input vector will be rotated is given by phase value PH_init. By applying a phase value PH_init to a CORDIC, an extra rotation of a vector may be the result. To generate a wave with a certain frequency, the phase value PH may be accumulated by an offset value ΔPH. One of the values X in , Y in , and PH may be set to zero, as it is redundant.  
      To create output values X out  and Y out  representing a sine or cosine wave, the phase input PH has to be increased with every clock cycle by the phase offset value ΔPH. This phase offset value is fed to the circuit arrangement at input  10 . Phase value PH is the digital phase information of the sine and cosine output signals. The phase value is generated by an accumulator  12 , which adds the ΔPH value to the current phase value PH. The cumulated phase value PH+ΔPH is stored in register  14  for the next calculation step. To avoid sign errors, the phase data should range over 2πrad. An initial phase value PH_init is fed to input  6  at the start of calculating the rotation of the vector represented by X in , Y in , and PH_init. Every calculation step the CORDIC calculates:  
         [           X   out               Y   out           ]     =     C   *     ⅇ     j   *   PH       *     [           X   in               Y   in           ]           
 
 in which C is constant, preferably close to 1. In the initial step the CORDIC calculates:  
         [           X   out               Y   out           ]     =     C   *     ⅇ     j   *     PH   init         *     [           X   in               Y   in           ]           
 
 In the next step the CORDIC calculates  
         [           X   out               Y   out           ]     =     C   *     ⅇ     j   **     (       PH   init     +     Δ   ⁢           ⁢   PH       )         *     [           X   in               Y   in           ]           
 
      The value ΔPH together with the time a calculation step takes, determines the frequency of the sine or cosine wave.  
       FIG. 2  depicts a sine waveform  16 , being formed by interpolating discrete values  16   a  The corresponding phase value  18  of that sine wave  16 , as might be put out by the CORDIC  2  is also depicted. In case the phase offset value ΔPH is 1 in the two&#39;s complement code representation, with 12 bit code, 4096 discrete samples of values  16   a  are needed to generate one sine wave period. In this case the output frequency is 1/4096 of the clock frequency. If ΔPH is 2048, only two samples are needed for a full period.  
      There is the need for creation of waveforms composed of multiple waves, as with multiple sine and/or cosine waves, with different frequencies and phases, it is possible to generate any waveform possible by superposition. In particular in audio and/or speech coders/decoders, the generation of different waveforms is a performance critical task. To generate these waveforms, many CORDICS may be used, each generating a different sine wave, being superpositioned at the output to one composed waveform.  
      This approach is cost intensive. The required hardware for complex composite waveforms is huge.  
      Therefore it is an object of the invention to provide a cost-effective method for multiple waveform composition by using a CORDIC. It is a further object of the invention to provide a power-effective method. It is yet a further aspect of the invention to reduce silicon area on a chip. It is still a further object of the invention to provide an easy software implementation for multiple waveform composition.  
      These objects of the invention are solved by a method for creating a waveform composed by superposition of N waves using a Coordinate Rotation Digital Computer (CORDIC), where said CORDIC calculates within N calculating steps discrete values of said N waves, and where said output of said discrete values from said CORDIC is cumulated with previous outputs of discrete values to form a composed discrete value of said waveform.  
      It is one feature of the invention to use one single CORDIC to generate different waveforms, in particular by superpositioning sine and cosine waves. Instead of providing for each wave a set of the values X in , Y in , PH and ΔPH to a single CORDIC, respectively, these sets are provided during N calculation steps to one CORDIC. After N calculation steps N discrete values for N different waves are calculated. During each calculation step a value X in , Y in , and PH is provided to the CORDIC for one single wave. X in , Y in , and PH_init are redundant, so that one value may be omitted. The corresponding discrete values X out , Y out  are put out. The output is cumulated with previous outputs. After N calculation steps, the cumulated output represents one discrete value for the composite waveform, which may be generated by interpolating all discrete values. The number N of different waves for the composition of said waveform may vary between 2 and 100, but is not limited to that range and may be much larger, in particular in case the clock frequency of CORDICs rises in the future.  
      To provide N different X in  and Y in , and PH_init, where one value may be omitted due to redundancy, a method according to claim  2  is proposed. PH_init may be set to zero. The queue provides with each calculation step a new input value X in  and Y in  for the respective wave. The queue values are fed in a round-robin manner with a period of N to the inputs of said CORDIC. Thus after N calculation steps, the first value is again fed to the input of the CORDIC, in case of phase offsets, a cumulated first value.  
      To provide phase values of each wave to the CORDIC, a method according to claim  3  is proposed. This queue provides during the first N calculation steps N phase values to initialise the CORDIC for the respective wave.  
      A method according to claim  4 , provides for rotation of each input vector. After a phase value is fed to the CORDIC, this value is increased by ΔPH and fed back to the input of the queue. After N calculation steps, the CORDIC is fed with an increased phase information PH+ΔPH, such that the input vector may be rotated by an angle increased by ΔPH. The phase offset value ΔPH may differ for each of the N vectors between any negative value to any positive value, preferably in the range of −πrad&lt;ΔPH&lt;πrad.  
      According to a method according to claim  5 , within M×N calculating steps a full period of a composite waveform is calculated with M discrete values. These M discrete values of the composite waveform are each composed by N discrete values of N different waves calculated by said CORDIC.  
      A further aspect of the invention is a circuit arrangement, in particular with a pre-described method, comprising a CORDIC with an amplitude input, a phase input and an output, where a first queue of N amplitude values is coupled to said amplitude input, a second queue of N phase values is coupled to said phase input, a third queue of N frequency values is together with the output of said second queue coupled to an adder, and where the output of said adder is coupled to the input of said second queue. The queues might be shift registers or memory devices, each carrying N values and providing with each calculation step a new value to the CORDIC. The queues might be fed back, so that their output is again fed to their input in a round-robin manner.  
      A feedback circuit according to claim  7  is preferred, as this circuit allows for accumulation of N discrete values of N different waves to generate an discrete value of a composite wave.  
      A further aspect of the invention is a software for implementing a pre-described method. It is further preferred that discrete values are calculated based on integer arithmetic. The software implementation allows, for example, speech and audio coding/decoding, such as MPEG coding/decoding, within a microcomputer.  
      The use of a pre-described method, a pre-described circuit arrangement or a pre-described software for sine/cosine wave composition, sinussoidal coding/decoding, parametric audio and/or video coders/decoders, and/or mobile communication devices is a further aspect of the invention. In sinussoidal coding in parametric audio decoders, it might be useful to calculate within 50 calculation steps 50 different waves to compose a composite waveform.  
    
    
      These and other aspects of the invention will be apparent from and elucidated with reference to the figures. In the figures show:  
       FIG. 1 a  prior art CORDIC;  
       FIG. 2 a  sine waveform;  
       FIG. 3 a  CORDIC according to the invention. 
    
    
       FIG. 3  depicts a circuit arrangement with a CORDIC  2  according to the invention. In addition to  FIG. 1 ,  FIG. 3  depicts a first queue  4   c  for input values X in  and Y in , a second queue  14   a  for phase values PH and a third queue  10   a  for phase offset signals ΔPH. The value PH_init may be set to zero. In case PH_init is different than zero, there may be a further queue for this value. Further depicted are accumulators  8   a  and  8   e  and register  8   c . The circuit arrangement works as follows:  
      Each queue  4   c ,  10   a ,  14   a  has, for example, 50 slots. Within queue  4   c  each slots holds an initial value X in  for a vector representing the amplitude of one sine wave. Thus 50 different amplitudes of sine waves may be provided. Queue  14   a  comprises 50 phase values PH for the respective 50 sine waves, and queue  10   a  holds 50 phase offset values ΔPH to determine the phase shift for each of said 50 vectors during one calculation step for this vector. This phase offset value ΔPH also determines the frequency of the respective sine waves.  
      The input vector for each sine wave is rotated by the value PH and an output vector in cartesian coordinates X out  and Y out  is put out. This is done for each of said 50 input values. The output vectors are accumulated in accumulators  18   d , and  18   e . After 50 calculation steps, the accumulated output vector represents one discrete value of a composed waveform.  
      With each calculation step, the phase value PH is increased by ΔPH, for each wave, respectively. The new phase value PH+ΔPH is fed to the input of queue  14   a . After 50 calculation steps, the new phase value PH+ΔPH is fed to CORDIC  2 . By that, the input vector is rotated by an increased angle. After M×N calculation steps, each phase value is PH+M×ΔPH. M is determined such that the composite waveform is at least one period long. After M×N calculation steps the next period of the composite waveform may be calculated.  
      By cumulating the discrete output values, all sine waves are superpositioned to form the composite waveform. Each discrete value of the composite waveform is calculated within N calculation steps. Thereafter, the next discrete value is calculated until a whole period of the composite waveform is calculated.  
      By using one single CORDIC, the calculation of composite waveforms is cost effective, power effective and may be applied to a plurality of speech and audio decoders, such as MPEG4 parametric (sinusoidal) coding.