.phase_diff {fftab}R Documentation

Compute Phase Difference Between Two Signals

Description

Computes the phase difference between two signals based on their cross-spectrum, with symmetric and redundant frequency components removed.

Usage

.phase_diff(a, b)

Arguments

a

A fftab object or signal representing the first input.

b

A fftab object or signal representing the second input.

Details

This function computes the cross-spectrum of two signals, removes symmetric and redundant frequency components, converts the result into polar representation, weights the phase angles by their magnitudes, and calculates the weighted average phase difference.

Removing symmetric components ensures accurate phase alignment, avoiding ambiguity caused by redundant negative frequencies.

Value

A numeric value representing the phase difference (in radians) between the two signals.


[Package fftab version 0.1.0 Index]