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

  Program that computes the total price of tickets

Write a program that computes the total price of tickets that a customer orders. The program should prompt the user for the number of the destination city and the number of tickets desired.

  Two types of sporting teams

Select two types of sporting teams and de?ne subclasses for them. These classes shouldinherit from a base team class such as that created in Exercise 1. Include uniquecharacteristics about the sport.

  Write a program to calculate the volume flow rate

Write a program to calculate the volume flow rate in cubic feet per second of water flowing through a pipe of diameter d in inches and a velocity of v feet per second.

  Program reads the contents of employees

Design a program that reads the contents of the employees.dat file and prints all the data within it. Format the report as designated in the Printer Spacing Chart below.

  Explain characteristics unique to object-oriented programing

The machine language treats a message as bits while object-oriented programming language treats every message as an object. Do you agree with this statement? Why or why not? Explain the characteristics unique to object-oriented programming and how..

  Design an algorithm to find the selling price

To make a profit, the prices of the items sold in a furniture store are marked up by 60%. Design an algorithm to find the selling price of an item sold at the furniture store. What information do you need to find the selling price?

  Program that use classes game-arena-robot and player

Your assignment is to complete this C++ program skeleton to produce a program that implements the described behavior. (We've indicated where you have work to do by comments containing the text TODO;

  How nested if-statements replace with one if-statement

Describe how following nested If-statements could be replaced with one if-statement using logical operator (And/Or/Not). Write down the C++ code example.

  Use a for loop to generate 100 random numbers.

Use a For Loop to generate 100 random numbers. Determine the most current maximum and minimum number as the random numbers are being generated. This is referred tp as a "running" maximum and minimum. Display the running maximum and minimum values as ..

  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.

  Program user to enter student names and final grades

Write a program that would allow a user to enter student names and Final grades (e.g. A,B,C,D,F) from their courses. You do not know how many students need to be entered. You also do not know how many courses each of the students completed.

  Write a program that inputs a line of text into char

8.6 (Displaying Strings in Uppercase and Lowercase) Write a program that inputs a line of text into char array s[100]. Output the line in uppercase letters and in lowercase 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