New answers tagged

0

If your sampling frequency is 5Hz (Which I don't think is!) and the signal contains a known frequency of 5Hz. So, the sampled signal will have aliasing for sure. You are correctly mapping your positive FFT spectrum from 0 to 2.5Hz, because digital frequency of sampled signal can only map from $[-f_s/2, f_s/2]$ which is $[-2.5hz, 2.5hz]$. The question is ...


0

Your FFT appears to be for a sampling frequency of 5 Hz. I estimate from your time domain data, if what we see there is a 5 Hz sinusoid, that your sampling frequency $F_s$ is actually closer to 500 Hz given by 1 cycle = 100 samples, so 100 samples/cycle * 5 cycles/sec = 500 samples/sec. Given the length of 250 samples with no further windowing, the ...


0

And now for a completely different answer.... Your two functions $g_1(\tau)$ and $g_2(\tau)$ are sort of related to or minor variations (normalizations if you prefer) of what are commonly called the autocovariance function and the autocorrelation function respectively of wide-sense-stationary random processes on dsp.SE. Note, though, that apparently these ...


2

See section 2.4.3 of this reference https://web.stanford.edu/~dntse/Chapters_PDF/Fundamentals_Wireless_Communication_chapter2.pdf If the doppler spectrum has to be gaussian, the auto-correlation of tap gains should be gaussian (which is correctly mentioned in other answer but I somehow felt more details were not captured). For a coherence time $T_c$, ...


1

To spread in frequency with a Gaussian shape is to convolve the frequency domain on the waveform with the Gaussian shape. To convolve in frequency is to multiply in time the respective Fourier Transforms. The Fourier Transform of a Gaussian is a Gaussian; so therefore you would multiply in time by a Gaussian window. In MATLAB you can use the "gaussian" ...


1

1) g1 assumes that there is a non-zero mean and that always needs to be subtracted off for the correlation calc to make sense. g2 assumes that the mean is zero. g2 is incorrect if the mean is not zero. 2) the mean is taken over the whole sample because the autocorrelation calc has the underlying assumption that the process is stationary so the mean doesn'...


1

The $X(z)$ calculated is correct but there are some mistakes in the steps and ROC is wrong. $X[z]$ is wrong representation of $\mathcal Z$-Transform since it is not a discrete sequence but rather a continuous function of $z$, where $z$ is a complex variable in argand plane ($z$-plane). Limit of $\sum$ changes from $n=0$ to $\infty$ to $n=1$ to $\infty$. Why?...


1

If you want a strictly real result from an IFFT, then you have to force the input to be conjugate symmetric. That way, all the imaginary components will cancel out to (almost) zero (except for rounding “errors” or microscopic numerical noise).


1

For a real signal, the FFT is symmetric complex numbers in general. That is $X[((-k))_N] = X[((k))_N]$. When you did this c(round(n*1000/fs):end)=0 you have disturbed the symmetry and hence, the ifft of this new signal will no longer be real. See a simple example >> x=[1 3 5 6]; >> y=fft(x); >> y(1:2)=0; >> ifft(y) ans = -1....


2

The short answer is do not null out the "mirror frequencies" that are located above $f_s/2$ that match the frequencies you want to keep. If your FFT was generated from a real signal, then when you do the IFFT you will get the real signal back as long as you did not zero out those upper frequencies (as you did). The DFT (which the FFT computes) returns ...


1

Myth: DTFT is Sinc-interpolated DFT. Problem with the above statement: Sinc is not $2\pi$-Periodic function, but all DTFTs are. Correct Answer: Theoretical, Continuous-$\omega$ $2\pi$-Periodic DTFT can be obtained by continuous Lagrangian-interpolation of the DFT Samples. So that the values at $\omega = 2\pi k/N$ will be the DFT Samples $X[k]$ for $k=0,1,...


1

It is the error with respect to size of jump. It has nothing to do with error at discontinuity. As per the explanation given, suppose the perfect square is having values $0$ and $1$. Just after the discontinuity of a rise time, the perfect square would take value $1$, while the reconstructed wave would take the value $1.09$ at the peak of overshoot. Here the ...


0

It works because the signals are complex. If they were real (actually a sum of two complex signals each) it would not. With a pure complex tone, as you sweep the frequency up it just loops around the DFT bins, no bin more special than another. A confirmation of this is that a phase shift in a pure complex tone will rotate all the DFT bins the same, ...


0

The "DC bin" does not represent DC exclusively, but has also some low frequency energy. How much depends on the fft size and sampling rate. Simple example: if your fft size is 1000 and your sampling rate is 1000Hz, then the dc bin represents frequencies from 0 to 0.5Hz, as the distance between fft bins is 1Hz. So, a phase can be calculated for the DC bin.


0

Moving average filter is a good smoothing filter in time domain but is a bad low pass filter in frequency domain due to slow roll off and bad stop band attenuation. It is important to look at the time and frequency response of the filters before deciding on them.


0

Simply append zeros prior to computing the DFT. The phase result will change based on where you add the zeros (prepend vs postpend vs both) given it can potentially time shift the waveform but the amplitude result in exactly identical to samples of the DTFT. Note the difference between the DTFT and DFT below: DTFT $$X(\omega) = \sum_{n=-\infty}^{\infty}x[...


0

1) Is this a theoretically accepted method to smooth data in DFT domain or only applies in time domain ? Sort of. It certainly can be done this way. Doing it directly in the DFT (instead of the PSD) is risky since it's a complex number you can get a lot of cancellation if the phase is fluctuating a lot. You also need to decide how you manage the "edges": ...


0

This would be trivial to do as simple decimation where each block increments its samples by $n+4$ with each block starting at sample 0,1,2,3 respectively. This is common with polyphase filter implementation and similar techniques to reduce the overall clock rate requirement for the processing (parallel processing). For more details on both of those ...


5

Well this goes to show that Fourier series is just approximation that gets more and more correct when you add more harmonics. Take a look at this: $\dfrac{4\sin\theta}{\pi}$ is just first harmonic. Harmonics are integer multiple of base frequency as you can see: $\sin3\theta$, $\sin5\theta$ etc. And the more of them you add to the first harmonic the more ...


4

The only signal, that really has just one frequency component, is an infinite sine signal. Limiting the signal duration in any way is bound to produce other frequency components, as time limiting can be thought of as multiplying with a rectangle window, which translates to convolution with an si-function in the frequency domain, thus introducing new ...


1

The second term can be expanded to $$\begin{align} 2|a_k|\left(\frac{ e^{i(2\pi f_k t+\angle a_k)} + e^{-i(2\pi f_k t+\angle a_k)}}{2}\right) &= |a_k|e^{i\angle a_k}e^{i(2\pi f_k t)}+|a_k|e^{-i\angle a_k}e^{-i(2\pi f_k t)} \\ &= a_k e^{i(2\pi f_k t)}+a_k^*e^{-i(2\pi f_k t)} \\ \end{align}$$ Since $a_k=|a_k|e^{i\angle a_k}$ and $a_k^*=|a_k|e^{-i\...


2

Simple: Euler's formula: $$ e^{i\theta} = \cos(\theta) + i \sin(\theta) $$ and $$ e^{-i\theta} = \cos(\theta) - i \sin(\theta) $$ Add them together: $$ e^{i\theta} + e^{-i\theta} = 2 \cos(\theta) $$ You should see that in your equation. From there it is usually stated: $$ \cos(\theta) = \frac{ e^{i\theta} + e^{-i\theta}}{ 2 } $$ See my article The ...


0

You could use the Cumulative sum algorithm (CUSUM) https://en.wikipedia.org/wiki/CUSUM Usually, one uses it to detect a change in the mean (upwards or downwards). The advantage is that if the change is spread over multiple samples, it is possible to detect it. The typical algorithm only detects change in one direction, but is easy to adapt it to detect ...


1

You can use various methods to interpolate the channel - Linear, Polynomial, Sinc Interpolation etc. But what you need to keep in mind is synchronization. You have to make sure that frequency and timing offsets are eliminated or accounted for. Otherwise you will see an error floor in the Channel Estimation Error. Means your Mean Square Error (MSE) for ...


2

The trigonometric functions are essentially exponential. Thus, a doubling of the argument corresponds to a squaring of the function (in a sense). In this case, it can be seen by applying the angle addition formula: $$ \begin{aligned} \cos( 2\theta ) &= \cos( \theta + \theta ) \\ &= \cos(\theta)\cos(\theta) - \sin(\theta)\sin(\theta) \\ &= \cos^...


2

If it helps any, generate a unit amplitude sinewave at 1 Hz and its square: Then the sinewave and its square look like this: You can see the DC component: the averaged value of the squared sinewave (averaged over an integer number of periods) is 1/2. And the red sinewave frequency is exactly doubled, so the period is halved. The DC and doubled frequency ...


3

This seems like more of a semantics problem. A signal is periodic with time $T$ if $$x(t+n\cdot T) = x(t), n \in \mathbb{Z}$$ So the signal is periodic in $0.5$ since the for $T = 0.5 \cdot n$ the argument of the cosine is an integer multiple of $2 \pi$. Since it's periodic in $0.5$ it's also periodic in all integer multiples of $0.5$, i.e $1$, $1.5$, $2$...


0

This is a classical deconvolution problem in that your received signal consists of multiple delayed and scaled copies of your transmitted signal, no different than what could be modeled with an FIR filter (which is the sum of delayed and scaled copies of the input signal), and your goal is to reconstruct the original transmitted signal from the received ...


1

I think the accepted answer is not quite strong enough to state the real problem: If you don't up-sample you run the risk of significant aliasing. Let's look at a simple example: sample rate of 25.6 kHz and a strong signal component at 11.5kHz. If you just square it you end up with a component at DC (which is representative of the average energy) and ...


2

The only reason I can think of may be to preserve the frequencies over which original signal had spectrum (before squaring). When you square a signal $x[n]$, whose spectrum $X(e^{j\omega})$ extends from $-\omega_0 \le \omega \le \omega_0$, you are multiplying by itself. So in frequency domain, the effect is to (periodically) convolve $X(e^{j\omega})$ by ...


1

Yes, the Doppler effect applies to any electromagnetic wave. No matter whether that is an actual Radar pulse, or a microwave oven falling from an office tower, or a passenger aircraft's transponder, or an LPWAN device. But, this possibility is especially limited for LPWAN devices, as I'll explain below. Low Doppler shift due to low carrier frequency The ...


1

Yes I would suggest to use resample_poly in scipy. When doing upsampling, you would get artefacts outside 12.8kHz, which you would remove via Low Pass Filtering. This is what is done by scipy.signal.resample_poly. You can enter the upsampling factor value as 36k/25.8k = 1.39534, and downsampling factor = 1. In the above method while doing low pass filtering,...


0

I suggest monitoring the phase versus time directly instead of frequency. Frequency is the derivative of phase so the slope of the phase would indicate the frequency. Detrend the phase slope for the starting frequency and then the point in time where the phase starts to ramp up should be easier to detect. The window in which to detect this change will be ...


2

The same effect will happen on the time-domain sequence too, due to the fact that DFT time and frequency domains are exact duals apart from a scaling factor and reversal. Therefore, by properly zero padding (to the center of) the FFT data, the corresponding time-domain signal will be interpolated; i.e., more samples from the same signal will be obtained.


0

Ok sorry, i will give you more details: in the picture there are the signals that I created as a result of the propagation of the gaussian signals I described above. Figure 4 and 5 are the xcorr and the GCC calculated adding an awgn to the signals. On the lower right you can see the different taus obtained with noisy signals and non-noisy signals: -tau_ab ...


1

This is inspired by the excellent answer by @Richard Lyons (which I upvoted) and the comment by @DSP Novice. It basically combines what they said. If the width of the 5000-amplitude pulse is always the same, then simply do as Richard Lyons suggested: it works fine. If the width varies, then the following scheme could be used: I imported your raw data and ...


1

Is the width of your 5000-amplitude pulse always the same? If so, then just discard your signal samples that occur after seven seconds. If the width of your 5000-amplitude pulse varies then try lowpass filtering (experimenting with different lowpass filter bandwidths) your signal to see if the filtered signal contains the information you desire. If the width ...


0

Is it possible to get the frequency of sine wave(100Hz) and sampling rate (1kHz) from the PCM data that I received. You will need to know either the frequency of the sine wave or the sampling rate. A digital signal is just a sequence of numbers. A 100 Hz sine wave sampled at 1 kHz looks identical to a 113 Hz wave sampled at 1.13 kHz. It's a sine with 10 ...


2

So, I myself have taught based on material that uses that scheme, "P/S" and "S/P" after and before the transforms. Personally, it's nonsense. What the author tries to say is: The IFFT is a mapping of sample vectors to vectors. So, you need a vector as input, not a stream of samples. What they instead say is: We use the terminology from very basic ...


0

Cleanliness of the eye pattern sample point is also used for symbol synchronization for NDA timing recovery. My communications book essentially ignored this, I don't know why. But carrier and symbol synchronization seems to be completely ignored in many newer digital communications texts.


0

When considering a transceiver system, if we do a certain filtering operation on the signal, will the BER of the system be affected? Yes it does. The whole of equalization concept in digital communication is to mitigate the effect of transmit signal getting filtered by channel (which includes right from the Transmit chain components, the communication ...


1

OP here. (Looks like I changed my name from Oscar to Jerry.) Sorry for letting this go for so long. The correct answer to my question is that the use of the naked delta—including under non-limiting integrals—is a shorthand. Whenever you see a naked delta, you may replace it with some suitable limiting integral of a unit-area function that tends to zero ...


2

If your signal is an analytical signal, then envelope(real(X)) would simply be your answer. This would be identical to using the Hilbert transform to extract the Quadrature part of the signal from the Inphase part. If your signal is not analytical, your envelope would simply be: $$G = \sqrt{I^2 + Q^2} $$


0

What is the link between them? Power should not be function of frequency (it is the integral on all frequencies of power spectral density) As far as a Spectrum Analyzer is concerned, to display the power spectrum in dBm, what it does it to take the FFT and compute square of magnitude $P_n = 20 \times log_{10}(|X(f_n)|^2*1000/100)$ with $f_n$ being the ...


0

In addition to the resolution bandwidth fact, i think power spectral density has something to do with stochastic signals. If your signal is predetermined, you have to work with power instead of power spectral density. One good example is the very sine wave you mentioned. The mean power for that signal in its main frequency can be defined using the integral ...


3

@Hustler. Hi. I suggest you use all 48000 vibration samples. As a general rule: In mathematical analysis of measured data it's preferred that you use all available data to estimate some physical quantity. If you perform 48000-point DFTs (discrete Fourier transforms) your first DFT bin frequency will be zero Hz and your DFT bin spacing will be (as jithin said)...


4

It is the objective of the receiver to make the best estimate for each symbol as to what was transmitted. This is often done by ultimately determining a decision time in each sample (through timing recovery) on the waveform after it has been processed by the receiver (equalization and matched filtering) in which to sample the waveform and make a decision as ...


1

For 3840 points, the frequency resolution between each bin is 48k/3840 = 12.5Hz. Hence you should see 2 peaks at bin 1 (corresponding to 12.5Hz) and bin 3838 (corresponding to -12.5Hz since this is a real signal). If you use 48000 points, resolution of each bin is 1Hz. Now, 48000 points cannot be represented as integer multiple of 3840 points (which ...


1

Here is it ... install pyaudo to play the generated sine signal, install numpy to help you with arrays and math, install matplotlib to plot ... I wrote this code quickly just to show how to do... some steps are commented in the code, this will play one generated signal in the choose frequency, concatenate all vectors signals and play using pyaudio at the ...


3

It is common in DSP practice to define some convenient center for a filter as being at time 0, even though we cannot build non-causal systems in practice. You see this most when you're designing a symmetrical filter, and you define t = 0 as the filter center, but it happens elsewhere. You do this because it makes the analysis easier, and you justify it by ...


Top 50 recent answers are included