Hot answers tagged

3

You should use freqs instead of freqz.


3

The way I understand the problem is each sample of the output is a linear combination of the samples of the input. Hence it is modeled by: $$ \boldsymbol{y} = H \boldsymbol{x} $$ Where the $ i $ -th row of $ H $ is basically the instantaneous kernel of the $ i $ -th sample of $ \boldsymbol{y} $. The problem above is highly ill poised. In the classic ...


3

I have no access to your audio files so I've downloaded: IR from here (mono/r1_omni.wav) - it's a really long one Anechoic recording from here (operatic-voice/mono/singing.wav) Resampled voice signals: Final convolved signal: As for your questions: 1. As you did the plot of IR in logarithmic scale it's clearly visible that towards its end there is ...


2

Your problem is here, as Yiftah also pointed out: % Analog filter design: [b,a] = afd_butt(Wp,Ws,Rp,As) freqz(b,a) The a and b are not vectors of IIR filter coefficients or z-domain polynomials, they are s-domain polynomials. The code above uses the analog prototypes to calculate the s-domain polynomials. The name of the section also hints at it: 8.3. ...


2

Yes and no. In principle, you can use the peak of your correlation function. However, it is not at 10000. The correlation function is symmetric around 0, so your peak is actually much closer to zero than you think. This is one of the reasons why xcorr returns two paramters, one for the lags at which the function is calculated. The correct way of plotting the ...


2

As specified in documentation, using 'ParityCheckMatrix' you can configure the Parity Check Matrix (PCM) during the constructions of the encoder/decoder objects. The syntax is encoder = comm.LDPCEncoder('ParityCheckMatrix',pcm) or simply encoder = comm.LDPCEncoder(pcm); where pcm is the desired PCM which must be sparse type. An example for (probably poor ...


2

Fat32's answer is correct and shows a common pitfall. The reason that you must do this is because recall that the output of the autocorrelation of a signal of length $N$ is $2N - 1$. You were performing the FFT with the original sample size of $N = 1000$, effectively destroying necessary information to retrieve the autocorrelation of size $2N - 1 = 1999$.


2

Your code works fine. But for the sake of demonstration clarity, just get rid of all the fftshift functions and change your frequency range too. The main problem is that you should use FFT sizes when calling fft() functions, which by default uses signal length as FFT size which was the problem you faced on the following line : ### Energy Spectral Density ...


2

The second way is how it is done. In the fast-time (or range-bin dimension) you are right to perform the matched filter. However, Doppler information is gathered from sampling pulse-to-pulse. The MTI filter essentially subtracts pulses so that if they have similar phase, or the phase is not changing at all, then there is little to no Doppler being generated ...


2

Is there any possibility to implement a speech recognition integrated with google voice that converts speechs in text in GNU Octave? Yes. The Google Cloud command line utility returns results in JSON. Octave is working on its JSON support, but until then you can use something like this. What we are missing now is triggering the whole process from within ...


2

Cutoff frequency for a discrete time filter can be expressed in different ways. It can be expressed in radians, which is mathematically useful when analyzing the transfer function in the z-domain. It can be expressed normalized to the sample rate, as it is here, which is handy because it is a simple number to work with and is not dependent on the sample ...


1

Method1: w = w([(end/2+1):end 1:end/2]); Method#2: w = circshift(w, ncol/2);


1

I don't fully understand what the OP means by DQPSK but suspect that he believes that the D in DQPSK stands for "differentially coherent demodulation of" QPSK, that is, DQPSK means differentially-coherent demodulation of a plain vanilla QPSK signal, and that in his terminology, differentially encoded DQPSK is differentially-coherent demodulation of ...


1

If you want to reduce sidelobes and are willing to accept lobe width increase, I'd suggest a Taylor window. Applying it to an image instead of a time-domain signal should not be an issue, so long as it is spatial sidelobes, not temporal ones, that you wish to suppress. Images are just spatial signals, so you can apply this filter in the X and Y dimension of ...


1

Don't quantize the numerator and denominator coefficients of the total transfer function. Use the coefficients of the second-order sections - sos in Matlab - and quantize those. You will usually implement an IIR filter using second-order sections, especially in a fixed-point implementation. The first thing to do is to scale the coefficients of the second-...


1

From the code you can see that they compute the maximum passband ripple by computing the minimum value of the filter's magnitude response in the passband. Similarly, they compute the maximum value of the magnitude response in the stopband, corresponding to the maximum stopband ripple.


1

This is meant as a stepping stone up to Dan's answer. The units for frequency at the sample level are radians per sample. You've got: $$ 400 \frac{cycles}{second} \cdot 2 \pi \frac{radians}{cycle} / 8000 \frac{samples}{second} = \frac{\pi}{10} \frac{radians}{sample} $$ That is your target $\omega_t$. Sound is a real valued signal, so you can model it like ...


1

Bottom Line: $$A <1$$ $$B =2\cos(\omega_n)$$ Where $\omega_n$ is the normalized angular frequency of the desired notch location (in this case for the OP with a sampling rate of 8KHz and notch at 400 Hz this would be $\omega_n = 2\pi400/8000 = \pi/10$), resulting in $B \approx 1.902$ and $A$ is the frequency notch bandwidth parameter; the closer $A$ is to ...


1

You could have added to your question why you doubt the correctness of those numbers. Anyway, the group delay of a moving average is indeed constant. It's just the parameter 'window size' that is off by one. The window size $N$ is the number of taps of the moving average filter, and the group delay is related to the window size by $$\tau_g=\frac{N-1}{2}$$ ...


1

A true moving average would have unity gain coefficients but also be divided by the total number of samples (as per the definition of average). This is trivial since it is just a scaling factor, but if the OP divides the output of the moving average by the total number of samples in the filter then the magnitude response will be normalized to 0 on a dB scale,...


1

For all the reasons above, an oscilloscope is inadequate to this task. Here's a couple of alternatives: Method 1: find someone with a really good spectrum analyzer, and borrow time on it. Method 2: build a really good notch filter (for a one-off you'll want to use analog components, and good ones). Characterize it (I didn't say this would be easy). Then ...


1

As provided pics show, there is no difference between the DC value of input and output signal of the filter i.e. they are both zero. but there is a problem in your filter design and that is, you set the 'FilterOrder' key to 1. I think its better to remove 'FilterOrder' key and its value and let the algorithm choose the smallest filter order for you. As for ...


1

The problem is asking you to find an analytical expression given $x_1[n]$ and $x_2[n]$. There is no need to compute anything, let alone code it up! The problem wants you to identify that given the discrete-time domain functions, you use properties of the DTFT to write $X_2(e^{j\omega})$ in terms of $X_1(e^{j\omega})$. You've already identified that $x_2[n]$ ...


1

As an answer probably require to have more details on the look-up table (smoothed and regularity of the kernels), here is a couple of recent papers, including a review: Satellite image restoration in the context of a spatially varying point spread function, 2010 Efficient shift-variant image restoration using deformable filtering, 2012 Fast Approximations ...


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