Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Hot answers tagged

22

Say you're interested in $$M^{j2\pi f_0 t}. \tag{1}$$ Note that $$M = e^{\log M},$$ so $(1)$ can be written as \begin{align} M^{j2\pi f_0 t} &= \left( e^{\log M} \right) ^ {j2\pi f_0 t} \\ &= e^{j2\pi (f_0\log M) t} \\ &= \cos(2\pi (f_0\log M) t) + j \sin(2\pi (f_0\log M) t), \end{align} which is a complex sinusoid with frequency $f_0 \log M$. ...


11

I will focus on the reason of the factor $1/2$ and leave aside the estimation things. The exact understanding should be : if a scalar Gaussian random variable (rv) is circular symmetric, its real and imaginary parts must be uncorrelated (= independent if they are assumed jointly Gaussian) and identically distributed with zero mean. Thus, your Matlab code is ...


10

Turns out that convolution and correlation are closely related. For real signals (and finite energy signals): Convolution: $\qquad y[n] \triangleq h[n]*x[n] = \sum\limits_{m=-\infty}^{\infty} h[n-m] \, x[m]$ Correlation: $\qquad R_{yx}[n] \triangleq \sum\limits_{m=-\infty}^{\infty} y[n+m] \, x[m] = y[-n]*x[m]$ Now, in metric spaces, we like to use this ...


9

This sum appears quite often in DSP. \begin{align} \sum_{n=0}^{N-1} \exp(-j\alpha n) &\stackrel{(a)}{=} \frac{1- \exp(-j\alpha N)}{1 - \exp(-j\alpha )}\\ &= \frac{e^{-j\alpha N/2}(e^{+j\alpha N/2}- e^{-j\alpha N/2})}{e^{-j\alpha /2}(e^{+j\alpha /2}- e^{-j\alpha /2})}\\ &\stackrel{(b)}{=} e^{-j\frac{\alpha}{2}(N-1)} \frac{\sin(N\alpha/2)}{\sin(\...


6

So it seems like real-world (discrete) audio signal might have complex values when being represented digitally, No, you misunderstood that. The discrete audio time signal doesn't have non-real values. The Fourier transform can have such. but does this make sense? It doesn't need to make sense. It's just math. I sometimes remind myself of that – it ...


6

The last expression (sum of a geometric series) is a common abuse of notations: it should have been: $N$ if $k= k_0$ $f(r)=\frac{1-r^N}{1-r}$ with $r=e^{-j 2\pi(k-k_0)/N}$ if $k\neq k_0$ Indeed, as you correctly remarked, numerator and denominator would vanish for $r=1$ (or $k= k_0$), so the fraction is not "theoretically" defined. However, it is ...


5

That's not really a discontinuity. On a circle the two points $-\pi$ and $+\pi$ are identified: They are the same point. That is true for all $x$ and $x+n 2\pi$ for integer $n$. If you would like to keep the continuity obvious, you might want to switch to a phasor representation of angles. Those are complex numbers on the unit circle $\exp(i\phi)$ and they ...


5

In fact you have two signals, and it depends on what you want to achieve, but usually you would just filter both signals (the real and the imaginary part) with the same (real-valued) low pass filter. So you either need two (identical) low pass filters, or you filter both signals sequentially with the same filter. In the general case, filtering a complex ...


5

To convert a real signal sampled at rate $2B$ to its complex baseband representation (sampled at rate $B$), you want to map the frequency content in the range $[0, B)$ in the real signal to the range $[-\frac{B}{2}, \frac{B}{2})$ in the resulting complex signal. This can be done in a couple different ways: Design a linear filter to approximate a Hilbert ...


5

This answer shows how to create a real-coefficient infinite-impulse-response (IIR) filter, the output of which equals the real part of the output of a given complex-coefficient IIR filter. Also an example is given that shows that the approach can be useful. Z-transform $\mathcal{Z}\{h[n]\}$ of a time-domain sequence $h[n]$ has the property that: $$\mathcal{...


5

Your parameters aren't correct for producing a whole number of cycles for each component. For each $i$ the value of $ \frac{\omega_{i}}{\omega_{s}} N $ has to be a multiple of $ 2 \pi $. Hope this helps. Ced Followup: Suppose your signal is $$ x[n] = A \cos( \alpha n + \phi ) $$ If $ \phi \neq 0 $ there is a possible solution which will give you a ...


4

Complex signals are a special case of multidimensonal signals (where the dimension is two). A lossy approach tackling compression of multidimensional signals is vector quantization. A very good resource is the book: "Vector Quantization and Signal Compression", co-authored by Robert M. Gray. Vector Qquantization is a classic lossy source coding technique ...


4

The Fourier transform is linear, so you have that $$\mathcal{F}[a+jb]=\mathcal{F}[a]+j\mathcal{F}[b].$$ Now, $\mathcal{F}[a]$ and $\mathcal{F}[b]$ are complex, so you have that \begin{align} \text{Real}\lbrace\mathcal{F}[a+jb]\rbrace &= \text{Real}\lbrace \mathcal{F}[a]+j\mathcal{F}[b] \rbrace \\ &= \text{Real}\lbrace\mathcal{F}[a]\rbrace-\text{Imag}\...


4

Bottom Line First What you suggest will only work if your signal is at baseband and not at a carrier, which is usually the best way to do any simulation work regardless. If your signal is not at baseband first multiply by $e^{-j2\pi f_c t}$ where $f_c$ is the carrier frequency and low pass filter out the higher image (which will now be centered at $-2f_c$) ...


4

Do the substitution before trying to sum the series (the line before the fraction). Note that e^0 = 1, thus the series is no longer geometric looking, thus trying to use that fraction to sum a series might not be an appropriate step.


4

The power of complex representations remains an open topic to me. I still do strive the understand Fourier transformations. An underlying question is, to me: why would complex transformations be useful for real data? More generally, when data dwell in a set $S$, is $S$ the most appropriate set of analysis, or is it more appropriate to resort to a bigger ...


4

That's a trick which you will also find in a DSP context, that's why I choose to provide an answer here. It is related to the Wirtinger derivative, and you can find more details about it in this answer over at math.SE. In practice this trick is often used to compute the extremum (minimum or maximum) of a real-valued function depending on a complex variable (...


4

The FSW is superheterodyne. This means that it will not have a DC offset or I/Q imbalance, but the IF path will appear as an asymmetrical lowpass (because it is really a shifted bandpass), which is then compensated for in the calibration. The first question: have you run the calibration properly? leave both machines running for half an hour in a stable ...


4

Neither of you is wrong. Your final expression is just the same as $H(\omega)\cdot e^{-j\omega(N-1)/2}$, which is (an approximation of) the desired complex frequency response with an additional linear phase term that depends on the chosen filter length $N$. This means that you need to subtract that linear phase term from the desired phase response, because ...


4

The generalized linear phase FIR filter has the following frequency response: $$H(\omega) = A(\omega)~e^{j (\alpha \omega + \beta)}$$ for some constant $\alpha$ and $\beta$ and $A(\omega)$ being real. The group delay of this filter is independent of frequency: $$\tau = -\frac{d (\alpha \omega + \beta) } {d \omega} = - \alpha $$ Now if you linearly shift ...


4

Now as the document says, let $x[n]$ be a length $N$ (even) sequence whose even and odd indexed samples are denoted as $g_1[n]$ and $g_2[n]$ of length $N/2$ each. Then the $N$-point DFT $X[k]$ of $x[n]$ can be written as folows: $$\begin{align} X[k] &= \sum_{n=0}^{N-1} x[n] e^{ -j \frac{2\pi}{N} n k} ~~~,~~ k = 0,1,...,N-1 \\\\ &= \sum_{n=0,2,4}^...


4

The use of the conjugate in the formation of the adaptive filter isn't necessary. However, if you do not write the output using a conjugate then it is quite easy to forget that the variables you are dealing with are complex. If you write $$h(n)=\sum_{k=0}^{\infty}w_k(n)u(n-k) $$ then it isn't clear that you are dealing with complex quantities. As Robert has ...


3

There's nothing wrong here - complex sinusoids like your signal really have only one peak in frequency domain! This is the fundamental idea of why we use the Fourier transform for periodic (even complex) signals. You can think of it this way: the cosine has two peaks, one at +f, the other at -f. That's because Euler's formula actually says $\cos x = \...


3

Below is a chart I had of "Universal Fourier Transform Properties", that apply in either direction (going from time to frequency or going from frequency to time). For example, a signal that is periodic in one domain, will be discrete in the other: a digitized time domain signal becomes periodic in frequency (such that we can concern ourselves with the ...


3

Complex sampling does not "break" Nyquist. IQ quadrature sampling produces twice as many bits per second of information (at the same sample rate for real or complex samples), and the 90 degree phase offset between the I and Q channel in those bits provides extra information about the spectrum. One typical example to demonstrate aliasing is that the samples ...


3

The summation on the left side of your equation represents a time domain discrete time periodic signal $x[n]$ whose period is N. $$ x[n] = \sum_{k=-\infty}^{\infty} \delta[n-kN] $$ And the summation on the right side of your equation is just the same (periodic) signal $x[n]$ represented via its Discrete Fourier Series DFS synthesis form which is an ...


3

Let me try to establish the relation between the univariate PDF for a real Gaussian and the univariate PDF for a complex proper (i.e. circular symmetric) Gaussian. You know that $p_x(x)=\frac{1}{\sqrt{2\pi\sigma^2}}\exp(\frac{-x^2}{2\sigma^2})$ is the PDF of a real-valued Gaussian with variance $\sigma^2$. We write $x\sim\mathcal{N}(0,\sigma^2)$ to denote ...


3

First of all lets state more correctly that a discrete-time 1D auto-correlation sequence (ACS), $\phi_{XX}[\kappa]$, of a single parameter $\kappa$, of a discrete-time random process $X[n,s]$ will exist as long as the process is stationary or at least WSS (wide sense stationary). And therefore the power spectral density (PSD), $\Phi_{XX}(e^{j2\pi fT})$, of ...


3

If the imaginary and real components each has a variance of 0.5, then what would be the total variance? The variance of the complex RV in that case would be $0.5 + 0.5 = 1$. If on the other hand, if $w∼CN(0,2σ^2_w)$ then does it mean that the real and imaginary components each has variance 1, so the total variance is 2. Is my understanding correct? Each ...


3

Another way to produce strictly real FFT results (other than numerical rounding/quantization noise in the imaginary component) is to make sure that the wave form is circularly symmetric around time domain sample 0. For a cosine function starting with a phase of 0, this can be produced by doing an FFT shift (circularly rotating the input vector by N/2 ...


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