# The order of processing the prerecorded samples (DC removal, Hilbert transform, frequency shifting)

I have a samples prerecorded by a radio device. Samples are not in baseband, contain large DC component and include only one channel (written in int32 format). My goal is to move it to the baseband, remove the DC spike and perform Hilbert transform to make it complex for further processing. My question is, what is the correct order of performing mentioned computations? Or it doesn't matter? I assume that first I need to remove DC by calculating mean (DC component) and correct each sample. Then go with Hilbert transform to get complex representation of the signal. After that I need to multiply the signal by a complex waveform to move it to the baseband. Can anyone confirm that my way of thinking is right or correct me if I am wrong.

• How can it have a large DC offset if it's not in the baseband? – Hilmar Apr 27 at 12:03
• Ah, yes sorry for my confusion. By saying DC I mean that the mean of the signal in not zero while analyzing prerecorded signal. Signal is BPSK modulated. – Marcin Puchlik Apr 27 at 12:25
• I understand what DC is. But if it's not a baseband signal I assume it's a bandpass signal and those can't have and DC unless it's a data capture or noise problem – Hilmar Apr 27 at 13:09

No Hilbert transform is necessarily needed, if the frequency initially is at a carrier sufficiently higher than its bandwidth, simply frequency translate the real signal to baseband using using $$e^{-j\omega_c t}$$ which means feed the signal into to multipliers and multiply one with $$\cos(\omega_c t)$$ and multiply the other with $$\sin(\omega_c t)$$ to get a complex I and Q output and filter the remaining higher frequency component that will reside at $$e^{-j 2\omega_c t}$$ (this is a typical Digital Downconverter (DDC) architecture).