SignalUtils::PhaseUnwrap Function

double PhaseUnwrap(TVec *Src, TVec *Dst, TRunningPhase RunningPhase, double ActualZeroPadding = 1, bool Radians = false, double Tolerance = 180);

Unwrap the phase of the phase spectrum.

#NameTypeDescription
1SrcTVec *
2DstTVec *
3RunningPhaseTRunningPhase
4ActualZeroPadding = 1double
5Radians = falsebool
6Tolerance = 180double
Remarks:

The phase spectrum in Src is unwrapped and the result is placed in Dst. RunningPhase defines how the unwrapped phased will be further processed. Tolerance defines the maximum change allowed between consecutive values, before the 360 (or 2*Pi) degrees is added (or subtracted). Tolerance must always be specified in degrees.

If radians is True, the Src should contain the phase spectrum in radians, otherwise in degrees. If the time signal was padded with zeros, the ActualZeroPadding should hold the ratio: LengthAfterZeroPadding/LengthBeforeZeroPadding. ActualZeroPadding factor is needed to accurately determine the total phase delay. If phase delay is not an issue the ActualZeroPadding factor can be set to 1.

The Src may not have central spectrum element as its last value. If the phase spectrum was obtained from FFT on a real data, the vector must be subranged before passed to the phase unwrapping routine.

Phase unwrapping is extensively discussed in [1] (p. 790), especially because of its application in complex cepstrum estimation.

References:

[1] Discrete-time signal processing, Oppenheim and Schafer, Prentice-Hall, 1989.

See Also: SignalUtils::FrequencyResponse, SignalUtils::PhaseWrap
Declared in Dew::Signal::Units::SignalUtils · Dew.Signal/Units.SignalUtils.h · Cross-compiler