Compare the amplitude of the two sinewaves

Assignment Help C/C++ Programming
Reference no: EM13779098

Preliminary C++ Program

Discussion

An FIR (Finite Impulse Response) filter can he represented by

          N- 1
Y(n) = ∑ x (n-k) h(k)
          K=0


Where N is the number of coefficients, h (k) is the impulse response of the filter

x(n-k) the input of the niter delayed k clock cycles

y (n) is the output of the filler, and x(m) = 0 for m < 0;

A given optimal equiripple FIR (Finite Impulse Response) filter has the following specification:

Sample rate: 10 kHz (0.0001 see / sample); Passband: 0 - 2.5 kHlz (Iowpass), 0.5 dB maximum ripple, Stophand: 3.0- 5 kHz, 50dB minimum attenuation

Using the Parks-Mcclellan program, we obtain the following impulse response values (scaled by 215'; ie, to get actual value, divide by 215).

h(0) = h(34) = 361.922 h(9) = h(25) = 812.822
h(1) = h(33) = 589.000 h(10) = h(24) = -934.419
h(2) = h(32) =- 52.556 h(11) = h(23)= -1082.725
h(3) = h(31) = -538.095 h(12) = h(22) = 1547.666
h(4) = h(30) = -58.657 h(13) = h(21) = 1083.109
h(5) = h(29) = 499A72 h(14) = h(20) = -3229.928
h(6) = h(28) = -251,531 h(15) = h(19) = -1275.738
h(7) = h(27) = -785.168 h(16) = h(18) = 10268.660
h(8) = h(26) = 381.999 h)(17) = h(17) = 17571.900

Courtesy: Dale Clover & John Della, Digital Signal Processing and Microcontroller, Motorola University, Prentice-Hall, 1999.

Step to follow-

1. Create three arrays x[600], h[600], and y[600]

2. Fill the x array with the 600 sample values of x(t) a-- 100 sin (4000 π t) for 0≤ t < 0.06 with rate of t = 0.0001 per sample. Note that the frequency for the sinewave is 2 kHz. The 600 sample values for the impulse function

3. Compute y[n] for 0≤ n< 600

4. Store the 600 sample values of x[n] in file filex and store the 600 sample values of y[n] in file filey.

5. Graph x[n] and y[n] on the same graph using Excel. Compare the amplitude of the two sinewaves x [n] and y[n].

Work to do

1. Repeat steps 1 to 5 for x(t) = 100 sin (4000 It t ) , frequency 2 kHz.

2. Repeat steps 1 to 5 for x(t) = 100 sin (6000 It t ), frequency 3 kHz.

3. Repeat steps 1 to 5 for x(t) = 100 sin (8000 it t ) frequency 4 kHz.

4. Compare the amplitudes of the two sinewaves x[n] and y[n] for frequencies 2 kHz, 3 kHz, and 4 kHz. Categorize the filter either as low pass filter, high pass filter, or hand-pass filter.

Reference no: EM13779098

Questions Cloud

Byronic heroes : A man proud, moody, cynical, with defiance on his brow, and misery in his heart, a scorner of his kind, implacable in revenge, yet capable of deep and strong affection
Hacking and defending practices : Networking and Internet- how can you put your math game online in the Internet so that more kids can benefit from it
Social movements highlight areas of society : Social movements highlight areas of society to be changed and make valuable contribution to solving problems. However, they seldom actually solve problems. In order to mobilize sufficient resources, they need to appeal to a broad population, and t..
Attending a college or university lesson : What mental models do you have about attending a college or university lesson? Are these mental models helpful? Could any of these mental models hold you back from achieving the full benefit of the lesson?
Compare the amplitude of the two sinewaves : Store the 600 sample values of x[n] in file filex and store the 600 sample values of y[n] in file filey. Graph x[n] and y[n] on the same graph using Excel. Compare the amplitude of the two sinewaves x [n] and y[n].
Write a term paper about early adulthood : Write a term paper about Early Adulthood. Students are expected to identify the perspective of the contemporary theory and describe current research and application to the field of lifespan development.
Diversity-related situation or cultural dilemma : Provide an analysis of the topic, including historical perspective and current day situation. Explain why this is a topic of interest.
Do you believe the employer''s actions were legal : Conduct research to provide examples to support your position and use your own personal employment experiences when possible. Have you observed situations where an employee was fired? Did the employer give a reason? Do you believe the employer's a..
Basic algorithm and pseudocode help : An area is calculated by multiplying the length by the width. The pseudocode program below should ask the user for the length and width of a rectangular room in order to calculate the area, and display the room's area.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write in c++. read an inputfile.txt

write in C++.  read an inputFile.txt which contains integers that are virutal addresses, and I am suppossed to translate that into physical addresses using a page table and a transition lookaside buffer

  Write a program which has a base process which communicates

write a program which has a base process which communicates with child processes acting as bombers that it

  What is an abstract base class

What is a pure virtual function. Why would you define a pure virtual function. Give an example of a pure virtual function. What is an abstract base class. What does it do. Why would you make a class abstract

  Create a simple command line program that simulates

Instructions:  Create a simple command line program that simulates the rolling of a pair of six sided dice a user given number of times

  Ansi-c program complete assignment as per written in the

complete assignment as per written in the attached

  Create a class to hold credit card information

The information to store is the card type (Visa, Mastercard, etc.) card number, the limit, and the current balance.

  We base our need to implement composition upon

What criterion, or criteria, should be used to include objects of a class as data members of another class? In other words, what should we base our need to implement composition upon?

  Determine the position in the x-y plane

Every circle has a center and a radius. Given the radius, we can determine the circle's area and circumference. Given the center, we can determine the position in the x-y plane.

  Grade book program for his class

Your English instructor, realizing you are a programmer, asks you to write a Grade Book program for his class to help him compute final grades. Design a program that asks for the student's name and four test grades.

  Prefetching is a technique that leverages predictable

Prefetching is a technique that leverages predictable address patterns to speculatively bring in additional cache blocks when a particular cache block is accessed. One example of prefetching is a stream buffer that prefetches sequentially adjacent..

  Produce a top-level design for your program

You are required to code the program using the C++ Programming Language. Your program should be properly laid out and should be modular, making sure that software engineering aspects of modularity and reusability as fully considered.

  Write application which ask user to input grades of students

Write C++ application which asks user to input grades for 5 student (3 grades each) save them in five double one dimensional arrays (one array for each student),

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd