<< 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 mutation
Janga Reply
what is a cell
Sifune Reply
how is urine form
Sifune
what is antagonism?
mahase Reply
classification of plants, gymnosperm features.
Linsy Reply
what is the features of gymnosperm
Linsy
how many types of solid did we have
Samuel Reply
what is an ionic bond
Samuel
What is Atoms
Daprince Reply
what is fallopian tube
Merolyn
what is bladder
Merolyn
what's bulbourethral gland
Eduek Reply
urine is formed in the nephron of the renal medulla in the kidney. It starts from filtration, then selective reabsorption and finally secretion
onuoha Reply
State the evolution relation and relevance between endoplasmic reticulum and cytoskeleton as it relates to cell.
Jeremiah
what is heart
Konadu Reply
how is urine formed in human
Konadu
how is urine formed in human
Rahma
what is the diference between a cavity and a canal
Pelagie Reply
what is the causative agent of malaria
Diamond
malaria is caused by an insect called mosquito.
Naomi
Malaria is cause by female anopheles mosquito
Isaac
Malaria is caused by plasmodium Female anopheles mosquitoe is d carrier
Olalekan
a canal is more needed in a root but a cavity is a bad effect
Commander
what are pathogens
Don Reply
In biology, a pathogen (Greek: πάθος pathos "suffering", "passion" and -γενής -genēs "producer of") in the oldest and broadest sense, is anything that can produce disease. A pathogen may also be referred to as an infectious agent, or simply a germ. The term pathogen came into use in the 1880s.[1][2
Zainab
A virus
Commander
Definition of respiration
Muhsin Reply
respiration is the process in which we breath in oxygen and breath out carbon dioxide
Achor
how are lungs work
Commander
where does digestion begins
Achiri Reply
in the mouth
EZEKIEL
what are the functions of follicle stimulating harmones?
Rashima Reply
stimulates the follicle to release the mature ovum into the oviduct
Davonte
what are the functions of Endocrine and pituitary gland
Chinaza
endocrine secrete hormone and regulate body process
Achor
while pituitary gland is an example of endocrine system and it's found in the Brain
Achor
what's biology?
Egbodo Reply
Biology is the study of living organisms, divided into many specialized field that cover their morphology, physiology,anatomy, behaviour,origin and distribution.
Lisah
biology is the study of life.
Alfreda
Biology is the study of how living organisms live and survive in a specific environment
Sifune
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