<< Chapter < Page
  Digital signal processing - dsp     Page 3 / 19
Chapter >> Page >

Truncated sinusoids

Each pulse consists of a cosine wave that has been truncated at a different length. The frequency of the cosine wave is the same for every pulse. As youwill see when we examine the code, the frequency of the cosine wave is 0.0625 times the sampling frequency. If you do the arithmetic, you will conclude thatthis results in 16 samples per cycle of the cosine wave.

In all five cases, the length of the time series upon which spectral analysis will be performed is 400 samples. For those four cases where the length of thepulse is less than 400 samples, the remaining samples in the time series have a value of zero.

Will compute at 400 frequencies

When the spectral analysis is performed later, the number of individual frequencies at which the amplitude of the spectral energy will be computed willbe equal to the total data length. Therefore, the amplitude of the spectral energy will be computed at the same 400 frequencies for each of the five timeseries. That makes it convenient for us to stack the spectral plots up vertically and compare them (as in Figure 2 ) . This makes it easy for us to compare the distribution of energy across the frequency spectrum for pulsesof different lengths.

Graph03 and graph06

The plots in Figure 1 were produced using the program named Graph03 . Other plots in this module will be produced using the program named Graph06 . I explained those programs in earlier modules, and I provided the source code for both programs in the previous module titled Spectrum Analysis using Java, Sampling Frequency, Folding Frequency, and the FFT Algorithm . Therefore, I won't repeat those explanations or provide the source code for those programs in this module.

The program named Dsp031a

A complete listing of the program named Dsp031a is provided in Listing 9 near the end of the module.

This program displays sinusoidal pulses identical to those processed by the program named Dsp031 , which will be discussed later.

Time series containing sinusoidal pulses

The program named Dsp031a creates and displays five separate time series, each 400 samples in length. Each time series contains a pulse andthe pulses are different lengths.

Each pulse consists of a truncated sinusoid. The frequency of the sinusoid for each of the pulses is the same.

Frequency values are specified as type double as a fraction of the sampling frequency. The frequency of each sinusoid is 0.0625 times thesampling frequency.

The pulse lengths

The lengths of the five pulses are:

  • 25 samples
  • 50 samples
  • 100 samples
  • 200 samples
  • 400 samples

Beginning of the class named Dsp031a

This program is very similar to programs that I explained in previous modules in this series, so my explanation will be very brief. As usual, I will explainthe program in fragments.

The beginning of the class, along with the declaration and initialization of several variables is shown in Listing 1 . The names of the variables along with the embedded comments should make the code self explanatory.

Listing 1. Beginning of the class named Dsp031a.
class Dsp031a implements GraphIntfc01{ final double pi = Math.PI;int len = 400;//data length int numberPulses = 5;//Frequency of the sinusoids double freq = 0.0625;//Amplitude of the sinusoids double amp = 160;//Following arrays will contain sinusoidal data double[]data1 = new double[len];double[] data2 = new double[len]; double[]data3 = new double[len];double[] data4 = new double[len]; double[]data5 = new double[len];

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