Your Equation

Library / Signal processing and digital filters / DSP-49

Signal processing and digital filters

Envelope from in-phase and quadrature samples

Envelope (magnitude of the analytic signal) from the in-phase sample I, which is the real signal, and the quadrature sample Q, its Hilbert transform.

Ref
DSP-49
Rev
v1
Field
Signal processing and digital filters
Result
A [V]

The analytic signal z[n] = I[n] + iQ[n] has the real signal as its real part and the Hilbert transform, in quadrature, as its imaginary part. Its magnitude A = √(I² + Q²) is the envelope: for an amplitude-modulated carrier, it follows the modulation. It is never negative, and it is clearest for one narrowband component.

Envelope (magnitude of the analytic signal) from the in-phase sample I, which is the real signal, and the quadrature sample Q, its Hilbert transform. The envelope is never negative, and reads as a modulation amplitude most clearly for a single narrowband component.

Calculator

Solve for
V
V
−100100
V
−100100
  • Phase of the analytic sample, atan2(Q, I)53.13 °
  • Instantaneous power, I² + Q²25 V²
  • Envelope level relative to 1 V13.98 dB

What drives the result

Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.

Envelope (V) current value 5 V
QQuadrature sampleKey driver
3100
IIn-phase sample
4100
  • The envelope is 5 V and the instantaneous phase is 53.13°.
  • For a pure carrier the envelope stays constant while the phase advances; for a modulated one, the envelope traces the modulation, which is the basis of AM demodulation.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing (V)Local stepChange in result
Q Quadrature sample−100 to 100 V310097.04+4 V+70.9 %
I In-phase sample−100 to 100 V4100.196.08+4 V+61.2 %

Sweep of Quadrature sample

Quadrature sample (V)Envelope (V)
−100100
−7575.06
−5050.09
−2525.18
03
2525.18
5050.09
7575.06
100100

Sweep one variable

Envelope (V)Hover, touch, or use the arrow keys on the chart
020406080100 −100−50050100 Quadrature sample (V) now 5

Variables and how each one contributes

A

Envelope

Result · V

What the equation gives you. Everything else feeds it.

I

In-phase sample

V · typical −100 to 100

The in-phase sample, which is the real signal, in V. Raises the envelope; the effect is largest when I dominates Q. Raising it by 10 % (to 3.3) moves the result by +3.71 %, from 5 to 5.186 V.

Q

Quadrature sample

V · typical −100 to 100

The quadrature sample, the Hilbert transform of the signal, in V. Raises the envelope; the effect is largest when Q dominates I. Raising it by 10 % (to 4.4) moves the result by +6.51 %, from 5 to 5.325 V.

Worked example with the values above

  1. Squares: I² = 9, Q² = 16.
  2. Sum: I² + Q² = 25 V².
  3. A = √25 = 5 V.

Assumptions and limits

  • Integer, positive resampling factors, with a low-pass filter that gives enough alias rejection.
  • For analytic-signal formulas, a narrowband signal with a clean quadrature component and less than π of phase change per sample.

Common mistakes

  • Not reducing L/M by the common factor, which wastes computation.
  • Forgetting the filter delay when counting output samples.
  • Using the phase difference when the true change per sample exceeds π.

Statistics and uncertainty

Rates and lengths here are exact integer relations. Estimates of envelope and frequency from analytic samples are sensitive to noise, since the phase of a small sample is poorly defined, so use only samples well above the noise floor.

Where it is used

  • Converting between audio and instrumentation sample rates and sizing buffers.
  • Demodulating amplitude and frequency from complex baseband data.

Maths you need

  • Interpolation and decimation: raising and lowering the sampling rate by integer factors
  • Analytic signal: a real signal plus i times its Hilbert transform
  • Principal phase: phase wrapped to the range −π to π

Related formulas

Practise this formula