SNACS Configuration

Introduction

SNACS requires a structured configuration file which defines all parameters necessary for performing the simulation. The following sections explain SNACS's configuration file and its command line parameters .

SNACS configuration file

SNACS uses libconfig to read the configuration file. The detailed syntax can be found at http://www.hyperrealm.com/libconfig/.

The syntax of the configuration file is C-like, for example, every line has to end with a semicolon. Comments until the end of the line can be done with

// 

and block-wise with

/* ... */ 

.

The general form of a configuration file is

Simulation:
{
        <simulation parameters common to all snBlocks>
        ...

        SNBlocks = (
                <definition of snBlocks>
        ); 
};

Plotting:
{
        <parameters for plotting>
};

Simulation parameters common to all snBlocks

Parameters for plotting

snBlocks parameters

GPS signal source (snSignalGenerateGPS)

This snblock generates a C/A code GPS signal.

Low-pass filter (snLowPassFilter)

  • Type = "snLowPassFilter";
  • Order: filter order.
  • CutOffFrequency: cut-off frequency.

Processing of channel model data (snChannel)

  • Type = "snChannel";
  • File: HDF5 input file. Structure as defined in HDF5 channel impulse response input file structure
  • interpolation_frequency: interpolation bandwidth for the sin(x)/x interpolation of the continuous channel impulse responses to discrete FIR coefficients.

Noise generator (snNoise)

  • Type = "snNoise";
  • snr_db: carrier to noise ratio in dB.
  • start_sec: defines the start time at which the noise samples are being added to the source signal.

Upconversion and quantization (snADC)

  • Type = "snADC";
  • adc_bits: amount of quantization bits. The amount of quantization steps are given by 2^(adc_bits)
  • enable_vga = true|false: The variable gain amplifier (VGA) detects the size of the peak sample in the current concbuf and divides all samples by its inverse. This operation normalizes all samples to the peak sample and ensures that all quantization bits are excited.
  • vga_lowest_amplification_dB: the lowest amplification the VGA can use in dB.
  • vga_highest_amplification_dB: the highest amplification the VGA can use in dB.

GPS software receiver tracking loops (snSDRGPS)

  • Type = "snSDRGPS";
  • SignalType: only "C/A" is supported.
  • PRN: PRN number
  • CorrFuncSamples: amount of additional samples on correlation function
  • CorrFuncStart: start here with additional correlation func samples in chips
  • CorrFuncDist: distance between correlation function samples in chips
  • WriteCorrFunc: ?
  • enable_aquisition = true|false; If enable_aquisition is set to false, StartSample must be defined.
  • StartSample: The code tracking loop starts to track the signal starting with this sample.

Aquisition

  • Plot3D = true|false: defines if a window with a 3D-graph of the aquisition result should be opened.
  • Length: aquisition length in seconds.
  • aq_freq_band: the bandwidth in Hertz around which the aquisition is performed
  • aq_freq_step: the frequency steps in Hertz for the aquisition search
  • Threshold: the smallest ration of the highest to the lowest peak in the aquisition search space for which aquisition successful is declared.

Tracking

  • enable_tracking = true|false;
  • CorrelationLength: Correlation length in seconds

DLL parameter section:

  • DiscriminatorType: early minus late ("EML") and dot-product ("DP") are possible choices
  • EarlyLateSpacing: the early late spacing in chips
  • DampingRatio: the DLL damping ratio
  • NoiseBandwidth: the DLL noise bandwidth

PLL parameter section:

  • DampingRatio: the PLL damping ratio
  • NoiseBandwidth: the PLL noise bandwidth

Configuration file example

Simulation:
{
        SamplingFrequency = 40e6; // Hz
        c0 = 2.99e8;
        SignalLength = 10.0; // s
        IntermediateFrequency = 15e6; // Hz
        
        ConcBufSize = 0.001; // in s

        result_directory = "Result";
        append_date_to_outdir = true;

        SNSets = (
                {       Title = "Signal Generation";
                },
                {       Title = "Software Defined Receiver";
                }
        );

        SNBlocks = (

                {       Type = "snSignalGenerateGPS";
                        SNSet = 0;      
                        SignalType = "C/A";     
                        PRN = 10;
                },

                {       Type = "snLowPassFilter";
                        Order = 64;
                        CutOffFrequency = 10.23e6;
                        SNSet = 0;                       
                },

                {       Type = "snChannel";
                        SNSet = 0;                       
                        File = "/home/fschubert/CIRs/DLRLMS_test7.h5";
                        interpolation_bandwidth = 10.23e6;
                },

                {       Type = "snNoise";
                        SNSet = 0;                       
                        snr_db = 45.0;
                        start_sec = 0.0;
                },              

                {       Type = "snADC";
                        SNSet = 0;
                        adc_bits = 3;           
                        enable_agc = true;
                        agc_lowest_amplification_dB = -6.0;
                        agc_highest_amplification_dB = 42.5;
                },

                {       Type = "snSDRGPS";
                        SNSet = 1;                       
                        SignalType = "C/A";             
                        PRN = 10; 

                        CorrFuncSamples = 13; // amount of additional samples on correlation function
                        CorrFuncStart = -1.5; // start here with additional corr func samples in chips
                        CorrFuncDist = 0.25; // distance between corr func samples in chips
                        
                        WriteCorrFunc = false;

                        DoGPSAquisition = false;
                        StartSample = 10;
                        
                        Aquisition:     
                        {       
                                SNSet = 1;                       
                                Plot3D = true;
                                Length = 1e-3;
                                aq_freq_band = 10000.0; // Hz
                                aq_freq_step = 250.0; // Hz
                                Threshold = 1.5;
                        };              

                        DoGPSTracking = true;
                        Tracking:
                        {
                                SNSet = 1;                      
                                CorrelationLength = 0.001; 
                                DLL:
                                {
                                        DiscriminatorType = "EML";
                                        EarlyLateSpacing = 1.0;
                                        DampingRatio = 0.707;
                                        NoiseBandwidth = 5.0;
                                };
                                PLL:
                                {
                                        DampingRatio = 0.707;
                                        NoiseBandwidth = 25.0;
                                };
                        };
                }
        ); // end SNBlocks
}; // end Simulation

Plotting:
{
        UpdateInterval = 5000; // ms
        PlotXSize = 512L; // samples to be plottet. format: long (L) 
};

SNACS command line parameters

  • -f file: read configuration from file
  • -s: start simulation after loading configuration file
  • -d x: set debug level to x