Consider vectors of N time samples. In the time domain, the basis vectors , for n...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider vectors of N time samples. In the time domain, the basis vectors , for n = {0, 1,..., N-1} have a 1 in the n'h slot and a zero elsewhere. In that basis, a signal x[n] is written as an N-vector = x[n]n. V-1 n=0 Let's consider sinusoidal basis vectors b, for k (0, 1,..., N-1}. In order to write the vector in this new basis, we'll need to know the projection of these basis vectors onto the original basis vectors. Please assume that the projection of the new basis vector of index k onto the original basis vector with index n equals (n|bx) = e/2 and the projection the other way (from old basis vector to new basis vector) equals its complex conjugate (bxln) = te 2x#. We can use these projections to write by, the new basis vector with index k, in the original basis as the N-vector of time samples e/2x4 for n (0, 1,..., N 1}. Likewise, we can write original basis vector , as an N-vector in the new basis ase for k (0,1,..., N 1}. (a) Given a value of N, write a Python function that returns an NX N numpy array (matrix) where the kth column is the basis vector written as an N- vector in the original basis. (Note that this will be a matrix of complex numbers.) I will refer to this below as the inverse matrix. (b) Write a Python function that takes an N X N inverse matrix (where the columns are the new basis vectors as vectors in the original basis) and returns an NX N numpy array where the element in the kth row and ph column is the inner product (1)=bb. Examining the results for N = 4, are the sinusoidal basis vectors orthonormal? Explain. (c) Write another function that returns an Nx N numpy array where the column is the basis vector , written as an N-vector in the new, sinusoidal basis. (Note that this will be a matrix of complex numbers.) I will refer to this below as the forward matrix. Explain how the forward matrix is related to the inverse matrix. Examining the results for N = 4, what do you get when you matrix multiply these two matrices? (d) Let's take a time signal in the original basis and see what it looks like in the sinusoidal basis. Take N = 1024 samples of a 1 kHz sine wave with Amplitude A = 1, sampled at F, = 44, 100 Hz. Matrix multiply this signal by the forward matrix for N = 1024. The result will be a complex N-vector iva -convert it to dB using 20. * np. log10 ( np.abs(v)) and plot the result. Also pass the signal to np.fft.fft() to get the DFT of the signal to S and plot it using the same dB measure. Discuss what you find. Try using f = np.arange (N) * Fs/N in a plot of f (x-axis) vs. dB (y-axis). What do you find? What happens if you subract 10 np. log10 (N) from your dB curve computed using np.fft.fft() ? Consider vectors of N time samples. In the time domain, the basis vectors , for n = {0, 1,..., N-1} have a 1 in the n'h slot and a zero elsewhere. In that basis, a signal x[n] is written as an N-vector = x[n]n. V-1 n=0 Let's consider sinusoidal basis vectors b, for k (0, 1,..., N-1}. In order to write the vector in this new basis, we'll need to know the projection of these basis vectors onto the original basis vectors. Please assume that the projection of the new basis vector of index k onto the original basis vector with index n equals (n|bx) = e/2 and the projection the other way (from old basis vector to new basis vector) equals its complex conjugate (bxln) = te 2x#. We can use these projections to write by, the new basis vector with index k, in the original basis as the N-vector of time samples e/2x4 for n (0, 1,..., N 1}. Likewise, we can write original basis vector , as an N-vector in the new basis ase for k (0,1,..., N 1}. (a) Given a value of N, write a Python function that returns an NX N numpy array (matrix) where the kth column is the basis vector written as an N- vector in the original basis. (Note that this will be a matrix of complex numbers.) I will refer to this below as the inverse matrix. (b) Write a Python function that takes an N X N inverse matrix (where the columns are the new basis vectors as vectors in the original basis) and returns an NX N numpy array where the element in the kth row and ph column is the inner product (1)=bb. Examining the results for N = 4, are the sinusoidal basis vectors orthonormal? Explain. (c) Write another function that returns an Nx N numpy array where the column is the basis vector , written as an N-vector in the new, sinusoidal basis. (Note that this will be a matrix of complex numbers.) I will refer to this below as the forward matrix. Explain how the forward matrix is related to the inverse matrix. Examining the results for N = 4, what do you get when you matrix multiply these two matrices? (d) Let's take a time signal in the original basis and see what it looks like in the sinusoidal basis. Take N = 1024 samples of a 1 kHz sine wave with Amplitude A = 1, sampled at F, = 44, 100 Hz. Matrix multiply this signal by the forward matrix for N = 1024. The result will be a complex N-vector iva -convert it to dB using 20. * np. log10 ( np.abs(v)) and plot the result. Also pass the signal to np.fft.fft() to get the DFT of the signal to S and plot it using the same dB measure. Discuss what you find. Try using f = np.arange (N) * Fs/N in a plot of f (x-axis) vs. dB (y-axis). What do you find? What happens if you subract 10 np. log10 (N) from your dB curve computed using np.fft.fft() ?
Expert Answer:
Answer rating: 100% (QA)
a Heres a Python function that returns an NXN numpy array matrix where the kth column is the basis vector bk written as an Nvector in the original basis python Copy import numpy as np def getinversema... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Discuss the Trade-off model and explain its components and the theory behind it. What does that model say to us regarding the optimal capital structure of the firms?
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Read the case study "Southwest Airlines," found in Part 2 of your textbook. Review the "Guide to Case Analysis" found on pp. CA1 - CA11 of your textbook. (This guide follows the last case in the...
-
Write a short report in which you assess the impact of one piece of health and safety legislation in an organisation of your choice.
-
A young couple, Eve and Steven, want to divide their main household chores (marketing, cooking, dishwashing, and laundering) between them so that each has two tasks but the total time they spend on...
-
Ethers and alcohols can be isomeric (see Sec. 1.8). Write the structures and give the names for all possible isomers with the molecular formula C4H10O.
-
What are the main characteristics of the conventional accounting and ecological accounting categories? Why is the distinction necessary?
-
The Baldwin Company wants to decrease its plant utilization for Buzz by 15%. How many units would need to be produced next year to meet this production goal? Ignore impact of accounts payable on...
-
Disney has assets worth $250.378 billion. It has debt with a total face value of $38.057 billion. If the risk-free interest rate is 0.375% per annum and the standard deviation of monthly returns on...
-
Presented below is an aging schedule for Bryan Company at December 31, 2021. At December 31, 2021, the unadjusted balance in Allowance for Doubtful Accounts is a credit of $8,000. Instructions a....
-
The Channel Island spotted skunk is only found on two isolated islands off the coast of southern California, Santa Cruz and Santa Rosa Islands. It is presumed to be closely related to the spotted...
-
While attending college, you want to use your free time to start a new business. Your first idea is to open a bakery shop selling Bundt cakes. Before you decide to execute this idea, you would like...
-
Online presentations address all of these general speech purposes EXCEPT: to inform. to persuade. O to address a special occasion. to utilize technology.
-
Royal Lawncare Company produces and sells two packaged products-Weedban and Greengrow. Revenue and cost information relating to the products follow. Selling price per unit Variable expenses per unit...
-
Trend and Seasonality Question (A) Given the actual demand for years 2003/4, calculate the forecast for year 2005 for each quarter and for the total year. For your calculations use the principles of...
-
Summary: Texas Paint & Coatings (TPC) is a producer of specialty paints and coatings for industrial and agricultural equipment manufacturers. Currently, TPC is in the process of introducing a new...
-
Today is Jan 1st 2023. You are the commercial lender for NAIT Bank. Your longtime clientSaxenda Inc Industries is a longstanding client of 9 years. Saxenda Inc is an incorporated company with their...
-
Linda Lopez opened a beauty studio, Lindas Salon, on January 2, 2011. The salon also sells beauty supplies. In January 2012, Lopez realized she had never filed any tax reports for her business and...
-
Use the Table of Integrals on Reference Pages 610 to evaluate the integral. TT cos'0 de
-
Evaluate the limit, if it exists. x + 2 lim x + 8 x-2
-
Find the volume of the solid that lies inside both of the spheres and x? + y? + z? + 4x 2y + 4z + 5 = 0 x + y? + z? = 4 .2 ,2
-
Discuss the physical meaning of the small-signal circuit parameter \(r_{o}\).
-
Discuss, using the concept of a load line, how a simple common-source circuit can amplify a time-varying signal.
-
Sketch a simple source-follower amplifier circuit and discuss the general ac circuit characteristics (voltage gain and output resistance).
Study smarter with the SolutionInn App