<< Chapter < Page Chapter >> Page >

The argument to the sine and cosine functions

If you think of x as being a measurement of time in seconds, and 1/n being a measurement of frequency in cycles/second, the arguments to the sine and cosine functions can be viewed as:

2*pi(radians/cycle)*(x sec)*(1/n)( cycle/sec)

If you cancel out like terms, this reduces to:

2*pi(radians)*(x )*(1/n )

Thus, with a fixed value of n , for each value of x , the argument represents an angle in radians, which is what is required for use withthe functions of the Java Math library.

Where does sin(arg) equal zero ?

The value of the sine of an angle goes through zero at every integer multiple of pi radians. This explanation will probably make more sense if you refer back to Figure 3 .

The curve in Figure 3 was calculated and plotted for n equal to 50. The sine curve has a zero crossing for every value of x such that x is a multiple of n/2, or 25.

Where are the peaks in the cosine function ?

Similarly, the peaks in the cosine curve in Figure 3 occur for every value of x such that x is a multiple of n/2, or 25.

Composition and decomposition

In theory, it is possible to decompose any time series into a number (quite possibly a very large number) of sine and cosine functions each having its own amplitude and frequency. (In a future module, we will learn how this is possible using a Fourier series or a Fourier transform.)

Conversely, it is theoretically possible to create any time series by adding together just the right combination of sine and cosine functions, each havingits own amplitude and frequency.

An approximate square waveform

As an example of composition, suppose that I need to create a time series that approximates a square waveform, as shown at the bottom of Figure 6 .

Figure 5. An approximate square waveform.
missing image

I can create such a waveform by adding together the correct combination of sinusoids, each having its own frequency and amplitude.

Figure 6. An improved approximate square waveform.
missing image

Successive approximations

The ten curves plotted in Figure 5 and Figure 6 show successive approximations to the creation of the desired square waveform. The bottom curvein Figure 6 is a plot of the following sinusoidal expression containing the algebraic sum of ten sinusoidal terms.

cos(2*pi*x/50) - cos(2*pi*x*3/50)/3+ cos(2*pi*x*5/50)/5 - cos(2*pi*x*7/50)/7+ cos(2*pi*x*9/50)/9 - cos(2*pi*x*11/50)/11+ cos(2*pi*x*13/50)/13 - cos(2*pi*x*15/50)/15+ cos(2*pi*x*17/50)/17 - cos(2*pi*x*19/50)/19

Each curve contains more sinusoidal terms

The top curve in Figure 5 is a plot of only the first sinusoidal term shown above. It is a pure cosine curve.

Each successive plot, moving down the page in Figure 5 and Figure 6 adds another term to the expression being plotted, until all ten terms are includedin the bottom curve in Figure 6 .

Reasonably good approximation

As you can see, the bottom curve in Figure 6 is a reasonably good approximation to a square wave, but it is not perfect.

(A perfect square wave would have square corners, a flat top, no ripple, and perfectly vertical sides.)

Each term improves the approximation

If you start at the top of Figure 5 and examine the successive curves, you will see that the approximation to a square wave improves as each new sinusoidalterm is added.

Questions & Answers

what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
cell is the building block of life.
Condoleezza Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Digital signal processing - dsp. OpenStax CNX. Jan 06, 2016 Download for free at https://legacy.cnx.org/content/col11642/1.38
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Digital signal processing - dsp' conversation and receive update notifications?

Ask