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

  Computes the product of all elements in a vector

Write a C function that computes the product of all elements in a vector x of dimension n. The elements of the vector are stored in a double array of size n.

  How many integer values are in the array

Write a function named "location_of_largest" that takes as its arguments the following.

  Write a recursive definition that reverses the elements

Write a recursive definition that reverses the elements in intArray between low and high.

  Maze program

Maze program. In this assignment you will represent a maze with a binary tree. . The starting point is node N and the ending point is node Z.

  Produce a c program to calculate the total price for order

Your friend has just opened a computer appliances shop at Changloon. He asked your help to develop a computer program which can be used at the counter. Your program should be able to input the customer's order which could be more than one item. Produ..

  Aimthis assignment is designed to apply your knowledge on

aimthis assignment is designed to apply your knowledge on microcontroller to build a traffic light system. you are

  Dynamic character arrays

Dynamic character arrays str and add contain strings. Write a function append that uses str and add as arguments and appends add to the end of str. Write a main program that illustrates the use of function append to concatenate five strings.

  Write a program that will represent an axis-aligned

Write a program that will represent an axis-aligned right triangle in the x-y plane as a Class. A right triangle has a right angle (90-degree angle) and two sides adjacent to the right angle, called legs. See http://en.wikipedia.org/wiki/Right_tri..

  Generates numbers in the fibonacci sequence

Write a class called fibs that generates numbers in the Fibonacci sequence (each number is the sum of the previous two). The sequence starts 1, 1, 2, 3, 5, ...

  By a minimal interpretation that makes a formula

By a minimal interpretation that makes a formula true, we mean that if one atom is removed from the interpretation then the resulting interpretation does no longer make the formula true.

  Write a program to evaluate infix expressions

Write a program to evaluate infix expressions and summarize differences between array notation and pointer notation

  Structured programming using procedural languages

A a program that is called "Playing with Numbers or Letters".

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