AI-generated summary of How to Get Phase From a Signal (Using I-Q Sampling), Marshall Bruner. Not written or verified by the author.
Takeaways: How to Get Phase From a Signal (Using I-Q Sampling)
2025-07-12 · 12:16 · Source: https://www.youtube.com/watch?v=Ev3lZClnLhQ · Marshall Bruner
Gist
A radar echo's phase carries the target's motion. Doppler shifts phase over time, so tracking it gives radial velocity, direction, and movements too small for magnitude to show. One sample of a cosine can't give the phase, because every output value matches two inputs. Sampling the cosine and sine together gives a pair with only one matching angle. That pair is IQ (in-phase and quadrature) sampling. To get it, mix the received signal with the known carrier, once as cosine and once as sine. Each product has a low-frequency term that depends only on phase and a term near twice the carrier. A low-pass filter keeps the first. The phase is then the arctangent of Q over I. In practice I and Q are stored as one complex number.
All claims are the narrator's. Summarized from YouTube auto-captions, which garble terms: "s" / "sign" for sine, "quadriure" for quadrature, "fee" for φ, p<unk> for π. Visuals, equations, and the linked Python notebook not seen, so formulas come from narration only. Notes marked (mine) are mine, not checked against a primary source.
Takeaways
Why phase matters
- A radar transmits at a carrier frequency $f_c$. The echo comes back with changed magnitude, set by distance and target, and changed phase $\phi(t)$.
- A target moving toward or away from the radar advances the phase over time: the Doppler effect. Its rate gives radial velocity. Phase also shows tiny movements magnitude alone can't.
Why one sample isn't enough
- Sampling the analog echo gives one amplitude per sample. That doesn't say where in the cycle you are.
- Example: an output of 0.5 fits $\theta = \pi/3$ or $5\pi/3$ on cosine, and $\pi/6$ or $5\pi/6$ on sine. Every output value of either function has two inputs.
- The two ambiguous pairs differ. Measure both: $\cos\theta = 0.5$ and $\sin\theta = \sqrt{3}/2$ fit only $\theta = \pi/3$.
- Plotted over one period, the pair $(\cos\theta, \sin\theta)$ gives a unique output for every input. That's the core of IQ sampling: two numbers, one aligned with cosine and one with sine, forming a vector that points to the exact spot in the cycle.
Getting I and Q
- Mix. A mixer multiplies two signals; circuit diagrams draw it as ⊗. Multiply the echo by the carrier once as cosine and once as sine.
- $\cos a \cos b = \tfrac{1}{2}[\cos(a-b) + \cos(a+b)]$
- The narration gives the sine version as $\tfrac{1}{2}[\sin(a-b) + \sin(a+b)]$. (mine) That identity is $\sin a \cos b$. For $\cos a \sin b$ the $\sin(a-b)$ term flips sign, which only flips the sign convention of Q.
- Pick b to cancel. Let $a = 2\pi f_c t + \phi(t)$ and $b = 2\pi f_c t$. The radar set $f_c$, so b is known. Then $a - b = \phi(t)$, and $a + b = 4\pi f_c t + \phi(t)$.
- Low-pass filter. The terms differ hugely in frequency, so a low-pass filter keeps only the phase term.
- Example: S-band radar at 3 GHz, cloud moving at 10 m/s. Doppler shift ≈ 200 Hz. The difference term oscillates at about 200 Hz, the sum term at about 2 × 3 GHz + 200 Hz.
- (mine) The arithmetic checks: $f_d = 2 v f_c / c = 2 \times 10 \times 3{\times}10^9 / 3{\times}10^8 = 200$ Hz.
- $\phi(t)$ has two parts: a constant initial phase (0 to 2π, ignored here) and a Doppler frequency term set by radial velocity over the speed of light.
- Result: $I = \cos\phi(t)$ and $Q = \sin\phi(t)$, up to scale. Quadrature means a quarter cycle (90°) out of phase with in-phase.
Phase from I and Q
- Plot (I, Q). The phase is the angle from the I axis to the point: $\phi = \arctan(Q/I)$.
- Recompute it as the point moves to trace phase over time.
- (mine) Plain $\arctan(Q/I)$ only spans half a circle. Code uses
atan2(Q, I)to get the full $-\pi$ to $\pi$. - I and Q are often combined into one complex number $I + jQ$: real part cosine, imaginary part sine. One number holds magnitude and phase, and the math is often simpler.
Patterns
- one reading of a cyclic quantity can't place you in the cycle ← "isn't enough to tell us where"
- two readings with different ambiguities, combined, give a unique answer ← "they overlap in different places"
- multiply by a known reference to cancel it and expose the unknown ← "we could have some cancellation"
- when wanted and unwanted parts differ hugely in rate, filter by rate ← "This massive difference in frequency"
- the timing of a signal reveals motion its strength hides ← "raw magnitude alone can't reveal"
- bundle paired values into one object so the math treats them together ← "into a single number"
- a method only counts if real hardware can build it ← "this has to be realizable"