Performing FFT to a signal with a large DC offset would often result in a big impulse around frequency 0 Hz, thus masking out the signals of interests with relatively small amplitude.
Origin provides two methods to remove DC offset from the original signal before performing FFT:
- Using FFT High-Pass Filter
- Subtracting the Mean of Original Signal
Note that these two methods can get the same result. You can also not filter the input, but set zero to the zero frequency point for FFT result.
Using FFT High-Pass Filter
Any DC bias on the signal will show up in the frequency domain as amplitude at zero Hz, by setting the cutoff frequency to be zero DC offset can be filtered. Steps are as following:
- Import the fftfilter2.dat under Origin exe\Samples\Signal Processing\ folder.
Highlight the source signal column Amplitude, and select menu Analysis: Signal Processing: FFT Filters.
In the pop-up dialog, choose High Pass for Filter Type, uncheck Auto checkbox to set Cutoff Frequency to zero and clear the Keep DC offset check-box.
- Click OK button to get the result without DC offset.
Subtracting the Mean of Original Signal
- Now we have the original signal stored in column B (Amplitude). Hold Ctrl + D to add a new column C for storing DC offset removed signal and input DC Offset Removed as Long Name.
Highlight column C, and select Set Column Values from the context menu to bring up the Set Values dialog.
In Before Formula Scripts panel of the Set Values dialog, put the script:
Then in the column formula text box, fill column C using the formula:
- Column C is the result without DC offset.
If you need to get the DC offset, open the dialog mentioned in method one, then use the low-pass filter, and set Cutoff Frequency to zero, or use the Mean function to calculate the mean of the signal:
DCOffset = Mean(col(B));