# Tag Info

9

As a student I was involved in the same problem as you are. Let me explain to you in the simplest words without any math. Convolution: It is used to convolute two function. May sound redundant but I´ll put an example: You want to convolute (in a non math term to "combine") a unit cell (which can contain anything you want: protein, image, etc) and a ...

7

I can tell you of at least three applications related to audio. Auto-correlation can be used over a changing block (a collection of) many audio samples to find the pitch. Very useful for musical and speech related applications. Cross-correlation is used all the time in hearing research as a model for what the left and ear and the right ear use to figure ...

7

Let $\theta_a$ and $\theta_c$ respectively denote the maximum magnitudes of the off-peak or out-of-phase periodic autocorrelation functions and the periodic crosscorrelation functions of a set of $K$ sequences of length $N$ and energy $\sum_{n=0}^{N-1}|x[n]]|^2 = N$. In a seminal paper published in 1974, Welch proved that $$\max\big(\theta_a, \theta_c\big)\... 7 No. Quoting Wikipedia's article Independence (probability theory): If X and Y are independent random variables, then the expectation operator \operatorname{E} has the property$$\operatorname{E}[X Y] = \operatorname{E}[X]\operatorname{E}[Y].$$Consider your X(t_1) and Y(t_2) as X and Y in this answer. If both \operatorname{E}[X] \ne ... 6 I guess you can compute for each pixel the correlation coefficient between patches centered on this pixel in the two images of interest. Here is an example where I downloaded the figure attached here and tried to compute the correlation in such a way. The output looks different from the one of the article, but it was to be expected since the resolution is ... 6 This is basically what @hooman suggests: fit a parabola to the three points near the peak of the sample cross-correlation of the data. Using the formula for p here:$$ p = \frac{1}{2} \frac{\alpha - \gamma}{\alpha - 2\beta + \gamma} $$where \alpha,\beta, and \gamma are the values of the sample cross-correlation just before the peak, at the peak, and ... 6 You're correct as the Cross Correlation function vanishes. This has the implicit assumption the process has zero mean (Actually, at least one of them). Namely, in order to have  {R}_{XY} \left( \tau \right) = 0  having  X \left( t \right) \perp Y \left( t \right)  isn't enough but at least of them has zero mean (Namely,  \mathbb{E} \left[ X \left( t \... 5 I suppose you mean the cross-correlation at lag zero. Well take an Hilbert space H (i.e. a metric space in which you can define a scalar product \langle\cdot ,\cdot\rangle). Then x,y\in H are orthogonal if \langle x,y\rangle=0, by definition. If your Hilbert Space is L_2(\mathbb{R}) (the space of real square integrable functions) then the scalar ... 5 What are reasons to choose for cross-correlation or cross-covariance when comparing signals with non-zero mean? Well, part of the issue is that cross-correlation as defined in your equation:$$(f \star g)[n]\ \stackrel{\mathrm{def}}{=} \sum_{m=-\infty}^{\infty} f^*[m]\ g[m+n].$$will not exist (or be infinite) if f and g have non-zero mean. So, in ... 5 The general topic of finding similarities between signals is wide ranging: are the signals of same sampling, length, offset, shift or scale? where do they take their values (discrete, real, complex)? are they stationary? noisy? what do you consider similar (whole signals, chunks, specific features)? which are the invariances looked for? and most important:... 5 Lagrange parabolic estimator The standard Lagrange polynomial parabolic interpolation peak finding formula from Peter's answer,$$p = \frac{1}{2} \frac{\alpha - \gamma}{\alpha - 2\beta + \gamma}has bias as function of the true delay d if the cross-correlation peak is that of a critically sampled sinc. If the sampling frequency is increased, the ... 5 The cross-spectral density is in the frequency domain while the cross-correlation function is in the time domain. The two are Fourier Transform pairs, the FT of the cross correlation function is the cross-spectral density. The the two provide the same information, just that one is in the time domain and the other is in the frequency domain. This is just as ... 5 Cross correlation is a measure of similarity between two signals, where one signal is allowed to be time-shifted. In this sense, the correlation is not a single number, but a function of the time shift. We say, "these two signal have a certain correlation R(\Delta) for a time shift \Delta". Intuitively, two signals that tend to have the same sign (both ... 5 As your plot shows, the second form allows for the correlation peak to be negative. Now, what does a strong negative cross correlation mean? It means the signals are very similar, except one has a negative sign in front of it, i.e., x_1 \approx -x_2. Whether or not this makes sense depends a lot on the actual application. In the application you describe, ... 5 Since this is an FIR, the group delay is D=(N-1)/2=20 samples. No, since this is a linear phase (i.e. symmetric or anti-symmetric) filter, the group delay is half the length! (being a FIR isn't sufficient.) The issue is that I get too peaks in the cross correlation, one at zero lag and another at 20 lag. Write down the formula for auto-correlation at ... 4 I suspect your problem occurs due to some scaling issues. Basically you need to normalize your research image to the pattern template by subtracting the mean value of the template. And it is better calculate the ratio of correlation to the standard deviation of both images. I don't know which programming language you are using. I wrote a Matlab code for you ... 4 You're basically doing a bank of hypothesis to find your signal using Matched Filter. Though you use a slightly different method. First of all, you should leave the signal in the time domain and calculate the cross correlation or their multiplication at the frequency domain. Yet, since your signal doesn't have unknown phase (Or delay) multiplication will ... 4 I'm afraid your statement isn't true. This can best be seen in a suitable choice of basis, one that simplifies the cross correlation. This basis if of course the shift invariant periodic Fourier basis on your support interval. Let's label the basis vectors F_n for integer n. The cross correlation of two different such basis vectors vanishes, because the ... 4 This would be a cumbersome way to detect heart beats (or the QRS complex), if that is what you are trying to do ultimately. A little bit about what you are trying to do currently: Your observations are correct and to these I would like to add that no two heart beats are the same and therefore, strictly speaking, your template will be aligning just with ... 4 On closer inspection, I discovered that the erroneous correlation result resembles the correct result, but shifted up and to the left. The former was displayed in scientific format, so it was hard to see the pattern at first. The reason is that taking the conjugate is equivalent to flipping the whole zero-padded kernel, and not just the original kernel (... 4 The function xcorr calculates the correlation of 2 signals. The correlation is known to be a good (The MLE) for delay estimation under Gaussian Noise. Yet, as can be seen in your data you're not using it in the cases it meant to be used. If we assume you have a model of a known signal with Additive White Gaussian Noise (AWGN or any other Additive White ... 4 When using a constant tone audio beacon, beware of room echoes causing multi-path interference and distortion, especially around the leading and trailing portions of your received waveforms. Try using a frequency sweep instead of a constant tone for your transmit waveform. This might provide you with a sharper correlation peak that is less likely to have ... 4 assuming finite power signals: \lVert x \rVert^2 \triangleq \lim_{N \to \infty} \ \frac{1}{2N+1} \sum\limits_{n=-N}^{+N} \big|x[n] \big|^2 \ < +\infty $$this is a Hilbert Space sorta thingie. define inner product:$$ \langle x,y \rangle \triangleq \lim_{N \to \infty} \ \frac{1}{2N+1} \sum\limits_{n=-N}^{+N} x[n] \cdot \overline{y}[n]  where $\... 4 if you are searching for similarity between two signals in frequency domain, you can go for coherence. Coherence indicates frequency components common to both signals 4 You can fit a curve to the points around the peak of the crosscorrelation ontained by xcor and find the peak of the fitted curve. Ideally you know the cross correlation function of your signals and you fit that function. For practical purposes a parabola also would do. As a rule of thumb for this approach to work properly the bandwidth of your signal should ... 4 What you have (conceptually) is not a 2D array but a collection of 1D arrays. correlate2D is designed to perform a 2D correlation calculation, so that's not what you need. Iterating through all pairs is not a big ask really - you can still use numpy to perform the cross correlation, you'll just need to have two loops (nested) to determine which signals to ... 4 For GPS, (simplifying for now by omitting corrections for ionsphere and orbit position and relativistic clock offsets), we determine the "Pseudo-range" to each satellite (SV), which will be the relative delay between all the received satellites we have correlated to relative to our local clock- using correlation as you described (delay each locally generated ... 4 It means the best match to template happens outside the image. For instance, let's say your template is 5 by 5. And you got answer which is -1, -1. It means the part of the image which best matches you image is centered at [-1, -1] and you only have part of it in your image. This is really an extreme case. P. S. If you share your data (2 Images) we'll be ... 4 You can use the formulas presented in the answers to: How to calculate a delay (correlation peak) between two signals with a precision smaller than the sampling period? To recap, find the largest value, called$\beta$. Take also the values of the samples just to the left of it,$\alpha$, and just to the right of it,$\gamma\$. Then calculate the peak ...

4

I have a PRN generator that I have validated with live captured signals that is available on the Mathworks Exchange site at this address and equally runs in Octave (Update: I also pasted the core of this in a code block below): https://www.mathworks.com/matlabcentral/fileexchange/14670-gps-c-a-code-generator The two tap coder is as given in the diagram in ...

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