LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

signal from GPS toolkit

Hi, I am working on the example module "niGPS Write Waveform To File".    I use the default settings to generate the baseband signal. 

Now I am tring to simulate if there is a GPS signal in it.  I read signal from the file into matlab, and try to acquire a GPS satellite, but cannot find it.

 

I checked again and again, do not know what's wrong with it.

 

 

0 Kudos
Message 1 of 13
(4,865 Views)

Hello usami,

This is most likely due to incorrectly reading the data from the binary file. The file is a 1D Array of I16s that is interleaved I and Q data with a 512 byte header.

The header consists of 8 bytes of version information for the version of GPS toolkit used to generate the file, 16 bytes for the IQ rate and peak power of the waveform and 488 bytes of that are used for padding. Without accounting for this header data you will be unable to accurately reproduce the waveform that follows.

When using the GPS toolkit and an RF Upconverter in LabVIEW you would then upconvert and generate the resulting waveform using the niGPS Streaming From File VI.

Exactly how are you using Matlab to simulate the GPS signal in the file.  How are you trying to acquire a GPS satellite?

Regards,
Dan King

0 Kudos
Message 2 of 13
(4,834 Views)

Dan_k

 

     I just wanted to confirm if there is indeed GPS signal.   I just read the binary file in Matlab as I16 data format,  I used the command to read the binary file:  fread(fid, 1, 'int16');   and used traditional acquisition method to check the GPS signal. But I could not find it.

Message Edited by usami on 01-22-2010 09:28 AM
0 Kudos
Message 3 of 13
(4,810 Views)

Hello usami,

The data generated is an interleaved IQ waveform of a baseband GPS signal. As I said before, there is also a 512 byte header that needs to be accounted for. As for checking the signal in Matlab, if you are using functions that will accept this type of data it should have no problem detecting the GPS signal in the data. If your functions require the data to be in another form, you will need to first modify the data so that it is in a form that your functions can properly interpret.

 

Let me know what kind of format is required by your functions for analysis and I will do my best to make a recommendation as to how to realign the data to your needs.

Regards,
Dan King

0 Kudos
Message 4 of 13
(4,788 Views)

Could you show me how to read it?  I am not sure which part is wrong, the reading functions or the analysis functions.   Thanks!

 

 

 


Dan_K wrote:

Hello usami,

The data generated is an interleaved IQ waveform of a baseband GPS signal. As I said before, there is also a 512 byte header that needs to be accounted for. As for checking the signal in Matlab, if you are using functions that will accept this type of data it should have no problem detecting the GPS signal in the data. If your functions require the data to be in another form, you will need to first modify the data so that it is in a form that your functions can properly interpret.

 

Let me know what kind of format is required by your functions for analysis and I will do my best to make a recommendation as to how to realign the data to your needs.


 

0 Kudos
Message 5 of 13
(4,745 Views)

I am unfamiliar with how to perform this type of operation in Matlab, but the steps you need to perform would be something like this.

  1. Read file into array of I16 data.
  2. Take the first 256 elements and throw them away.
  3. Take the even elements, including 0, and place into I_array.
  4. Take the odd elements and place into Q_array.
At this point you will have two arrays containing your I and Q data. I really don't know where you need to go from here without knowing what kind of data your analysis functions expect. Let me know and I can give you some more guidance.

Regards,
Dan King

0 Kudos
Message 6 of 13
(4,723 Views)

I have the same problem. I have already read the values but it seems that one of them (I, Q) is always 0. This is a sample of consecutive values:

 

 10496
        0
-27651
        0
  -2307

 

Thank you for your help.

0 Kudos
Message 7 of 13
(4,257 Views)

Hi Japm,

 

Is it always I or Q that is zeor, or does it sometimes swap which is zeroed?

 

Are you also reading your I/Q into MatLab?

 

More info on your signal and what you are expecting to see would be very helpful.

 

Micah M.
National Instruments
NIC AE Specialist - Test
0 Kudos
Message 8 of 13
(4,233 Views)

Thank you and sorry for my late replay, I was waiting to be notified automatically  😞

 

I generated the bin file with the "niGPS Write Waveform to File VI", from the GPS toolkit, without making changes. I'm waiting for an IQ signal that corresponds to only one satellite. 

 

I'm trying to read the signal  with MATLAB according to your instructions (I think I'm doing it right, it's easy) to use it on a program that identifies the satellite code from the IQ signal. Before using my MATLAB program, I find that the IQ signal that I read it's not right, the zeros  always appear with the same pattern (only on Q).

 

I'm expecting to see a whole IQ GPS signal corresponding to only one satellite. I'm waiting for signals on both 'channels' I and Q different to zero. After that I will try to confirm that I use right the signal.

 

 

0 Kudos
Message 9 of 13
(4,192 Views)

Hey japm,

 

There are three versions of the GPS Write Waveform to File example code. Are you using the (single satellite, manual mode) version? If so, you will not get Q data unless you add some amount of Doppler Shift. 

 

If you want better, easier GPS data then I recommend using the (Simple, Automatic) version of the example code. I ran that one on my computer and got Q data with the default settings. Are you reading your BIN file in LabVIEW?

 

Let me know!

 

Micah M.
National Instruments
NIC AE Specialist - Test
0 Kudos
Message 10 of 13
(4,167 Views)