Tag Info

13

I can recommend you two books about DSP for C language. Embree P. M. - C Language Algorithms for Digital Signal Processing It is old and you can easily get it second-hand for a decent price. It covers pretty much all 4 topics that you described. The other one I recommend is: Malepati H. - Digital Media Processing: DSP Algorithms Using C It covers ...

12

According to your definition of autocorrelation, the autocorrelation is simply the covariance of the two random variables $Z(n)$ and $Z(n+\tau)$. This function is also called autocovariance. As an aside, in signal processing, the autocorrelation is usually defined as $$R_{XX}(t_1,t_2)=E\{X(t_1)X^*(t_2)\}$$ i.e., without subtracting the mean. The ...

10

I've never seen the word "Formula" with "AMDF". My understanding of the definition of AMDF is $$Q_x[k,n_0] \triangleq \frac{1}{N} \sum\limits_{n=0}^{N-1} \Big| x[n+n_0] - x[n+n_0+k] \Big|$$ $n_0$ is the neighborhood of interest in $x[n]$. Note that you are summing up only non-negative terms. So $Q_x[k,n_0] \ge 0$. We call "$k$" the "lag". clearly if ...

8

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

\begin{align} R_x(\tau) &=\int_{-\infty}^\infty x(t)x^*(t-\tau)\,\mathrm dt\\ &= \int_{-\infty}^\infty \left[\int_{-\infty}^\infty X(f)e^{j2\pi ft}\,\mathrm df\right]x^*(t-\tau)\,\mathrm dt\\ &= \int_{-\infty}^\infty X(f) \left[\int_{-\infty}^\infty x^*(t-\tau) e^{j2\pi ft}\,\mathrm dt\right]\,\mathrm df\\ &= \int_{-\infty}^\infty X(f) \... 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 I'd recommend Introduction to Signal Processing by S.J. Orfanidis. It's a great book with a good mix of theory and practice, and it also has code examples in C and Matlab. Once you've worked through it you'll know enough to carry on by yourself. 7 Cons: Not as accurate This is just compared to the other methods. I was measuring frequency very accurately to look for clock drift, etc: 1000.000004 Hz for 1000 Hz, for instance. For guitar pitch detection it will be fine. doesn't work for inharmonic things like musical instruments I should have said "it can't find an accurate fundamental if there is ... 7 The definition of the autocorrelation function R_x(\tau) depends on the nature of your x. If x is a deterministic signal with finite energy then:R_x(\tau)=\int_{-\infty}^{+\infty}x(t)x^*(t-\tau)dt$$If x is a deterministic signal with finite average power^{(1)} then:$$R_x(\tau)=\lim_{T\to+\infty}\frac{1}{T}\int_{-T/2}^{+T/2}x(t)x^*(t-\tau)dt$$... 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

Let's look at the case $x[n] \in \mathbb{R}$, where $x[n]$ is real. Autocorrelation is basically convolution of the signal with it's time inverse. This can be easily expressed in the frequency domain. $$\mathscr{F}\Big\{ r_{xx}[n] \Big\} = \mathscr{F}\Big\{ x[n] \Big\} \cdot \mathscr{F}\Big\{ x[-n] \Big\}$$ $$R_{xx}(\omega) = X(\omega)\cdot X^*(\... 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 \underline{Prologue :} Let me ask you another question, How will you compare two complex numbers U (a+jb) and V (c+jd)? By comparing magnitude? Subtract them and take real part? Multiply them and compare? Since any complex number involves two entities ( one for magnitude |z| and other for argument \theta ) any comparison involves comparison of ... 5 There is a vast literature on this subject. In particular, deleting one bit (the leading bit in one specific implementation) from each of the Walsh-Hadamard sequences and applying a permutation to the remaining 2^n-1 bits will result in 2^n sequences of length 2^n-1 that consist of (i) the all-zeroes sequence (ii) the 2^n-1 cyclic shifts of a ... 5 In principle you are doing the right thing. Step 4 should produce a real result unless there is a coding error. Sometimes you add up some residual imaginary part due to numerical noise but, if any, that should be very small. Here is an example %% random signal of length n n = 128; x = rand(n,1); % zero pad x = [x; zeros(n,1)]; % fft fx = fft(x); % mag ... 5 As correctly pointed out in the comments, in general the process Y(t)=x(t)M(t) is not wide-sense stationary (WSS), i.e. its autocorrelation function depends not only on the time difference parameter \tau, but also on the absolute time t:$$R_Y(\tau,t)=E[Y(t+\tau)Y^*(t)]=E[x(t+\tau)M(t+\tau)x^*(t)M^*(t)]=\\ =x(t+\tau)x^*(t)E[M(t+\tau)M^*(t)]=x(t+\tau)x^...

5

The Cauchy Schwarz inequality states that: $$\left|\int_{-\infty}^{\infty}g_1(t)g_2(t) dt\right|^2 \leq \int_{-\infty}^{\infty}|g_1(t)|^2 dt \int_{-\infty}^{\infty}|g_2(t)|^2 dt$$ I'm going to assume that $f(t)$ is real, just to make the math a little easier. From the above we can write: $$\left|\int_{-\infty}^{\infty}f(t)f(t-\tau) dt\right|^2 \leq \int_{... 5 Knowing the energies of x_1 and x_2 is not sufficient for determining the energy of x_3=x_1x_2. What you can do is determine an upper bound for the energy of x_3 given the energies of x_1 and x_2 and their maximum values:$$E_3=\sum_{k}\big|x_1[k]x_2[k]\big|^2\le\begin{cases}\max_k\big|x_1[k]\big|^2\sum_k\big|x_2[k]\big|^2=\max_k\big|x_1[k]\big|^...

5

Since the question has been raised as to whether the hint that I had given to the OP in a comment on the original question was appropriate for a newcomer to signal processing, here goes. Stripped of extraneous baggage and notation, the question is whether it is possible to determine the value of $E[X^2Y^2]$ straightforwardly where $X$ and $Y$ are zero-...

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

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 There is in general, as @Hilmar's answer points out, no unique solution to the question of a sequence that has the given perodic autocorrelation function. In the simplest case, that a shifted version$y$of any sequence$x$(e.g.$y[n] = x[n-3]$for all$n$) has the same autocorrelation function as$x$. Similarly,$y[n] = x[-n]$for all$n$has the same ... 5 It's the empirical ACF computed using the sample. 5 The derivative of the Dirac delta impulse is written as$\delta'(\tau)$. This helps with notation because the mistake you made is to write$h(-\tau)=\frac{d}{d\tau}\delta(-\tau)$, which is not the case because$\delta(\tau)$is an even (generalized) function, whereas the derivative operator$\delta'(\tau)$is an odd (generalized) function:$$\delta'(\tau)=-\... 4 For a real-valued signal$C$, the autocorrelation function$M$is a real-valued even function and the power spectral density$m$(Fourier transform of$M$) is a real-valued nonnegative even function. Now,$m(k) = c(k)c^*(k)$where$c$is the Fourier transform of$C$, as you correctly assert, but given only$m$and no other information about$c$(or$C$), it ... 4 An autocorrelation function like that is not possible for ordinary signals. The autocorrelation function is the Fourier transform of the power spectral density, which is a strictly positive quantity. However, to get a rectangular function as Fourier transform you need to have negative values. That is in conflict with the strictly positive power spectrum. 4 The random telegraph signal with parameter$\lambda$is derived from a Poisson process of arrival rate$\lambda$. In the Poisson process, the number of arrivals in$(t_1, t_2]$is a Poisson random variable with parameter$\lambda(t_2-t_1)$. Consider counting the Poisson arrivals in$(0,\infty)$with a digital counter whose least significant bit (LSB) is$0$... 4 Note that in general the Fourier transform of a stationary process$x(t)$does not exist. The Wiener-Khinchin theorem only states that under certain conditions the power spectral density of$x(t)$exists, and it can be computed as the Fourier transform of the autocorrelation function of$x(t)$. Having said that, if for some reason one assumes that the ... 4 Problem 1: As pointed by learner, awgn adds noise to the sequence y. So you are not plotting the autocorrelation of white gaussian noise, but the autocorrelation of white gaussian noise plus a constant. Use zeros instead of ones ; or analyze the difference$z - y$; or since$y$is a constant signal, remove the mean of$z\$. Problem 2: Once point 1 is ...

4

What you see are mainly numerical effects, even though the second result is actually correct, but not according to what Matlab intends to compute. But let's go slow ... Matlab computes the autocorrelation function by first subtracting the mean of the signal and then correlating it with itself. Then the autocorrelation function is normalized such that its ...

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