Advanced maths

Hilbert analytic signal calculator with envelope and instantaneous phase

Construct the analytic signal of real samples and report its amplitude envelope, unwrapped phase and resolved phase-difference frequency.

Your numbers

Use the documented format and bounds; rows may be separated by new lines.
Use the documented format and bounds; rows may be separated by new lines.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Construct the analytic signal of real samples and report its amplitude envelope, unwrapped phase and resolved phase-difference frequency.

THE FORMULAz[n]=IFFT(H[k] FFT(x[n])); H doubles positive frequencies, removes negative ones and retains DC/Nyquist.

A worked example

The eight default cosine samples at spacing 0.125 have analytic samples on the unit circle. The envelope is one and the resolved backward phase differences give frequency 1 per time unit.

Good to know

4–256 real equally spaced samples within ±1000000 and spacing 1e−12–1000000. Periodic DFT analytic convention, DC and even-length Nyquist retained. Phase/frequency unavailable near zero envelope and after gaps. No interpolation, resampling or unique physical frequency claim for arbitrary multicomponent signals.

An analytic signal from real observations

The analytic signal pairs the entered real sequence with a quadrature component obtained by a discrete Hilbert-transform construction. It is complex-valued even though the input samples are real. Its magnitude is the amplitude envelope, and its complex angle supplies a phase that can be unwrapped where the amplitude is sufficiently far from zero.

This is a different output from a Fourier spectrum alone. A spectrum describes frequency-bin coefficients, while the analytic signal returns one complex value at each sample position. The page shows those samples, the envelope and phase-related quantities together so the chosen finite-record convention remains visible.

A pure sampled cosine produces a unit analytic envelope8 cosine samplesEnvelope = 1Δt = 0.125Δphase = π/4Frequency = 1Real / quadrature plane
Scroll across to see the full diagram.
The eight default cosine samples at spacing 0.125 have analytic samples on the unit circle. The envelope is one and the resolved backward phase differences give frequency 1 per time unit.

Compare this with the Discrete Fourier transform calculator for complex sequences. Construct one-sided analytic signal and amplitude envelope/phase from real samples, instead of reporting Fourier coefficients only.

Use equally spaced samples and a meaningful spacing

Enter between four and 256 complete real samples in time order. The spacing must be positive and uses whatever time unit belongs to the data. A spacing in seconds makes the derived frequency cycles per second; another time unit changes that label numerically, even though the complex sample values themselves do not change.

The page assumes uniform spacing. It does not infer timestamps, interpolate missing observations or repair an irregular record. Feeding unevenly timed samples into the same finite DFT formula would change the mathematical interpretation, so an irregular-time analysis needs an explicitly suitable method rather than a different number in the spacing box.

Check the default pure cosine

The eight default values sample one cosine cycle with spacing one eighth of a time unit. Removing the negative-frequency half and doubling the positive-frequency half gives complex samples approximately cos(2πn/8)+i sin(2πn/8). They lie on a unit circle, so every envelope value is approximately one.

The unwrapped phase advances by π/4 per sample. Dividing that phase increment by 2π times the spacing gives one cycle per time unit. The first frequency entry is unavailable because the chosen backward-difference convention has no earlier phase sample; it is not filled with an invented zero or copied neighbor.

Keep DC and the Nyquist bin consistent

The frequency-domain mask leaves the zero-frequency component unchanged. For an even sample count, the Nyquist bin is also retained rather than doubled, because it is its own negative-frequency counterpart. Positive-frequency bins are doubled and the distinct negative-frequency bins are set to zero before the inverse transform.

These details matter for constant signals, odd sample counts and samples containing an alternating Nyquist component. A simplistic instruction to double half the bins can mishandle those cases. The reconstruction check verifies that the real part of the resulting analytic sequence recovers the entered observations within the supported numerical tolerance.

Phase is unavailable when amplitude vanishes

At zero amplitude, a complex angle is mathematically undefined. Near zero, a tiny numerical perturbation can swing that angle dramatically. The implementation therefore marks phase as unavailable below a scale-relative envelope threshold, and it does not compute a frequency across the resulting gap.

Unwrapping adjusts a resolved phase difference by multiples of 2π to keep successive jumps within the selected interval. That operation cannot recover arbitrary rapid changes hidden between widely spaced samples. If phase advances by more than the sampling can resolve, an apparently smooth unwrapped result can still represent an aliased physical process.

Interpret instantaneous frequency cautiously

The frequency field is a backward difference of unwrapped phase divided by 2π and sample spacing. It is not a fitted spectral peak and does not guarantee one physically meaningful oscillation rate for a mixture of several components. Interference can make an envelope small or cause phase behavior that is hard to interpret as one source.

The finite record is treated periodically by the DFT. If the last sample does not connect smoothly to the first, the implied boundary discontinuity can affect the quadrature component throughout the sequence. The calculator does not silently pad, detrend, window or crop the data; those choices should be made explicitly before comparison with another workflow.

Use the curves and reconstruction together

The illustration shows the real signal, its quadrature component and the corresponding complex trajectory for a checked example. A constant envelope appears as a circle in the complex plane, but a general input can trace a more complicated path. The diagram is an explanation of the construction, not an assumption imposed on every entered record.

Keep the sample spacing, record length and boundary convention with an exported result. Matching only a displayed maximum envelope is not enough to validate another implementation; compare the full complex sequence and the real-part reconstruction as well. A small reconstruction residual establishes consistency of that identity, without proving a unique interpretation of the observed physical signal.

A few questions, answered

Why is the result complex for real input?

The imaginary quadrature component completes the analytic representation. The real part still reconstructs the original sample sequence.

Why are some phase or frequency entries unavailable?

Phase is undefined at zero amplitude and unstable near it. The calculator also avoids taking a frequency difference across an unavailable phase gap.

Does the spacing change the envelope?

It does not change the analytic sample magnitudes, but it scales the time axis and any frequency derived from phase differences.

Can the frequency always be read as one physical oscillation?

No. Multicomponent signals, boundary discontinuities and undersampling can make that interpretation invalid even when the numerical construction is correct.

Find your calculator

Start typing to explore the library.