Sie sind auf Seite 1von 4

SAC Command Reference Manual

Spectral Estimation
Introduction
SPE is a spectrum estimation package intended primarily for use with
stationary random processes. It contains three different spectral estimation
techniques:
Power Density Spectra,
Maximum Likelihood Method, and
Maximum Entropy Method.
These are all indirect methods, because they use a sample correlation
function, rather than the data itself, to estimate the spectral content.

SAC Subprocess
A subprocess is like a small program within the main SAC program. You
start a subprocess by typing its name (SPE in this case.) You can terminate
it and return to the main program using the QUITSUB command. You can
also terminate SAC from within a subprocess using the QUIT command.
While within a subprocess, you can execute any command belonging to
that subprocess plus a limited number of main SAC commands.
SPE Commands
COR:

Computes the correlation function.

MEM:

Calculates the spectral estimate using Maximum Entropy


Method.

MLM:

Calculates the spectral estimate using Maximum Likelihood


Method.

PDS:

Calculates the spectral estimate using Power Density Spectra


Method.

PLOTCOR:

Plots the correlation function.

PLOTPE:

Plots the RMS prediction error function.

PLOTSPE:

Plots the spectral estimate.

QUITSUB:

Terminates a SAC subprocess.

READ:

Reads data from a SAC data file into memory.

WRITECOR: Writes a SAC file containing the correlation function.


WRITESPE:

Writes a SAC file containing the spectral estimate.

Their abbreviated names are also allowed.


Main SAC Commands executable from within the SPE subprocess:
AXES_

BEG IN D EVICES_

BEG IN W IN D O W _
BO RD ER_
CO M CO R_
CO PYH D R_
ECH O _
EN D D EVICES_

BEG IN FRAM E_
CO LO R_
D ATAG EN _
EN D FRAM E_

ERASE_
G ETBB_
H ELP_
LIN LIN _
LO G LIN _
M ESSAG E_
PLO TC_
READ ALPH A
SETBB_
SETM ACRO _
SYN TAX_
TITLE_
W AIT_
XD IV_
XG RID _
XLIN _
YD IV_
YG RID _
YLIN _

EVALU ATE_
FLO O R_
G RID _
G TEXT_
IN STALLM ACRO _ LIN E_
LIN LO G _
LO G LAB_
LO G LO G _
M ACRO _
PAU SE_
PLABEL_
Q D P_
Q U IT_
READ BBF_
REPO RT_
SETD ATAD IR
SETD EVICE_
SG F_
SYM BO L_
SYSTEM CO M M AN D _ TICKS_
TSIZE_
VSPACE_
W IN D O W _
W RITEBBF_
XFU D G E_
XFU LL_
XLABEL_
XLIM _
XLO G _
XVPO RT_
YFU D G E_
YFU LL_
YLABEL_
YLIM _
YLO G _
YVPO RT_

The Theory
Overview
SPE is a spectrum estimation package intended primarily for use with
stationary random processes. It implements three different indirect spectral
estimators. They are called indirect, because they do not estimate the
spectrum directly from the data, but from a sample correlation function
that is computed from the data. The choice of indirect methods is a matter
of taste, since direct spectral estimation techniques are also available. The
correlation function itself is a useful quantity. You may wish to examine it
in the course of performing spectral estimation tasks.
The choice of indirect techniques is supported by "Spectral Analysis and Its
Application," by Jenkins and Watts, a respected reference on the subject of
spectrum estimation.
The type of spectrum estimated by SPE is properly described as the power
density spectrum, with the spectrum defined in the frequency domain.
Thus, the estimated power delivered by the random process in some band
of frequencies is the integral of the spectral power density estimate over
that band of frequencies.

User Control
SPE affords the user some control over the details of estimation process.
For some, with experience in estimating spectra, this is highly desirable.
Defaults are provided for those who do not wish to become involved in the
details of the theory.
The user has a choice of data window type, size, and the number of
windows used when estimating the correlation function. Generally these
parameters control the resolution of the estimate, and the amount of
reduction of variance desired in the final estimate. In addition,

prewhitening of the data may be specified as part of the process of


estimating the correlation function. Prewhitening often has the effect of
mitigating a severe "window bias" that can occur in spectral estimates
having a high dynamic range. The warping of the spectrum that occurs with
prewhitening is compensated for in the final result. In this implementation,
low-order prediction error filters are used for prewhitening.

The Estimators
The user has a choice of three spectral estimators: Power Density Spectra (
PDS), Maximum Likelihood Method ( MLM), and Maximum Entropy Method (
MEM).

PDS
The PDS estimator is quite simple: the sample correlation function is
multiplied by a correlation window, then the result is transformed with an
FFT to obtain the spectral estimate. The user again has a choice of the
window type and the size of the window. The above mentioned book by
Jenkins and Watts could be considered as the detailed documentation for
the PDS technique.

MLM
The MLM estimator generates a spectral estimate which is the power output
of a bank of narrow band-pass filters which have been optimized to reject
out-of-band power. The result is a smoothed, parametric estimate of the
power density spectrum. The user can choose the number of parameters.
Documentation for this method can be found in the paper by Richard
Lacoss in the IEEE book "Modern Spectrum Analysis" by Donald Childers.

MEM
The MEM estimator is another parametric method, which uses a prediction
error filter to whiten the data. The resulting spectral estimate is
proportional to the inverse of the filter's power frequency response. The
user is free to choose the order of the prediction error filter.
Documentation for this method can be found in the review paper on linear
prediction by John Makhoul in "Modern Spectrum Analysis." The formal
name of the actual method implemented is the Yule-Walker method.

Diagnostics
In addition to the spectrum, several diagnostic functions can be calculated
and plotted. The prediction error can be plotted as a function of order. This
plot can be used to select a good size for the prediction error filter used in
the MEM method. Since much is known about the performance of the PDS
estimator, more diagnostic information is available for this method in SPE.
The 90`` confidence limits can be estimated theoretically, as can the
frequency resolution of the estimate. Both of these quantities can be
indicated on a PDS spectral plot.

The Program
Differences

There are two primary differences between SPE and the main SAC program.
Only one data file can be processed by SPE at a time. This is because SPE
produces and stores a number of auxiliary functions (the correlation
function, the prediction error function, and the spectral estimate itself) as it
proceeds. This restriction to a single data file may be removed in the
future. The second difference is that, unlike SAC itself, there is a specific
order or progression in which the commands are generally executed.

Initialization
This progression begins when the SPE command is executed. Default
values for the various SPE parameters are defined at this time. The data file
may have been read in using the READ command before entering SPE or at
any time while within SPE. Space for the above mentioned auxiliary
functions is created whenever a new file is read.

Correlation
The correlation function is then computed, using the COR command. It may
be saved as a SAC data file using the WRITECOR command and later read
back into SPE using the READCOR command. This is more efficient than
recomputing the correlation each time, especially if the data file is very
long. At this point, you may wish to examine the correlation function using
the PLOTCOR command. You may also wish to examine the prediction error
function using the PLOTPT command if you are going to use the MEM
method.

Estimation
Now you are ready to select one of the three spectral estimation techniques
using the PDS, MLM, or MEM commands. Each technique has its own
options. You may now examine the resulting spectrum using the PLOTSPE
command. There are several different scaling options available. You can
also save the spectral estimate as a SAC data file using the WRITESPE
command.

Termination
At this point you have several options: you can select a different spectral
estimate technique, read in a different correlation function, read in a
different data file, terminate the subprocess using the QUITSUB command,
or terminate SAC using the QUIT command.

Das könnte Ihnen auch gefallen