Clear Filters
Clear Filters

Using Custom I/Q Sample on "GPS HDL Acquisition and Tracking Using C/A Code" Example

6 views (last 30 days)
I want to use a custom 8bit I/Q sample data on the example which Mathworks shared:
What I need to do in order to be able to use my own data? If I feed the I/Q samples directly, I do not receive good results on Acquisition.

Answers (1)

Tom Richter
Tom Richter on 24 Nov 2023
Hi Kaan,
it depends on the range of your I/Q samples. In the example the data type is converted from double to fixed-point. Here you must know the range of your data. In the example you can check:
>> max(rxData)
ans =
-5.1297 - 0.0465i
>> min(rxData)
ans =
-1.7579e-04 - 1.3235e-04i
With that you choose the signedness, word length, and fraction length. With fixdt(1,18,14) you will have a range between -8 .. 8-2^-14. When you reduce the word length you also have to reduce the fraction length by the same amount of bits to keep this range. For 8 bit word length: fixdt(1,8,4) which gives a range of -8 .. 8-2^-4. You will have much less precision.
Your data could be complete integter with a range between -128 .. 127. You can interpret the values differently but it would not work using it directly as rxData without changing settings (range would be to high -> overflow). You can do this with the same Data Type Conversion block by changing the "Input and output to have equal:" to stored integer.
It could be necessary to also make fixed-point changes within the "Acquisition and Tracking" subsystem.
Best regards,
Tom

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!