You are on page 1of 9

Abstract

The project is a 16 bit binary input Numerically Coded Oscillator (NCO) which incorporates the Taylor
Series Expansion of a function to produce a Sinusoidal waveform as its output. The NCO has three
operating regions, namely: The Phase Accumulator, Phase Amplitude Converter and the Digital to Analog
Converter – each circuit plays a role in the NCO to convert the Digital Binary Input and generate an Analog
output of a Sinusoidal Waveform.

The problem that made this project difficult for the researcher was generating a Sinusoidal Waveform
from Digital binary input signals. The proposed solution to the problem was to incorporate the Taylor
Series Expansion of a function in a circuit that would generate the desired Sinusoidal Waveform from
Digital Binary input signals. Validation of the proposed solution to the problem was done through a series
of solutions, trial and errors, and cross-checking of the ideal output with the output acquired with the
help of Circuit Simulating Softwares like Proteus and Matlab’s Simulink. Upon validating, the researchers
were able to incorporate the Taylor Series Expansion a function in the designed NCO and an imperfect
Sinusoidal waveform was generated due to the lesser number of iterations that were used.

Introduction

2.1 The project is all about generating an Analog Sinusoidal waveform that incorporates the
Mathematical formula of the Taylor Series expansion using Digital Binary inputs. A Numerically
Controlled Oscillator was designed by the researchers that uses the Taylor series expansion of a function
in circuit form to produce the analog sinusoidal wave. The project aims to address the problem of
incorporating the mathematical formula of the Taylor Series expansion of a function in generating an
analog sinusoidal waveform from digital binary inputs. In communication systems, NCOs are oftenly
used in conjunction with DACs to convert the digital signal input to an analog signal output. The name
“numerically controlled” means that the rate at which sine wave samples appear at the output of the NCO
and the number of sine samples per period can be set by a microcomputer or a microcontroller. [1]
NCOs, also called Direct Digital Synthesizers (DDS) are significant in today’s modern communication
systems since they are used to convert digital signals into a sinusoidal signal at a desired frequency. They
are used in many communication systems which includes digital up and down converters used in
wireless 3G and radio systems software, digital PLLS, radar systems, drivers for optical or acoustic
transmissions, multilevel FSK and PSK modulators and demodulators.

2.2 There are three different types of NCOs that addresses the problem of generating a Sinusoidal
waveform from digital inputs. (1) Digital Synthesizer Based NCOs, these type of NCOs uses adder and
multiplier circuits that replaces the LUT in storing the sine wave samples and a phase to amplitude
converter that incorporates mathematical formulas such as the Taylor Series expansion in producing a
sinusoidal waveform. These type of NCOs are the most widely used in communication systems and
equipment. They are mainly used as frequency synthesizers as they are able to set the frequency of the
generated signal in very high resolution. They are also used in application that requires frequency hopping.
Thought they are advantageous in a lot of ways they are also pretty intricate circuits that requires more time in
solving and incorporating the mathematical formulas that will be used in the phase accumulator to produce
the desired sinusoidal waveform. (2)Look Up Table based NCOs, these NCOs uses a Read Only Memory
that contains the sine wave samples and and accumulator which generates the addresses.[3] It is called a Look
Up Table since the samples are stored in the ROMs memory to be looked up. The accumulator includes a
fractional part which allows greater frequency to be achieved. NCOs that uses look up tables has faster means
of computing the function and only takes a single memory lookup regardless of the complexity of its
complexity. The downside of this is that it takes memory, especially if high resolutions are needed for the
function input. (3) Computer-based NCOs that calculates the Sine samples in real-time, which are
implemented using an algorithm called CORDIC (COordinate Rotation DIgital Computer), these types of
NCOs are mostly used in ultra-low distortion generators used for testing audio equipment [2] and when
hardware multipliers are unavailable.

Model 360 Ultra Low Distortion Function Generator, Operating Manual and Programming Reference, Stanford
Research System, Sunnyvale, USA, Rev. 2.0 (9/2008).

Oldham N.M., Hetrick P.S., Zeng X.: A Calculable, Transportable Audio-Frequency AC Reference Standard. “IEEE
Trans. Instrum. Meas.” 1989, Vol. 38, No. 2, p. 368-371.
Digital based sine wave generator

3.1 A Sine wave or Sinusoidal signal is one of the most important type of signal in analysis and design of
linear type and variant systems. It is a mathematical curve that describes a smooth repetitive oscillation.
It is a continuous wave in the sine function, hence the name Sine wave, it constantly changes its polarity
every half cycle alternating between a positive maximum value and a negative maximum value
respectively with regards to time the most common example of this being the main source voltage we
have in our homes. The formula for sine wave is:

𝑦(𝑡) = A sin (2π𝑓𝑡 + 𝜑) = A sin(ω + 𝜑). (1)

Where A is the amplitude, f is the frequency, t is the time, ω is the angular frequency, 𝜑 is the phase
specifies (in radians) where in its cycle the oscillation is at t = 0.

The world at present operates on technology and communication systems. Everything may have
progressed and digital signals are being used more frequently due to its advantages over analog signals,
but the Sine wave signal though it may be analog still is one of the most important signals that the
physical world relies on. The audio signals we receive when we talk, the signal transmitted information,
and communications in any form and the electricity coming out of the power sockets in our houses are all
sine waves. Sine waves are produced naturally in oscillator circuits, which are circuits that have an
inductor and a capacitor. In the field of electronics engineering, sine waves are generated with the help of
sine wave generators that can be either analog-based or digital-based. Sine-wave generators are circuits
that turn a specific user-defined input signal into a sinusoidal signal. Analog-based sine wave generators
were the first type of sine wave generators that were used before the arrival of digital means. They
incorporated ICs and amplifiers to adjust the amplitude of the output signal and add an offset. The
disadvantages of using such methods were the limitations of the quality of signals generated. Digital-
based sine wave generators were then incorporated to increase signal quality and more means of
generating a sine wave using digital methods were used. One of these methods is the Direct Digital
Synthesizers.

In creating a sinusoidal signal in a digital environment the things to consider is that there must be a binary
input at a given reference frequency that will be found in a circuit called the Phase Accumulator. The
truncated output coming from the phase amplitude converter will then be fed to a circuit called the Phase
to Amplitude Converter that will be used to create a sample domain-waveform. The output will then be
converted into analog form using a Digital to Analog Converter, completing the process of generating a
sine wave in a digital environment.

The researchers used the theory behind the Numerically Controlled Oscillator and how it generates an
output of a sinusoidal waveform and used it as reference for the designed project. The phase
accumulator will be a 16 bit binary Asynchronous counter that will input a clocked signal at a given
frequency, and this will serve as the Phase Accumulator of the NCO. The output will then be fed to a
Phase to Amplitude converter which will be incorporating the mathematical operation of the Taylor Series
Expansion of a user defined function. Adders and Multipliers will be used in this region to perform the
mathematical operation that the researchers will be using. The output of the PAC will then be used as
inputs to the Digital to Analog Converter of the NCO. Resistor 2Resistor ladders will be used in this region
to convert the Digital signal in Analog form so that a desired output of a Sine Wave will be produced. The
researchers came up with the proposed design after a lot of research, trial and errors about the working
principles of a NCO.

The designed project will have a clocked binary input from zero to pi at a reference frequency of 10kHz in
the Phase Accumulator and will be using the function of cos(2x) in the Phase to Amplitude Converter.
The Adders and Multipliers will be based on the Taylor Series Expansion of the said function. Each
multiplier and adder will be connected to perform a specific number of iterations. Changing this
parameters or having a shift or error in the design will greatly affect and distort the output sine wave of the
NCO.

In order for the researchers to arrive at the said design, validation using circuit simulating softwares like
Proteus, a proprietary tool suite used for electronic design automation, and Matlab Simulink, a graphical
programming environment for modeling, simulating and analyzing multi domain dynamical systems, will
be used. These softwares offer a variety of functions and will create the necessary environment to test
the validity of the designed NCO. The researcher will be using these two simulating environments in
creating the NCO. Proteus will be used to create the hardware based design of the project while Matlab
Simulink will be used to make the working block diagram of the project.

IV. Methodology

In making the Numerically Coded Oscillator the number of bits it will be operating on will be 16 bits. The
function that the researchers will be using is sin (2x). Using the Taylor series expansion of sin (2x) shown:

(−1)𝑛
(sin 2𝑥) = ∑ (2𝑥)2𝑛+1 . (2)
(2𝑛 + 1!)
𝑛=0

The researchers will be solving for the number of iterations that the circuit will perform in order to
produce the desired sine wave. The researchers took into account these specific limits and functions
that the designed project will be operating on. Taking these as anchors and building around these
specifications, the researchers first made the block diagram of the project in Matlab Simulink to test if
the theory of the working principle of the designed circuit would work and the desired number of
iterations for the function that the researchers desired would make a sinusoidal waveform. The
solutions that were solved manually were incorporated in the block diagram of the project.

The block diagram of the NCO is shown in Fig.1. It contains three main regions: phase accumulator,
phase to amplitude converter, and the digital to analog converter. The phase accumulator is a repeating
sequence of a digital input that ranges from zero to pi in binary form. The phase accumulator shown in
Fig.2 is a 16 bit Asynchronous Counter. It is made of 16 Dual JK-Flip Flops shown in Fig.3, cascaded to
satisfy the number of bits that the designed project will operate on. The PA is a counter that will count
up at each clock cycle with a limit starting from zero and will stop once it reaches the truncated value of
pi in 16 bits, at a reference frequency of 10 kHz.
The output of the phase accumulator is then fed as inputs to the multiplier and adder circuits found in
the Phase to Amplitude converter shown in Fig.4. In this circuit the function of sin(2x) are incorporated
into the circuit and the taylor series expansion of the said function is performed starting from the zeroth
iteration going to the ninth iteration. A series of multiplication, addition and subtraction operations will
be done in order to satisfy equation. The researchers used sixteen pairs of 74284 and 74285 ICs
cascaded together to form 16 bits and are used as multipliers shown in Fig.5, that multiplies the input
from the counter. Each pair of multiplier is connected to a set of adders made from 74283 ICs that
performs the summation of the output from the multipliers. The output from these adders are then fed
to a 16 bit full adder composed of cascaded 7483 ICs shown in Fig.6. These adder performs the addition
and and subtraction of inputs using the 2’s complement. In this phase accumulator, the Taylor series
expansion of sin(2x) is performed and the first iteration of the taylor series expansion is done. The
Multipliers and Adders does the operation for the value in the iteration and the 16 bit full adder does
the addition and subtraction process when the results are combined and will have a 16 bit output
because the 17th bit will be truncated. The researchers only did the first iteration of the function due to
processing problems and capabalities of the computer that was used. Lagging issues and non-real time
simulations were major issues in simulating the working operation of the hardware based phase
accumulator. This forced the researchers to only do the first iteration, since it was the maximum limit
that the computer could handle.

Fig.4 Phase to amplitude converter using 16 bit Multipliers and 16 bit Adders
Fig.5 Architecture of the 16 bit Multiplier

Fig.5 16 bit Full Adder

The output of the PAC will be used in the Digital to Analog Converter made by R-2R ladders which is a
binary-weighted DAC that uses a repeating values of R and 2R. The resistors used are 10k and 20k ohms
that are connected in a ladder-like configuration that will generate a binary weighted voltage at the
output when the each bit is active a sinusoidal waveform is generated as its output.
Fig3. Architecture of the phase accumulator

Fig2. Phase accumulator using 16 bit asynchronous binary counter

To operate the designed project the desired limits in the and the number of bits to be used should be
determined. Followed by determining the function to be used in generating the desired sinusoidal
waveform and incorporating the mathematical operations that will be used to solve the taylor series
expansion of the function should be then solved and realized. The frequency of the project varies on the
input frequency or reference frequency that the phase accumulator operates on. The higher the input
frequency the higher the frequency the NCOs frequency. The amplitude of the NCO and the phase of our
sinusoidal waveform output varies on the function that was used in the NCO.

The project will be tested on circuit simulating softwares like Proteus and Matlab Simulink to verify the
actual results. These softwares will give the researcher the desired results for they are more than capable
in performing the desired operation of the NCO that incorporates the Taylor series expansion of the
desired function. The researcher expects the result to be a sinusoidal waveform with some imperfections
due to the lesser amount of iterations. Some difficulties in running the designed circuit as a whole may be
an issue due to the amount of processing speed and power of the computer the researchers used.

Fig.8 Architecture of the Numerically Coded Oscillator


v. results

vi. conclusion

The project designed by the researchers is a Numerically Controlled Oscillator that incorporates
the Taylor series expansion of the function sin(2x). It has three main regions of operation that forms the
project as a whole: (1) Phase accumulator is the 16 bit Asynchronous counter of the project that has a
limit that ranges from zero to pi. It is the one responsible for generating the digital binary inputs that are
generated in each clock pulse. (2) Phase to Amplitude is composed of the multipilier and adders and is the
one that does the mathematical operation of the taylor series expansion of the function sin(2x). It
performs the iterations that are in the taylor series expansion of the function. (3) Digital to Analog
Converter is made up of a R-2R ladder that is a type of DAC that uses repeated values of R and 2R in a
ladder like configuration to produce an analog sinusoidal waveform.

After a series of tests and validation, trial and errors, the designed NCO was not able to address
the problem of producing a sinusoidal waveform due to the number of iterations that were used in the
hardware based circuit. The working principles of the designed project was validated and tested in the
designed block diagram and showed a resulting sinusoidal waveform in the 9th iteration of the chosen
function. But due to the lack of processing speed and power of the computer that was used, the hardware
based design was only limited to solving and implementing a circuit in the first iteration of the function.
Thus resulting to an incomplete sinusoidal waveform due to the lack of iterations in the hardware based
components in the project.

The designed project may be improved in a couple of ways: (1) In producing a finer sinusoidal
waveform, a higher number of iterations must be done and incorporated in hardware form. (2) Project
simulation may work better in computers with higher processing speeds and higher memory for real-time
simulations to be met. (3) In making the DAC other forms of IC based DACs may be faster since R-2R ladder
type has a slower conversion rate.

You might also like