New answers tagged

1

This is the classical sampling theorem. When you sample a continuous signal $x(t)$, you are basically multiplying it by a sample train $s(t) = \sum_{-\infty}^{+\infty}\delta(t-kT_s)$, the value at consecutive $T_s$ being your samples. In frequency domain, it effect is to convolve $X(\omega)$ and $S(\omega)$ $$S(\omega) = \sum_{-\infty}^{+\infty}\delta(\...


0

The wavelet function is preset and continuous signal defined in a time interval from 0 to N-1. The characteristics of this function is to be continuous (defined in any point). Important to remember that the function is applied with the convolution to your signal. Then, the concept of linearity refers to, by definition, means that the output follows a ...


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" ...


3

By default MATLAB uses linear interpolation when creating line plots, which means it simply draws a line from each point to each point, unless there are more points than pixels in which case each point or group of points within each pixel would represent each pixel shown. Compare the following to see this: This plots a line from x,y=1,2 to x,y= 5,7 plot([...


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'...


0

I will try to answer your part of your question based on experience. Since, non ideal signals will contain noise you will have to remove it to some extent. For this you have two approaches: Moving Average filter= y[n] = $\frac{1}L\sum_{k=0}^{L-1}x[n-k]$ , where L is the window size of the filter, note that moving average filter is a comb filter and will ...


2

Your understanding is correct and you can apply Hann windowing on discrete signals. The choice of your window depends on how easily you can visually resolve two sinusoids that are closely spaced in the spectrogram. $$STFT = X(m,\omega) = \sum_{n=-\infty}^{n=+\infty}x_nw_{n-mL}e^{-j\omega n}, $$ where $L$ is the step size of spectrogram (interval after which ...


1

To answer your question, we need to understand DTFT as change of basis of the vector $x[n]$. Lets first agree that DTFT of an infinite length sequence $x[n]$ will be defined only if the DTFT sum converges which means : $X(e^{jw}) = \sum^{\infty}_{-\infty} x[n].e^{-j\omega n}$ must converge and be finite. This happens for all square summable sequences, i.e. ...


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,...


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": ...


1

For the 1-d case, I think that conv() is implemented in the direct domain while xcorr is implemented in the frequency domain. This indicates that conv will be faster for small kernels, while xcorr will be faster when inputs are equal size. I dont know if this still is the case, and if it extends to the 2-d case. Operations that allows for native single-...


1

If you substitute your second equation back into the first equation, you obtain $$\begin{align}\sum_{k=0}^{N}a_k\sum_{m=1}^NA_mz_m^{n-k}&=\sum_{m=1}^NA_mz_m^n\sum_{k=0}^Na_kz_m^{-k}\end{align}\tag{1}$$ If $z_m$ are zeros of the polynomial $$A(z)=\sum_{k=0}^Na_kz^{-k}\tag{2}$$ then Eq. $(1)$ equals zero, as required for the homogenous solution.


0

For a term $\frac{1}{1-az^{-1}}$ it can either be $a^nu[n]$ with Region of Convergence(ROC) $|z| \gt |a|$ OR $-a^nu[-n-1]$ with ROC $|z| \lt |a|$. Since your input and output are both stable, your $h[n]$ is also stable. If you see its original form of $\frac{1-2z^{-1}}{1-\frac{3}{4}z^{-1}}$, it has pole at $z=3/4$, it's ROC is $|z| \gt 3/4$ so that the ...


0

$H(z) = \frac{Y(z)}{X(z)} = \frac{\frac{-\frac{3}{2}z^{-1}}{(1-\frac{1}{2}z^{-1})(1-\frac{3}{4}z^{-1})}}{\frac{-\frac{3}{2}z^{-1}}{(1-\frac{1}{2}z^{-1})(1-2z^{-1})}} = \frac{1-2z^{-1}}{1-\frac{3}{4}z^{-1}}$ $H(z)= \frac{1}{1-\frac{3}{4}z^{-1}}-\frac{2z^{-1}}{1-\frac{3}{4}z^{-1}}$ $h[n] = (\frac{3}{4})^nu[n] - 2*(\frac{3}{4})^{n-1}u[n-1]$ Since $z^{-1}$(...


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 ...


1

The problem with your code is that you need to get the indexing and time gating right. Matlab represents the frequencies in the FFT vector somewhat out of order , i.e. from $[0,N-1]$ instead of $[-N/2+1,N/2]. Once you rotate them so that DC is in the center and grab the correct frequencies after convolution, this does indeed work. %% Create two signals n = ...


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 ...


3

Let's assume you have 2 signals: vX and vY. So: clear(); numSamplesX = length(vX); numSamplesY = length(vY); numSamplesConv = numSamplesX + numSamplesY - 1; vTimeDomainConv = conv(vX, vY); vFrequencyDomainConv = ifft(fft(vX, numSamplesConv) .* fft(vY, numSamplesConv), 'symmetric'); max(abs(vTimeDomainConv - vFrequencyDomainConv)) %<! Should be < ...


0

Maybe you should average your FFT over time to enhance you signal's SNR, you may then be able to see a spectrum that fits your expectations. It also seems that your signal is filtered around 420 Hz. Unless this is your initial signal's bandwidth, your filtering may not have been applied correctly.


1

If your description is correct, you are seeing noise. After step 1, everything above 2 kHz should be gone. After your band-bass everything below 8750 Hz is gone, so you basically end up with a null set. Since your filters are not infinitely steep there is still something non-zero left over but it's mostly going to be noise and very poorly defined. ...


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,...


1

My personal point of view: what matters much more than the distribution is the second-order statistics of the channel. In particular things like delay spread / coherence bandwidth and Doppler spread / coherence time. These parameters tell you a thing or two that you must take into account when estimating your channels: The coherence bandwidth (roughly equal ...


0

How to evaluate DFT for a sequence extending from n=2 to say n=N+1? Formularistic: trivial variable substitution of the running variable $n$ by $\tilde n = n+2$, done. Looking at it as a signal: When doing an DFT, it helps to think of it simply as mapping of $\mathbb C^N\mapsto\mathbb C^N$, i.e. a complex vector goes in, same size complex vector comes out....


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.


2

Here is a hint that will help you: The DFT is cyclical in time and in frequency. For the sequence given by $$x(n) = [-1,2,-3,2,-1]$$ With x(0) = -3 would be solved using the standard DFT equation that starts at n=0 using $$x(n) = [-3, 2, -1,-1, 2]$$ From that you can solve for the DFT and then determine easily for each result what it's phase is.


0

Do you know Calculus? All those shapes correspond to bounded values over an interval of the function or its first and second derivatives. There are many ways to approximate derivatives in discrete sequences. You can design a metric for each of your conditions based on the derivatives, then evaluate those metrics on a sliding basis. 1) A step occurs when ...


1

Spectrogram contains magnitude values only, that explains why the values start at 0 instead of some negative value. And scipy seems to calculate it with 24bit accuracy, where $2^{24}\approx 16.7\cdot10^6$.


0

A first comment is that the situation you describe can be mixed. A bowl shape can happen "during" a wide upward line. This questions the scale of the shape with respect to the size of the window. A second comment is that your situations don't describe all possible situations. There might be at least a last "trash" or "underdetermined" situation (every other ...


3

Have you considered trying a constant jerk model as opposed to a constant acceleration model? Perhaps a higher order model would capture the acceleration better. See, for instance: K. Mehrotra and P. R. Mahapatra, "A jerk model for tracking highly maneuvering targets," in IEEE Transactions on Aerospace and Electronic Systems, vol. 33, no. 4, pp. 1094-1105, ...


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

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

Watch after 30mins... above question is addressed. Consider: $$ A_{4} (z) = 1 + h_1 z^{-1} + h_2 z^{-2} + h_1 z^{-3} + z^ {-4}$$ $$ A_4 (z) = A_3 (z) + k_4 * B_3 (z)$$ $$ A_4 (z) = A_3 (z) + k_4 * z^ {-4} (A_3 (z^ {-1})) $$ Try to break $A_4(z)$ into two equal halves: $$ A_4 (z) = (1 + h_1 z^ {-1} + \frac{h_2}{2} z^ {-2} ) + z^ {-4} (...


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 ...


3

Actual channels are always causal (like everything else in the physical universe). Actual (discrete-time) channels also sometimes have one tap that is considerably larger than the rest; an example impulse response would be h = [0.1, 1.5, 0.2]. Some authors prefer to define h[0] as the largest tap; in my example, we'd have h[-1] = 0.1, h[0] = 1.5, and h[1] = ...


2

It is a bit to wrap your head around. Mathematically, if you denote the z transform as $X(z) = \mathcal{Z}\left \lbrace x_k\right \rbrace$, then when you take the transform of $x_k$ after it's been delayed by one sample you get $\mathcal{Z}\left \lbrace x_{k-1}\right \rbrace = z^{-1}X(z)$. Except in strange corner cases* this always works, and you don't ...


0

If we focus on finite-duration impulse response filters and apply the MSE criterion to optimize the coefficients of the feedback and feedforward filters. The equalizer output can be expressed as: \begin{equation}\hat{I}_{k}=\sum_{j=-K_{1}}^{0} c_{j} v_{k-j}+\sum_{j=1}^{K_{2}} c_{j} \tilde{I}_{k-j}\end{equation} where $\hat{I}_{k}$ is an estimate of the $k$...


1

The Z-transform, defined as $$X(z) = \sum_{n=-\infty}^{+\infty}x[n]z^{-n}$$ expresses a discrete time signal as a sum of complex exponential signals $z^{-n}$, with non unitary amplitudes, that is $$z = re^{j\omega}, \: \: r \in \Re_+$$ Just to compare with, the Discrete Time Fourier Transform (DTFT) expresses a discrete time signal as a sum of complex ...


0

Yes, they are the same. Let us take the linear convolution of $x[t]$ and $y[t]$ as 2 portions $H_1$ of length $N$ corresponding to first $N$ samples, and $H_2$ of remaining $N-1$ samples. Circular convolution between $x$ and $y$ causes $H_2$ to overlap over $H_1$ because of time-aliasing. So the first $N-1$ samples of the result is $H_1 + H_2$ with only the ...


0

I think the question as is, is unanswerable, but here I am making an attempt of correct it with these comments as answer. Should I upsample before or after rectifying? For the algorithm, if you are finally assessing against a threshold in magnitude, you should not care about down|upsampling. Do not add that. Does this process look correct? Strictly ...


1

Circular convolution is basically linear convolution with aliasing. The circular convolution calculated at a sample number that does not involve wrap around values of the signal and are calculated within the one period of both signals might have the same value as the linear convolution.


1

Lot of good comments and a nice answer but still I felt OP's question may have gone unanswered. A is length 100 sequence, B is length 80 sequence. So conv(A,B) linear convolution operation results in a 179 length sequence. The important thing to keep in mind is that the resulting sequence is 179 length. Now, coming to DFT of these sequences (remember FFT ...


0

$|H(e^{j2\pi f_k/f_s})|$ for $f_k = k f_s/N$ = $|H(z)|_{z=e^{j\omega_0}}$. When you compute this, you are computing the value of $Z$ transform at $z = 1e^{j\omega_0 }$, where $\omega_0 = 2\pi k/N $. For magnitude, $|H(z)| = \frac{|B(z)|}{|A(z)|}$. Hence $H(e^{j\omega_0}) = \frac{|B(e^{j\omega_0})|}{|A(e^{j\omega_0})|}$ = $\frac{\tilde{B(k)}}{\tilde{A(k)}}$...


1

the following matlab/octave code gives the linear convolution result using frequency domain : A = ((-1).^[0:79]').*hamming(80); % input one B = blackman(100); % input two C1 = conv(A,B); % A * B (convolution) in time domain C2 = real( ifft( fft(A,179).*fft(B,179) ) ); % convolution using freq domain The output will be identical of length 179 ...


Top 50 recent answers are included