The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

1

Upon closer inspection, this doesn't even seem to be a rotation: $R_n$ being the output sample corresponding to the input sample $A_n$, we can understand their equation $$R_n = A_n - \Delta_n \tag1$$ as the statement that we add sequence $(-\Delta_n)_{n=1,\ldots,k}$ to the input signal $a$ and get the output signal $r$. I'll call that sequence $s$, $S_n ...


0

How high are your harmonics? They are probably frequency spurs caused by the limited precision of your DDS. https://www.analog.com/media/en/training-seminars/tutorials/MT-085.pdf They could also be caused by the analog electronics, i.e. the DAC itself, the power supplies, etc. Try generating a frequency that has a period not equal to a whole number. If ...


0

Because the sequence $$ x[n] = A \cos( \omega n) $$ will produce exactly the same samples for all discrete-time frequencies such as $\omega = \pi/3$ or $\omega = \pi/3 + 2\pi$ or $\omega = \pi/3 + 6\pi$ or $\omega = \pi/3 -8 \pi$... In other words every frequency of the form $w = w_0 + 2\pi k $ for all integers $k$ will yield the same set of samples; they ...


0

There is no requirement, it is a matter of choice. Some conceptual clarity is required. A sequence of sampled points does not have a derivative. Derivatives come from continuous functions. If you treat the inverse DFT definition as a continuous function, the result is a continuous interpolation function that will pass through all your sampled points. ...


2

If I compute the Fourier Transform of Z(f), what will I get? If you apply the inverse Fourier Transform, you get the impulse response of the system which is indeed a time domain signal. You can also apply the forward transform and would get the impulse response time reversed and scaled since the forward and inverse transform are quite similar. Which is ...


0

Yes, we use windows to reduce spectral leakage and you show an example where using a window increases it. There is more than one way to explain it. If you express a DFT as a matrix vector product $$ \mathbf{y}=\mathbf{Wx} $$ where $$ \mathbf{WW^H}=c\mathbf{I} $$ where $c$ is a constant that depends on how you define your DFT. The point is that $\mathbf{...


1

Equidistant Dirac impulses in the spectrum imply a periodic time domain signal. As pointed out in a comment, in continuous time, the signal $x(t)=\sin(\omega_0t)$ is always periodic, regardless of the value of $\omega_0$. Your question about the spectrum being periodic is unclear to me. A one-sided spectrum with equidistant Dirac impulses also implies a ...


0

@Niousha. Regarding your first paragraph, in theory a real-valued continuous-time domain sinusoidal signal, of infinite time duration, will have only one positive-frequency impulse in the frequency domain. (I say "in theory" because such a signal does not exist in Nature. Such a signal is strictly an abstract concept, like a perfect circle or one of Euclid's ...


0

Looks like aliasing. Your 360 Hz is probably not a real component at 360 Hz but it's the 9th harmonic (540 Hz) that aliases back to 360 Hz at a 900Hz sample rate. That's easy to test: change the sample rate to, 940 Hz and see of the 360Hz moves to 400Hz or stays put. It moves to 400Hz, it's clearly aliasing.


2

Even with @MattL.'s fix you are discarding typically non-zero parts of the discrete-time derivative by not including its first and last sample, which destroys its autocorrelation properties near the end points, typically resulting in the low-frequency plateau in the frequency spectrum as you have observed. We can add a bit of a zero-valued safety buffer at ...


0

Not an answer but too long for a comment: It looks like you may have two problems: First you seem to plot the negative frequencies as the top half of the spectrum. You should only plot the output of the FFT from $0$ to $N/2$. Second: did you a try a symmetric differentiator? The simplest approach to in the discrete domain is simply. $$y_0[n] = x[n]-x[n-1]$...


2

When I try this, the results looks as expected. So you really have to explain in more detail what exactly it is that you're doing, because it doesn't seem to be a property of the discrete-time derivative. EDIT: Now that I see your code, I'm convinced that the problem will disappear if you use dydt = zeros(1,sr); to initialize the derivative vector.


2

Your FFT method of finding the phase of a single tone is only valid if your 's' signal contains an exact integer number of cycles. I.E., no spectral leakage. And that is NOT the case for your 's' signal.


0

Your function is both integrable, and square integrable, because it is continuous on the finite support $[0\;2\pi]$. In this context ($L_1 \cap L_2$), its Fourier transform is pretty well defined as a classical function (not a distribution like the Dirac), and continuous. So, your formula is incorrect. So there is no infinite magnitude. Moreover, one cannot ...


Top 50 recent answers are included