### Sidebar

public:vievs_manual:simulation

# Simulation

## Overview of VIE_SIM

With the VieVS simulation module (VIE_SIM) simulated VLBI observables are generated, taking into account the three most important stochastic error sources in VLBI (additionally the simulation of source structure was added later on). VIE_SIM sets up the o-c vector (observed minus computed) of the least-squares adjustment at each epoch. The artificial observations from the VieVS simulator (VIE_SIM) are then transformed to databases in NGS format.

Group delay observables are calculated containing the following four main stochastic error sources in VLBI: The wet troposphere delay, the station clock error, the measurement noise and the source structure (see Equation below). The wet troposphere delay has the largest impact on the error.

$$o-c = (wzd_2 \times mfw_2(el) + clock_2) - (wzd_1 \times mfw_1(el) + clock_1) + ss + wn$$

$wzd_{1,2}$ and $clock_{1,2}$ are the simulated zenith wet delays and clock values at the station 1 and 2 and $mfw_{1,2}(el)$ are the corresponding wet mapping functions for the elevation angles $el$ which are assumed to be error-free. The source structure ($ss$) and the white noise ($wn$) are added per baseline.

## Input files

### NGS file

You can select the sessions to be simulated in the GUI (File - Set input files), e.g. from the VieVS/DATA/SCHED, VieVS/DATA/NGS or VieVS/DATA/SIM folder.

### Simulation parameters file

The input simulation parameters file is located in the VieVS/DATA/TURB folder. It contains station names (8 characters), the refractive index structure constant [$10^{-7}m^{-1/3}$], the effective height of wet troposphere [m], components of the wind vector [m/s], the a priori zenith wet delay [mm], the correlation interval [m], the step width for the numerical integration [m], the clock Allan Standard Deviation and the white noise [ps].

## Output files

The simulated NGS files are stored in the VieVS/DATA/SIM/year directory. In DATA/LEVEL4/your_dir you find the corresponding Matlab structure files.

## Perform simulations

After starting Matlab you should select the VieVS/WORK/ directory as current folder. Typing “VieVS” in the Matlab command window starts the interface of the latest version of VieVS.

• In the GUI (File - Set input files) you can choose the sessions to be simulated. Do not use outlier files and, if OPT files exist, create an empty OPT directory (e.g. 'SIM'). Select this directory in the GUI before starting the simulator.
• In the GUI (Parameters - observation restrictions) set the quality code limit to a large number ($> 9$).
• After you select the Simulation menu label on the top of the interface, the interface of VIE_SIM appears (as shown in the Figure below). You can choose the parameters to be simulated and enter the number of days and a starting point for the running number of the NGS files. The additional options include 'set reference clock to zero' and 'write ngs file'. You can choose a file containing the simulation parameters (stored in VieVS/DATA/TURB/ folder). An alternative option is to directly enter the values, these will then be applied to all stations. If you want to simulate source structure as well you have to select a predefined catalog which contains the source structure of every source. It shall be noted here, that while clk, trp and wn have a stochastic component that changes for each simulation run, source structure is a geometrical quantity and is identical for the individual observations in repeated simulation runs. Hence it is a systematic effect.
• In the menu (Run - Run options) the checkboxes VIE_INIT, VIE_MOD and VIE_SIM have to be selected to run the simulation.
• It is possible to do the simulation and parameter estimation in the same run. Just add the checkbox VIE_LSM.

The simulation tool is very useful to test different schedules. Make sure to create an NGS file while running VIE_SCHED and use this file to do the simulations. You can even do everything at once by selecting all the modules (VIE_SCHED, VIE_INIT, VIE_MOD, VIE_SIM, VIE_LSM) in the Run - Run options menu.