Embodiments herein generally relate to the generation of a sinusoid signal and, in particular, to a digital sinusoid generator having a high frequency resolution.
Reference is made to
As a representative, but not limiting, example, the number of bits in the multi-bit digital signals may be: a=7 bits, b=8 bits and c=16 bits, for a tunable sinusoid generator with 256 stored samples that outputs a 16-bit word with 127 tunable sinusoid frequencies.
The frequency f sin of the output digital sinusoid signal 16 is equal to the frequency of the clock signal (fclk) divided by the number of samples for one period which are accessed from the sin/cos LUT 12. The tuning signal 14 is used to set the frequency f sin of the digital sinusoid signal xsin(n) by controlling the number of accessed samples. The tuning value k for the signal 14 is set by a tuner circuit 20. By increasing the value of k, fewer of the N samples in the sin/cos LUT 12 are accessed and the frequency f sin is increased (given a fixed frequency fclk for the clock signal CLK). For example, where k=1, all N samples from 0 to N−1 stored in the sin/cos LUT 12 are sequentially accessed at the frequency of the clock signal CLK and output to generate the digital sinusoid signal xsin(n) at the frequency f sin=fclk/N. For k=2, however, only one-half (i.e., N/2) of the N samples from the sin/cos LUT 12 are sequentially accessed at the same frequency of the clock signal CLK (by taking only the even numbered samples, for example, as specified by the term “nk”) and output to generate the digital sinusoid signal xsin(n) at the frequency f sin=2*fclk/N (which is double the frequency for k=1).
The permitted range of values for k in tuning the frequency of the generated digital sinusoid is limited by the Nyquist criteria to the range of 0 to (N−1)/2. This puts a significant constraint on the ability of the circuit 10 to generate digital sinusoids of different frequency. Indeed, frequency resolution with the circuit 10 is limited by the number of available samples N stored in the sin/cos LUT 12. This issue could be addressed by increasing the size of the sin/cos LUT 12 with a corresponding increase in the number of stored samples N. However, this requires use of a larger memory and in many circuit applications the use of such a larger memory for the sin/cos LUT 12 is not possible due to one or more considerations such as: occupied circuit area, power, temperature, etc. There accordingly exists a need in the art to improve the frequency resolution of a sin/cos LUT-based digital sinusoid generator without having to increase the memory size (i.e., the number of samples stored in the LUT).
In an embodiment, a digital circuit comprises: an input configured to receive a first digital sinusoid signal; a first delay circuit configured to apply a delay to the first digital sinusoid signal to generate a first delayed digital sinusoid signal; a first adder circuit configured to add the first digital sinusoid signal to the first delayed digital sinusoid signal to generate a first added digital sinusoid signal; a first gain scaling circuit configured to apply a first scaling factor to the first added digital sinusoid signal to generate a second digital sinusoid signal; and a selection circuit configured to repeatedly select samples from both the first and second digital sinusoid signals and generate an output digital sinusoid signal.
In an embodiment, a sinusoid generator circuit comprises: an input configured to receive a first digital sinusoid signal having a time domain representation corresponding to A sin(ωt); a processing circuit coupled to said input and configured to generate from said first digital sinusoid signal a second digital sinusoid having a time domain representation corresponding to A sin(ωt+α/2); wherein a is a phase shift equal to one sample of the first digital sinusoid signal; and a selection circuit having first and second inputs configured to receive the first and second digital sinusoid signals, respectively, said multiplexer circuit configured to repeatedly and sequentially select samples of the first and second digital sinusoid signals to generate a third digital sinusoid signal.
In an embodiment, a sinusoid generator circuit comprises: an input configured to receive a first digital sinusoid signal having a discrete domain representation of A sin(2ππ/N), where n is an index for samples and N is a total number of samples in one sinusoid period; a processing circuit coupled to said input and configured to generate from said first digital sinusoid signal a second digital sinusoid having a discrete domain representation corresponding to A sin(2π(n−(½))/N); and a selection circuit having first and second inputs configured to receive the first and second digital sinusoid signals, respectively, said multiplexer circuit configured to repeatedly and sequentially select samples of the first and second digital sinusoid signals to generate a third digital sinusoid signal.
In an embodiment, a method comprises: receiving a first digital sinusoid signal; delaying the first digital sinusoid signal to produce a delayed digital sinusoid signal; adding the first digital sinusoid signal to the delayed digital sinusoid signal to generate an added digital sinusoid signal; apply a scaling factor to the added digital sinusoid signal to generate a second digital sinusoid signal; and repeatedly and sequentially selecting samples from the first and second digital sinusoid signals to generate a third digital sinusoid signal.
For a better understanding of the embodiments, reference will now be made by way of example only to the accompanying figures in which:
A solution to the problem noted above provides an increase in the frequency resolution of a sine lookup table (LUT) based digital sinusoid generator without having to increase the size of the memory or number of stored samples for the LUT. This solution takes advantage of the following mathematical relationship:
A sin(ωt)+A sin(ωt+α)=2 A cos(α/2)sin(ωt+α/2) (Eq. 1)
where α is a phase shift.
The term 2 cos(α/2) is a constant dependent only on the magnitude of the phase shift α. This constant can be eliminated by an appropriate mathematical scaling operation:
2A cos(α/2)sin(ωt+α/2)*1/(2 cos(α/2))=A sin(ωt+α/2) (Eq. 2)
where 1/(2 cos(α/2)) is the scaling factor used to cancel the phase-dependent constant value.
So, through a gain scaling of the sum of two phase shifted (by α) sinusoids, a sinusoid A sin(ωt+α/2) can be generated.
By properly selecting the phase shift a in the digital domain, digital samples of A sin(ωt+α/2) can be positioned between consecutive digital samples of A sin(ωt). An alternating selection in the digital domain between the digital samples of A sin(ωt) and the digital samples of A sin(ωt+α/2) can then be made to generate a digital sinusoid having twice the number of samples within a same period and thus having double the frequency resolution.
Reference is now made to
The generator 110 further comprises a digital signal processing circuit 111 including a delay circuit 120, an adder circuit 124, a gain scaling circuit 128 and a 2:1 multiplexing (MUX) circuit 132.
The first digital sinusoid signal 118 is input to the delay circuit 120 which is clocked by the clock signal CLK. The delay circuit 120 applies a one sample delay (i.e., a delay equal to one cycle of the clock signal CLK) to the first digital sinusoid signal 118 to generate a delayed digital sinusoid signal 122. In the discrete domain, the delayed digital sinusoid signal 122 output from the delay circuit 120 is a multi-bit (for example, c-bit) digital signal of the form: xdly(n)=A sin(2π(n−1)k/N). In the time domain, this delayed digital sinusoid signal ideally corresponds to x(t)=A sin(ωt+α), which is equal to the second addend of the mathematical relationship Eq. 1 noted above. In this case, the phase delay α corresponds to a one sample delay implemented by delay circuit 120 based on the clock signal CLK.
The adder circuit 124 adds the first digital sinusoid signal 118 and the delayed digital sinusoid signal 122 to generate an added digital sinusoid signal 126. In the discrete domain, the added digital sinusoid signal 126 output from the adder circuit 124 is a multi-bit (for example, c-bit) digital signal of the form: xadd(n)=A sin(2πnk/N)+A sin(2π(n−1)k/N)=2A cos(π/N)sin(2π(n−(½))k/N). In the time domain, this delayed digital sinusoid signal ideally corresponds to x(t)=2A cos(α/2)sin(ωt+α/2), which is the sum of the mathematical relationship Eq. 1 noted above.
The term 2 cos(π/N)=2 cos(α/2) is a mathematic constant dependent solely on the applied phase shift a set by the one sample delay. The gain scaling circuit 128 can then be used to mathematically apply a gain scaling value g, where g=1/(2 cos(π/N)), to the added digital sinusoid signal 126 in order to cancel the constant and generate a second digital sinusoid signal 130. In the discrete domain, the second digital sinusoid signal 130 output from the gain scaling circuit 128 is a multi-bit (for example, c-bit) digital signal of the form: xsin 2(n)=A sin(2π(n−(½))k/N). A visual representation of the second digital sinusoid signal 130 is shown in
In this case, the phase shift α/2 term of A sin(ωt+α/2) corresponds to one-half of the sample delay provided by the delay circuit 120 based on the clock signal CLK. This is important because it places the individual samples of the second digital sinusoid signal xsin 2(n) between consecutive samples of the first digital sinusoid signal xsin 1(n). A visual representation of this is shown in
The first digital sinusoid signal xsin 1(n) and the second digital sinusoid signal xsin 2(n) are provided as inputs to the 2:1 multiplexing (MUX) circuit 132. The selection input of the MUX circuit 132 receives the clock signal CLK. The MUX circuit 132 accordingly operates to pass samples of the first digital sinusoid signal xsin 1(n) (the “x” samples as shown in
The circuit 110 requires only the inclusion of delay, addition and multiplication (gain scaling) operations using the digital signal processing circuit 111 in order to process the digital sinusoid signal output from the sin/cos LUT 112 and double the available frequency resolution by generating twice as many samples. This is accomplished without any increase in the number of samples N stored in the sin/cos LUT 112 itself and without any increase in the size of the memory for the sin/cos LUT 112.
The digital signal processing circuitry 111 of the circuit 110 can be cascaded to enable a further doubling of the frequency resolution. An example of such a cascaded circuit configuration is shown in
Reference is now made to
The discrete digital values which represent discrete samples of the magnitude of a sinusoid having a certain base frequency fb and sampled at a certain sampling frequency fs (see,
A first adder circuit 224 adds the first digital sinusoid signal 218 and the delayed digital sinusoid signal 222 to generate a first added digital sinusoid signal 226. In the discrete domain, the first added digital sinusoid signal 226 output from the adder circuit 224 is a multi-bit (for example, c-bit) digital signal of the form: xadd1(n)=A sin(2πnk/N)+A sin(2π(n−1)k/N)=2A cos(π/N)sin(2π(n−(½))k/N).
The term 2 cos(π/N) is a mathematic constant dependent solely on the applied phase shift set by the one sample delay. A first gain scaling circuit 228 can then be used to mathematically apply a gain scaling value g, where g=1/(2 cos(π/N)), to the added digital sinusoid signal 226 in order to cancel the constant and generate a second digital sinusoid signal 230. In the discrete domain, the second digital sinusoid signal 230 output from the gain scaling circuit 228 is a multi-bit (for example, c-bit) digital signal of the form: xsin 2(n)=A sin(2π(n−(½))k/N).
A second adder circuit 234 adds the first digital sinusoid signal 218 and the second sinusoid signal 230 to generate a second added digital sinusoid signal 236. In the discrete domain, the second added digital sinusoid signal 236 output from the second adder circuit 234 is a multi-bit (for example, c-bit) digital signal of the form: xadd2(n)=A sin(2πnk/N)+A sin(2π(n−(½)k/N)=2A cos(π/2N)sin(2π(n−(¼))k/N).
The term 2 cos(π/2N) is a mathematic constant dependent solely on the applied phase shift set by the one sample delay. A second gain scaling circuit 238 can then be used to mathematically apply a gain scaling value g′, where g′=1/(2 cos(π/2N)), to the second added digital sinusoid signal 236 in order to cancel the constant and generate a third digital sinusoid signal 240. In the discrete domain, the third digital sinusoid signal 240 output from the gain scaling circuit 238 is a multi-bit (for example, c-bit) digital signal of the form: xsin 3(n)=A sin(2π(n−(¼))k/N).
A third adder circuit 244 adds the delayed digital sinusoid signal 222 and the second sinusoid signal 230 to generate a third added digital sinusoid signal 246. In the discrete domain, the third added digital sinusoid signal 246 output from the third adder circuit 244 is a multi-bit (for example, c-bit) digital signal of the form: xadd3(n)=A sin(2π(n−1)k/N)+A sin(2π(n−(½)k/N)=2A cos(π/2N)sin(2π(n−(¾))k/N).
The term 2 cos(π/2N) is a mathematic constant dependent solely on the applied phase shift set by the one sample delay. A third gain scaling circuit 248 can then be used to mathematically apply a gain scaling value g′, where g′=1/(2 cos(π/2N)), to the third added digital sinusoid signal 246 in order to cancel the constant and generate a fourth digital sinusoid signal 250. In the discrete domain, the fourth digital sinusoid signal 250 output from the gain scaling circuit 248 is a multi-bit (for example, c-bit) digital signal of the form: xsin 4(n)=A sin(2π(n−(¾))k/N).
A selection circuit 252 clocked by the clock signal CLK is then used to repeatedly and sequentially select samples from among the delayed digital sinusoid signal 222 (xdly(n)) and the first, second, third and fourth digital sinusoid signals (xsin 1(n) to xsin 4(n)) to generate output digital sinusoid signal 254. In the discrete domain, the output digital sinusoid signal 254 is a multi-bit (for example, c-bit) digital signal of the form: xout(m)=A sin(2π(n−1)k/4N); wherein the “4N” term indicates that four times the number of samples N are available for each period of the sinusoid.
In an example embodiment, the selection circuit 252 may comprise a 4:1 multiplexer circuit receiving the first, second, third and fourth digital sinusoid signals (xsin 1(n) to xsin 4(n)) as inputs. The selection input of this 4:1 multiplexer circuit receives the clock signal CLK and the clock signal phase shifted by ninety degrees CLK90. The multiplexer circuit operates to pass samples of the fourth digital sinusoid signal xsin 4(n) when the clock signal CLK has a first (for example, low) logic state and the phase shifted clock signal CLK90 also has the first logic state. Samples of the second digital sinusoid signal xsin 2(n) are passed by the multiplexer circuit when the clock signal CLK has a second (for example, high) logic state and the phase shifted clock signal CLK90 has the first logic state. When the clock signal CLK has the second logic state and the phase shifted clock signal CLK90 also has the second logic state, the multiplexer circuit passes samples the third digital sinusoid signal xsin 3(n). Lastly, samples of the first digital sinusoid signal xsin 1(n) are passed by the multiplexer circuit when the clock signal CLK has the first logic state and the phase shifted clock signal CLK90 has the second logic state.
While the invention has been illustrated and described in detail in the drawings and foregoing description, such illustration and description are considered illustrative or exemplary and not restrictive; the invention is not limited to the disclosed embodiments. Other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from a study of the drawings, the disclosure, and the appended claims.
This application claims the priority benefit of U.S. Provisional Application for Patent No. 63/167,858, filed Mar. 30, 2021, the disclosure of which is incorporated by reference.
Number | Name | Date | Kind |
---|---|---|---|
4573070 | Cooper | Feb 1986 | A |
4992743 | Sheffer | Feb 1991 | A |
4998072 | Sheffer | Mar 1991 | A |
5031131 | Mikos | Jul 1991 | A |
5459680 | Zimmerman et al. | Oct 1995 | A |
5467294 | Hu et al. | Nov 1995 | A |
5708687 | Powell et al. | Jan 1998 | A |
7047264 | Kishi | May 2006 | B2 |
7054088 | Yamazaki | May 2006 | B2 |
7327816 | Messier | Feb 2008 | B2 |
7518894 | Fosler | Apr 2009 | B2 |
7702707 | Thomas et al. | Apr 2010 | B2 |
7844650 | Warner et al. | Nov 2010 | B2 |
7890562 | Gross | Feb 2011 | B2 |
8325834 | Sakoda | Dec 2012 | B2 |
8694569 | Willson, Jr. | Apr 2014 | B2 |
8924452 | Lei | Dec 2014 | B2 |
9312467 | Kim | Apr 2016 | B2 |
9407203 | Lee | Aug 2016 | B2 |
9772972 | Pagnanelli | Sep 2017 | B2 |
11163022 | Daubert | Nov 2021 | B2 |
20190384347 | Bal et al. | Dec 2019 | A1 |
20220321111 | Bal | Oct 2022 | A1 |
Entry |
---|
Al-Ibrahim, M. M.: “A new hardware-efficient digital sinusoidal oscillator with low- and uniform-frequency spacing,” Electrical Engineering 85 (2003) 255-260, Springer-Verlag 2003. |
Dhillon, Harpreet Singh, et al: “A Low Power Architecture of Digital Sinusoid Generator using Cubic Spline Interpolation,” ISSN: (Print) 0974-7338 (Online) IETE Journal of Education, homepage: http://www.tandfonline.com/loi/tije20. |
Flanagan, Michael J.: “Reduced-Complexity Digital Sinusoid Generators and Oversampled Data Converters,” California Institute of Technology, 1995. |
Lin, Meng-Hsueh, et al.: “An Efficient Pipeline Direct Digital Frequency Synthesizer Based on a Novel Interpolation Algorithm,” ECCTD'01—European Conference on Circuit Theory and Design, Aug. 28-31, 21001, Espoo, Finland. |
Number | Date | Country | |
---|---|---|---|
20220321111 A1 | Oct 2022 | US |
Number | Date | Country | |
---|---|---|---|
63167858 | Mar 2021 | US |