Fatigue User’s Guide > Loading Management > Auto Spectral Density (MASD)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Auto Spectral Density (MASD)
The Auto Spectral Density program, MASD, performs a frequency analysis on a single parameter input file, a .dac file for example. MASD produces an output file that indicates the frequency content of the input file.
Most physical events occur at a certain speed, with a certain magnitude, and repeat at a certain rate. Engineers need to analyze such events in terms of all these characteristics. While all events occur in time and space, engineers and mathematicians have devised an alternative way of viewing events. They refer to this as the frequency domain as opposed to the time domain.
The French mathematician J Fourier (1768 - 1830) showed that any periodic motion can be represented by a series of sines and cosines. This can be demonstrated simply by considering a square wave. Such a waveform can be represented by the following Fourier series:
(4‑2)
There are some very good reasons for working in the frequency domain. One of the most important is that some complicated operations in the time domain become simple in the frequency domain, for example convolution in the time domain becomes a simple multiplication in the frequency domain. In addition, the relationship between the excitation and the response of a structure is often more easily understood in the frequency domain.
Real events are analogue (continuous) and are often random and non-periodic. Random processes continue for an infinite length of time, but are usually observed over a finite time. By carrying out a Fourier Transform (FT) of the finite length time domain data segment, the data is transformed into the frequency domain.
If the data is sampled for use in a digital computer, it is not possible to use the continuous form of the Fourier Transform and a discrete equivalent is required (a DFT):
(4‑3)
where N is the number of points in the time history and xm is the kth Fourier coefficient.
The Inverse Fourier Transform (IFT) also exists which transforms data from the frequency domain into the time domain. This reverse transformation is not discussed here but the reader is referred to standard texts for more information (Refs. 41,42).
One of the problems of the DFT is that calculation times are long when there are a lot of data values, i.e. when N in (4‑3) is large. Many optimized methods have been proposed, collectively described as “Fast” Fourier Transforms (FFT). One such method was proposed by Cooley and Tukey (Ref. 43) and is published by the IEEE. One of the compromises made in the FFT is that a particular number of data values must be analyzed at any time. However, the fast Fourier transform and the DFT can be regarded as identical for the purpose of this discussion. (The algorithm used in the frequency analysis tools is based on the IEEE optimized algorithms (Ref. 44)).
The basic FFT process carried out on N data values sampled at F samples per second results in complex numbers representing a one sided spectrum of frequencies with a bandwidth of Hz. These raw complex Fourier coefficients may be postprocessed in a number of ways.
Window Functions
Since it is rarely practical to transform a complete data segment, the analysis is carried out using short buffers of data taken at increasing times through the sample. However, start and end data values in the buffer are rarely identical, resulting in an effective discontinuity in the signal being analyzed. To reduce these effects, the buffer is shaped using a window function.
The default window function if no special window function is applied is a rectangular one, that is to say no data window is applied. Other common types of spectral window functions are shown in Figure 4‑33 below. The choice of which window type to use will depend on the type of data to be analyzed. However, it is always a good idea to analyze the data first using the rectangular window function.
If a window function is used, a correction for effective bandwidth is applied to the complex results of the FFT. This correction depends on the type of window and is carried out automatically by the software.
Figure 4‑33 Spectral Window Functions (Schematic)
Ensemble Averaging
The FFT coefficients from each buffer are normally summed in some way to produce a result representing the average frequency content over the whole of the sample. The greater the number of buffers contributing to this average, the more confidence may be placed in the result. Since the data windows attenuate data at the start and end of the buffer, some data is not used in computing the average. Consecutive buffers may be overlapped to use all the data in the signal. An overlap of 50% means that data at the end of one buffer is located at the center of the next buffer where the end effects are not present.
If the changes in the frequency components over the length of the whole sample are of interest, the buffers should not be averaged. The results from this type of analysis may be presented using a plot where the results from each buffer form one line in a three dimensional plot of frequency versus time versus spectral estimate. Such a plot is known as a waterfall plot (see Figure 4‑34).
Figure 4‑34 A Waterfall Plot.
Module Operation
The MASD module can be run in one of the following three modes:
From PTIME menu driven system - PSD from time.
In stand alone mode by typing masd at the system prompt
By incorporating the MASD commands in a batch operation
Once running in interactive mode the MASD module will display the following screen.
Figure 4‑35 The MASD File Name & Parameter Screen
The purpose and usage of each field is explained below. Note that until Input File name is completed and confirmed (by clicking OK), the other fields are grayed out.
 
Field
Description
Input File Name
In this field the user should type the name of an input file (usually a single parameter .dac file). By default MASD assumes a .dac file extension but if a file with a different file extension is to be processed then enter the file name plus extension in full.
MASD carries out a frequency analysis on a time series.
MASD will expect to find the input data files resident in the user’s directory, however, other directories can also be accessed if the complete file specification i.e. path name and file name are entered, e.g. /demo/filename.
Probably the easiest way to name an input file is to use the pick list facility.
Waterfall Analysis (Y/N)
Within the section of data being analyzed, a single spectrum can be produced showing the frequency content over the whole section. Alternatively, multiple spectra can be produced showing the change in spectral content as the time series progresses. The multiple spectral display is called a Waterfall Plot. Choose Yes to produce a multiple analysis.
Output Type
The complex spectrum created by this program can be one of three types.
Power Spectral Density (PSD) where the magnitude is scaled, squared, and divided by the spectral width.
Amplitude Spectrum (MASD) where the magnitude of the FFT is scaled to indicate the amplitude of the original data.
Energy Spectral Density (ESD) which is defined as the PSD multiplied by the analysis time.
In addition to these options it is possible to output the Real and Imaginary parts of the FFT or the magnitude of FFT. The FFT algorithm returns real and imaginary components for a single sided spectrum. The -ve frequency mirror is ignored although this is compensated for by scaling up the magnitude by a factor of 2. These options are only available if the data will fit into a single buffer.
Output Scaling
MASD allows the user to choose between displaying the amplitude as RMS or as true values. For example a sine wave of amplitude (and true value) 1 has a RMS value of 0.7171. To calculate and display the true amplitude of the frequency components, select Peak, otherwise the default is RMS.
Averaging Method
When many FFT buffers are calculated, the spectral estimates for each buffer can be handled in 2 ways. One simple way is to linearly average the component values over the number of buffers calculated. This corresponds to the default linear option.
The disadvantage of this method is that fast high amplitude events that occur in a single buffer are lost when the average of many buffers is taken. The peak hold option retains the largest FFT for each component and thus eliminates the disadvantage.
Start Time (secs.)
The frequency analysis may be carried out on a specific portion of the time series. The start and end times for this analysis window are user- selectable and are requested in the units of the time base for the input time series. The default value offered is the base value of the signal.
Keywords can be used, for example START+5 will start the analysis 5 seconds after the START of the file.
End Time (secs.)
The end time of the analysis window may be selected by the user or defaulted to the end time that MASD reads in the input time series file.
Keywords can be used, for example END-5 will end the analysis 5 seconds before the END of the file.
When all the fields shown in Figure 4‑35 have been completed and confirmed (by clicking OK) then the screen shown in Figure 4‑36 is shown.
Figure 4‑36 MASD’s Parameter Input Screen
Fields that are not appropriate to the choices made in Figure 4‑35 are not active on Figure 4‑36. This means that the Overlap (%), Normalization, and Window File name, fields may be grayed out in certain instances.
 
Field
Description
Window Type
Each data block is tapered using the window function. A window improves accuracy of the FFT because it reduces the magnitude of the data block in a gradual way and avoids discontinuities at the extremities of data blocks. The window functions are as follows.
Rectangular
Hanning
Kaiser-Bessel
Triangular
Cosine Bell
User Defined
If a user-defined window is required then MASD looks for a user definition file with a .uwf file extension. A user definition file is created using a .dac file creation program such as Graphical Create, 193, or Multi-Channel Editor - (MCOE), 915. Alternatively the user could create the file in ASCII and then use ASCII Convert + Load, 186 to convert it to a .dac file. Note that the user-defined file MUST be the same size as the FFT buffer size.
Buffer Overlap (%)
By default spectral windows are overlapped by 67%. The purpose of overlapping spectral windows is to minimize the effects of “leakage” at the edges of each window. Clearly the greater the degree of overlap the longer it will take to process a given signal. Negative values of overlap will cause MASD to skip data between spectral windows.
Data Normalization File/Buffer/None
Normalizing the input time series data prior to analysis reduces the DC contribution (or power at 0 Hz) which can often swamp the rest of the spectrum. Note that selecting normalization prior to analysis will not permanently alter the input signal. File means that the mean of the entire file is removed from each buffer, even if the whole file is not selected. Buffer means that each individual buffer has its mean calculated and then subtracted from the data in that buffer.
FFT Buffer Size
The minimum buffer size available is 32 and the maximum is 131072. For buffer sizes greater than 8192, a slow FFT is used.
The FFT buffer size defines the resolution of the power spectrum. The buffer must be a power of 2 and the longer the buffer, the higher the resolution of the spectral lines. To calculate the resolution divide the Nyquist frequency by half the FFT buffer size. E.g. if Nyquist=178 Hz and the FFT buffer size selected is 1024 the spectral lines are 178 / (1024 / 2) = 0.347 Hz apart. Another use of a smaller buffer size is for short data files as these cannot be adequately analyzed with a big buffer, since there may not be enough data to give a good spectral average. Using a smaller buffer size could give a better spectral average at the expense of spectral line width.
Noise Floor
When the amplitude of a particular frequency component is small, the FFT coefficients become vanishingly small and may cause computational difficulties or distort results; for example, the phase calculation is particularly affected. In order to overcome these difficulties, a value may be defined which represents an effective zero.
This cutoff point is normally specified in dB down from the maximum magnitude. The default is -72dB. Note that -20dB is one order of magnitude less than the maximum.
Window File Name
If a user-defined window is required then MASD looks for a user definition file with a .uwf file extension. See Window Type above.
When the fields in Figure 4‑36 have been completed the screen shown in Figure 4‑37 appears.
Figure 4‑37 The Output Parameters Screen (MASD)
This screen enables the user to specify the output file name, whether to plot the output file, and the minimum/maximum frequency of the plot.
 
Field
Description
Output File Name
The results of the frequency analysis are written to an output file for later analysis or graphical postprocessing. By default the name of the output file is taken to be the input file name but with a file extension as appropriate to the analysis; for example
.psd - Power spectral density
.amp - Amplitude spectrum
.esd - Energy spectral density
.mag - Magnitude
.pha - Phase
.ftr - Real part of FFT
.fti - Imaginary part of FFT
.wfl - Waterfall file
If a file with the specified or default name already exists, MASD will prompt for confirmation that the existing file is to be overwritten.
Plot Output Yes/No
Whether or not to plot the postprocessing file using MQLD. If No is selected then the plot parameter fields such as Minimum/Maximum frequency do not appear. The results of processing will NOT be plotted on screen but they will be saved as a disk file. This is also the case when waterfall files are processed.
Maximum / Minimum Frequency
If the output file is to be plotted then the frequency limits for the plot are set here.
The Nyquist frequency (half the sampling rate) is offered as the maximum frequency for the spectrum to be displayed initially on the screen. The user may select this limit or specify the required frequency. It is possible to change this later when the power spectrum is displayed graphically.
Waterfall Parameters
Section Method Buffer/Time
The selection of the file used for each waterfall spectrum can be specified in terms of time or number of buffers.
Number of Buffers
This option enables the user to specify the number of FFT buffers to be used for each waterfall spectrum (maximum buffer size = 8192, minimum = 32).
At this stage, MASD will commence to do the analysis according to the user specification. During this process a message indicating the extent of progress through the analysis will be displayed. When the input file has been processed a screen of results is displayed.
A results summary screen will be displayed after all input parameters have been specified and the analysis has been performed.
The calculated power spectrum can be displayed graphically. MASD uses the MSC Fatigue module MQLD to plot non Waterfall (if Display=Y was set) MASD output files (see Graphical Display, 226). To plot Waterfall files, MASD uses module MP3D which is described in Matrix Options, 318.
Figure 4‑38 Results File Being Displayed by MP3D.
Batch Operation (MASD)
MASD can be run in batch mode as with other MSC Fatigue modules. A list of MASD’s batch keywords:
/WFALL
Waterfall yes or no. /WFALL=Y
/INPut
The input file name. /INP=FILE
/OUTput
The output file name required for the results data file. /OUT=RESULT
/OVerwrite
Whether to overwrite an existing results file. /OV=Y
/STArt
The start time for the analysis window. /STA=1
/END
The end time for the analysis window. /END=20
/FMAXimum
The maximum frequency for the power spectrum plot. /FMAX=5.7
/FMINimum
The minimum frequency for the power spectrum plot. /FMIN=2.7
/NORMalize
Option to normalize the input time series. = F, B, or N. /NORM=F
/OVERlap
The amount of overlap of the FFT buffers. /OVER=45
/OTYPE
Output type PSD, ESD, or amplitude (see above). /OTYPE=PSD
/SCALE
Scaling (peak/RMS). /SCALE=PEAK
/AVERaging
The averaging method used i.e. Linear/Peak. /AVER=PEAK
/WINdow
The window type (rectangular, Hanning, user-defined etc.). /WIN=REC
/WFILE
The window file name if user-defined. /WFILE=<FILENAME>.UWF
/FLOor
The noise floor in dB. /FLO=79
/PLOt
To plot or not to plot Yes or No. /PLO=Y
/NBUFfer
Number of buffers. /NBUF=10
/TIME
The waterfall time slice in second. /TIME=0.1
/PLTNAM
Hardcopy file name. /PLTNAM= <FILENAME>
/METHOD
Waterfall sectioning method. /METHOD=B
/FFTsize
The FFT buffer size according to the table below. /FFT=512
FFT Buffer Sizes: 32, 256, 512, 1024, 2 048, 4096, 8192, 16384, 32768, 65636, 131,072