0% found this document useful (0 votes)
93 views4 pages

NSA Using Excel With GPIB (Ken Hall)

This document describes using Microsoft Excel 97 with GPIB (General Purpose Interface Bus) to automate the process of performing Normalized Site Attenuation (NSA) measurements and analysis. The Excel VBA macros control a spectrum analyzer via GPIB to make measurements at 1600 frequencies between 30-1000 MHz. The macros also calculate theoretical NSA values, compare to measurements, and generate reports. This streamlines the tedious manual process and removes potential errors from data entry and interpolation.

Uploaded by

joeblow997
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views4 pages

NSA Using Excel With GPIB (Ken Hall)

This document describes using Microsoft Excel 97 with GPIB (General Purpose Interface Bus) to automate the process of performing Normalized Site Attenuation (NSA) measurements and analysis. The Excel VBA macros control a spectrum analyzer via GPIB to make measurements at 1600 frequencies between 30-1000 MHz. The macros also calculate theoretical NSA values, compare to measurements, and generate reports. This streamlines the tedious manual process and removes potential errors from data entry and interpolation.

Uploaded by

joeblow997
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

NSA Using EXCEL ‘97 with GPIB

Allows Making Measurement and Analysis Less Tedious


Ken Hall
Hewlett-Packard
Roseville, CA 95747, USA
[email protected]

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-

0-7803-7264-6/02/$17.000 2002 IEEE


515
~

.. 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

path. The path will usually consist of a transmit Measurement file

. cable, receive cable, amplifier and attenuators


V-site - Measure the maximum signal with the Tx
antenna fixed while the Rx antenna moves from 1
Tab Tref is used to calibrate the path attenuator and derive
the V-direct signal level. The thru cable and attenuator
to 4 meters, calculate site NSA (1) and delta NSA calibration is used to improve the uncertainty of the meas-
(2) versus theoretical. urements. CLICKing "Setup and Cal Thru Cable/Attn" but-
ton starts the sequence of events towards measuring NSA
with minimum uncertainty. CLICKing the "Run V Direct"
button momuts the user to make the direct measurement.

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

Figure 7. Min and Max Deviation from theoretical NSA and


Figure 6. Site measurement spreadsheet tabular data
Tab IMV, figure 6, is used to perform the site measure- Tab 15MV, figure 7, the delta to NSA (JIl:N12) for each
ments. It is set up for measuring an altemate site, semi- of the positions is calculated upon the completion of a scan.
anechoic chamber or all weather open area test site. The cell background is color -coded for easy identification
CLICKing the “Run Center” button will prompt the user to of measurement status. Red, yellow or green.
connect the antennas and place them in the center turntable The data is plotted along with NSA limits, figure 8.
position.

Once the user acknowledges that the setup is


completed the v-site macro:
Sets the spectrum analyzer to correct band

517
References’*

[ l ] Albert A. Smith Jr., et. AI, “Calculation of Site Attenua-


tion From Antenna Factors”, IEEE Transactions on Elec-
tromagnetic Computability, VOL. EMC-24, NO. 3 August
1982, pages 301 to 316.
[2] ANSI C63.4-1992, “American National Standard for
Methods of Measurement of Radio Noise Emissions fkom
Low-Voltage Electrical and Electronic Equipment in the
range of 9 kHz to 40 GHz”
I [3] Manny Barron, “Theoretical Normalized Site Attenua-
D , m _ , m . m , m % m m m m , w
r-0-
tion Calculations by Spreadsheet Analysis”, 2000 IEEE
EMC Intemational S y m p o s i q pages 921 to 932
Figure 8. Plotted data
[4] ANSI C63.S-1988, “American National Standard for
Conclusion Electromagnetic Compatibility-Radiated Emission Meas-
urements in Electromagnetic Interference (EMI) Control-
Microsoft@ Excel 97, with the Visual Basic, has taken the Calibration of Antennas (9 lcHz to 40 GHz)”
tedious post processing out of NSA measurements. We [SI Michael D. Foegelle, “Site Validation Theory 101:
have been adapting EXCEL for our cable path calibrations Techniques and Methods”, Compliance Engineering,
and one time programming needs. July/August 2000
[6] Zhong Chen and Mike Windler in “Systematic Errors in
Normalized Site Attenuation Testing”, Compliance Engi-
neering, Januaryfiebruary 2000

518

You might also like