I used a signal analyzer to get IQ sample data from a blue tooth device. The IQ data received is in the form of a .MAT file and I examined the file contents and see an + ibn samples where a, b are constants, n is the sample number and the format is a complex number. I was told the real part is the I and the imaginary part is the Q. Are these samples received baseband I Q data? I am trying to determine the carrier frequency offset. I was trying to determine the frequency of the signal. I felt I could measure the phase difference between samples per time. However, I have the angles being only between pi/2 and -pi/2 when I do arctan(b/a). I assume I should unwrap the signal phase. In MATLAB there is the unwrap command (var = unwrap(phase)). But that does nothing to the values I received. I am unsure of how to proceed with my search for the carrier frequency offset. Any help?
If you're looking for the phase progression I would recommend not using
atan() in MATLAB to extract the phase angle. Use the built-in function
angle() to extract the phase from the complex samples properly accounting for the quadrant of the complex plane in which each sample appears. This resulting phase can then be unwrapped.
unwrappedPhaseRad = unwrap(angle(inputComplexSamples));
unwrappedPhaseRad is the unwrapped phase in radians and
inputComplexSamples is a vector (1 dimensional array) of your complex input data samples.