﻿ oipapio

fourier series - Spectrum of Cosine in Complex Form

The complex exponential form of cosine$$\cos(k \omega t) = \tfrac{1}{2} e^{i k \omega t} + \tfrac{1}{2} e^{-i k \omega t}$$The trigonometric spectrum of $\cos(k \omega t)$ is single amplitude of the cosine function at a single frequency of $k$ on the real axis which is using the basis function of cosine?The complex exponential spectrum of $\cos(k \omega t)$ has two amplitudes at 1/2, one at $k$ and $-k$.I am confused what this x-axis is representing - amplitudes of what? Whats the basis function? I'm guessing amplitudes of exponential but thes...Read more

frequency spectrum - Why so many methods of computing PSD?

Welch's method has been my go-to algorithm for computing power spectral density (PSD) of evenly-sampled timeseries. I noticed that there are many other methods for computing PSD. For example, in Matlab I see:PSD using Burg methodPSD using covariance methodPSD using periodogramPSD using modified covariance methodPSD using multitaper method (MTM)PSD using Welch's methodPSD using Yule-Walker AR methodSpectrogram using short-time Fourier transformSpectral estimationWhat are the advantages of these various methods? As a practical question, when w...Read more

frequency spectrum - Matlab code for wigner ville distribution

I wanna to have a wigner ville distribution spec.and need code in matlab...Read more

Convolution in the frequency domain

We often hear that "convolution in time is the same as multiplication in frequency", and vice versa, that "convolution in frequency is the same as multiplication in time". So in a typical windowing operation, we do a point-wise multiplication of a signal $x[n]$, with a window $w[n]$. This means that in the frequency domain, we are performing $X(f) * W(f)$. My question is the following: I wish to illustrate this for myself, but I am not sure what lengths FFTs to take, and what type of convolution to do. (Circular? Linear? etc). Those details see...Read more

Estimating the amplitude of a particular frequency

I am relatively new to DSP and have been reading a lot on the internet. I have a couple of questions.I have a signal in the form of a function $$f(x) = A_0 + A_1 \cos(\omega_1 x) + A_2 \cos(\omega_2 x)+...+ A_n \cos(\omega_n x).$$I have $f(x)$ and I know the minimum and maximum frequencies. $f(x)$ can have really high frequencies. a) I need to find the amplitude $A_p$ of a particular frequency $\omega_p$ in $f(x)$. One way to do this is, I could get sample points from $f(x)$ sampling at greater than Nyquist rate and do an FFT and find the ampl...Read more

frequency spectrum - How can I accurately represent an mp3's wave form in respects to time?

I'm trying to programmatically plot a sound wave that I have placed in a 2d array, however, I cannot consistently get the sound wave to reach the end of the window. For example, when you load a sound in audacity, you get this:In contrast, when I load a sound into my program I will often get something like this (red is the play head that moves at speed of one blue tick mark every second. The Green line is the end of the song in seconds):As you can see, I can plot the complete wave form, but it does not sync up with the end of the song. Oddly eno...Read more

frequency spectrum - Should the phase coefficients of the DFT of a real, even input signal all be zero?

The phase coefficients of a real, even input signals should all apparently be $0$ or a multiple of $\pi$. That's a property of the DFT I've learned about in the Audio Signal processing course on coursera. However, the example they use completely confuses me.They create a triangle wave that looks like this:and then showed the phase spectrum to be this:They explained that this phase spectrum was not zero, because the original triangle function wasn't even because it wasn't centered around zero - it had a phase shift that was messing things up. So...Read more

dBFS scaling and spectrum

I am trying to replicate the spetrum as given in Audacity and other commercial software... I am getting crazy with the correct scaling needed in order to have dBFS (with reference to a full scale sine wave).Suppose $x_t$ is the PCM sample at $k$ bit precision, first of all I rescale the PCM samples$$s_t = \frac{x_t}{ \frac{ 2^{k-1} }{ \sqrt{2} } }$$Suppose now $w_t$ is some window function, I compute the FFT of of size N of the product $s_t w_t$. Let $P_1, P_2, \ldots, P_N$ be the FFT complex values. Since I am only interested in one-side s...Read more