# How to recover data/information from real complex baseband signal?

I have recorded real complex baseband signal. I want to recover data from the same. The complex baseband signal is basically a composite CDMA signal. How can i recover that information ?

Original Tx Composite signal

Real Rx Baseband signal

I know fundamentally I just have to multiply the composite CDMA signal with the relevant PN code in-order to get the original signal back. code length is 1024.

p_recovered = np.array([], dtype = float)
for i in range(p_len):
p_recovered = np.append(p_recovered, 1.0*sum(composite[i*codelength:i*codelength+codelength])/codelength)
p_recovered = np.repeat(p_recovered, codelength)

r_recovered = despread(composite, r_code, codelength)
q_recovered = despread(composite, q_code, codelength)


I did that in simulation(below), and recover the original messages back.

My question is how can i recover information from actual modem received signal ?

In an actual received signal you will also have to address the frequency, phase and time offsets between the transmitter and receiver since they run off of independent clocks that aren’t otherwise synchronized, as well as frequency offsets introduced through Doppler if the transmitter and receiver are in motion relative to each other. Further information on the details of this can be found under the topics of Carrier Recovery and Timing Recovery.

For CDMA this can be done with a course frequency search by doing the OP’s correlation repeatably at different frequency offsets and using an acquisition threshold on the correlator output to determine the rough offset. Once within the acquisition bandwidth of the correlator (approximately 1/T where T is the duration of the PN sequence in time), the complex I Q outputs of the correlator can be used to measure phase change per correlation interval (which as $$f=d \phi /dt$$ is the fine frequency measurement (carrier offset). This approach can be part of a frequency lock loop or the individual phase measurements can be part of a phase lock loop; either being the carrier recovery implementation.

With CDMA one approach to timing and carrier recovery (common in GPS receivers) is to use three correlators each using the matching PN sequence separated by half a chip such that the correlator outputs form “Early”, “Prompt”, and “Late”. The prompt is used for carrier acquisition and tracking as described above by both sweeping frequency for carrier offset and the PN code for delay offset (at each frequency test). Once acquired, the early and late can maintain tracking (time offset) by subtracting the two (zero time error when early minus late equals zero).

I have other posts detailing this further as well as timing recovery that I will add links here. The above approach is sequential so slow but minimizes resource requirements. One link I show also provides further details on a direct (one-shot) frequency and delay (PN offset) acquisition that would be relatively fast (can be completed on a single capture) when the processing resources allow.

See:

Early - late gate spread spectrum

High modulation index PSK - carrier recovery

QPSK constellation from baseband signal