Hot answers tagged

23

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$. ...


12

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(\...


9

PROLOGUE My answer to this question is in two parts since it is so long and there is a natural cleavage. This answer can be seen as the main body and the other answer as appendices. Consider it a rough draft for a future blog article. Answer 1 * Prologue (you are here) * Latest Results * Source code listing * Mathematical justification for ...


9

You mention in a comment that your target platform is a custom IC. That makes the optimization very different from trying to optimize for an already existing CPU. On a custom IC (and to a lesser extent, on an FPGA), we can take full advantage of the simplicity of bitwise operations. In addition, to reduce the area it is not only important to reduce the ...


8

1. Logarithms and exponents to avoid multiplication To completely avoid multiplication, you could use $\log$ and $\exp$ tables and calculate: $$I^2 + Q^2 = \exp\!\big(2\log(I)\big) + \exp\!\big(2\log(Q)\big).\tag{1}$$ Because $\log(0) = -\infty,$ you'd need to check for and calculate such special cases separately. If for some reason accessing the $\exp$ ...


8

Given two complex numbers $z_1=a_1+jb_1$ and $z_2=a_2+jb_2$ you want to check the validity of $$a_1^2+b_1^2>a_2^2+b_2^2\tag{1}$$ This is equivalent to $$(a_1+a_2)(a_1-a_2)+(b_1+b_2)(b_1-b_2)>0\tag{2}$$ I've also seen this inequality in Cedron Dawg's answer but I'm not sure how it is used in his code. Note that the validity of $(2)$ can be checked ...


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 ...


6

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 ...


6

I'm putting this as a separate answer because my other answer is already too long, and this is an independent topic but still very pertinent to the OP question. Please start with the other answer. A lot of fuss has been made about the effectiveness of the initial "early-out" test, which I have been calling the Primary Determination. The base approach ...


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

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 ...


5

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}\...


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 ...


5

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 (...


5

The Sigma Delta Argument Test I came up with my own solution with the premise of resolving maximum vector magnitude (including equality) by testing the angle for quadrature between the sum and difference of the two vectors: For the sum $\Sigma$ and difference $\Delta$ of $z_1$ and $z_2$ given as (which is a 2 point DFT) $\Sigma = z_1 + z_2$ $\Delta = ...


4

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 ...


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

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 = \...


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