Hot answers tagged

11

Some issues here: Your SNR formula only applies to full scale sine waves, your sine wave has -6dB amplitude so your SNR will be 6 dB lower The formula also implies rounding, not truncation, that's another 6 dB You use a frequency that's a small integer divider of the sample rate, that means you are just repeating the same samples over and over again and don'...


7

I was doing quite a bit wrong, but the key thing that I was missing was the fact that the SNR needs to be calculated over the whole Nyquist spectrum instead of only looking at the peaks. This article explains everything very well: Taking the Mystery out of the Infamous Formula, "SNR = 6.02N + 1.76dB," and Why You Should Care. Another issue was that ...


2

Your spectrum is zero at all frequencies other than at the carrier and the side bands. If the magnitude is zero the phase is undefined. Since you use finite precision math, the magnitude in your calculation will not be exactly zero but just a really really small number. So the phase can be computed but what you are seeing just random numerical noise. As you ...


2

Why do I have ringing and such an aggressive response? Because you designed a really aggressive filter, which is borderline unstable. All the poles are less than 1/1000 away from the unit circle. How does the low cut off frequency and high sample rate affect the filter response? The lower the cutoff, the higher the order, and the higher the sample rate, ...


1

The order of your filter is 9, which is high. For DC-removal purposes, an order-1 IIR filter is often used. Order-1 IIR filters don't ring. You could tune the $\alpha$ value to suit your need. $H(z) = \frac{1-z^{-1}}{1-\alpha z^{-1}}$ You could also perform a DC-block removal. In this case, simply compute the average of your signal and subtract it from ...


1

In the code the OP is comparing the real and the imaginary components of the FFT in each to determine similarity. If a phase shift occurs then the real and imaginary components will also change. What the OP should be comparing is the magnitudes of the complex values in each sample, which should be invariant under such image shifts. Confirming this; the OP ...


1

This is wrong Because if your carrier frequency is less than your message frequency, then you will have trouble in filtering .


1

I just implemented one VSDFT in Matlab and confirm what is said above. FFT makes uses of symmetries, but here you can't. Instead you should have a lot less number of points to compute, as if you had a quarter of the FFT to compute.


Only top voted, non community-wiki answers of a minimum length are eligible