Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer all the questions and provide MATLAB code with the explanation. 1. Recall that sinusoids may be expressed in the form: r(t) = A

image text in transcribedimage text in transcribed

Please answer all the questions and provide MATLAB code with the explanation.

1. Recall that sinusoids may be expressed in the form: r(t) = A cos (27 fot+) = Re {Aej j24 fot} Where Ae is called the phasor of x(t). Now, consider that: y(t) = EX=1 Ak cos(2nfxt +4x) = Re{EX=1 Ax ej Pkqj27fxt}_Re{EX=12* ej 27fxt} Where Zx _AkejPk (a) Modify your sumcos function done previously with the input arguments given below to synthesize y(t) described in the above equation without using loops. You would need to use matrix multiplication instead of vector addition for y(t) synthesis. Also, your function must be able to do the summation of arbitrary number of signals, not just couple ones. The matlab function should have this format: % function xx = sumcos(f, z, fs, dur) %SUMCOS Function to synthesize a sum of cosine waves % usage: xx - sumcos(f, Z, fs, dur) f = vector of frequencies (these could be negative or positive) Z = vector of complex exponentials: Amp*e^(j*phase) fs - the sampling rate in Hz dur - total time duration of signal Note: f and Z must be the same length. Z(1) corresponds to frequency f(1), Z(2) corresponds to frequency f(2), etc. Hint 1: It is suggested to test your code by comparing your results with the results simply done by vector addition (i.e. just sum up those signals). Hint 2: Zk is a complex number. Hint 3: In Matlab,' means non-conjugate transpose, 'means conjugate transpose. (b) Just like the hints posted on BB for the previous lab, please show the whole procedures to assemble the matrix used in (a) with equations and matrix operations. You are also required to be able to explain your work to me in person. (No credit for this lab if you fail to do this part). Now, try your sumcos function with the following coefficients: 2x={ in k an integer Choose the fundamental frequency to be fo = 25 Hz. Compute the signal for three cases: N = 5, 10, and 25, and plot all three functions together with a three-panel subplot. What waveshape is approximated with this sum of cosines as N + oo? Explain how the period of synthesized waveshape is related to the fundamental. Hint 1: The sumcos function is the one mentioned previously (problem #1). Hint 2: You would need to plot the signal when N approaches to infinity. For this case, you can assign a large number to N (such as 200, 300,1000 etc.). 1. Recall that sinusoids may be expressed in the form: r(t) = A cos (27 fot+) = Re {Aej j24 fot} Where Ae is called the phasor of x(t). Now, consider that: y(t) = EX=1 Ak cos(2nfxt +4x) = Re{EX=1 Ax ej Pkqj27fxt}_Re{EX=12* ej 27fxt} Where Zx _AkejPk (a) Modify your sumcos function done previously with the input arguments given below to synthesize y(t) described in the above equation without using loops. You would need to use matrix multiplication instead of vector addition for y(t) synthesis. Also, your function must be able to do the summation of arbitrary number of signals, not just couple ones. The matlab function should have this format: % function xx = sumcos(f, z, fs, dur) %SUMCOS Function to synthesize a sum of cosine waves % usage: xx - sumcos(f, Z, fs, dur) f = vector of frequencies (these could be negative or positive) Z = vector of complex exponentials: Amp*e^(j*phase) fs - the sampling rate in Hz dur - total time duration of signal Note: f and Z must be the same length. Z(1) corresponds to frequency f(1), Z(2) corresponds to frequency f(2), etc. Hint 1: It is suggested to test your code by comparing your results with the results simply done by vector addition (i.e. just sum up those signals). Hint 2: Zk is a complex number. Hint 3: In Matlab,' means non-conjugate transpose, 'means conjugate transpose. (b) Just like the hints posted on BB for the previous lab, please show the whole procedures to assemble the matrix used in (a) with equations and matrix operations. You are also required to be able to explain your work to me in person. (No credit for this lab if you fail to do this part). Now, try your sumcos function with the following coefficients: 2x={ in k an integer Choose the fundamental frequency to be fo = 25 Hz. Compute the signal for three cases: N = 5, 10, and 25, and plot all three functions together with a three-panel subplot. What waveshape is approximated with this sum of cosines as N + oo? Explain how the period of synthesized waveshape is related to the fundamental. Hint 1: The sumcos function is the one mentioned previously (problem #1). Hint 2: You would need to plot the signal when N approaches to infinity. For this case, you can assign a large number to N (such as 200, 300,1000 etc.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students also viewed these Databases questions