How do I calculate the power density spectrum if the measured phase has a constant drift?
Phase drift detrend with power density
If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.
Moku:Go Arbitrary Waveform Generator Moku:Go Data Logger Moku:Go Frequency Response Analyzer Moku:Go Logic Analyzer & Pattern Generator Moku:Go Oscilloscope & Voltmeter Moku:Go PID Controller Moku:Go Spectrum Analyzer Moku:Go Waveform Generator Moku:Go Power Supplies Moku:Go Digital Filter Box Moku:Go FIR Filter Builder Moku:Go Lock-in Amplifier
- Python API examples
In some circumstances, it's not possible to synchronize Moku:Lab onboard clock with the frequency synthesizer in the system. The measured phase trace has a constant drift.
This can be fixed by a linear detrend process before the power spectrum density (PSD) calculation. In Python, the detrend can be performed by adding a detrend='constant' option in the scipy.signal.welch function. In MATLAB, a similar process can be done with a first-order detrend function, before the PSD calculation.