Example 04 - Simulation with channel impulse response files

This example shows the simulation of a channel impulse response (CIR) with SNACS. In this example we use the simple CIR file which was generated in Example 03.

We can use the same SNACS configuration file structure as in Example 02 we only have to insert the "snChannel" module and provide the correct CIR file name:

                {       Type = "snChannel";
                        file = "../../examples/example_04/snacs_cir_moving_los_v01.h5";
                        interpolation_type = "SINC";
                        interpolation_bandwidth = 10.23e6;
                },              

The same signal is defined for both signal generation and tracking. The complete configuration file for the simulation example is given below.

You can start it by running

cd snacs/trunk/release
./SNACS-release -f ../../examples/example_04/example_04_gps.cfg 

This is a screenshot of the running simulation:

example-04-screenshot.png
SNACS screenshot of example 04

You can use the MATLAB script plot_snacs_results_example04.m to plot the results:

snacs-result_example04.png
SNACS simulation result of Example 04

This is the complete configuration file for the simulation example:

1 /*
2  * Example configuration file for
3  *
4  * SNACS - The Satellite Navigation Radio Channel Simulator
5  *
6  * example_04_gps.cfg
7  *
8  * Demonstration of a SNACS simulation with GPS signal generation
9  * and the channel impulse response file which was generated in Example 03.
10  *
11  * Copyright (C) 2010 F. M. Schubert
12  *
13  */
14 
15 Simulation:
16 {
17  sampling_frequency = 40e6; // Hz
18  c0 = 2.99e8;
19  length = 5.0; // s
20 
21  conc_buf_length = 0.001; // in s
22  buffers_per_concbuf = 2;
23 
24  result_directory = "/tmp/snacs-result_example04";
25  append_date_to_outdir = false;
26 
27  SNBlocks = (
28  { Type = "snSignalGenerate";
29  start = 0.0001;
30  signal = {
31  inphase = {
32  code = "C/A";
33  prn = 1;
34  modulation = "BPSK(n)";
35  n = 1.0;
36  data_type = "none";
37  };
38  };
39  },
40 
41  { Type = "snChannel";
42  file = "../../examples/example_03/snacs_cir_moving_los_v01.h5";
43  interpolation_type = "SINC";
44  interpolation_bandwidth = 10.23e6;
45  },
46 
47  { Type = "snADC";
48  intermediate_frequency = 15e6; // Hz
49  adc_enable = true;
50  adc_bits = 4;
51  vga_enable = true;
52  vga_lowest_amplification_dB = -6.0;
53  vga_highest_amplification_dB = 42.5;
54  },
55 
56  { Type = "snSDRStandard";
57 
58  signal = {
59  inphase = {
60  code = "C/A";
61  prn = 1;
62  modulation = "BPSK(n)";
63  n = 1.0;
64  data_type = "none";
65  };
66  };
67 
68  intermediate_frequency = 15e6; // Hz
69  aquisition_enable = true;
70 
71  Aquisition:
72  {
73  plot_3d = true;
74  length = 1e-3;
75  aq_freq_band = 10000.0; // Hz
76  aq_freq_step = 250.0; // Hz
77  threshold = 2.5;
78  };
79 
80  tracking_enable = true;
81  Tracking:
82  {
83  DLL:
84  {
85  discriminator_type = "EML";
86  correlation_length = 0.001;
87  early_late_spacing = 1.0;
88  damping_ratio = 0.707;
89  noise_bandwidth = 5.0;
90 
91  corr_func_samples = 13; // amount of additional samples on correlation function
92  corr_func_start = -1.5; // start here with additional corr func samples in chips
93  corr_func_dist = 0.25; // distance between corr func samples in chips
94 
95  write_corr_func = false;
96  };
97  PLL:
98  {
99  damping_ratio = 0.707;
100  noise_bandwidth = 25.0;
101  };
102  };
103  }
104 
105  ); // end SNBlocks
106 }; // end Simulation
107 
108 Plotting:
109 {
110  UpdateInterval = 500; // ms
111  PlotXSize = 300L; // pixel to be plottet. format: long (L)
112  plot_buffer_length = 0.0001; // s
113 };
114