JPL Publication 87-24 

UNIX-Based Data Management System 

for the Mobile Satellite Propagation 

Experiment (PiFEx) 

Ani1 V. Kantak 

- -- 

(N AS A-CB- 18 50 2 3) UN I X-Ba SED DATA HA 1y AGE HE IT 

SYSTEM FOE THE HOBILE SATELLITE PROPAGATIOM 

EXPERIMENT (PiFEx) 

76 P CSCL 05B 

[Jet Propulsion Lab. 1 

G3/82 

September 15,1987 

NASA 

National Aeronautics and 

Space Administration 

Jet Propulsion Laboratory 

California Institute of Technology 

Pasadena, California 

Ii89-25073 

Unclas 

0211538 
JPL Publication 87-24 

UNIX-Based Data Management System 

for the Mobile Satellite Propagation 

Experiment (P 

Ani1 V. Kantak 

September 15,1987 

NnSA 

National Aeronautics and 

Space Administration 

Jet Propulsion Laboratory 

California Institute of Technology 

Pasadena, California 

FEx) 
The research described in this publication was carried out by the Jet Propulsion 

Laboratory, California Institute of Technology, under a contract with the National 

Aeronautics and Space Administration. 

Reference herein to any specific commercial product, process, or service by trade 

name, trademark, manufacturer, or otherwise, does not constitute or imply its 

endorsement by the United States Government or the Jet Propulsion Laboratory, 

California Institute of Technology. 
ABSTRACT 

A new method is presented for handling data resulting from Mobile 

Satellite propagation experiments such as the Pilot Field 

Experiment (PiFEx) conducted by JPL. This method uses the UNIX 

operating system and C programming language. The data management 

system is implemented on a VAX minicomputer. The system 

automatically divides the large data file housing data from 

various experiments under a predetermined format into various 

individual files containing data from each experiment. The 

system also has a number of programs written in C and FORTRAN 

languages to allow the researcher to obtain meaningful quantities 

from the data at hand. 

iii 
CONTENTS 

1 . INTRODUCTION ................... 1 

2 . DATAFORMAT ................... 3 

3 . TRANSFER OF DATA FROM THE MASS STORAGE DEVICE 

TO THE MINICOMPUTER ............... 11 

4 . DATA BASE MANAGEMENT SYSTEM ........... 13 

5 . CALIBRATION ................... 15 

5.1 Calibration of Files ............ 18 

5.2 PIFEX1.F .................. 19 

5.3 PIFEX2.F .................. 22 

6 . FILE HANDLING .................. 25 

6.1 PIFEX3 .................. 26 

6.2 PIFEX4.F .................. 28 

6.3 PIFEX5.F . . 30 

6.4 PIFEX6.F .................. 32 

7 . PROGRAMS FOR PROPAGATION DATA ANALYSIS ...... 34 

7.1 PIFEXIO.F .................. 35 

7.2 PIFEX1l.F .................. 38 

7.3 PIFEX12.F .................. 41 

7.4 PIFEX13.F .................. 44 

7.5 PIFEX14.F .................. 48 

APPENDIX ....................... 51 

PRECEDING PAGE BLANK NOT FILMED 

V 
Figures 

1. 

2. 

3. 

4. 

5. 

6. 

7. 

8. 

The DAS and its interfaces wLth the experiments. . 

Format of a 2.5-minute file . . . . . . . . . . . 

Representative output of the PIFEXlO program . . . 

Representative output of the PIFEXll program . . . 

Representative output of the PIFEX12 program . . . 

Representative plot of the signal amplitude 

using the AKPLOT routine . . . . . . . . . . . . . 

Representative plot of the signal phase using 

the AKPLOT routine . . . . . . . . . . . . . . . . 

Representative plot of the frequency and 

magnitude of the Fourier transform using the 

AKPLOT routine . . . . . . . . . . . . . . . . . . 

Tables 

1. Inputs from various data sources . . . . . . . . . 

2. Reference and pilot channel calibrations . . . . . 

5 

12 

37 

40 

43 

46 

47 

50 

7 

17 

vi .. .* I. _*. .. . ... < 
SECTION 1 

INTRODUCTION 

The Pilot Field Experiment (PiFEx) was an attempt to mimic the 

proposed Mobile Satellite (MSAT) scenario. Conducted at the 

National Oceanic and Atmospheric Administration (NOAA) 1000-foot 

tower located at Denver, Colorado, PiFEx consisted of a fixed 

transmitting station that transmitted a known data pattern under 

the 8-phase modulation scheme. The transmitted signal was 

received by a transponder located at t h e t o p of the NOAA tower 

and, after frequency translation, was retransmitted to a receiver 

located in a van. The van containing the receiver was driven 

around the tower in a predetermined fashion so as to simulate the 

mobile receiver in the MSAT project. While being driven around 

the tower, the van received the signal, appropriately processed 

it, and finally stored it in a mass storage device for postexperiment processing. 

The major aims in the PiFEx propagation experiment were to define 

the mobile communications channels and to test the workability of 

a number of new concepts used to design various components of the 

receiver system. These components included subsystems like the 

JPL-designed and -developed mechanically steered antenna for 

tracking and locking onto the incoming information-bearing 

signal, and the data acquisition and collection subsystem. The 

result of such an experiment is usually large amounts of data 

stored in either magnetic tapes or microcomputer floppy 

diskettes. In general, because there are such large amounts of 

1 
data, they usually reside on a minicomputer rather than a 

microcomputer. 

One of the researcher's main tasks thus becomes accessing the 

data according to his needs but with a minimum of effort. Even 

though most minicomputer and mainframe computer systems have 

their own data base management systems, most of these systems 

have been created for commercial (e.g., banking) data and either 

are unsuitable for scientific computational efforts or entail a 

substantial investment that may not be justifiable. In general, 

tailoring such a commercial data -handling system to handle 

scientific data such as the data from the PiFEx propagation 

experiment would require many hours of effort and result only in 

extremely inefficient use of the data base management system's 

capabilities. 

t 

The PiFEx data are currently stored on a VAX 780 minicomputer 

running on the UNIX operating system. The system also has C and 

FORTRAN compilers. What follows in this report is a method to 

provide a system to manage the PiFEx data on the VAX in an 

interactive way. The system provides not only the file handling 

necessary to retrieve the desired data, but also several FORTRAN 

programs to generate some standard results pertaining to 

propagation data. 

2 
SECTION 2 

DATA FORMAT 

As was described before, the PiFEx experiment used a fixed 

transmitter to transmit a known data pattern to the transponder 

located at the top of the NOAA tower. The receiver was housed in 

a mobile van which was driven around the tower in a predetermined 

fashion to generate the data the researchers needed. The received 

signal was appropriately sampled and stored into a mass storage 

device by the data collection system. PiFEx hosted quite a few 

experiments, but the data can be categorized into four distinct 

classes of data: 

1) Antenna pointing experiment data: The purpose of this 

experiment was to quantify effects of electronic warmup, 

ambient temperature change, vehicle turn 

rate/acceleration, vehicle vibrations, and details of 

the tracking algorithm on the pointing performance of 

the antenna. 

2) Radio experiment data: This experiment was useful in 

measuring the radio's performance in tracking the 

received pilot signal with or without Doppler. It was 

also used to measure the radio's performance in 

acquiring the signal with or without Doppler, and in 

conjunction with the antenna pointing system acquisition 

mode or tracking mode. 

3 
3) Modem experiment data: This experiment helped to 

determine the bit and packet error performance of the 

modem in the fading channel characteristic of the mobile 

satellite service. This experiment also measured the 

performance of the modem's unique word detection system. 

4) Propagation channel characterization data: The data from 

this experiment is useful to characterize the 

communications channel in terms of fading and multipath 

losses. 

The Data Acquisition System (DAS) consisted of an IBM ATcompatible microcomputer system, data acquisition boards, a 

keyboard, a color monitor, and finally a mass storage device. 

Figure 1 shows the DAS and all its interfaces with the 

experiments. The DAS operated on a continuous, real -time basis, 

gathering various data generated by the experiments described 

above. Each experiment produced different data to be recorded for 

post-analysis. Some of the data were analog in nature, while 

others were digital. The DAS was charged with the responsibility 

of converting the analog data into digital data by the usual 

methods of sampling and performing analog-to-digital (A/D) 

conversion. The output of the entire experiment was stored in a 

Bernoulli box (the mass storage device). Table 1 shows inputs 

from various data sources, analog as well as digital, along with 

the sample size required for the desired accuracy. 

4 
d 9 w -4 

3 c M 

a 

c 

Id 

3 
Table 1. Inputs from various data sources 

REFERENCE I CHANNEL 

REFERENCE C! CHANNEL 

I TEN 

~ ~ ~~~~ 

1 o(:)o 12 

1 0 0 0 12 

~ ~~~~ ~ ~~~ 

DYNAMIC LOOF ERROR 

STATIC LOOP ERROR 

SAMPLING RATE 

(SANFLES/SEC) 

66.667 

66.667 

100 

100 

FILOT I CHANNEL 1 (3 c.) 1:) 

FILOT 0 CHANNEL 1 000 

ANT E NN I? C W4 T R OL 1 OC) 

S FEE G ME & C; UR E ME 14 T 1 16 I 

D=DIGfTAL DATA 

CI 

a 

CI 

~~ 

A 

A 

a 

D 

PRECEDING PAGE BLANK NOT FILMED 

7 
The DAS sampled the various data and stored them in a binary 

offset format. This particular format is the result of the DAS 

software and is not common in computers. However, the DAS has the 

capability for converting the numbers from binary offset format 

to the more generally used ASCII format numbers. The data were 

divided into four different subsets according to their data rates 

and data-producing sources. The first set contains the reference 

and pilot channel in-phase and quadrature voltages. This set 

provides the experimenter with the amplitude and phase of the 

incoming reference and pilot channel signals. The sampling rates 

of the in-phase and quadrature channels were selected to be 1000 

samples per second for the pilot as well as reference channels. 

This data set was named the "Propagation Data Set" for obvious 

reasons. The second data set consisted of data from the dynamic 

and static phase lock loop error of the receiver system, and this 

data set was termed the llLoop Data Set." The third set of data 

was termed the "Antenna Data Setg1 and it contained the normalized 

difference, log sum, and temperature. These data were from the 

mechanically steered antenna system designed by JPL. Each source 

in this data set was sampled at a rate of 100 samples per second. 

All the three sets of data described above contained analog data, 

i.e., the DAS sampled the output at the proper rates, performed 

an A/D operation on them, and finally stored the data in an 

appropriate data set. The fourth data set was termed the "Digital 

Data Setg1 because it stored data resulting from digital sources 

in the experiment. This set contained an azimuth position data 

file, a gyro data file, a van speed data file and, finally, a 

file termed "spare data." The spare data file was included to 

8 
make room for future expansion in digital sources. The digital 

data are sampled at relatively low rates. 

The DAS was designed to accumulate 2.5 minutes of data from all 

four sets of data in its random access memory while 

simultaneously performing the A/D conversion for the analog 

sources. At the end of 2.5 minutes, the data were dumped into the 

mass storage device (the Bernoulli box). This action took some 

finite amount of time (much smaller than 2.5 minutes), during 

which the DAS did not gather any new data. After the data were 

dumped into the Bernoulli box, the 2.5 minutes of data 

accumulation started again. Using the data rates given in Table 

1, one cancompute that the 2.5 minutes of data accumulation from 

each set of data mean that there are 600,000 samples from the 

first set, 20,000 samples from the second set, 30,000 samples 

from the third set, and 50,000 samples from the fourth set. Thus, 

in all, there are 700,000 samples (numbers) in each 2.5 minutes' 

accumulation. This 2.5 minutes of data accumulation formed a file 

in the mass storage device. At the end of the experiment all the 

data were resident in numerous 2.5-minute files. Figure 2 shows 

the details of a typical 2.5-minute file from the mass storage 

device. 

One thing to note here is that the DAS is a 16-bit machine, so 

when the sample needed only 12 bits to get the desired accuracy, 

the machine stored it as a 16-bit number with the four most 

significant bits turned to 0. 

9 
This section has described the data that were gathered as a 

result of the PiFEx experimentation; the following sections 

provide a possible data management system for the gathered data. 

10 
SECTION 3 

TRANSFER OF DATA FROM THE MASS STORAGE DEVICE TO THE MINICOMPUTER 

The DAS only sampled and accumulated the data into the mass 

storage device (Bernoulli box): it will not be used to analyze 

the data. This will be done by the VAX minicomputer. For this 

reason the data from the Bernoulli box will have to be 

transmitted to the VAX in some way. As was mentioned before, the 

data stored in the Bernoulli box is in a binary offset format: 

ordinarily a program would have to be written to convert this 

binary offset format to the ASCII format. However, to avoid this 

situation, the capability of the DAS to read and convert the 

numbers written in the binary offset format to the ASCII format 

will be used, and then the data will be sent to the VAX 

minicomputer via a hardwire connection. The DAS is equipped to do 

this easily. 

As a result, we will assume in what follows that all the 2.5- 

minutes files have been duly converted to ASCII format and 

transported t o t h e VAX by the process described above. We will 

also assume that the order in which the data were stored in the 

Bernoulli box did not change during the transportation from the 

microcomputer to the minicomputer. Consequently, Figure 2, which 

shows the 2.5-minute data file structure in the Bernoulli box, 

also shows the file structure in the VAX. 

11 
REFERENCE I 

REFERENCE G! 

FILUT I 

FILOT Q * 

+ 

------- 

DYN LP ERROR 

STA LP ERROR 

+ 

------- 

NOFiM D I FFRNC 

LOG SUM 

+ 

------- 

AZIMUTH F'OS * 

+ 

- - - .- - - - 

GYRO RFtTE * 

------- 

EXF'T MO2E 

+ 

+ 

------- 

vfird SFEED 

+ 

------- 

SFARE DATA 

+ 

+ 

SET #1 : F'ROPDATA 

TOTAL SAMPLES = 6(300(:)0 

SET #2 : LOOPDATA 

TOTAL SAMPLES = 2OC)OO 

SET #Z : 

TOTAL SRMFL 

---t-- 

---t-- 

Figure 2. Format of a 2.5-minute file 

12 
SECTION 4 

DATA BASE MANAGEMENT SYSTEM 

The data base management system consists of several programs 

residing in the VAX minicomputer. These programs can be divided 

into two categories: one consisting of programs that handle the 

files and the other consisting of programs that handle the 

number-crunching aspects connected with the data. To use these 

files the user needs to log on to the VAX under his account code 

and then copy all the programs in the /U/KANTAK/PIFEX directory 

into his own directory. This is necessary to preserve the 

original files in case of a mishap with the user files. Once the 

data are transferred to the VAX minicomputer in the form of 

numerous 2.5-minute ASCII files, the above mentioned set of 

programs will be used to handle the data. These programs are 

listed below: 

Programs for coarse handling of the 2.5-minute file data: 

PIFEXl. F Calibration program. 

PIFEX2. F Calibration program. 

PIFEX3 File-handling program. 

PIFEX4. F Propagation data (set #1) handling program. 

PIFEX5. F Loop data (set #2) handling program. 

PIFEXG. F Antenna data (set #3) handling program. 

Programs for propagation data analysis: 

PIFEXlO. F Computes the probability of the signal 

13 
level's being greater than or equal 

abscissa. 

Computes the probability density of signal 

levels and least square fits to the proper 

Rician density function. 

Computes the frequency of the fade duration. 

to the 

PIFEXll. F 

PIFEX12. F 

PIFEX13. F Creates a downloadable file for AKPLOT. 

PIFEX14. F Computes the Fourier transform of 1024 

samples. 

The executable versions of the above files are included in the 

package so that the user does not have to compile anything. If 

the FORTRAN file is PIFEX##.F, then the corresponding executable 

file is dalled PIFEX##EX. 

14 
SECTION 5 

CALIBRATION 

The data that were sampled from the reference and pilot I and Q 

channels were essentially voltages, and these values depended 

upon the power supplied to the instruments. This implied that 

calibration of the instruments was necessary before data 

recording began. The following steps were followed to generate 

the calibration table to be used to scale the data: 

1. Connect the directional coupler (or the switch located at 

the antenna terminal) of the reference receiver to the 

calibration signal source. 

2. Vary the calibration signal power from -100 dBm to -70 dBm 

in steps of 2 dBm. The Data Acquisition System will sample 

the I and Q channels of the reference receiver once per step 

of the calibration signal, and the voltage levels will be 

stored in the Bernoulli box. 

3. Connect the directional coupler (or the switch located at 

the antenna terminal) of the pilot receiver to the 

calibration signal source. 

4. Follow the same step as for the reference receiver 

calibration. 

5. Turn the switches on the reference and pilot receivers to 

their respective antennas. 

15 
At this point the van was ready to travel and take the readings 

for all the planned experiments. At the end of the experiments 

the calibration steps described were executed again to ensure 

that the parameters of the system had remained essentially 

constant. As a result of the calibration the following table 

(Table 2) was generated for both the reference and pilot 

channels. These two tables were stored in the Bernoulli box 

during the PiFEx test, and then they were transferred to the VAX 

minicomputer along with the rest of the data. 

NOTE: The computer file storiny this data will be a sequential 

file and each line of the above tsble wjll be stored as: 

In-phase channel volts: 

Quadrature channel volts: 

Calibration signal power (dBm): 

16 
Table 2. Reference and pilot channel calibrations 

CALIBRATION 

SI GIML 

F'OWER (durn) 

IN FHASE (I) QUfiDRATURE (Q) 

CHFINNEL CHANNEL 

VOLTAGE (VOLTS) VOLTAGE (VOLTS) 

- 1 1 0 1 

17 

i 
5.1 CALIBRATION OF FILES 

Calibration is needed only for the propagation data, i.e., for 

the first set of data in the 2.5-minute file (see Figure 2). 

There are 600,000 samples to be calibrated, and the remaining 

data in the 2.5-minute files (i.e., set #2, set #3 and set #4) 

should not be changed. The calibration tables for both the 

reference and pilot receivers were transmitted to the VAX 

computer and will be available to the user of the propagation 

data (the data of set #l). 

18 
5.2 PIFEX1.F 

PURPOSE : This program allows the user to generate the 

calibration file if it was not generated at the 

experiment site, which may happen if there are 

any unforeseen experimental conditions at the 

site. If the calibration file was generated at 

the experiment site and was transferred to the 

VAX along with the data, then this program is 

not necessary. 

USAGE : The symbolic file of the program is called 

PIFEX1.F. The extension llF1l signifies that it 

is a FORTRAN file. The executable file of this 

program, called PIFEXlEX, is also provided so 

that the user does not have to compile it. To 

run this program the user should type 

PIFEXlEX 

and press return. 

The following question and answer session will then begin: 

PIFEXl : Enter the desired calibration file name: 

USER RESPONSE : The user should enter the desired name of the 

calibration file being generated. The user may 

have to run this program two times to generate 

the calibration files for the pilot and 

19 
reference channels. 

NOTE 

PIFEXl 

: It should be noted by the user that if the user 

specifies an already existing file, then the 

system will rewrite on this file and the 

original data will be lost. 

: Enter the calibration test quantities one by one 

using IcFl1 format. Inputting 0 for all entries 

will stop the program. 

Enter sample number 1 quantities: 

Power at the antenna terminal (dBm): 

In-phase channel voltage (volts): 

Quadrature channel voltage (volts): 

USER RESPONSE : The user will input the power at the antenna 

terminal, the in-phase channel voltage, and the 

quadrature channel voltage, one by one in the 

real number format, i.e., ####.###. The decimal 

point has to be in every input explicitly. When 

the user has reached the end of his calibration 

table, he should enter a 0 for each 

entry, and this will stop the input process. No 

further user inputs are required. 

20 
NOTE : At this point PIFEXl generates for each I and Q 

channel input a quantity vsqre, where 

vsqre=(I channel volts)2 + (Q channel volts)2 

and it stores I channel volts, Q channel volts, 

the power in dBm, and the vsqre in the desired 

calibration file named by the user earlier. 

PIFEXl OUTPUT : Showing the newly created file: 

I channel Q channel volts Input power dBm vi*vi+vq*vq 

21 
5.3 PIFEX2.F 

PURPOSE 

USAGE 

: This program calibrates the propagation data 

(data set #1) in any designated 2.5-minute file. 

This program does not change the data that 

follows the propagation data: i.e., data set #2, 

data set #3, and data set #4 remain unchanged 

because they do not have to be calibrated. 

: The symbolic file of the program is called 

PIFEX2.F. The extension "F" signifies that it is 

a FORTRAN file. The executable file of this 

program, called PIFEX2EX, is also provided so 

that the user does not have to compile it. To 

run this program the user should type 

PI FEX2 EX 

and press return. 

The following question and answer session will then begin: 

PIFEX2 : Enter the input file name: 

USER RESPONSE : The user should enter the name of the 2.5-minute 

data file he desires to process (calibrate). 

PIFEX2 : Enter the output file name: 

USER RESPONSE : The user should enter the name of the desired 

22 
NOTE 

PIFEX2 

USER RESPONSE 

PIFEX2 

USER RESPONSE 

PIFEX2 OUTPUT 

output file that will contain the calibrated 

data. 

: It should be noted that if the name of the file 

specified is new, then a new file will be 

created, but if the file name is already in use, 

then the PIFEX2 program will overwrite the file, 

destroying its original contents. 

: Enter the pilot calibration file name: 

: The user should enter the pilot calibration file 

name. This file either was generated using the 

PIFEXl program or was generated on site and was 

transmitted to the VAX. 

: Enter the reference calibration file name: 

: The user should enter the reference channel 

calibration file name. This file either was 

generated using the PIFEXl program or was 

generated on site and was transmitted to the 

VAX . 

: The original 2.5-minute input file given to 

PIFEX2 program has in its data set #1 REF I, REF 

Q, PIL I, and PIL Q samples. There are 600,000 

such samples. The output file will now contain 

23 
the REF SIG LEVEL (dBw), REF PHASE (rad), PIL 

SIG LEVEL (dBw), and PIL PHASE (rad). Please 

note that the signal levels are in dBw and not 

dBm. Data set #2, data set #3, and data set #4 

in the original 2.5-minute file remain unchanged 

in the output file. Thus the size of the input 

file does not change; only the calibrated 

numbers are substituted for the raw numbers. 

24 
SECTION 6 

FILE HANDLING 

At this point the user has the 2.5-minute data files he is 

interested in calibrated and under the desired names. As was 

mentioned before, each calibrated 2.5-minute file has calibrated 

data set #1, data set# 2, data set #3, and data set #4. The user 

may be interested in any one or more of these data sets. The 

program PIFEX3 is supplied towards this end. 

25 
6.1 PIFEX3 

PURPOSE 

USAGE 

: This program takes the calibrated or 

uncalibrated 2.5-minute file and segments it 

into eight different output files containing 

data set #1, data set #2, data set #3, and all 

the separate files of data set #4, respectively. 

The names of these eight files are : PROPDATA, 

LOOPDATA, ANTDATA, AZ I DATA, GYRODATA, 

EXPTMODE, SPEEDATA, and SPARDATA. 

: PIFEX3 is not a FORTRAN file; it is written in 

the UNIX system language. The program is an 

executable file, and to use it the user has to 

enter 

PIFEX3 2.5-MINUTE FILE NAME 

and press return. 

PIFEX3 OUTPUT : The output of PIFEX3 will be the eight different 

files named above. The output file named 

llPROPDATAvl will contain only the calibrated or 

uncalibrated propagation data (i.e., data set 

#l). llLOOPDATA1l will contain only the dynamic 

loop error and the static loop error (i.e., data 

set #2). The llANTDATA1l will contain the 

normalized difference, the log sum, and 

temperature. Basically, IIANTDATAIv has data set 

26 
#3. Finally, the data set #4 files are as 

follows: ooAZIDATAoo, which contains the antenna 

azimuth position; otGYRODATAoo, which contains the 

vehicle turn rate; IoEXPTMODEo1, which contains 

the information, valid or not: loSPEEDATA1t, which 

contains the van speed; and loSPARDATAoo, which 

will be the empty file provided for future 

expansion. 

27 
I 6.2 PIFEX4.F 

PURPOSE 

USAGE 

: The file llPROPDATAtl contains only the 

Dropagation data, with the four quantities of 

each sample of the reference and pilot receiver 

arranged in the following order: REF SIG LEVEL, 

REF SIG PHASE, PILOT SIG LEVEL, and PILOT SIG 

PHASE. It is anticipated that the researcher 

would like to have each of these four quantities 

in its own separate file. 

: The ItFV1 extension on the file name shows that 

the file is a FORTRAN file. The executable file 

is also given, under the name PIFEX4EX. To use 

this file, the user has to type 

PIFEX4EX 

and press enter. 

The following question and answer session will then begin: 

PIFEX4 : Enter the file name to store the ref signal 

levels: 

USER RESPONSE : The user should enter a name f o r t h e file that 

will store the reference signal levels. 

NOTE : If the name given is a new name (not already 

existing), then PIFEX4 will create the file, but 

28 
PIFEX4 

USER RESPONSE 

PIFEX4 

USER RESPONSE 

PIFEX4 

USER RESPONSE 

PIFEX4 OUTPUT 

if the file already exists, then PIFEX4 will use 

this file and rewrite on the original data. This 

note will not be repeated for PIFEX4 and it 

should be assumed to be applicable whenever a 

file name is to be entered by the user. 

: Enter the file name to store the ref signal 

phases: 

: Similar to the first response. 

: Enter the file name to store the pilot sig 

levels: 

: Similar to the first response. 

: Enter the file name to store the pilot sig 

phases : 

: Similar to the first response. 

: The data from the ltPROPDATA1l file will be 

divided into four files: the reference signal 

levels, reference signal phases, pilot signal 

levels, and pilot signal phases files. The names 

of these files, of course, will be usersupplied . 

29 
6.3 PIFEX5.F 

PURPOSE 

USAGE 

: The file llLOOPDATA1l contains only the loop data, 

which consists of measurements of the dynamic 

loop error and static loop error. It is 

anticipated that the researcher would like to 

have each of these two quantities in its own 

separate file . 

: The llF1l extension on the file name shows that 

the file is a FORTRAN file. The executable file 

is also given, under the name PIFEX5EX. To use 

this file, the user has to type 

PIFEX5EX 

and press enter. 

The following question and answer session will then begin: 

PIFEX5 : Enter the file name to store the dynamic loop 

error: 

USER RESPONSE : The user should enter a name for the file that 

will store the dynamic loop error. 

NOTE : If the name given is a new name (not already 

existing), then PIFEXS will create the file, but 

if the file already exists, then PIFEXS will use 

this file and rewrite on the original data. This 

30 
PIFEX5 

note will not be repeated for PIFEX5 and it 

should be assumed to be applicable whenever a 

file name is to be entered by the user. 

: Enter the file name to store the static loop 

error: 

USER RESPONSE : Similar to the first response. 

PIFEXS OUTPUT : The data from the llLOOPDATAtl file will be 

divided into two files: the dynamic loop error 

file and the static loop error file. The names 

of these files, of course, will be usersupplied . 

31 
6.4 PIFEX6.F 

PURPOSE 

USAGE 

: The file IIANTDATAII contains the antenna data, 

which consists of measurements of the normalized 

difference, log sum, and temperature, arranged 

in that order. It is anticipated that the 

researcher would like to have each of these 

three quantities stated above in its own 

separate file. 

: The IIFI1 extension on the file name shows that 

the file is a FORTRAN file. The executable file 

is also given, under the name PIFEXGEX. To use 

this file, the user has to type 

PIFEXGEX 

and press enter. 

The following question and answer session will then begin: 

____-- PIFEXG 

USER RESPONSE 

NOTE 

: Enter the file name to store the normalized 

difference: 

: The user should enter a name for the file that 

will store the normalized difference. 

: If the name given is a new name (not already 

existing), then PIFEXG will create the file, but 

if it already exists, then PIFEXG will use this 

32 
file and rewrite on the original data. This note 

will not be repeated for PIFEXG and it shouldbe 

assumed to be applicable whenever a file name is 

to be entered by the user. 

PIFEX6 : Enter the file name to store the log sum data: 

USER RESPONSE : Similar to the first response. 

PIFEXG : Enter the file name to store the temperature: 

USER RESPONSE : Similar to the first response. 

PIFEX6 OUTPUT : The data from "ANTDATAVg file will be divided 

into three files: the normalized difference, log 

sum, and temperature. The names of these files, 

of course, will be user-supplied. 

33 
SECTION 7 

PROGRAMS FOR PROPAGATION DATA ANALYSIS 

Every 2.5-minute file has the propagation data in data set #l. 

The programs described in Section 6 will separate.the propagation 

data set into its own file. Once the propagation data are 

isolated, the researcher may like to perform the usual operations 

on these data, such as computing the probability of the signal 

level's being greater than or equal to the given level, computing 

the probability density of the signal levels,computing the 

frequency of the fade duration, and generating the Fourier 

transform of the signal levels. Towards that end, a few programs 

are provided as noted in Section 4. 

Most operations on data described in this section generate the 

data for presentation in a plot form and hence make it necessary 

to have a plotter routine either on the VAX or on the 

researcher's microcomputer. A new plotter routine called AKPLOT 

goes a long way towards meeting these plotting needs. AKPLOT is 

both completely interactive and user-friendly. At the beginning 

of every plot there is an interactive session through which 

AKPLOT gathers the parameters necessary for the plot. The plot is 

produced on the screen, and the user is given the ability to 

change the plot to the desired form and finally perform a screen 

dump to a printer to produce a hard copy. AKPLOT was used to 

produce all the graphs in this manual. 

34 
7.1 PIFEXlO. F 

PURPOSE 

NOTE 

USAGE 

: This program is useful in producing data for 

computingthe probability ofthe signal level's 

being greater than or equal to the specified 

signal level. 

: The program specifies the signal level, starting 

at -130 dBw and going to -80 dBw in steps of 0.5 

dBw. For every step the probability of the 

signal level in the given file exceeding the 

specified level is computed and stored. 

: The symbolic file of the program is called 

PIFEXIO.F. The extension ItFtt signifies that it 

is a FORTRAN file. The executable file for this 

program is also provided and is named PIFEXlOEX. 

To run this program the user should type 

PIFEXlOEX 

and press return. 

The following question and answer session will then follow: 

PIFEXlO : Enter the input signal levels file name: 

USER RESPONSE : The user is required to input the name of the 

signal levels file for either the reference 

receiver or the pilot receiver. These files were 

35 
made by use of the PIFEX4 program. 

PIFEXlO : Enter the output file name: 

USER RESPONSE : The user is required to enter the name of the 

output file. 

PIFEXlO OUTPUT : The input to this program is the signal levels 

file, while the output will be two vectors. The 

first vector will contain the signal levels, 

while the second one will contain the 

corresponding probability of the incoming signal 

level's being greater than or equal to the level 

stored in the first vector. The levels in vector 

one will start at -130.0 dBw and reach up to 

-80.0 dBw in steps of 0.5 dBw. Thus there will 

be 100 entries in each vector. Figure 3 shows a 

representative output of this program. 

36 
n 

n 

Q 

H 

UI 

Y 

I E+ 

I El El EI 

D 

..* ....*............. 04.. 

0 . . D 

. 

. - 

3 I I I I I I I I I I I 

-1B -8 -6 -* -2 E 22 

L 

POWER LEVEL CDS> 

‘1 1. 

. \I 

Figure 3. Representative output of the PIFEXlO program 

37 
7.2 PIFEXll. F 

PURPOSE 

USAGE 

: This program computes the probability density of 

the signal levels and fits a Rician density 

function of the proper K factor to the data 

points via least squares fitting. 

: The symbolic file is PIFEX1l.F. As before, the 

extension llF1l indicates that the file is a 

FORTRAN file. The compiled (executable) version 

is supplied in the file PIFEXllEX. To use this 

program the user is required to input 

PIFEXllEX 

and press return. 

The following question and answer session will then begin: 

PIFEXll : Enter the input signal levels file name: 

USER RESPONSE : The user is required to input the name of the 

file storing the signal levels. This file should 

be generated by using the PIFEX4 program. 

PIFEXll : Enter the output file name: 

USER RESPONSE : The user is required to input the name of the 

file in which the output will be stored. If the 

entered name is a new name, then this file will 

38 
be created, but if the name is already in use, 

then PIFEXll will use this file, i.e., the 

original data of the file will be erased. 

PIFEXll OUTPUT : The input to this program is the signal level 

file. The output file, under the user-supplied 

name, will contain 100 entries of x(i) ,y(i) 

pairs where x(i) will contain the signal level 

starting from -130.0 dBw and reaching -80.0 dBw 

in steps of 0.5 dBw, while y(i) will contain the 

corresponding probability density value. The 

next 100 entries in this file will contain the 

pair x(i) ,y(i) where the x(i) value is the same 

as described above, but the y(i) value will be 

the corresponding Rician density value. Thus 

there will be in all 200 rows of entries into 

this file. This information will be needed by 

the plotter routine to be used to plot the 

curves. Figure 4 shows a representative output. 

39 
2 

> 

c 

H 1.5 

Z 

w 

> 

F 1 

H 

J 

H 

u 

Q 

0 

U 

P 

m5 

0 m5 1 1.5 2 

RELFlTIVE POWER 

Figure 4. Representative output of the PIFEXll program 

40 
7.3 PIFEX12. F 

PURPOSE : This program computes the frequency of the input 

data s fade duration. 

USAGE 

The following 

PIFEX12 

USER RESPONSE 

PIFEX12 

USER RESPONSE 

: The symbolic file is PIFEX12.F. As before, the 

extension IIFgt indicates that the file is a 

FORTRAN file. The compiled (executable) version 

is supplied in the file PIFEX12EX. To use this 

program the user is required to input 

PIFEX12EX 

and press return. 

estion and answer session will then beg .n : 

: Enter the input signal levels file name: 

: The user is required to input the name of the 

file storing the signal levels. This file should 

be generated by using the PIFEXI program. 

: Enter the output file name: 

: The user is required to input the name of the 

file in which the output will be stored. If the 

entered name is a new name, then this file will 

be created, but if the name is already in use, 

41 
PIFEX12 

USER RESPONSE 

PIFEX12 OUTPUT 

then PIFEX12 will use this file, i.e., the 

original data of the file will be erased. 

: Enter the desired signal level: 

: This is the signal level used for the fade 

duration. 

: The sampling interval is predefined to be 1/1000 

of a second, i.e., between every two samples 

there is 0.001 seconds of difference. The input 

to this program is the signal levels file. The 

output will be a file containing two vectors, 

x(i) and y(i); i=l,lOO. The first entry, x(i), 

will be the bin number giving the fade duration 

in terms of the samples (e.g., bin number 5 will 

refer to the fade that lasts 5 samples' time, 

i.e., 5*0.001 seconds) and y(i) will give the 

number of times this fade takes place in the 

input file. Figure 5 shows a representative 

output of this program. 

:< . -. 

42 
GI 5 1B 15 

FflDE PURflTION 

Figure 5. Representative output of the PIFEX12 program 

43 
7.4 PIFEX13. F 

PURPOSE 

USAGE 

: This program generates a .downloadable file out 

of the signal levels file, and the signal phases 

file for the use of the plotter routine AKPLOT. 

: The symbolic file is supplied in the file 

PIFEX13.F. The extension ttFt signifies that the 

file is a FORTRAN file. The compiled version 

(executable version) is also supplied and is 

under the name PIFEX13EX. To use this program 

the user has to type 

PI FEXl3 EX 

and press return. 

The following question and answer session will then begin: 

PIFEX13 : Enter the input file name: 

USER RESPONSE : The user is expected to enter the name of the 

file that contains the data that needs to be 

plotted using the plotter routine AKPLOT. 

PIFEX13 : Enter the output file name: 

USER RESPONSE : The user should enter the name of the file under 

which the data prepared for AKPLOT will be 

stored. If the name supplied to PIFEX13 is a new 

44 
PIFEX13 

NOTE 

name (i.e., no file exists under this name), 

then PIFEX13 will create the file and then store 

the output data in that file. If the supplied 

name exists in the directory, then PIFEX13 will 

erase the data in there and replace it with new 

data. 

OUTPUT : The input to this program is the file containing 

the signal levels, and the output of this 

program will be a file that will contain the 

pair x(i),y(i) where x(i) will store the time 

instant, i.e., the sample number*0.001, and the 

y(i) will contain the signal level. There will 

be only 1000 entries in this file. Figures 6 and 

7 show plots of the signal amplitude and phase 

representative of plots using the AKPLOT 

routine. 

: This program may be altered to produce other 

plots using AKPLOT. One may access the symbolic 

file and change the x(i) computation to whatever 

is to be plotted on the x axis, and y(i) may be 

read from the supplied file. Also, one may 

change the beginning of the output file to any 

time instant by jumping a suitable number of 

samples in the input file. 

45 
n 

Y 

J 

5 

E 

-5 

-iB 

-15 

-20 

+5 

Figure 6. Representative plot of the signal amplitude 

using the AKPLOT routine 

46 
n 

Ul 

W 

&I 

as 

d 

W 

c) 

W 

VI 

Q 

I 

0 

J 

z 

d 

H 

VI 

Y 

a 

30 

60 

30 

E 

-30 

-60 

-30 

I 1 I 1 1 I I I I I 

I 

.I 

m 

= 

= 

m 

.. 

I 

- 

m 

.I 

I I I I I I I I I A 

m2 mL) mfi 

TIME t SECONDS 1 

mB 

Figure 7. Representative plot of the signal phase using 

the .AKPLOT routine 

1 

47 
7.5 PIFEX14. F 

PURPOSE 

USAGE 

: This program computes the Fourier transform of 

the first 1024 samples of the input file. 

: The symbolic file is supplied in the file 

PIFEX14.F. The extension I1FI1 signifies that the 

file is a FORTRAN file. The compiled version 

(executable version) is also supplied, under the 

name PIFEX14EX. To use this program the user has 

to type 

PIFEX14EX 

and press return. 

The following question and answer session will then begin: 

PIFEX14 : Enter the input file name: 

USER RESPONSE : The user is expected to enter the name of the 

file that contains the data that needs to be 

Fourier transformed. 

PIFEX14 : Enter the output file name: 

USER RESPONSE : The user should enter the name of the file under 

which the Fourier-transformed data will be 

stored. If the name supplied to PIFEX14 is a new 

name (i.e., no file exists under this name), 
then PIFEXl4 will create the file and then 

store the output data in that file. If the 

supplied name exists in the directory, then 

PIFEX14 will erase the data in there and replace 

it with new data. 

PIFEX14 OUTPUT : The input to this program is the file containing 

the signal levels, and the output of this 

program will be a file that will contain the 

pair x(i) ,y(i) where x(i) will store the 

frequency and y(i) will contain the 

corresponding magnitude of the signal level's 

Fourier transform. There will be only 1000 

entries out of the possible 1024 entries in this 

file. Figure 8 plots the frequency on the x axis 

and the magnitude of the Fourier transform on 

the y axis using the AKPLOT routine. 

49 
n 

h 

# 

J 

W 

3 

W 

J 

Y 

k 

r3 

(f 

I: 

Y 

8 175 

8 15 

8 125 

81 

075 

05 

8 11325 

0 

.................... 

................ 

........... 

-250 -150 -50 5L3 150 2530 

FREGIUENCY I HZ ) 

Figure 8. Representative plot of the frequency and magnitude 

of the Fourier transform using the AKPLOT routine 

50 
APPENDIX 
Symbolic File PIFEX1.F 

c This program creates the necessary calibration file 

c by manually inputtingthe data noted down at the test 

c site during calibration. 

C 

C 

200 

300 

200 

211 

212 

202 

101 

102 

100 

203 

204 

205 

206 

50 

character fname*l2 

logical used 

write(6,200) 

format("Enter the desired calibration file name : 

format (f 20.10) 

read (5,2 01) fname 

Format (a12) 

inquire(file=fname,exist=used) 

if(.not.used)goto 211 

open(unit=ll, file=fname, status=lloldll) 

open(unit=ll, f ile=fname,status=llnewll) 

write(6,202) 

format(" *I) 

i=1 

write (6,101) 

format("Enter the calibration test quantities one 

by onev1) 

write (6,102) 

format("using f format all entries 0 will stop 

the program :I1) 

write(6,202) 

write(6,202) 

write(6,203) i 

format ("Enter sample number (I, i3, quantities : It) 

write(6,202) 

write(6,204) 

format("Power at the antenna terminal (dBm) : 

read(5,300) dbm 

write (6,205) 

format(tlIn phase channel voltage (volts) : I!) 

read( 5,300) vi 

write(6,206) 

format ("Quadrature channel voltage (volts) : It) 

read(5,300) vq 

if(vi.eq.0.0.and.vq.eq.O.O.and.dBm.eq.O.O)goto 50 

write (11,300) vi 

write (11,300) vq 

write(11,300) dbm 

vsqre=vi*vi+vq*vq 

write(11,300) vsqre 

i=i+l 

goto 100 

close (11) 

open (unit=ll, file=fname, status=floldfl) 

1 

goto 212 

1 

52 
write(6,202) 

write(6,209) fname 

write(6,202) 

write(6,202) 

write(6,207) 

write (6,2 02) 

read(11,300) b 

read(11,300) c 

read(11,300) d 

write (6,208) a, b, c, d 

goto 400 

209 format(llShowing the newly created file : 11,a12) 

207 format (7x, ItI channel volts11, 5x, llQ channel volts1t, 

c 5x, "input power (dBm) It, 3x, llvi*vi + vq*vqtt) 

400 read (11,300, end=60) a 

208 format(3x,f17.8,3x,fl7.8,3x,fl7.8,3x,fl7.8) 

60 stop 

end 

53 
Symbolic File PIFEX2.F 

204 

205 

300 

301 

C 

C 

C 

C 

200 

201 

202 

203 

104 

105 

This program calibrates the test data points for the 

propagation test (first 600,000 entries in the incoming 

file) and produces a new file with the calibrated dBw and 

phases of the signal points and the remaining data points 

c remain unchanged. 

C 

dimension xp(1000),yp(1000),xr(lOOO),yr(lOOO) 

logical used 

character finp*12,fout*12,calp*l2,calr*12 

write(6,200) 

format(lIEnter the input file name : 

read (5,201) finp 

format (a12) 

write(6,202) 

format (I1 It) 

write ( 6,2 03 ) 

format(IlEnter the output file name : 

read(5,201) fout 

write(6,202) 

open (unit=ll, f ile=f inp, status=lloldll) 

inquire(file=fout,exist=used) 

if(.not.used)goto 104 

open (unit=12, f ile=fout, stat~s=~lold~~) 

goto 105 

open (unit=12, f ile=fout, stat~s=~~new~~) 

i=1 

j=O 

write(6,204) 

format(llEnter the pilot calibration file name : II) 

read(5,20l)calp 

open (unit=13, file=calp, status=lloldll) 

write(6,202) 

write (6,205) 

format(llEnter the reference calibration file name : It) 

read(5,20l)calr 

format ( f 2 0.10 ) 

read(13,300,end=302)a 

read(13,300)b 

read (13,300) yp (i) 

yp ( i ) =yp ( i ) -3 0.0 

xp(i) = a*a+b*b 

read ( 14,300) a 

open (unit=14, f ile=calr, status=lloldll) I 

I 

1 

I 

302 

read(14,300)b 

read ( 14,3 00) yr ( i) 

yr (i)=yr (i) -30.0 

xr(i) = a*a+b*b 

i=i+l 

goto 301 

n=i-1 

i=1 

54 
500 

211 

212 

read( 11,300) xri 

read (11,300) xrq 

read (11,300) xpi 

read ( 11,300) xpq 

siglevr=xri*xri+xrq*xrq 

siglevp=xpi*xpi+xpq*xpq 

sigphsr=atan2(xrq,xri) 

sigphsp=atan2(xpq,xpi) 

if(siglevr.lt.xr(l))then 

siglevr=xr (1) 

goto 210 

endif 

if(siglevr.gt.xr(n))then 

siglevr=xr (n) 

goto 210 

endif 

if ( s iglevp . It. xp ( 1) ) then 

siglevp=xp (1) 

goto 210 

endif 

if (siglevp. gt . xp (n) ) then 

siglevp=xp (n) 

goto 210 

endif 

do 206 k=l,n-1 

if(siglevr.ge.xr(k).and.siglevr.le.xr(k+l))goto 207 

siglevr=yr (k) + ( (yr (k+l) -yr (k) ) / (xr (k+l) -xr (k) ) ) * 

do 208 k=l,n-1 

if(siglevp.ge.xp(k).and.siglevp.le.xp(k+l))goto 209 

206 continue 

207 

c (siglevr-xr (k) ) 

208 continue 

209 

210 continue 

siglevp=yp(k)+( (YP(k+l)-YP(k) )/(XP(k+l)-XP(k) 1 )* 

c (siglevp-xp (k) ) 

if (i.eq.1000) j=j+l 

if (j . eq. 150) goto 211 

if (i.eq.1000)i=O 

i=i+l 

write(12,300)siglevr 

write (12,300) sigphsr 

write(12,300)siglevp 

write(12,300)sigphsp 

goto 500 

read(11,300,end=212)a 

write( 12,300) a 

goto 211 

stop 

end 

55 
Symbolic File PIFEX3 

echo 

echo OLD FILE REMOVAL PROCEDURE INITIATED 

echo 

number=O 

if test -s propdata 

then rm propdata 

number=l 

echo 

echo removing old propdata file 

fi 

if test -s loopdata 

then rm loopdata 

number=l 

echo 

echo removing old loopdata file 

fi 

if test -s antdata 

then rm antdata 

number=l 

echo 

echo removing old antdata file 

fi 

if test -s azidata 

then rm azidata 

number=l 

echo 

echo removing old azidata file 

fi 

if test -s gyrodata 

then rm gyrodata 

number=l 

echo 

echo removing old gyrodata file 

fi 

if test -s exptmode 

then rm exptmode 

number=l 

echo 

echo removing old exptmode file 

fi 

if test -s speedata 

then rm speedata 

number=l 

echo 

echo removing old speedata file 

fi 

if test -s spardata 

then rm spardata 

number=l 

echo 

echo removing old spardata file 

56 
fi 

if test $number -eq 0 

then echo 

echo no old files to be removed 

fi 

echo 

echo 

echo NEW FILE CREATION PROCEDURE INITIATED 

split -600000 $1 

echo 

mv xaa propdata 

num='wc -1 < propdata' 

echo 

echo propdata file was created and it contain 

$num lines of data 

mv xab residue 

split -50000 residue 

rm residue 

mv xaa residuel 

mv xab residue2 

split -20000 residuel 

rm residuel 

mv xaa loopdata 

num='wc -1 < loopdata' 

echo 

echo loopdata file was created and it contains 

$num lines of data 

cat xac>>xab 

rm xac 

mv xab antdata 

num='wc -1 < antdata' 

echo 

echo antdata file was created and it contains 

$num lines of data 

split -10000 residue2 

rm residue2 

mv xaa azidata 

num='wc -1 < azidata' 

echo 

echo azidata file was created and it contains 

$num lines of data 

mv xab gyrodata 

num='wc -1 < gyrodata' 

echo 

echo gyrodata file was created and it contains 

$num lines of data 

mv xac exptmode 

num='wc -1 < exptmode' 

echo 

echo exptmode file was created and it contains 

$num lines of data 

mv xad speedata 

num='wc -1 <speedatat 

echo 

echo speedata file was created and it contains 

57 
$num lines of data 

mv xae spardata 

num=Iwc -1 < spardata' 

echo 

echo spardata file was created and it contains 

$num lines of data 

echo 

echo 

echo TASK COMPLETED 

echo 

echo 

echo 

58 
Symbolic File PIFEX4.F 

106 

107 

204 

c This program gets the reference channel signal levels 

c and phase separated from the pilot channel signal levels 

c and phase in the file @Ipropdatavv. Propdata is the name 

c of one of the output files of the program Ivpifex3lv. 

C 

C 

logical used 

character fa*12,fb*12,fc*12,fd*12 

open (unit=15, f ile=lvpropdatall, status=vloldvv) 

write (6,200) 

format(IlEnter the file name to store ref signal 

levels : 

read(5,20l)fa 

inquire(file=fa,exist=used) 

if(.not.used)goto 104 

open (unit=ll, f ile=fa, status=l1oldl1) 

goto 105 

104 open (unit=ll, f ile=fa, status=Ilnew") 

105 write( 6,202) 

202 format ( 

write (6,203) 

phases : 

read(5,20l)fb 

inquire(file=fb,exist=used) 

if(.not.used)goto 106 

open (unit=12, f ile=fb, ~tatus=~~old*~) 

goto 107 

open (unit=l2, f ile=fb, stat~s=~~new~l) 

write(6,202) 

write(6,204) 

format("Enter the file name to store pilot sig 

levels : If) 

read(5,20l)fc 

inquire(file=fc,exist=used) 

if(.not.used)goto 108 

200 

201 format(al2) 

203 format(llEnter the file name to store ref signal 

open (unit=13, file=fc, stat~s=~~old~l) 

goto 109 

108 open (unit=13, f ile=fc, stat~s=~~new~l) 

109 write(6,202) 

write (6,205) 

205 format(vvEnter the file name to store pilot sig phases :I1) 

read(5,201) fd 

inquire(file=fd,exist=used) 

if ( .not. used) goto 110 

open(unit=14, file=fd, statu~=~~old~~) 

goto 111 

open (unit=14, file=fd, stat~s=l~new~~) 

write(6,202) 

format ( f 2 0.10 ) 

59 
600 

400 

I 500 

do 600 i=1,60 

read ( 15,300) a 

read(15,300,end=500)a 

write(11,300)a 

read( 15,300) b 

write (12,300) b 

read (15,300) c 

write (13,300) c 

read( 15,300) d 

write (14,300) d 

goto 400 

continue 

stop 

end 

60 
Symbolic File PIFEXS. F 

c This program separates the llloopdatall file into two 

c separate files containing dynamic loop error and static 

c loop error ttloopdatall is the name of one of the output 

c files of the program PIFEX3. 

C 

logical used 

character fa*12,fb*12 

open (unit=15, f ile=llloopdatalt, status=ttoldlt) 

write( 6,200) 

loop error : It) 

read (5,201) fa 

inquire(file=fa,exist=used) 

if(.not.used)goto 104 

open(unit=ll, file=fa,status=tloldll) 

goto 105 

104 open(unit=ll, file=fa,status=gtnewll) 

105 write(6,202) 

202 format ( It ) 

write (6,203) 

203 format(ttEnter the file name to store static 

loop error :It) 

read(5,201) fb 

inquire(file=fb,exist=used) 

if(.not.used)goto 106 

open (unit=l2, file=fb, statu~=~~old~~) 

goto 107 

open (unit=12, f ile=fb, status=tlnewlt) 

200 format(tlEnter the file name to store dynamic 

201 format(al2) 

106 

107 write(6,202) 

300 format ( f 20.10) 

400 read(15,300,end=500)a 

write(11,300)a 

read (15,300) b 

write (12,300) b 

goto 400 

500 continue 

end 

stop 

61 
Symbolic File PIFEX6.F 

108 

109 

205 

110 

111 

206 

113 

114 

300 

400 

500 

c This program separates the I1antdatat1 file into three 

c separate files containing normalized difference , log sum 

c and finally the temperature. llantdatall is the name of one 

c of the output files of the program PIFEX3. 

C 

logical used 

character fc*12,fd*12,fe*12 

201 format (a12) 

write(6,202) 

202 format ( It) 

open (unit=15, f ile=llloopdatall, status=lloldll) 

write(6,204) 

204 format("Enter the file name to store normalized 

difference :I1) 

read(5,20l)fc 

inquire(file=fc,exist=used) 

if(.not.used)goto 108 

open(unit=13, file=fc, stat~s=~~old~~) 

goto 109 

open(unit=13, file=fc, stat~s=~~new~l) 

write(6,202) 

write (6,205) 

format(IlEnter the file name to store log sum :I1) 

read(5,201) fd 

inquire(file=fd,exist=used) 

if(.not.used)goto 110 

open(unit=14, file=fd, ~tatus=~~old~~) 

goto 111 

open (unit=14, file=fd, status=ltnewll) 

write(6,202) 

write(6,206) 

format(IlEnter the file name to store 

temperature : @I) 

read(5,20l)fe 

inquire(file=fe,exist=used) 

if(.not.used)goto 113 

open (unit=12, file=fe, status=lloldll) 

goto 114 

open(unit=12, file=fe, ~tatus=~~new~~) 

write(6,202) 

format ( f 20.10) 

read(15,300,end=500)c 

write(13,300)c 

read ( 15,300) d 

write(14,300)d 

read(l5,300)e 

write (12,300) e 

goto 400 

continue 

stop 

end 

62 
Symbolic File PIFEXIO.F 

200 

301 

100 

700 

701 

3 

4 

5 

6 

777 

7 

c this program computes the probability of signal level 

c being greater of equal to the abscissa. 

dimension x(lOO),y(lOO) 

logical used 

character fname*12,fnam*12 

write (6,200) 

format(' enter the input signal levels 

file name I) 

read(5,lOO) fname 

write(6,301) 

format(' enter the output file name') 

read(5,lOO) fnam 

format ( a 12 ) 

open(unit=ll,file=fname,status='old') 

inquire(file=fnam,exist=used) 

if (.not.used)goto 700 

open (unit=l2, file=fnam, ~tatus=~~old~~) 

goto 701 

open(unit=12,file=fnam,status='new') 

do 5 i=l,lOO 

ii=o 

j=o 

x( i) =-130.0+ (i-1) *O. 5 

read(11,777,end=4) buf 

if(buf.ge.x(i)) j=j+l 

ii=ii+l 

goto 3 

rewind (11) 

y( i) =float (j)/float (ii) 

write( 12,i') x(i) ,y( i) 

write (6,7) x (i) ,y( i) 

continue 

format (i16) 

format ( f 2 0.10) 

format (f20.10, lx, f20.10) 

end 

stop 

63 
Symbolic File PIFEX1l.F 

c this programm computes the probability density of the 

c signal levels and least squares fits it to a proper rician 

133 

5 

6 

777 

7 

110 

200 

100 

301 

700 

701 

3 

4 

c density function. 

double precision z(1OO),x(100),y(lOO) 

double precision xx,step,pp,sum,suml,del 

double precision fun 

logical used 

character fname*12,fnam*12 

write ( 6,2 0 0) 

format(Ienter the input signal levels file name') 

format(al2) 

read(5,lOO) fname 

open(unit=ll,file=fname,status='old') 

write (6,301) 

format(' enter the output file name I) 

read(5,lOO)fnam 

inquire(file=fnam,exist=used) 

if(.not.used) goto 700 

open (unit=l2, file=fnam, status=lloldll) 

goto 701 

open(unit=12,file=fnam,status='new1) 

do 5 i=l,lOO 

x( i) =-130.0+0.5 

ii=O 

j=O 

read (11,777, end=4) buf 

if (buf . le. x ( i) ) j =j +1 

ii=ii+l 

goto 3 

rewind (11) 

z(i)=float(j)/float(ii) 

if (i.eq.1) y(l)=O 

if (i.eq.l)goto 133 

y( i)=(z (i) -z (i-1) )/ (x( i) -x( i-1) ) 

write (12,7) x( i) ,y( i) 

write(6,7)x(i) ,y(i) ,z(i) 

continue 

format (i16) 

format ( f 2 0.10) 

format(g20.6,lx,g20.6,lx,g20.6) 

step=l. 

del=l. 

k= 0 

sum=O. 0 

do 50 i=l,lOO 

xx=2. *dsqrt (dabs (x (i) ) * (1. +step) *step) 

pp=fun (xx) * ( 1. +step) *dexp (- (x (i) ) * (1. +step) -step) 

sum=sum+ (y (i) -pp) **2 

k=k+l 

if(sum.ge.sum1)goto 120 

if(k.eq.l)goto 80 

50 

64 
80 

120 

300 

step=step+del 

suml=sum 

got0 110 

continue 

write (6,300) step 

format(' the K factor = ',g20.6) 

do 121 i=1,100 

xx=2.*dsqrt(dabs(x(i))*(l.+step)*step) 

pp=fun (xx) * (1. +step) *dexp (- (x (i) ) * ( 1. +step) -step) 

write (6,18) x (i) ,pp 

write( 12,7) x( i) ,pp 

stop 

end 

double precision function fun(xx) 

double precision fun,z,r,xx 

r=dabs (xx) 

if (r-3.75dO) l,l, 2 

fun=(((((4.5813d-3*~+3.60768d-2)*~+2.659732d-l)*~ 

+1.206749d0)*z+3.089942dO)*z+3.5l5623dO)*z+l.dO 

return 

fun=dexp(r)/dsqrt(r)*((((((((3.92377d-3*.~ 

18 format(' x = ',g20.6,2x,'pp = ',g20.6) 

121 

C MODIFIED BESSEL FUNCTION OF ORDER ZERO. 

1 ~=~~*~~*7.lllllld-2 

2 2=3.75dO/r 

c -1.647633d-2)*~+2.635537d-2)*2-2.057706d-2)*z 

c +9.16281d-3)*2-1.57565d-3)*2+2.25319d-3)*~ 

c +1.328592d-2)*~+3.989423d-l) 

return 

end 

65 
Symbolic File PIFEX12.F 

c this program computes frequaency of fade duration 

dimension ix(lOO),iy(lOO) 

logical used 

character fname*12,fnam*12 

write (6,200) 

file name I) 

read(5,lOO) fname 

write (6,301) 

301 format(' enter the output file name') 

read(5,lOO) fnam 

100 format ( a 12 ) 

write(6,302) 

302 format(' enter the desired signal level ') 

read (5,3 03) sig 

303 format(g20.10) 

open(unit=ll,file=fnarne,status='old') 

inquire(file=fnam,exist=used) 

if (.not.used)goto 700 

goto 701 

200 format(' enter the input signal levels 

700 open(unit=12,file=fnam,status='newl) 

701 read (11,777) buf 

ii=O 

do 400 i=l,lOO 

iy(i)=O 

400 ix(i)=i 

99 read(ll,6,end=98)buf 

ii=ii+l 

goto 99 

98 ii=ii+l 

write(6,7)ii 

j=O 

rewind( 11) 

3 read (11,6, end=4) buf 

f i=buf 

if(fi.le.sig) then 

j=j+l 

end if 

goto 3 

I 

4 

211 

6 

~~ 

if(fi.gt.sig.and.j.ne.0) then 

j bin=j / 2 

if (j .eq. 1) then jbin=l 

if(jbin.gt.lOO)jbin=lOO 

iy(jbin)=iy(jbin)+l 

j=O 

end if 

goto 3 

do 211 i=1,100 

write (12,7) ix( i) , iy (i) 

write( 6,7) ix( i) , iy( i) 

format (i16) 

66 
777 

7 

format ( f 20.10) 

format(il6,10x,il6) 

stop 

end 

67 
Symbolic File PIFEX13.F 

5 

6 

777 

7 

68 

700 

701 

c this program generates the downloadable file out of signal 

c levels file and the signal phase files for the use of the 

c AKPLOT routine to produce the plots. 

dimension ~(1000) ,y(lOOO) 

logical used 

character fname*12,fnam*12 

write ( 6,2 00) 

200 format(' enter the input file name I) 

read(5,lOO) fname 

write (6,3 3 3) 

333 format ( I' 'I) 

write (6,301) 

301 format(' enter the output file name') 

read(5,lOO)fnam 

100 format (a12) 

write (6,333) 

open(unit=ll,file=fname,status='oldl) 

inquire(file=fnam,exist=used) 

if(.not.used) goto 700 

open (unit=ll, f ile=fnam, status=l'oldlt) 

goto 701 

open(unit=12,file=fnam,status='new1) 

do 5 i=l,lOOO 

x(i) =O. 001*i 

read(11,777)buf 

y (i) =buf 

write( 12,7) x( i) ,y( i) 

write(6,7) x( i) ,y(i) 

continue 

format(i20) 

format (f20.10) 

format (f20.10, lx, f20.10) 

close (11) 

close (12) 

end 

stop 
Symbolic File PIFEX14.F 

200 

301 

100 

700 

701 

4 

11 

12 

6 

777 

7 

c This program computes the fourier transform of 1024 

c samples ofthe signal levels fileand theoutput is stored 

c into the output file supplied by the user. 

dimension x ( 2,2 100) , yy ( 52 0) 

logical used 

character fname*12,fnam*12 

write(6,200) 

format(' enter the input file name I) 

read(5,lOO) fname 

write(6,301) 

format(' enter the output file name') 

read(5,lOO) fnam 

format(al2) 

open(unit=ll,file=fname,status='old') 

inquire(file=fnam,exist=used) 

if(.not.used) goto 700 

open (unit=l2, f ile=fnam, stat~s=~~old~~) 

goto 701 

open(unit=12,file=fnam,status='new') 

do 4 i=1,1024 

read(11,777,end=4) buf 

x ( 1, i) =buf 

x(2, i) =o. o 

continue 

sign=-l.O 

npow=9 

t=O. 001 

call fftran(sign,t,x,npow) 

do 11 i=1,512 

yy( i) =sqrt (x( 1, i) **2+x(2, i) **2) 

continue 

do 12 i=1,999 

nc=i-5 0 0 

xxx=float(nc)/l.024 

if(nc.eq.-1.or.nc.eq.O)goto 12 

if(nc.eq.1) xxx=O.O 

YYY'YY (abs (nc) 1 

write (12,7) xxx, yyy 

write (6,7) xxx, yyy 

continue 

format (i16) 

format ( f 2 0.10) 

format (f20.10, lx, f20.10) 

stop 

end 

DIMENSION X(l) ,CS(2) ,MSK(13) 

COMPLEX X,CXCS,HOLD,XA 

EQUIVALENCE (CXCS, CS) 

NMAX=2 * *NPOW 

22=6.283185306*SIGN/FLOAT(NMAX) 

DELTA=T 

69 
5 

10 

15 

20 

25 

30 

35 

40 

45 

50 

55 

60 

65 

70 

75 

80 

IF (SIGN) 10, 10,5 

DELTA=l./ (T*FLOAT(NMAX) ) 

MSK( 1) =NMAX/2 

DO 15 1=2,NPOW 

MSK ( I) =MSK ( 1-1) /2 

NN=NMAX 

MM=2 

DO 45 LAYER=l,NPOW 

NN=NN/ 2 

NW=O 

DO 40 I=l,MM,2 

II=NN*I 

W=FLOAT(NW) *ZZ 

CS(2)=SIN(W) 

DO 20 J=l,NN 

II=II+l 

IJ=II-NN 

XA=CXCS*X (11) 

X(II)=X(IJ)-XA 

X(1J) =X( IJ) +XA 

DO 25 LOC=2,NPOW 

LL=NW-MSK (LOC) 

IF(LL) 30,35,25 

NW=LL 

NW=MSK (LOC) +NW 

GO TO 40 

NW=MSK (LOC+l) 

CONTINUE 

MM=MM*2 

NW=O 

DO 80 I=l,NMAX 

NWl=NW+l 

HOLD=X(NWl) 

IF(NW1-I) 60,55,50 

X(NWl)=X(I) *DELTA 

X (I) =HOLD*DELTA 

DO 65 LOC=l,NPOW 

LL=NW-MSK (LOC) 

IF(LL) 70,75,65 

NW=LL 

NW=MSK (LOC) +NW 

GO TO 80 

NW=MSK (LOC+l) 

CONTINUE 

RETURN 

END 

CS(l)=COS(W) 

70