New answers tagged

0

I learned the answer! Because this noise is white noise, we need an average filter in the time domain as a pre-filtering method. For my scenario, the receiver calculates I_P and Q_P values in an interval of 1 ms and sends the values to the discriminator. Because of the white noise, NCO is updated by the noisy values coming from the discriminator in each 1 ms ...


0

Assuming that the system response is smooth, without narrow peaks or narrow valeys. And that the spectrum of the input signal does not vary so much from one chunk to another. I think this approach is better than doing a single FFT, as you know the FFT of a random signal will have lots of randomness. Averaging may also remove effects due to quantization ...


0

I created a MATLAB function which is basically conv2() in Frequency Domain: function [ mO ] = ImageConvFrequencyDomain( mI, mH, convShape ) % ----------------------------------------------------------------------------------------------- % % [ mO ] = ImageConvFrequencyDomain( mI, mH, convShape ) % Applies Image Convolution in the Frequency Domain. % Input: % ...


1

As already said by @ZR Han, the strong 0 Hz content or DC (direct current) indicates a potential offset with strong energy in the signal. Elsewhere, the first spectrogram does not show a lot for variations, as if the signal were very stationary. Another quite stationary content is the steady frequency around 0.22 Hz. Hence, if a significant part of the ...


1

Since I don't have your original data, I'm going to give the answer from my intuition. Try Hann window function and 50% overlap and see what happens. I have tried a human voice signal as input and whether zero-padding is applied doesn't change the results. % signal = ... winsize = 512; win = hann(winsize, 'periodic'); % use hann window instead of rectangular ...


2

The function butter, as the name indicates, is used to construct the Butterworth IIR filter. The function designfilt can be used to design the Butterworth filter as well, but you can design the other type filters with this function. What type filter you need depends on your application. For example, the Butterworth filter rolls off more slowly around the ...


1

Your field data is real (as in "not complex") and hence your spectrum is conjugate symmetric. fftshift() rotates the spectrum so that 0 Hz is in the middle of the vector. Your x-axis on the plot should be fs*[-nFFT/2:nFFT/2-1]/nFFT; where $nFFT$ is the FFT length and $fs$ is the sampling rate. Remember that time discrete signals are periodic in ...


1

Now that the OP has clarified in the comments that this is an IF file for beginners I understand the issue. The point is to not be able to demodulate or recognize the individual chips of the GPS PRN sequence, in fact in typical application the received signal on the surface of the earth can typically be -20 dB SNR (pre-correlation) meaning it is 100x lower ...


3

Maybe that's a just a matter of semantics. You can certainly cascade an even order high pass with an odd order lowpass and you get something that's an odd order filter that sure looks like a bandpass. %% odd order bandpass fs = 44100; fc = 1000; [z,p,k] = butter(2,fc/sqrt(2)/fs*2,'high'); sos = zp2sos(z,p,k); [z,p,k] = butter(3,fc*sqrt(2)/fs*2); sos = [sos; ...


5

In principle there is no reason why the filter order of a general bandpass or bandstop filter must be even. Such a restriction is a consequence of a specific design procedure. In classic IIR filter design (Butterworth, Chebyshev, Cauer) you start with an analog prototype lowpass filter. Bandpass or bandstop filters are then obtained by a frequency ...


3

I believe your thinking is correct. For bandpass filters, for each z-plane pole in the positive-frequency range there's a conjugate pole in the z-plane's negative-frequency range. So for bandpass filters there will all be an even number of total z-plane poles (two poles, four poles, six poles, etc.). When using MATLAB's ellipord command for bandpass filters ...


4

This must be an artifact of the implementation for the hilbert function, in that any implementation of finite length will have a finite ripple. It doesn't appear the underlying filter using in the hilbert function can be modified, so there are three suggestions to obtain a smoothed demodulated result: Method 1: Implement the Hilbert using the FFT: take the ...


1

To be clear, the FFT provides the result of the individual frequencies as weighted complex exponential frequencies, meaning the coefficients of $e^{j\omega t}$ not to be confused with our typical first introduction of "frequency" as periods of $\cos(\omega t)$ or $\sin(\omega t)$. Once put to practice the exponential form is MUCH more intuitive for ...


1

Can you advise: What is the sample interval What did you use to calculate the spectrum. Edit 2: The top one looks right, plotting from 0 Hz to 2*Nyquist. Not sure how you calculated the spectrum, but this may be the convention with that package. If you prefer to present the spetrum from -ve Nyq to +ve Nyq you can't just plot the same results with new axes. ...


1

I'd recommend using a median filter to smooth your signal. A median filter will get rid of the outliers, or the spikes in your signal. The length of the median filter will have to be determined by how frequently the spikes appear in your signal. The median filter is available in Python as numpy.median. If you want to retrieve the spikes (the interference ...


2

Please refer to Parseval's theorem. If your impulse response is $h(n)$ and its DFT is $H(k)$, then $$\sum_{n=0}^{N-1} |h(n)|^2 = \frac{1}{N} \sum_{k=0}^{N-1} |H(k)|^2 $$ So the square root of the sum of the amplitudes in the frequency domain, divided by the number of points in the DFT should give you the RMS. It is common practice to calculate RMS on a ...


1

Non-Uniformity Correction often refers to the notion that, all things being equal (with respect to the object observed), the actual pixel value may be affected by bias (offset) and noise (deviation around the offset). When all offsets and noise powers are (almost) constant across the pictures in space and time, then one can treat pixels equally. If not, ...


2

Usually it means the variance within a window of pixels where the (i, j) pixel is in its center: In the above you can see a 3 x 3 window (Radius of 1). You'd calculate the variance in this window and set its value to the location of the Pij pixel.


1

That's because Matlab preforms FFT, the formula that you referred to is the FT of your signal, the difference between the two can be derived by convolving the DTFT (which has the same form of the FT) with the sinc function, which in your case is close to a delta function. For that reason you get a slight different frequancy domain from the theory you would ...


0

For spectrogram similarity, I suggest using a metric from image processing known as SSIM - Structural Similarity Index Metric. It is a quantity between $[0,1]$ which denotes the similarity between two images. The paper describing SSIM can be found here, and the MATLAB function ssimval will give you the metric.


0

I know it is a bit late, but i had the SAME issue as you today. But from what you showed, i may got the solution similar to Matlab. I don't know if it is the right answer but you could tell me in a future! Just to complement what you have already said, in the matlab documentation for the function, we have: stopband attenuation of 60 dB. I did some changes ...


0

unbuffer in Python; helpful post. Nice visuals in MATLAB docs (bottom).


0

I deleted a previous attempt using a approach with the single lead compensator and provide this alternative solution below. The root locus shows all closed loop pole locations, which follow the root locus trajectories as the loop gain is adjusted. From that we can choose closed loop pole locations that meet our requirements for settling time, loop bandwidth, ...


0

import numpy as np pi = np.pi freq = np.arange(-pi,pi,(2*pi)/len(value))


2

Generate random integer uniformly distributed between 1 or 2. Then you can shift it to your liking. X=randi(2,size,1)-1


1

Whenever one has data to analyze, a first thing to do is to visualize it in different shapes: time series, histograms, etc. From this observation, you can imagine the DSP tools you can use to model, estimate, predict feature about your signal. Here, we only have a vector of values. No time stamp, so we don't know whether the signal is properly sampled, ...


1

Given the symmetric coefficients and that the plot is similar to a Sinc function, The "signal" appears to be the coefficients of a linear-phase low pass FIR filter (Since the FT of a Sinc is a rectangular pulse, and the coefficients of the filter are samples of the impulse response, and the FT of the impulse response is the frequency response- so ...


2

If the values for each sample of $n(t)$ are given, then the mean and variance can be estimated using the equations for sample mean and sample variance, which is trivial so I assume the OP is only given that it is Gaussian-distributed with average power of 5 mW. From that alone, there is no way to know what the mean of the signal is since it hasn't been ...


1

The easiest way would be y = prod(G)*sosfilt(SOS,x); An alternative would be put to the cumulative gain into the first section. sosScaled = SOS; sosScaled(1,1:3) = sosScaled(1,1:3)*prod(G); y = sosfilt(sosScaled,x);


1

The histogram is a good numerical estimate for the PDF sampled a the bin centers. Just scale it so that the sum over all bins is 1. The quality of the estimate depends on number of samples and "good" choice of the bins. The latter one is a trade off: smaller bins give you better amplitude resolution and wider bins make the PDF in each band more ...


2

A signal that's discrete in frequency is periodic in time. By using an FFT you inherently make this assumption and the FFT calculates the spectrum of a signal that's infinitely repeated in time. The FFT is ONLY real valued if the time domain signal has even symmetry, i.e. $x(-t) = x(t)$. For a discrete periodic signal of period N this becomes $x[n] = x[N-n]$....


0

Relevant visual, and on FFT meaning. If you append a zero to a perfect cosine, you increase lengths of all FFT bases (real cosines, imag sines) by 1, so none of them perfectly correlate (multiply & sum) with the original cosine. Need extra frequencies (with intermediate phases, achieved by imag in FFT) to compensate.


0

When you want to simulate / visualise the frequency spectrum of a continuous-time signal (such as your $y = \sin(\omega t)$) using a digital computer, you first sample the continuous-time signal with an appropriate sampling-rate, then you apply a window to the resulting discrete-time sequence (say $y[n]$ in this case) so as to get a finite length block out ...


1

Following your edit, the first challenge in creating a controller is the task to create a stabilizing controller. After that, performance can be tuned. In order to find if the created controller stabilizes the closed-loop, the nyquist plot can be used. The nyquist stability criterion states that the amount of encirclements of the point -1 (hereby are counter-...


1

I'm a bit puzzled with your Bode plot, here's what I get with your transfer function and Matlab 2019b. My phase starts at almost -180 degrees while yours start at 0 degree. Is it possible that you've made a mistake somewhere in your analysis? Your transfer function is a bit complex, you could simplify it by removing the fast poles and zeroes. For example, ...


1

The assumption here is the sine wave being samples is a known and assumed accurate reference, and the sampling rate is the unknown. An algorithm that utilizes every sample with equal weight would provide for the best estimate assuming a white noise process. The approach the OP uses, and any similar "edge-detection" methods where we are making a ...


0

If $\omega$ is a vector with all the discrete elements $\omega_{j}$ over the descrete time steps $dt$ the correct formula would be dt*cumtrapz(omega); which is the same as cumtrapz(dt,omega) or alternatively if $dt$ isn't constant but $t$ is a vector with evaluation positions Omega=cumtrapz(t,omega,2). The "2" is needed to indicate that the 2nd ...


1

The filter is a discrete FIR filter, so the transfer function would be given as: $$H(z) = .0287 + 0.1430z^{-1} + 0.3283z^{-2} + 0.3283z^{-3}+0.1430z^{-4}+0.0287z^{-5}$$ With the frequency response given by using the unit circle for the complex variable $z$, as in $z = e^{j\omega}$ for $\omega \in [0, 2\pi)$, with the sampling rate normalized to $\omega = 2\...


1

You have 2 right-half plane zeroes : 0.012 and 18. The zero at +18 is "fast" and will not affect the performance much, but your slow zero at 0.012 will severely limit your performance. You can't cancel this right-half plane zero with a right-half plane pole in your controller, your controller output will be unbounded. Is this homework or a real ...


0

Is my thought process correct? No. Frequency domain filtering is difficult and even if you get it right, I sincerely doubt that low-pass filtering will solve your problem Your data is very noisy. I looks like there are two noise sources: one with a "quantization" step of about 20 plus some smaller noise overlaid. Hard to tell without further ...


0

Due to the harsh volatility of the data, I need to perform fft to transfer my time series to the frequency domain, select a cutoff point to remove all the noise and then transfer back to the time domain. Is my thought process correct? You want to do the right thing, but the way you're approaching it is not good: FFT'ing data and then cutting off stuff leads ...


Top 50 recent answers are included