NSA Using Excel With GPIB (Ken Hall)
NSA Using Excel With GPIB (Ken Hall)
Abstract
trum analyzer. The programs are directly transportable to
other National GPIB cards and can be used with other
Performing Normalized Site Attenuation (NSA) measure-
manufacturers’ cards that have a Visual Basic interface. For
ments and reporting the results is a tedious process. Usu-
portability purposes, five files are used to perform the NSA
al& the data is obtained manually or with a program de-
process. One the reference data file which contains antenna
veloped using an instrument control language. Analyzing,
factors and theoretical NSA calculations, the others are
comparing and reporting the data usually requires import-
geometry specific measurement files. The NSA test de-
ing the current andpast data into a spreadsheet foperform
scribed uses broadband antennas covering 30 to 1000 MHz.
the needed calculations. The theoretical NSA values were
The frequency range is broken down into four measurement
normally taken f.om tables buried in different standards.
bands, 30 - 45, 45 - 120, 120 - 560 and 560 - 1000 MHz.
Up to now the tables in various standards had errors which
The ftequency range and band selection was based on
required mitigation. Calculating NSA on the fry removes
problems identified by ANSI C63.5, SCl; WG 1-15.6 as
the potential data e n t y and interpolation errors. With the
described by Zhong Cben and Mike Windler in “Systematic
release of Excel 97 the process is streamlined without the
Errors in Normalized Site Attenuation Testing”[6] the result
need for additional add ins. Microsoft@ Excel 97 includes
of which are in the soon to he published ANSI C63.5. To
Microsoft Visual Basic that can be used to control GPIB,
reduce the uncertainty antenna factors, measurements and
serial and generalpuTose input output devices.
calculations are performed at each of the 1600 frequencies.
-
Keywords
Normalized Site Attenuation, NSA, EXCEL, GPIB I I I
INTRODUCTION
The programs presented in this paper incorporate the Excel
H Computer with EXCEL’97
andHPIB/GPIB 1 Ri
spreadsheet for measuring, controlling, storing, manipulat- HPIB
ing and graphing the data. Visual Basic MACRO routines
are used to calculate the theoretical NSA and control the
instrument for manipulating the antenna and measuring the HP859x with
+Tracking Generatni
signals. The theoretical site attenuation algorithm used is
-
TX
based on the “Calculation of Site Attenuation From An-
Sunol or EMCO
tenna Factors” paper by Smith, German and Pate [l]. Controller ______..______
Manny Barron describes the analysis method in “Theoreti-
cal Normalized Site Attenuation Calculations by Spread-
sheet Analysis” [3] and Michael Foegelle discusses meth-
ods to improve results in “Site Validation Theory 101:
Techniques and Methods” [5].
Measurement considerations
As identified in ANSI C63-4 [2] NSA is the performance
measure of an Open Area Test Site or Alternate Test Site. It
can be performed using discrete frequencies or swept meas-
urement techniques. Our system consists of a spectrum ana-
lyzer with a built-in tracking generator, a remotely con-
Tolled antenna mast, antennas, cables, attenuators, amplifi-
ers, a computer with a GPIB interface card. and Microsoft@
Excel 97. Figure 1 is the block diagram. A National Instru-
ments Corporation PCMCIA-GPIB card and Visual Basic
Language Interface, figure 2, is used to control the antenna
mast, spectrum analyzer and receive the data from the spec-
.. Copy-ibvars -National Instruments information addresses the device described, by GPIB address, to talk
..
Init - Initialize hardware and GPIB card and the interface to listen.
Mastxxx - Do Mast stuff
NSA - Calculate Theoretical values for each fre-
. quency
RegisterGPIBGlobals - National Instruments in-
. formation
unRegisterGPIBGlohals - National Instruments in-
. formation
V-direct - Measure the Tracking generator signal
using a direct connection between the TG and SIA
Figure 4. Entry to NSA macro
11- - I/
Figure 5. Reference measurement spreadsheet
Figure 3 -List of Macro's
Site NSA = V-direct - V-site - RxAf - TxAf (1) Steps of the v-direct macro:
Delta NSA = Theoretical NSA - Site NSA Initialize the spectrum analyzer
(2)
SendSA = "IP;FA" & startf & "MHZ;FB" &
Reference file stopf & "MHZ;IBC;RBIOOKHZ;VB3OKHZ;AT
The reference file contains the theoretical NSA and antenna I0;RL 97DB;"
factors. Under worksheet Tab REF the theoretical NSA is Call Send(0, sa, SendSA, DABend)
calculated for each of the fiequencies, figure 4 displays the
entry to the macro. NSA calculations are performed based Measure the signal for all bands and place in cells
on distance, height and polarity that are read fiom NSA startf = 3 0
cells. The NSA calculations are covered thoroughly by start-bit = 15 'row cell
Manny Banon in [3]. With a 600MHz PC the NSA calcula-
tions take less than 2 minutes for 1600 frequencies. Under bits = 400
Tab AF Antenna factors can be either imported or created. num-bands = 6
GPIB control
-
band-size = (1000 30) /num-bands
The GPIB card is installed in Slot 0. The SendIFC(0) For band = I To num-bands '
command is used as part of GPIB initialization. It forces the stopf = startf + band-size
interface to be Controller-In-Charge of the GPIB. The
Send(0, sa, SenaSA, DABennd) command addresses the
-
INCREMENT = (stopf s t a r t 4 1400
device described, by GPIB address, to listen and the inter- SendSA = "FA" & startf & "MHZ;FB" &
face to talk. The Receive(0, sa, A8, STOPennd) command stopf & "MHZ;"
516
Call Send(0, sa, SendSA, DABend) Clears the trace and sets max hold
SendSA = “CLRW TRA;TS; ” Moves the antenna mast from 1 to 4 meters
Call Send(0, sa, SendSA, DABend) If band Mod 2 = I Then
SendSA = “MXMH TRA; ” Call mast-up2090
Call Send(0, sa, SendSA, DABend) Else ‘MAST DOWN
SendSA = “TDF P; TA; I’ Call Mast_down2090
Call Send(0, sa, SendSA, DABend) End If
Call Receive(0, sa, A8, STOPend) Retrives and stores the data in the appropriate cells
pos = I SendSA = “TDF P; TA; ’I
Fori = start-bit To starl-bit f bits Call Send(0, sa, SendSA, DABend)
Cells(i, 0 imyvalue) = Mid(A8, pos, 5) Call Receive(0, sa, A8, STOPend
Cells(i, I ) = start3 + (i -
start-bit) * Sets the spectrum analyzer to the next hand
INCREMENT Moves the antenna mast from 4 to 1 meters
pos =pos + 7 ‘Shift to each f the 401 bits If band Mod 2 = I Then
Next i Call mast-up2090
start-bit = start-bit + biis Else MASTDOWN
startf = s t o p 3 Call Mast_down2090
Next band End If
Necessary calculations are performed Stores the data in the appropriate cells
The columns, figure 5 , are calculatedcompleted by the Repeats cycle until all hands satisfied
macro:
Calculates NSA
Frequency - defined in initial assignment
Calculates delta NSA
Reference TIG Output connected to SIA Input
~
Plots data
Offset Cable - measurement with cable and attenuator
Offset - ( BS-CS) -attenuation of cable and attenuator
517
References’*
518