Vous êtes sur la page 1sur 63

December 2007

VibraTools™ version 7.0.2 for MATLAB®

Contents
Contents...................................................................................................................................... 1
Introduction ................................................................................................................................ 2
License agreement...................................................................................................................... 2
Return Policy.............................................................................................................................. 2
Installation procedure................................................................................................................. 2
Toolbox contents ........................................................................................................................ 2
Help function.............................................................................................................................. 9
Help Groups ............................................................................................................................... 9
Auxiliary Functions................................................................................................................ 9
File Format Conversion etc. ................................................................................................... 9
Universal File Interface.......................................................................................................... 9
Direct Data Import/Export ..................................................................................................... 9
Data Structure (Header) Commands .................................................................................... 10
Time data filters and weighting functions............................................................................ 12
Frequency domain filters and weighting functions .............................................................. 12
Frequency and Correlation Analysis .................................................................................... 12
Rotating machine RPM based analysis ................................................................................ 12
Graphical user interfaces...................................................................................................... 12
Maps ..................................................................................................................................... 13
Plot utilities .......................................................................................................................... 13
Statistics, Data quality.......................................................................................................... 13
Example scripts ........................................................................................................................ 13
Command Reference ................................................................................................................ 15

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 1


Introduction
This is a short manual on how to use the toolbox software. The toolbox consists of a
collection of functions as M-files. The VibraTools Suite™ of toolboxes for MATLAB is built
up with a number of MATLAB scripts. After installation you will have access to these scripts
just like any other MATLAB functions. There is no graphical user interface, except for demo
scripts, but there are commands that allow you to easily build your own applications if you
would like graphical user interfaces. It is, of course, up to you as a user to use the functions
properly in your applications, but we provide a number of example programs that illustrate
some typical analysis tasks.

License agreement
Please read the separate license agreement shipped with the product, and available in PDF
format in the installation directory. By installing the product you approve the license
agreement.

Return Policy
We grant you a 30-day full return policy. This means that if you are not happy with the
functionality of the toolboxes, you are free to return all material you received within 30 days
of you received the software, and we will credit the invoice (not applicable to upgrades, of
course). You need to write to us at info@vibratools.com or send a letter to our address below
prior to returning the package.
Address (Europe): Address (USA):
Axiom EduTech AB Axiom EduTech Inc.
Laggarsvägen 36 70 Himalaya Ct
SE-184 97 LJUSTERÖ Alpine, Utah 84004
SWEDEN U.S.A.
support@vibratools.com support@vibratools.com

Installation procedure
Please see the separate installation note provided in your package for instructions on how to
install the VibraTools Suite software.

Toolbox contents
The content of the toolbox is given in the M-file contents.m. The commands are grouped into
logical groups to make it easy to find the correct command. You get this list from inside
MATLAB by typing
>> help vibratools

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 2


provided you installed the VibraTools command files into a directory “vibratools” (the
installation utility does that, so if you did not move the software, this works). This gives you
the following list of all functions in the toolbox.

Auxiliary functions.
Clipneg Clip signal at negative side.
Clippos Clip signal at positive side.
Halfsine Makes half sine pulse.
Taper Cosine tapering of data.

File format conversion etc.


flogopen Opens a log file (text file) and returns the file id parameter
ie3dbl IEEE double precision floating point conversion.
ie3float IEEE floating point conversion.
ie3flt IEEE floating point conversion (exponent first).
long Long integer format conversion.
short Short integer format conversion.
hpfloat HP floating point conversion.

Universal file interface.


headconv Converts toolbox header to header for UNIWRITE.
sprspec Special print format for universal file.
uffunclist Make a list of Universal file (ufxxxx.mat) functions.
univhead Makes a header for universal file type 58 (for uniwrite).
univread Reads an universal file type 58.
uniwrite Writes an universal file type 58. Will expunge.
uniwrite58 Writes an universal file type 58. Replaces uniwrite.

Direct data import/export.


dacread Reads data from DACTRON text file.
datlook Reads info from Sony DAT (PC-Scan MK II).
datread Reads data from Sony DAT (PC-Scan MK II).
datlook3 Reads info from Sony DAT (PC-Scan MK III).
datread3 Reads data from Sony DAT (PC-Scan MK III).
nsoftlook Reads info from nSoft time data file.
nsoftread Reads data from nSoft time data file.
sdfread Reads SDF (Standard Data Format) time files.
sigread Reads data from DACTRON .sig file.
sonylook Reads info from Sony DAT (PC-Scan).
sonyread Reads data from Sony DAT (PC-Scan).
Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 3
teacread Reads data from TEAC LX-10/20 DAT files.
treclook Gets info from TRAS data record file.
trecread Reads TRAS data record file.
ttptlook Gets info from TRAS thruput file.
ttptread Reads TRAS thruput file.
waveread Wav-file read, scaled format.

Data Structure (Header) commands.


findfunc Finds functions after import that match specification.
funclist Make a list of functions from any file format.
headch record sequence number (channel number) from Header
headdx Delta x from header.
headenbw ENBW factor from header.
headfs Sampling frequency from header.
headfunc Function identifier from header
headll Signal length from header.
headlx Left x (start) from header.
headmd Measurement point direction from header.
headmp Measurement point number from header.
headnc Number of channels from header.
headocctype Gets octave type from header.
headovrl Overall RMS for octave spectra from header.
headovsamp Over sampling factor from header.
headq Picks out the Q factor from Header (for Shock Response)
headrd Reference point direction from header.
headrp Reference point number from header.
headsrch String search in header.
headstr String with force/response ID from header
headti Title from header.
headtime Makes time vector from info in header.
headts Transducer serial number from header.
headtt Transducer type from header.
headweight Gets weighting type from header.
headxl X label from header.
headxu X unit from header.
headyl Y label from header.
headyu Y unit from header.
makehead Makes a new VibraTools header.
md2str Measurement label in string format from numeric format.
str2md Measurement label from numeric to string format.
Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 4
str2mdnum Convert direction string to numeric value for universal file.
sethch Change record sequence number (channel number) in Header
sethdx Change x axis increment in header.
sethenbw Change enbw factor in header.
sethfs Change sampling frequency in header.
sethll Sets the data length (number of samples) in header.
sethlx Sets the left x (min x) in header.
sethmp Change measurement point in header.
sethmd Change measurement direction in header.
sethnc Change number of channels in header.
sethocttype Sets Octave type in header.
sethovrl Sets the Overall rms value for octave spectra in header.
sethovsamp Sets the Over sampling factor in header.
sethq Sets the Q factor in Header (for Shock Response)
sethrp Change reference point in header.
sethrd Change reference direction in header.
sethts Sets the transducer serial number in header.
sethtt Sets the transducer type in header.
sethweight Sets weighting type in header.
sethxu Change x unit string in header.
sethxl Change x label string in header.
sethyu Change y unit string in header.
sethyl Change y label string in header.
sethfunc Change measurement function in header.

Time data filters and weighting functions.


acc2vel Conversion from acceleration to velocity by RC filtering.
afilter A-weighting filter design (filtering of time signal).
cfilter C-weighting filter design (filtering of time signal).
comfort Human comfort according to SS 4604861 (ISO 8041).
diffnorm Derivative of time signal.
intnorm Integration of time signal.
isoadc ISO 2631-5 acceleration dose for a seated operator
isofiltw ISO 2631 - ISO 8041 filters.
isofilwb ISO 2631 filter W.B. (combined directions).
isofilwc ISO 2631 filter Wc. (seat back, horisontal x).
isofilwd ISO 2631 filter Wd. (whole body, horisontal).
isofilwe ISO 2631 filter We. (rotational vibration).
isofilwf ISO 2631 filter Wf. (motion sickness, vertical).
isofilwh ISO 2631 filter Wh. (hand-arm).
Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 5
isofilwi ISO 2631 filter Wi. (head, vertical).
isofilwk ISO 2631 filter Wk. (whole body, vertical).
isosed ISO 2631-5, daily equivalent static compression dose
octfilt Octave band filter implementation.
runrmsex Running rms exponential averaging.
runrmsln Running rms linear averaging.
tersfilt 1/3 octave band filter implementation.

Frequency domain filters and weighting functions.


aweigh A-weighting of linear spectrum.
aweighp A-weighting of power spectrum.
cweigh C-weighting of linear spectrum.
cweighp C-weighting of power spectrum.
freqdiff Frequency differentiation.
freqint Frequency integration.

Frequency and correlation analysis.


autocorr Autocorrelation.
csdnorm Normalized cross spectral density csd with hanning window
crosscor Cross correlation.
expwin Exponential window
fanenv Frequency analysis with envelope spectrum
fanflat Frequency analysis with flattop window, using linear averaging.
fanflatph Frequency analysis with flattop window, using peakhold averaging.
fanflatx Frequency analysis with flattop window, using exponential averaging.
fanhann Frequency analysis with hanning window, using linear averaging.
fanhannph Frequency analysis with hanning window, using peakhold averaging.
fanhannx Frequency analysis with hanning window, using exponential averaging.
fantrans Frequency analysis of transient.
fantransp Frequency ANalysis of TRANSient with Phase.
fanoct Octave-band spectrum calculation using time domain filtering according to
IEC 1260.
fanters Third-octave-band spectrum calculation using time domain filtering
according to IEC 1260.
fanuni Frequency analysis with uniform window, using linear averaging.
fanuniph Frequency analysis with uniform window, using peakhold averaging.
fanunix Frequency analysis with uniform window, using exponential averaging.
psd2oct Power Spectral Density to 1 octave band conversion.
psd2ters Power Spectral Density to 1/3 octave band conversion.
psdnorm Normalised psd, Power Spectral Density.
Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 6
equivbw Equivalent noise bandwidth for time window.
flattop Flat top window.
hann Hanning window.
hann1hz "Hanning" window with 1 Hz bandwidth.
sinefreq Sine frequency estimation.
welchvar Variance of psd estimate with Welch's method.

Rotating machine RPM based analysis (see also under Maps).


getnsamp Get new sampling times for syncronous sampling
getrpm Get RPM as function of time from tacho signal
ordline Order line plotted in current RPM Spectral Map
ordslice Order slice from RPM Spectral Map
ordslicebw Order slice from RPM Spectral Map, using summation over frequency band
smoothrpm Smooth rpm(time) curve in case of noisy tach signal
rpmploto Order line plotted in current RPM Intensity Map
syncslice Order slice from RPM Order Map
syncslicebw Order slice from RPM Order Map, using summation over frequency
vkorderm Order tracking using Vold-Kalman filter for multiple RPM-vector
vkorders Order tracking using Vold-Kalman filter for single RPM-vector
vktime Extracts time data from signal using Vold-Kalman filter

Maps.
rpmmap RPM Spectral/Order Map, monocolor, Flattop window.
rpmmaph RPM Spectral Map, monocolor, Hanning window.
rpmplot Plot RPM Spectral Map (waterfall), monocolor of rpmmap results.
rpmplotc Color intensity RPM/frequency plot of rpmmap results.
terscont 1/3 octave band contour map.
tersmap 1/3 octave Response Map, color map version.
tersmvel 1/3 octave band maximum velocity map.
tersvmrs 1/3 octave band max rms (time constant fast) map.
timeh2o Waterfall Time Spectral Map.
timeh2oh Waterfall Time Spectral Map, monocolor, using HANNING window.
timemap Time Spectral Map, surface, color.
timemapc Time Spectral Map, flat, color.

Plot utilities.
angled Phase angle in degrees.
datascan Scan of data plot.
db10 dB scaling (power).
db20 dB scaling (linear).
Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 7
figtext Puts text on plots.
maketime Make time vector.
plotoct Bar plot of octave or third-octave spectra as dB SPL.
plothead Plots data with info from header.
plotters Makes 1/3 octave band spectrum plot.
seta4 Sets A4 paper format.
seta4l Sets A4 landscape paper format.
seta4p Sets A4 portrait paper format.
signpack Packs signal for display purposes.
sigtrunc Signal truncation.
xlogtics Makes nice X log scale marks.

Statistics, Data quality.


apdnorm Amplitude Probability Density function.
bittest Test of number of bits from ADC.
crest Crest factor.
expnzero Expected number of zero crossings.
framstat Frame statistics.
irreg Irregularity factor.
kurtosis Kurtosis.
kurtwm Kurtosis with mean.
maximax Maximax (max(abs)).
normal Normal probability density function.
qualityl Quality parameter matrix, with file list inputs
qualitym Quality check matrix.
qualpnt Quality check matrix printout.
runtest Stationarity run test.
runttime Stationarity run test as function of time.
skewness Skewness.
station Stationarity test, one number output.
stattest Stationarity test.
stattime Stationarity test as function of time.
tooconst Too constant test.

It can also be useful to look at the “private” directory under “vibratools”. The functions in this
directory are not fully developed but might still contribute to the analysis.

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 8


Help function
All functions are equipped with help text. To get help on a command, just type help and the
name of the function. As an example, help fanflat gives:
FANFLAT Frequency ANalysis with FLAT top window
[y,f] = fanflat(x,fs,N,M,p)
y result, rms scaled
f frequency vector in Hz
x data vector
fs sampling frequency in Hz
N FFT block size
M number of averages
p overlap percentage
See also FANHANN, FANTRANS, FANUNI

The syntax for the function is given and also the definition of the parameters. Sometimes
recommendations are given, as in help comfort:
COMFORT comfort in buildings, SS 460 48 61
y = comfort(x,fs)
y output running rms value, velocity, mm/s, ISO 8041 Wk
one second time constant
x measured acceleration data vector in m/s2
fs sampling frequency in Hz
lowest recommended sampling frequency is 800 Hz

Help Groups
Auxiliary Functions
The auxiliary functions group contains some practical utilities, such as signpack, that allows
the user to efficiently plot long data vectors.

File Format Conversion etc.


The file format conversion commands are mainly used for data import routines, and you are
likely not going to use these commands unless you are writing your own file import routine.

Universal File Interface


Under this header you find the commands for reading and writing universal file data. These
commands support import and export of data from/to universal file format 58, which is an
ASCII format, and from/to binary universal file format 58b. See more under “Data Structure
(Header) Commands below for more information on this.

Direct Data Import/Export


In this group you find all data import and export commands except for the universal file
format described above. Currently supported files/suppliers are:

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 9


Dactron, nSoft, HP/Agilent/VXI Technologies (SDF format), and for example Data Physics
Corp. (SDF), SONY PC-Scan, and OROS and other vendors who use Windows WAV format.
We are continuously releasing new file import routines. Check our homepage
www.vibratools.com or send us an email if you have a special request.

Data Structure (Header) Commands


One of the basic features of the toolbox is the definition of a consistent data structure for
imported data. Data may be imported from many sources, such as Universal File Format,
Wav-files, DAT (Sony PC Scan), 3K TRAS, etc. The list of supported data sources is
constantly growing.
When data (time or frequency data) are imported, each channel is stored in a separate
MATLAB file with incrementing file names, for example uf101.mat, uf102.mat, … The .mat
file consists of two or three variables: Header, Data and, in some cases, Xaxis. The Data
variable is simply the imported data stream as a column vector. In cases where the sampling
distance may be non-constant, (Universal File) the Xaxis (time or frequency) is also saved.
The Header is the main feature of our data structure. It is a standard MATLAB character
matrix, containing nine rows of 80 characters each. The header contains data information in
the same format, regardless of the data source. The format is best described by an example:

FRF (H1-estimator) for 1 / 1


response / load
94-May-17 11:32:22
Rec 325 of test "barrel_frf"
NONE
4 325 1 2048 0 0 0 0
0 0.00000e+00 0 0.00000e+00 0 0.00000e+00 0 0.00000e+00
NONE Hz 0.00000e+00 2.50000e-01 0 0
1 m/s2 NONE N

This header is the result from univread on a Frequency Response Function from an LMS
system, given as Universal File type 58. The first five rows contain text records from the
universal file. A description of the type 58 format is given in documentation file 58.txt (open
with Windows WordPad for a nice formatted document). Worth noting is that in the toolbox
header, row 3 always contains date and time information. Rows 6 – 9 contain the following
information:

Row Characters Information


6 1 - 10 Function type (4 means FRF)
6 11 - 20 Record (sequence) number
6 21 – 30 Number of channels
6 31 – 40 Number of data points
6 41 – 50 Measurement point number (not given here)

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 10


6 51 – 60 Measurement point direction (not given here)
6 61 – 70 Reference point number (not given here)
6 71 – 80 Reference point direction (not given here)
7 1-7 Spare, integer. Used for some data sources
7 8 - 20 ENBW factor if Spectra, a-factor if FRF, Q-factor if SRS
7 21 -27 Octave type
7 28 - 40 Overall RMS for octave spectra
7 41 - 47 Weighting type
7 48 - 60 Oversampling factor
7 61 - 67 Spare, integer. Used for some data sources
7 68 - 80 Spare, floating format. Used for some data sources
8 1 - 20 Abscissa label
8 21 - 40 Abscissa units
8 41 – 53 Abscissa min. (start)
8 54 - 66 Abscissa increment (delta x)
8 67 - 73 Spare, integer
8 74 - 80 Spare, integer
9 1 – 20 Ordinate numerator label
9 21 – 40 Ordinate numerator units
9 41 – 60 Ordinate denominator label
9 61 – 80 Ordinate denominator unit
10 1 – 20 Transducer Type
10 21 – 40 Transducer Serial Number
Table 1. Field description for VibraTools structured data storage Header variable.

Note that it is quite common that universal files contain NONE as information, and/or that
information is left out, as the numbers and directions for measurement points and reference
here. (This information is in this case given in the first row instead).

Users that create their own data import functions are encouraged to use the format given here,
as there are many useful functions that depend on this specific format. The univread
command and many of our header commands are published as freeware, see
www.vibratools.com.
In the group “Data Structure (Header) Commands”, you find a list of commands for both
reading out values from Header, and for setting values in Header. There are also special
commands like findfunc and funclist that allow you to search for and to list the content of for
example a universal file (after reading it with univread).

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 11


The function, uniwrite, writes Universal File type 58 or 58b (binary). See the document
“Universal Write Manual.pdf” in the Documentation Files directory for more information on
how to export data to universal files.

Time data filters and weighting functions


This group contains several filter routines and functions for weighting data using digital
filters. The group includes commands for standard A- and C-filters and for integrating and
differentiating data. A practical routine acc2vel converts a measured acceleration into
velocity, simulating a first-order RC filter, analog with what is done in a charge amplifier
when selecting “velocity output”. The octave and third octave band filters given conform to
the proper IEC standard and has the correct bandwidth. Note that the octave and third-octave
filter commands in this group only define the filter coefficients. To make a complete
frequency analysis in octave or third-octave bands, you can use the commands in the
Frequency Analysis group. In addition to the filters mentioned, all filters defined in the ISO
2631 standard are also implemented.

Frequency domain filters and weighting functions


This group includes commands for frequency domain weighting, for example acoustic A- and
C-weighting of spectra.

Frequency and Correlation Analysis


The main feature of the functions in the frequency and correlation analysis group is that they
leave properly scaled results. There are commands for narrow-band analysis (using FFT) as
well as octave and third octave analysis. The hann and flattop time windows are defined in
the ISO standard 18431-2. A measured PSD may be converted to a third octave band
spectrum.

Rotating machine RPM based analysis


This group contains commands for analyzing data from a run-up or coast down of engines
etc., where a tachometer channel has been included in the measurement. The group contains
commands for fixed-frequency as well as synchronous sampling, using digital resampling of
the data. Crossing orders can be analyzed using Vold-Kalman filters.

Graphical user interfaces


MATLAB contains very powerful graphical user interface routines. The tool for creating
graphical user interfaces is called Guide and is started by typing ‘guide’ at the MATLAB

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 12


command prompt (>> guide). There is also an add-on available for VibraTools, the Option
GUI and Data Acquisition. Please visit our webpage or contact us for more information.

Earlier versions of VibraTools contained functions for creating graphical user interfaces.
These are no longer documented in this manual since Guide is a much better alternative. The
files are however still included in VibraTools so your old applications will still work.

Maps
The functions in the map group make it simple to create scaled waterfall maps and also maps
using one-third octave band filters.

Plot utilities
Among the features in the plot utilities group are functions to plot one third octave band
spectra and nice looking logarithmic axes.

Statistics, Data quality


Many statistical functions and tests are implemented. These may be used for data quality
checks.

Example scripts
To make it easy to start using the toolbox, we have included a number of demo examples,
complete with data, so that you can see examples of how some typical tasks may be done.
More examples may be found on our web pages, check at www.vibratools.com. With the
current release, the following demo examples are provided on the CD:

Script file Description


DEMO1.m Basic demonstrations
DEMO2.m Plots time data, APD, frame statistics, and PSD of data from a
tracked vehicle.
DEMO3.m Third octave spectrum of a synthetic signal (square wave) and
acoustic A-weighting.
DEMO4.m Imports data from a SONY DAT recorder and analyzes
multichannel data.
DEMO5.m Data quality analysis example.
ENVDEMO.m Demonstration of the command fanenv to produce an envelope
spectrum, which is often used for diagnosing bearings etc.
RPMDEMO.m RPM Map and order slices from fixed-frequency and
synchronously resampled data.
ANALYZERDEMO.m Subdirectory containing a one-channel FFT analyzer illustrating
the VibraTools GUI commands.
VKORDERDEMO.m Compares traditional FFT analysis with Vold-Kalman analysis

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 13


VKTIMEDEMO.m Extracts time data using Vold-Kalman filter.
TESTCARD.m Measuring of important PCs sound card parameters.
ANTIALIASING.m Determines the antialiasing filter characteristics of the PCs
sound card.
Table 2. Demonstration scripts provided with VibraTools version 6.5.

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 14


Command Reference
In this section all commands are listed in alphabetical order.

ACC2VEL Acceleration to velocity conversion


v = acc2vel(x,fs,fc)
converts acceleration to velocity
v is velocity output in mm/s
x is datavector acceleration in m/s2
fs is sampling-frequency in Hz
fc is cutoff-frequency in Hz
simple RC integrator with cutoff frequency fc is used
See also INTNORM

AFILTER gives the filter coeffs for A-weighting of time signal


[b,a] = afilter(fs)
[b,a] filter coefficients
fs sampling frequency in Hz
NOTE! The accuracy of the result is depending on the sampling frequency
Check the resulting filter before using it, for instance with AWEIGH.

Example:
fs = 10000;
x = zeros(16384,1); x(1) = fs;
[b,a] = afilter(fs);
y = filter(b,a,x);
[z,f] = fantrans(y,fs);
figure(1);clf;loglog(f,z,'k');hold on
a = aweigh(ones(size(f)),f);
loglog(f,a,'r')

See also AWEIGH, AWEIGHP, CFILTER, CWEIGH, CWEIGHP

ANGLED Angle in degrees


y = angled(x)
y 180/pi*angle(x)
x input data vector

APDNORM amplitude probability function and corresponding normal function


[a,n,ax] = apdnorm(x,N,xmin,xmax)
a amplitude probability density function
n normal apd from rms and mean of x
ax amplitude x-axis for plot
x signal vector
N number of bins
xmin minimum amplitude value
xmax maximum amplitude value

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 15


AUTOCORR auto correlation function
[a,t] = autocorr(x,fs,N)
a auto correlation function, acf
t time axis for acf in seconds
x signal vector
fs sampling frequency in Hz
N frequency transform block size

The autocorrelation function is formed from spectral estimate with half boxcar
window result is truncated to time interval [-N/4fs ; N/4fs] and centered around
time zero

AWEIGH A-weighting of frequency spectrum, linear


z = aweigh(y,f)
y (linear) function of frequency
f frequency vector in [Hz]

AWEIGHP A-weighting of power (squared) frequency spectrum


z = aweighp(y,f)
y (squared) function of frequency e.g psd
f frequency vector in [Hz]

BITTEST Test of number of bits used in data vector from ADC


y = bittest(x)
y number of bits used for signal vector x
can be used for test of dynamic range

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 16


CFILTER gives the filter coeffs for C-weighting of time signal
[b,a] = cfilter(fs)
[b,a] filter coefficients
fs sampling frequency in Hz
NOTE! The accuracy of the result is depending on the sampling frequency
Check the resulting filter before using it, for instance with CWEIGH.

Example:
fs = 10000;
x = zeros(16384,1); x(1) = fs;
[b,a] = cfilter(fs);
y = filter(b,a,x);
[z,f] = fantrans(y,fs);
figure(1);clf;loglog(f,z,'k');hold on
c = cweigh(ones(size(f)),f);
loglog(f,c,'r')

See also AFILTER, AWEIGH, AWEIGHP, CWEIGH, CWEIGHP

CLIPNEG Clipping of signal at negative side


y = clipneg(x,lvl)
y signal vector x clipped for values < lvl
x input signal
lvl clipping level

CLIPPOS Clipping of signal at positive side


y = clippos(x,lvl)
y signal vector x clipped for values > lvl
x input signal
lvl clipping level

COMFORT comfort in buildings, SS 460 48 61


y = comfort(x,fs)
y output running rms value, velocity, mm/s, ISO 8041 Wk
one second time constant
x measured acceleration data vector in m/s2
fs sampling frequency in Hz
lowest recommended sampling frequency is 800 Hz

CREST Crest factor of signal


c = crest(x)
c = maximax/rms
x input signal vector

CSDNORM Normalized cross spectral density csd with hanning window


[Gyx,f] = csdnorm(x,y,fs,size)

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 17


Gyx normalized csd
f frequency vector in Hz
x (input) data vector
y (output) data vector
fs sampling frequency in Hz
size FFT size

50 % overlap is used
all data is used

See also FANHANN FANFLAT FANUNI FANTRANS PSDNORM.

CROSSCOR Cross Correlation Function


[c,t] = crosscor(x,y,fs,N)
c cross correlation function
t time axis for cross correlation function
x signal vector
y signal vector, same size as x
fs sampling frequency
N frequency transform block size

cross correlation is formed from spectral estimate with half boxcar window
result is truncated to time interval [-N/4fs ; N/4fs]
and centered around time zero

CWEIGH C-filter weighting of linear frequency spectrum


z = cweigh(y,f)
y (linear) function of frequency
f frequency vector in Hz

CWEIGHP C-filter weighting of quadratic frequency spectrum


z = cweighp(y,f)
y power function of frequency
f frequency vector in Hz

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 18


DACREAD reads DACTRON *.txt data file to MATLAB
dacread(column,nocol,seqno,remark,FileName,FilePathName)
col column to read
nocol number of columns in format
seqno sequence number
remark string to go to first line in header
The file is saved as dacxxxx.mat where xxxx
is the sequence number seqno
if file and/or path not given, a dialog box is opened
Give FileName without extension!
The mat file consists of Header and Data.
Compatible with ttptread, trecread, univread
sonyread and datread, but no Xaxis

DATASCAN Scan of data plot


datascan(x,fs,N)
x data vector
fs sampling freqiuency in Hz
N number of points per plot

DATASCAN plots N samples at a time of the function x, and pauses,


until end of data is reached.
fs and N are optional
fs = 1, N=1024 are used as default.

DATLOOK reads Sony PCscan MK II logfile


[ID,da,nochl,fsamp,rectime] = datlook(FileName,FilePathName)
DATLOOK uses log file FileName.log
Give FileName without extension!
information is displayed and also be given to result vector
ID ID number
da date
nochl number of channels
fsamp sampling frequency
rectime record length in seconds

DATLOOK3 reads Sony PCscan MK III logfile


[ID,da,nochl,chls,fsamp,rectime] = datlook3(FileName,FilePathName)
DATLOOK uses log file FileName.log
Give FileName without extension!
information is displayed and also be given to result vector
ID ID number
da date
nochl number of channels
fsamp sampling frequency
rectime record length in secons

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 19


DATREAD reads Sony PCscan MK II file to MATLAB
datread(p1,p2,skip,len,seqno,FileName,FilePathName)
p1 channel
p2 downsampling factor (integer 1, 2, 3, 4, ... 32)
skip start time in seconds (skip skip seconds before start)
len length in seconds
seqno sequence number
The file is saved as datxxxx.mat where xxxx
is the sequence number seqno
datread uses log file FileName.log and data file FileName.bin
if file and/or path not given, a dialog box is opened
Give FileName without extension!
The mat file consists of Header and Data.
Compatible with ttptread, trecread, univread and sonyread,
but no Xaxis
NOTE: The function uses rather long buffers, so
make the SONY PCscan recording at least 3 seconds
longer than (skip+len)

DATREAD3 reads Sony PCscan MK III file to MATLAB


datread3(p1,p2,skip,len,seqno,FileName,FilePathName)
p1 channel
p2 downsampling factor (integer 1, 2, 3, 4, ... 32)
skip start time in seconds (skip skip seconds before start)
len length in seconds
seqno sequence number
The file is saved as datxxxx.mat where xxxx
is the sequence number seqno
datread uses log file FileName.log and data file FileName.bin
if file and/or path not given, a dialog box is opened
Give FileName without extension!
The mat file consists of Header and Data.
Compatible with ttptread, trecread, univread and sonyread,
but no Xaxis
NOTE: The function uses rather long buffers, so
make the SONY PCscan recording at least 3 seconds
longer than (skip+len)

DB10 dB calculation, z = 10*log10(abs(y)/ref)


z = db10(y, ref)
z = 10*log10(abs(y)/ref)
y input data vector
ref reference, if no reference is given, 1 is used

DB20 dB calculation, z = 20*log10(abs(y)/ref)


z = db20(y, ref)
z = 20*log10(abs(y)/ref)
y input data vector
ref reference, if no reference is given, 1 is used

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 20


DIFFNORM The derivative of a time series
y = diffnorm(x,fs)
y output signal vector
x time series input vector
fs sampling frequency in Hz
second order diff formula is used
note that a time delay of two samples is introduced!

EQUIVBW Equivalent noise bandwidth for window


enbw = equivbw(w)
enbw equivalent noise bandwidth (factor * delta f)
(this function gives the factor 3/2 for hanning as example)
w window vector

EXPWIN Exponential window


function w = expwin(N,EndPercent);

N Window length in samples


EndPercent Value of window at record end, in percent

EndPercent=1, means window is down to 0.01 at end of time record


(actually, w(N+1) would be = to 0.01, if calculated)
EndPercent=0, or 100 returns a boxcar, that is, no window

EXPNZERO Expected number of zero crossings


c = expnzero(x,fs,N)
c the expected number of zerocrossings in one direction per unit time
x signal vector
fs sampling frequency in Hz
N fft size

c is calculated from the psd moments


psd is calculated with fftsize N
c = sqrt(m2/m0)

FANENV Frequency ANalysis with ENVelope spectrum


[e,f] = fanenv(x,fs,N,fc,fb,Method)
e output vector, envelope spectrum
f frequency vector in Hz
x data vector
fs sampling frequency
N FFT block size
fc center frequency in Hz for bandpass filter (optional)
fb frequency bandwidth in Hz for bandpass filter (optional)
Method 'linear' (default) or 'squared'. If 'squared', the envelope is
squared prior to calculating the rms spectrum, which can
reduce effects of envelope harmonics.

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 21


The envelope spectrum is computed after a bandpass filter has been used
to filter out the requested bandwidth. If fc and fb are not given, no
bandpass filtering is done.
The first three frequency bins of the envelope spectrum are set to zero
to remove any effects of the envelope not being zero mean.

See also FANHANN FANFLAT

FANFLAT Frequency ANalysis with FLAT top window, using linear averaging
[y,f] = fanflat(x,fs,N,M,p)
y result, rms scaled
f frequency vector in Hz
x data vector
fs sampling frequency in Hz
N FFT block size
M number of averages
p overlap percentage
See also FANFLATPH FANFLATX FANHANN, FANTRANS, FANUNI

FANFLATPH Frequency ANalysis with FLAT top window, using peakhold averaging
[y,f] = fanflat(x,fs,N,M,p)
y result, rms scaled
f frequency vector in Hz
x data vector
fs sampling frequency in Hz
N FFT block size
M number of averages
p overlap percentage
See also FANFLAT FANFLATX FANHANN, FANTRANS, FANUNI

FANFLATX Frequency ANalysis with FLAT top window, using exponential averaging
[y,f] = fanflat(x,fs,N,M,p)
y result, rms scaled
f frequency vector in Hz
x data vector
fs sampling frequency in Hz
N FFT block size
M number of averages
p overlap percentage
See also FANFLAT FANFLATPH FANHANN, FANTRANS, FANUNI

FANHANN Frequency ANalysis with HANNing window RMS scaled, linear averaging
[y,f] = fanhann(x,fs,N,M,p)
y output vector, rms scaled
f frequency vector in Hz
x data vector

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 22


fs sampling frequency
N FFT block size
M number of averages
p overlap percentage

See also FANHANNPH FANHANNX FANFLAT FANTRANS FANUNI PSDNORM

FANHANNPH Frequency ANalysis with HANNing window RMS scaled, peakhold


averaging
[y,f] = fanhann(x,fs,N,M,p)
y output vector, rms scaled
f frequency vector in Hz
x data vector
fs sampling frequency
N FFT block size
M number of averages
p overlap percentage

See also FANHANN FANHANNX FANFLAT FANTRANS FANUNI PSDNORM

FANHANNX Frequency ANalysis with HANNing window RMS scaled, exponential


averaging
[y,f] = fanhann(x,fs,N,M,p)
y output vector, rms scaled
f frequency vector in Hz
x data vector
fs sampling frequency
N FFT block size
M number of averages
p overlap percentage

See also FANHANNPH FANHANNX FANFLAT FANTRANS FANUNI PSDNORM

FANOCT Octave-band spectrum calculation using time domain filtering according to IEC
1260
[Spec,f] = fanoct(x,fs,fmin,fmax))
x Time data
fs Sampling frequency
fmin Minimum frequency to be used (the nearest center frequency > fmin is used).
Default 16 Hz
fmax Maximum frequency to be used (the nearest center frequency < fmax is
used). Default 16 kHz
Spec Vector with resulting RMS spectrum (RMS value of each octave band using all
data in x)
f Vector with center frequencies for Spec

Octave filters from 16 Hz to 16 kHz are included. You can easily modify the script if
needed.You need to ensure that the bandwidth of your data includes your requested

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 23


frequency range! A check is performed to see that the maximum third octave center
frequency does not exceed fs/5. If lowest center frequencies are < fs/100, the signal is
decimated for improved performance at lower center frequencies.

See also FANTERS OCTFILT TERSFILT PLOTOCT PSD2TERS

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 24


FANTERS Third-octave-band spectrum calculation using time domain filtering according
to IEC 1260
[Spec,f] = fanters(x,fs,fmin,fmax))
x Time data
fs Sampling frequency
fmin Minimum frequency to be used (the nearest center frequency > fmin is used)
fmax Maximum frequency to be used (the nearest center frequency < fmax is used)
Spec Vector with resulting RMS spectrum (RMS value of each octave band using all
data in x)
f Vector with center frequencies for Spec

NOTES:
1/3rd octave filters from 20 Hz to 20 kHz are included. You can easily modify the
script if needed. You need to ensure that the bandwidth of your data includes your
requested frequency range! A check is performed to see that the maximum third
octave center frequency does not exceed fs/5. If lowest center frequencies are <
fs/100, the signal is decimated for improved performance at
lower center frequencies.

See also FANOCT OCTFILT TERSFILT PLOTOCT PSD2TERS

FANTRANS Frequency ANalysis of TRANSient


[y,f] = fantrans(x,fs)
y transient spectrum magnitude, impulse scaled { y(0) = impulse }
f frequency vector in Hz
x data vector, all data is used
fs sampling frequency in Hz

See also FANHANN FANFLATT FANUNI PSDNORM.

FANTRANSP Frequency ANalysis of TRANSient with Phase


[y,f] = fantransp(x,fs)
y complex transient spectrum, impulse scaled { abs(y(0)) = impulse }
f frequency vector in Hz
x data vector, all data is used
fs sampling frequency in Hz

See also FANTRANS FANHANN FANFLATT PSDNORM.

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 25


FANUNI Frequency ANalysis with UNIform window RMS scaled, linear averaging
[y,f] = fanuni(x,fs,N,M,p)
y output vector, rms scaled
f frequency vector in Hz
x data vector
fs sampling frequency in Hz
N FFT block size
M number of averages
p overlap percentage

See also FANUNIPH FANUNIX FANFLAT FANHANN FANTRANS PSDNORM.

FANUNIPH Frequency ANalysis with UNIform window RMS scaled, peakhold averaging
[y,f] = fanuni(x,fs,N,M,p)
y output vector, rms scaled
f frequency vector in Hz
x data vector
fs sampling frequency in Hz
N FFT block size
M number of averages
p overlap percentage

See also FANUNI FANUNIX FANFLAT FANHANN FANTRANS PSDNORM.

FANUNIX Frequency ANalysis with UNIform window RMS scaled, exponential averaging
[y,f] = fanuni(x,fs,N,M,p)
y output vector, rms scaled
f frequency vector in Hz
x data vector
fs sampling frequency in Hz
N FFT block size
M number of averages
p overlap percentage

See also FANUNI FANUNIPH FANFLAT FANHANN FANTRANS PSDNORM.

FIGTEXT writes a string in current figure, used with plots


figtext(x,y,string)
x low left corner in % of window x
y low left corner in % of figure y

FINDFUNC Find import file(s) that match specification

FileNo = findfunc(FileList,Ref,Resp,Func)
FileList Vector with file numbers
All files in the list do not need to exist.

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 26


Ref Reference specification, either a number>=0 or a string.
Resp Response specification, either a number>=0 or a string.
Func 'FRF' (default), 'Coh', etc., in SHORTSTRING format, see HEADFUNC
FileType 'uf' (default), 'dat', etc., specifying prefix of MAT file names
FileNo Vector with all file numbers that match specification

If the identifier Ref or Resp is a number, only the measurement


point number is matched. If the identifier Ref or Resp is a
string, then the entire string is matched. Allowed direction strings are:
'RZ-','RY-','RX-','Z-','Y-','X-','X+','Y+','Z+','RX+','RY+',and 'RZ+'.
The direction strings can be upper or lower case.

FileNo = findfunc([100:200],7,7) finds the driving point FRF in DOF 7


FileNo = findfunc([100:200],'7Z+','7Z-') finds the driving point FRF in
DOF 7, but in this case, only if the directions Z+ and Z-,
respectively, match.
FileNo = findfunc([100:200],0,7) finds all FRFs of response DOF 7 with
all references.
The number 0 can be used as a wildcard for Ref or Resp either as a number
or in a string, for example
FileNo = findfunc([100:200],0,'0Z+') finds all FRFs of responses in Z+ direction
with all references.

See 58.asc for description of Universal File format

See also HEADFUNC, UFFUNCLIST UNIVREAD DATREAD.

FLATTOP Flat top window for frequency analysis


w = flattop(N)
w returns the N-point Flat top window in a column vector.
flat top window according to ISO 18431-1
See also FANFLAT

FLOGOPEN Opens a log file (text file) and returns the file id parameter
[LogId, LogFileName] = flogopen(LogFileName, Text);
LogFileName File name without extension
Text Text string (optional)
LogId File id for opened file

If the last part of LogFileName is a number, the function checks for


the existence of that name, and if it exists, the number is incremented
and a new file is opened.
Date and time of opening the file is printed in the file.
If Text is given it is printed in the file right after the date and time

FORCEWIN Window sequence x by a force window.


wx=forcewin(x,width) produces a windowed sequence in wx the
same length as x. The sequence wx is ensured to start and end
with zero, in order to minimize any degradation when Fourier

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 27


transforming wx.

x Sequence to be windowed (force impact)


width point in % of N where w starts to descend
w goes to zero in width/2

If width > 66, a boxcar window is returned (no window)

FRAMSTAT Frame Statistics


[y,t] = framstat(x,fs,'func',nframe,noverl)
The function func is applied on frames of x
y returned result as a column vector
t the compressed time column vector in seconds
x data vector
fs sampling frequency in Hz
func applied function (mean, std, kurtosis, max, ...)
nframe number of points in frame
foverl number of points in overlap

FREQDIFF Frequency differentiation of spectrum or FRF

Gdiff = freqdiff(G, f, SpecType)


G Spectrum to be differentiated
f Frequency vector in Hz
SpecType 'lin' or 'LIN' assumes G is a linear spectrum (default)
SpecType 'power' or 'POWER' assumes G is a power spectrum (eg. a PSD)

This function produces the spectrum of the differentiated time


signal. If G was produced from a velocity signal, then this function
produces the spectrum of the corresponding acceleration signal. It works
on complex and real spectra and frequency responses.
The function differentiates by multiplying G by j*w or by (j*w)^2,
where j*w is j*2*pi*f. If G is real, the absolute value is
taken.
FREQINT works on 3D spectra as computed by xmtrx (ModalTools).

see also FREQINT

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 28


FREQINT Frequency integration of spectrum or FRF

Gint = freqint(G, f, SpecType)


G Spectrum to be integrated
f Frequency vector in Hz
SpecType 'lin' or 'LIN' assumes G is a linear spectrum (default)
SpecType 'power' or 'POWER' assumes G is a power spectrum (eg. a PSD)

This function produces the spectrum of the integrated time


signal. If G was produced from an accelerometer signal, then This function
produces the spectrum of the corresponding velocity signal. It works on
complex and real spectra and frequency responses.
FREQINT integrates by dividing G by j*w or by (j*w)^2, where j*w is j*2*pi*f.
If G is real, the absolute value is taken.
FREQINT works on 3D spectra as computed by xmtrx (ModalTools).

see also FREQDIFF

FUNCLIST Make a list of functions from an import from any file format
funclist(FileList,SortType,FileType)
FileList Vector of file numbers in ascending order
All files in the list do not need to exist.
SortType 'FILE' (default), 'RESP', 'REF', or 'FUNC'
Sort after specified column
FileType File type, for example 'uf' (default), 'dat', or 'sdf'

example:
funclist([1:6])
gives:

File no Response Reference Func Type


1 1Y+ 1Z+ Coh
2 1Z+ 1Z+ Coh
3 1Y+ 1Y+ FRF
4 1Z+ 1Y+ FRF
5 1Y+ 1Y+ Coh
6 1Z+ 1Y+ Coh

funclist([1:2 5:6])
gives:

File no Response Reference Func Type


1 1Y+ 1Z+ Coh
2 1Z+ 1Z+ Coh
5 1Y+ 1Y+ Coh
6 1Z+ 1Y+ Coh

GETNSAMP Get new sampling times for syncronous sampling


nsamp = getnsamp(tacho,fs,triglevel,slope,ppr,sampperrev)

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 29


nsamp vector with new sampling time instants
tacho tacho signal
fs sampling frequency for tacho in Hz
triglevel trig level for tacho pulses
slope +1 for trig on positive slope,
-1 for trig on negative slope
ppr number of pulses per revolution for tacho
sampperrev number of sampling pulses per revolution

NOTE! The trig function is very simple and basic which requires a
clean tacho signal. In some cases, a filtered tacho may work better
than the original one.

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 30


GETRPM Get RPM as function of time from tacho signal
[rpm,trpm] = getrpm(tacho,fs,triglevel,slope,ppr,newfs)
rpm RPM as funcion of time
trpm time base for RPM (seconds)
tacho tacho signal
fs sampling frequency for tacho in Hz
triglevel trig level for tacho pulses
slope +1 for trig on positive slope,
-1 for trig on nehgative slope
ppr number of pulses per revolution for tacho
newfs new sampling frequency for tacho signal and time base

NOTE! The trig function is very simple and basic which requires a
clean tacho signal. In some cases, a filtered tacho may work better
than the original one.

HALFSINE Generation of halfsine pulse


[x,t] = halfsine(amplitude,duration,fs,totaltime)
x halfsine pulse
t total time vector in seconds
amplitude max amplitude of pulse
duration duration of pulse in seconds
fs sampling frequency in Hz
totaltime total time of output vector in seconds

HANN Hanning window


w = hann(N)
w returns the N-point hanning window in a column vector.
hanning window according to ISO 18431-1
See also FANHANN

HANN1HZ Version of hanning window that allows one Hz bandwidth


w = hann1hz(N)
w returns the N-point hanning^0.7397 window in a column vector.
this will give a true one Hz noise bandwidth
for fs/N = 6000/8192, for example fs = 48 kHz and N = 64*1024

HEADCH picks out the record sequence number (channel number) from Header
ChNo = headch(Header)
Header from UNIVREAD, DATREAD, TEACREAD etc

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 31


HEADCONV converts toolbox header to an universal file header for UNIWRITE
header = headconv(toolhead)
header Header for UNIWRITE
toolhead Header in toolbox from univread, datread, waveread etc

Function starts by making a default header.


Then the relevant parameters from toolhead are added.
HEADCONV uses UNIVHEAD

See also UNIWRITE, UNIVHEAD, UNIVREAD


NOTE! There is no full compatibility between a Universal File Header
and a toolbox header. Use UNIVHEAD to make any additional changes needed!

HEADDX picks out the delta x from Header


dx = headdx(Header)
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

HEADENBW picks out the ENBW factor from Header


enbw = headenbw(Header)
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

HEADFS picks out the sampling frequency from Header


fs = headfs(Header)
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

HEADFUNC Extracts function type from universal file header


Func = headfunc(Header, OutputType)

Header Universal file header (from UNIVREAD)


OutputType 'NUMBER' (default) produces universal file code as integer in Func
OutputType 'STRING' produces a full text description of the function type
OutputType 'SHORTSTRING' produces a 3- to 7-letter abbreviation
See inside file for description of the strings; not all are obvious.

HEADLL picks out the data length (number of samples) from Header
ll = headll(Header)
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

HEADLX picks out the left x (min x) from Header


lx = headlx(Header)
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 32


HEADMD picks out the measurement direction from Header
md = headmd(Header)
md measurement direction (response)
0: scalar
1: +X translation
-1: -X translation
2: +Y translation
-2: -Y translation
3: +Z translation
-3: -Z translation
4: +X rotation
-4: -X rotation
5: +Y rotlation
-5: -Y rotation
6: +Z rotation
-6: -Z rotation

HEADMP picks out the measurement point from Header


mp=headmp(Header)
mp measurement point number
Header from UNIVREAD

HEADNC picks out the number of channels from Header


nc=headnc(Header)
mp number of channels
Header from UNIVREAD

HEADOCTTYPE Gets Octave type from Header


OctType = headocttype(Header)

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

HEADOVRL picks out the 'Overall rms' for octave spectra from Header
Overall = headovrl(Header)

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

HEADOVSAMP picks out the Over sampling factor from Header


OverSampl = headovsamp(Header)

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

HEADQ picks out the Q factor from Header (for Shock Response)
Q = headQ(Header)

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 33


HEADRD picks out the reference direction from Header
rd = headrd(Header)
rd reference direction
0: scalar
1: +X translation
-1: -X translation
2: +Y translation
-2: -Y translation
3: +Z translation
-3: -Z translation
4: +X rotation
-4: -X rotation
5: +Y rotlation
-5: -Y rotation
6: +Z rotation
-6: -Z rotation
HEADRP picks out the reference point from Header
rp = headrp(Header)
rp reference point number
Header from UNIVREAD

HEADSRCH Search for Header string


k = headsrch(filetype,first,last,string)
k gives a list of numbers of File Headers that match string
filetype 'uf', 'ttpt' 'trec' 'dat' etc.
first file number xxx for first signal vector
last file number for last signal vector
not all files in between have to exist
string string for match
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc
Example: k = headsrch('uf',101,200,':+x')

HEADSTR Make string with force and response DOFs from Header for title in plots etc.

Header Standard VibraTools header


T output string suitable for title

Example output: T = 'Force: 1X+, Response: 2Y-'

If data has no reference (for example for time data, or PSDs),


'NONE' is displayed.

HEADTI picks out the R:th title line from Header


ti = headti(Header,R,N)
ti is string
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD etc
R = 1 Main text max 72 chrs if from TRAS
R = 2 Sub text max 30 chrs if from TRAS

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 34


R = 3 Date and time for acquisition
R = 4 Tells the type of file if from TRAS
N is number of characters

HEADTIME Makes Time Vector from info in Header


t = HEADTIME(Header)
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

HEADTS picks out the transducer serial number from Header


TransSerial = headts(Header)
TransSerial Transducer serial number string
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

HEADTT picks out the transducer type from Header


TransType = headtt(Header)
TransType Transducer type string
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

HEADWEIGHT Gets weighting type from Header


WeightType = headocttype(Header)
WeightType 0 for unweighted
1 for A-weighted
3 for C-weighted

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

HEADXL picks out the x label from Header


xl = headxl(Header)
xl x label string
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

HEADXU picks out the x unit from Header


xu = headxu(Header)
xu x unit string
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

HEADYL yl = HEADYL(Header) picks out the y label from Header


yl = headyl(Header)
yl y label string
If ordinate denominator label is filled in, as for a
two-channel function, then yl is combined as for example
yl = 'Acceleration/Force'

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 35


HEADYU picks out the y unit from Header
yu = headyu(Header)
yu y unit string
For two-channel functions such as FRFs, a combination of
numerator and denominator units is returned.

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

HPFLOAT returns the floating point number corresponding to x i HP format


f = hpfloat(x)
x is a column vector with four bytes in HP format
or x is a matrix 4*N

IE3DBL IEEE double prec. float of x (8 bytes), exponent first


f = ie3dbl(x)
x IEEE double prec. float of x (8 bytes), exponent first
see also HPFLOAT, IE3FLOAT, IE3FLT, IE3DOUBL

IE3FLOAT IEEE single precision float of x (4 bytes)


f = ie3float(x)
x IEEE single precision float of x (4 bytes)
see also HPFLOAT, IE3FLOAT, IE3FLT, IE3DOUBL

IE3FLT IEEE single prec. float of x (4 bytes), exponent first


f = ie3flt(x)
x IEEE single prec. float of x (4 bytes), exponent first
see also HPFLOAT, IE3FLOAT, IE3FLT, IE3DOUBL

INTNORM returns the normalised integral of a time series


y = intnorm(x,fs)
y output signal vector
x input data vector
fs sampling frequency in Hz
mean and linear trend is removend

IRREG returns the irregularity factor value of signal vector x


c = irreg(x)
c expected number of zeros / expected number of peaks
calculated from the psd moments
psd is calculated with block size 256
c = sqrt(m2*m2/m4/m0)
c is a number between 0 and 1
c is near 1 for a narrowband signal
c approaches zero for wideband

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 36


ISOADC Function for calculation the Acceleration dose (Dk) for a seated
operator usting vibrations on the seat accordting to ISO 2631-5:2004
(adc = acceleration dose calculation)
[Dk Sed Dkd] = isoadc(data,channels,fs,daily_time_of_use)
Dk Acceleration dose Dk according to ISO 2631-5:2004
Sed Calculation of the daily equivalent statec compression dose
using equation A.2 in ISO 2631-5:2004
Dkd Normalised acceleration dose for the average daily
exposure time (daily_time_of_use) according to
equation 5 of ISO 2631-5:2004
data signals from seat in engineering data
channels which row/column of data giving for the different directions
in data. NOTE: a negative number indicates a measurement in
opposite direction. Order in channels [x y z]
fs sampling frequency. (The data will be resampled if not 160Hz)
daily_time_of_use how many hours the machine is used on a daily basis
under this condition.
Only used if Sed and Dkd values are going to be
calculated.

The function can also normalise the acceleration dose for the
average daily exposure time (Dkd) as well as calculate the daily
equivalent static compression dose (Sed) to analyse the assessment
of adverse health effect at lifetime exposure during working time
(based on 240 days of exposure per year)

See also ISOSED.

ISOFILTW Filter ISO 8041 W-, All ISO 8041 weighting filters
y = isofiltw(x,fs,type);
y output signal vector, acceleration
x input signal vector, acceleration
fs sampling frequency Hz
type:
Wk whole body, vertical
Wd whole body, horisontal
Wf whole body, motion sickness
Wbc whole body, combined
Wc whole body, seat back, horisontal x
We whole body, rotational
Wi head of recumbent person
Wh hand-arm
Wb whole body, rail vehicles, according to BS
6841:1987

bilinear transformation algorithm is used


for Wf, recommended lowest sampling frequency is 10 Hz
for Wh, recommended lowest sampling frequency is 10000 Hz
for Wbc, Wc, Wd, We, Wi and Wk, recommended lowest sampling freq. is 800 Hz

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 37


ISOFILWB Filter ISO 8041 WB, whole body, combined direction
designated W.B. combined
y = isofilwb(x,fs);
y output signal vector, acceleration
x input signal vector, acceleration
fs sampling frequency in Hz
bilinear transformation algorithm is used
lowest recommended sampling frequency is 800 Hz

ISOFILWC Filter ISO 8041 Wc, whole body,


seat back horisontal x direction
y = isofilwc(x,fs);
y output signal vector, acceleration
x input signal vector, acceleration
fs sampling frequency in Hz
bilinear transformation algorithm is used
lowest recommended sampling frequency is 800 Hz

ISOFILWD Filter ISO 8041 Wd, whole body, horisontal directions


y = isofilwd(x,fs);
y output signal vector, acceleration
x input signal vector, acceleration
fs sampling frequency in Hz
bilinear transformation algorithm is used
lowest recommended sampling frequency is 800 Hz

ISOFILWE Filter ISO 8041 We, whole body,


rotational vibration rx, ry, rz
y = isofilwe(x,fs);
y output signal vector, acceleration
x input signal vector, acceleration
fs sampling frequency in Hz
bilinear transformation algorithm is used
lowest recommended sampling frequency is 800 Hz

ISOFILWF Filter ISO 8041 Wf, motion sickness, vertical direction


y = isofilwf(x,fs);
y output signal vector, acceleration
x input signal vector, acceleration
fs sampling frequency in Hz
bilinear transformation algorithm is used
lowest recommended sampling frequency is 10 Hz

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 38


ISOFILWH Filter ISO 8041 Wh, hand arm vibration,
all directions x, y, z
y = isofilwh(x,fs);
y output signal vector, acceleration
x input signal vector, acceleration
fs sampling frequency in Hz
bilinear transformation algorithm is used
lowest recommended sampling frequency is 10 kHz

ISOFILWI Filter ISO 8041 Wi, head of recumbent person,


vertical direction z
y = isofilwi(x,fs);
y output signal vector, acceleration
x input signal vector, acceleration
fs sampling frequency in Hz
bilinear transformation algorithm is used
lowest recommended sampling frequency is 800 Hz

ISOFILWK Filter ISO 8041 Wk, whole body, vertical direction


y = isofilwk(x,fs);
y output signal vector, acceleration
x input signal vector, acceleration
fs sampling frequency in Hz
bilinear transformation algorithm is used
lowest recommended sampling frequency is 800 Hz

ISOSED Calculates the daily equivalent static compression dose from


single or multiple acceleration dose values from different
work operations during a day using equation 6 in ISO 2631-5:2004
(adc = acceleration dose calculation)
[Sed, Dkd] = isosed(Dk,tmeas,T)
Dk acceleration dose values for different conditions
1..N using the machine on a daily basis.
in format [Dx1 Dy1 Dz1
Dx2 Dy2 Dz2
... ... ...
DxN DyN DzN]
NOTE! The Dk vector can be calculated through the
script adc.m for one condition at time
(adc = acceleration dose calculation)
tmeas period of times for the measurement of the
acceleration dose values 1..N (in hours)
T vector of evaulated daily exposure time for the different
acceleration dose values 1..N (in hours)
Sed the daily exposure static compression dose at lifetime exposure
Dkd the normalised acceleration dose values for average daily exposer
In this matrice you can see which operation to try to reduce
as much as possible for the best result of the Sed value

See also ISOADC.

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 39


KURTOSIS returns the kurtosis value of vector x
c = kurtosis(x)
x input data vector
mean is subtracted

KURTWM kurtosis with mean


c = kurtwm(x)
x data vector
mean is not subtracted

LONG returns integer value of four byte vector


f = long(st)
st vector of four bytes
see also SHORT

MAKEHEAD Make an empty VibraTools header for Data variable


Header = makehead(Data,dx,Func,Xunit,Yunit) produces a header for Data
Header = makehead; produces a header with data lengt=0
Header New VibraTools header
Data Column vector with data for which the header is valid
dx X axis increment in time or frequency (default = 0)
Func Either the numeric function number, or a short string
as defined in HEADFUNC (see inside headfunc.m) (default
= 1, time data)
Xunit String unit for x axis, for example 'Hz' (default empty)
Yunit String unit for y axis, for example 'm/s^2' (default empty)
TransType String for Transducer Type, for example 'Voltage' (default empty)
TransSerial String for Transducer Serial Number, for example 'E213A' (default empty)

This command fills header lines 1 and 3, the data length variable,
and the x increment. Use the different sethXXXX commands to set
other fields.

MAKETIME Make Time Vector


t = maketime(x,fs)
t time vector in seconds with length corresponding to x
x data vector
fs sampling frequency in Hz

MAXIMAX Maximax of vector x max(abs(x))


f = maximax(x)
f max(abs(x))
x input data vector

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 40


MD2STR Convert numerical direction to string
sd = md2str(md);
md measurement direction, +/-1 for +/-X, 2 for Y, 3 for Z
sd Measurement direction in output string, for example Y-
If md is a vector, sd is a character matrix.
If md=0, sd is an empty string

NORMAL normal density function


y = normal(s,ax)
y normal density function
s standard deviation
ax amplitude vector for x axis

NSOFTLOOK looks at nSoft time data file (*.Dac) header


[fs,nosamp,ytitle,yunits] = nsoftlook(FileName,FilePathName)

fs sampling frequency
nosamp number of samples
ytitle title (label) of data
yunits units for data

Give FileName without extension!

NSOFTREAD reads nSoft data file *.Dac to MATLAB


nsoftread(seqno,FileName,FilePathName)
seqno sequence number
The file is saved as nsoftxxxx.mat where xxxx
is the sequence number seqno

if file and/or path not given, a dialog box is opened


Give FileName without extension!
The mat file consists of Header and Data.
Compatible with ttptread, trecread, univread and sonyread,
but no Xaxis

OCTFILT octave-band filter


[b,a] = octfilt(fs,f0)
fs sampling frequency
f0 center frequency

NOTE: The filter is within the IEC/ANSI limits for fs/f0 between approx 5 and 500.
For higher ratios, resample signal and call tersfilt with the new sampling frequency.

ORDLINE Order line plotted in current RPM Spectral Map


F frequency vector for RPM map plot
order order #

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 41


ORDSLICE Order slice from RPM Spectral Map
ord = ordslice(M,F,R,order)
ord selected order as function of RPM (R) from RPM Spectral Map
M RPM map data matrix
F frequency vector for RPM map plot
R RPM vector for RPM map plot
order order #. order can be a vector with several orders, in which
case ord is a matrix with each order in a row

ORDSLICEBW Order slice from RPM Spectral Map, using summation over frequency band
ord = ordslicebw(M,F,R,order)
ord selected order as function of RPM (R) from RPM Spectral Map
M RPM map data matrix
F frequency vector for RPM map plot
R RPM vector for RPM map plot
order order #. order can be a vector with several orders, in which
case ord is a matrix with each order in a row
nofreqs Number of frequency lines to sum for rms value. MUST be odd!

This command should be used together with rpmmaph, and assumes that a Hanning
window was applied. nofreqs should be 3 to 7, but no check is made.
We recommend using rpmmap and ordslice instead of the present command, since
rpmmap applies a flattop window, which is less sensitive to smearing.

See also RPMMAPH SYNCSLICEBW RPMMAP SYNCSLICE

PLOTHEAD plot using info in header


P = plothead(x,y,h)
plots y versus x using info in header h
p handle to figure
x x axis data vector
y y axis data vector
h header

PLOTOCT Bar plot of octave or third-octave spectra as dB sound Pressure Level


p = plotoct(f,Spec,TotLevel)
p handle to figure
f Vector with center frequencies for Spec
Spec Vector with resulting RMS spectrum in linear scale
TotLevel Totalt level. (Optional) If given, this bar is plotted on the right-hand side

The input spectrum is treated as an RMS octave- or third-octave band spectrum of


sound pressure!
Modify script for other purposes
See also FANOCT FANTERS OCTFILT TERSFILT PSD2TERS

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 42


PLOTTERS Plot of 1/3 octave band spectrum
plotters(ft,zt)
ft frequency values in Hz for spectrum
zt 1/3 octave band values

to set axis: axis([log10(xlow) log10(xhi) ylow yhi])

PSD2OCT Psd to one octave band spectrum using filter


[zt,ft] = psd2oct(z,f)
zt octave spectrum
ft frequency for octave spectrum in Hz
z psd spectrum
f frequency axes in Hz

PSD2TERS Psd to third octave band spectrum using filter


[zt,ft] = psd2ters(z,f)
zt third octave spectrum
ft frequency for third octave spectrum in Hz
z psd spectrum
f frequency axes in Hz

PSDNORM Normalised psd with hanning window


[y,f] = psdnorm(x,fs,size)
y normalised psd
f frequency vector in Hz
x data vector
fs sampling frequency in Hz
size FFT size
50 % overlap is used
all data is treated

See also FANHANN FANFLATT FANUNI FANTRANS.

QUALITYL Quality parameter matrix, with file list input


Q = qualityl(filelist,params)
Q Quality Parameter Matrix
filelist cell array with file names for VibraTools files
params 'x' for max
'n' for min
'm' for mean
'r' for rms
'c' for crest
'w' for skewness
'k' for kurtosis'
'i' for irregularity

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 43


's' for stationarity
example: 'rck' means produce rms, crest and kurtosis
QUALITYM Quality parameter matrix
Q = qualitym(filetype,filestart,fileend,params)
Q Quality Parameter Matrix
filetype 'uf', 'dat' etc.
filestart file number xxxx for first signal vector "ufxxxx.mat"
fileend file number for last signal vector
params 'x' for max
'n' for min
'm' for mean
'r' for rms
'c' for crest
'w' for skewness
'k' for kurtosis'
'i' for irregularity
's' for stationarity
example: 'rck' means produce rms, crest and kurtosis

QUALPNT Quality parameter matrix printout


qualpnt(filetype,start,stop,params,filename)

filetype 'uf', 'dat' etc.


start file number xxx for first signal vector ufxxx.mat
atop file number for last signal vector
params 'x' for max
'n' for min
'm' for mean
'r' for rms
'c' for crest
'w' for skewness
'k' for kurtosis'
'i' for irregularity
's' for stationarity
filename File name for text output file
example: 'rck' means produce rms, crest and kurtosis

see also QUALITYM


NOTE! FOR ALL PARAMETERS EXCEPT MEAN, THE MEAN VALUE
OF DATA IS SUBTRACTED BEFORE CALCULATIONS !!!!

RPMMAP RPM Spectral Map, monocolor


[M,F,R] =rpmmap(x,fs,rpm,fsrpm,startrpm,steprpm,endrpm,N,fmin,fmax,
zmax,plotstat)
plots the waterfall RPM Spectral Map, rms scaled
M RPM map data matrix
F frequency vector for RPM map plot
R RPM vector for RPM map plot
x data matrix with one ore two columns.

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 44


fs data sampling frequency in Hz
rpm RPM vector, in sync with x, but may have different fs
fsrpm RPM sampling frequency
startrpm low rpm in map
steprpm step in rpm in map
endrpm high rpm in map
N fft size
fmin min frequency in plot
fmax max frequency in plot
zmax max rms (in z coordinate) in plot
plotstat plotstat='noplot' or 'NOPLOT' will suppress plotting

The results M, F, R may be used in ordslice, order slice plot.

First column in x is treated as the data vector. If x contains a second


column then M contains phase information relative to second column.

See also ORDSLICE SYNCSLICE RPMMAPH RPMPLOT RPMPLOTC.

RPMMAPH RPM Spectral Map, monocolor, Hanning window


[M,F,R] =
rpmmaph(x,fs,rpm,fsrpm,startrpm,steprpm,endrpm,N,fmin,fmax,zmax,plotstat)
plots the waterfall RPM Spectral Map, rms scaled
M RPM map data matrix
F frequency vector for RPM map plot
R RPM vector for RPM map plot
x data vector
fs data sampling frequency in Hz
rpm RPM vector, in sync with x, but may have different fs
fsrpm RPM sampling frequency
startrpm low rpm in map
steprpm step in rpm in map
endrpm high rpm in map
N fft size
fmin min frequency in plot
fmax max frequency in plot
zmax max rms (in z coordinate) in plot
plotstat plotstat='noplot' or 'NOPLOT' will suppress plotting

The results M, F, R may be used in ordslice, order slice plot.


RPMMAPH applies a Hanning window to each time record and shold be used with
ordslicebw or syncslicebw for correct energy summation. We recommend using
rpmmap (which applies a flattop window) and ordslice instead which use flattop
window which is less sensitive to errors due to smearing.

See also RPMMAP ORDSLICE ORDSLICEBW SYNCSLICE SYNCSLICEBW

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 45


RPMPLOT Plot RPM Spectral Map (waterfall), monocolor, of RPMMAP results.

h = rpmplot(M,F,R,fmin,fmax,zmax)

plots the waterfall RPM Spectral Map, rms scaled


h handle to figure
M RPM map data matrix
F frequency vector for RPM map plot
R RPM vector for RPM map plot
fmin min frequency in plot
fmax max frequency in plot
zmax max rms (in z coordinate) in plot

See also RPMMAP RPMMAPH RPMPLOTC.

RPMPLOTC Plot a color intensity RPM/frequency plot of rpmmap results.


rpmplotc(M,F,R,scaling,range,mode,ylbl);
R, F, M RPM and frequency vectors and rpm map matrix from RPMMAP
scaling 'lin' produces a plot with linear amplitude (not so
sensitive). 'log' (default) produces plot using log10
range dynamic range in DECADES. range must be > 0.
mode If anything but 'none' M is linearly interpolated to approx.
1000-by-1000 lines, suitable for normal screen resolutions.
Default is to interpolate.
ylbl 'Frequency, Hz' (default) or 'Order'. Label for y axis.

rpmplotc(M,F,R) produces a default plot with log amplitude,


and range=3, and with interpolation.
The threshold used for plotting is max(max(M))/(10^range). Usually
3-5 should give good results for log scaling, higher for linear
scaling.
If scaling is linear, a colorbar is added to the plot. For
logarithmic scaling no color bar is added.

See also RPMMAP RPMMAPH RPMPLOT.

RPMPLOTO Order line plotted in current RPM Intensity Map


R RPM vector for Intensity map (from RPMPLOTC)
Orders Orders to plot

RUNRMSEX Running root-mean-square, exponential average


y = runrmsex(x,fs,T)
y output running rms signal vector
x input signal vector
fs sampling frequency in Hz
T exponential time constant, seconds

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 46


mean is subtracted from signal

RUNRMSLN Running root-mean-square, linear average


y = runrmsln(x,fs,T)
y output running rms signal vector
x input signal vector
fs sampling frequency in Hz
T averaging time, seconds
mean is subtracted from signal

RUNTEST Run test stationarity test


[y,lo,hi] = runtest(x,alfa)
RUNTEST uses the method of runs
y number of reverse arrangements for x
lo low limit of y for stationarity
hi high limit of y for stationarity
x frame statistics vector from FRAMSTAT
alfa = significance alfa 0.02, 0.05 or 0.10

the signal behind x is supposed to be stationary if lo < y < hi


see also STATTEST

RUNTTIME Stationarity test as a function of time using RUNTEST


[y,lo,hi,t] = runttime(x,fs,N,n,alfa)
y result function
lo low comparison level
hi high comparison level
t time axis for result

x test data vector


fs sampling frequency in Hz
N number of intervals for test
n number of subintervals for RUNTEST
alfa test parameter

see also STATTEST, RUNTEST, STATTIME

SDFREAD Read HP Standard Data Format (SDF) file to MATLAB

nextseq = sdfread(seqno,FileName,FilePathName)
Give FileName with extension
The mat file consists of Header and Data.
Saves data as sdfxxxx.mat, where xxxx = seqno

Only time data are supported!

SETA4 set papertype to a4

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 47


SETA4l set papertype to a4, landscape

SETA4p set papertype to a4, portrait

SETHCH Sets the record sequence number (channel number) in header

Newheader = sethch(Header, ChNo)


ChNo New record sequence number
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHDX Sets the x-axis increment in header

Newheader = sethdx(Header, dx)


dx New x-axis increment
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHENBW Sets the ENBW factor in header

Newheader = sethenbw(Header, enbw)


enbw New enbw factor
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHFS Sets sampling frequency in header

Newheader = sethfs(Header, fs)


fs New sampling frequency
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

The sampling frequency is converted to time inrement which is


actually stored in header.

See also HEADFS HEADDX.

SETHFUNC Set function type in header


Newheader = sethfunc(Header, FuncType)

Header Universal file header to be changed (from UNIVREAD)


FuncType Function type in numeric or string form, see below.
Newheader Header with changed function type

See description file for universal file for definitions of function types.
FuncType can be a string, corresponding to the short format in
function HEADFUNC.

See also HEADFUNC UNIVREAD UNIWRITE

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 48


SETHLL Sets the data length (number of samples) in header
Newheader = sethll(Header,ll)
ll Numeric length

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHLX Sets the left x (min x) in header


Newheader = sethlx(Header,x0)
x0 Left x

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHMD Set the measurement direction in Header


Newheader = sethmd(Header, md)
Newheader Updated header
md measurement direction (response)
0: scalar
1: +X translation
-1: -X translation
2: +Y translation
-2: -Y translation
3: +Z translation
-3: -Z translation
4: +X rotation
-4: -X rotation
5: +Y rotlation
-5: -Y rotation
6: +Z rotation
-6: -Z rotation

Header from UNIVREAD

SETHMP Set the measurement point in Header


Newheader = sethmp(Header, mp)
mp measurement point number
Newheader Updated header

Header from UNIVREAD

SETHNC Sets the number of channels in Header


NewHeader = sethnc(Header,NoCh)
Header Old header from UNIVREAD, DATREAD, TEACREAD etc
NoCh Number to be put in NewHeader

SETHOCTTYPE Sets Octave type in Header


NewHeader = sethocttype(Header,Type)
Type n for 1/n octaves (1, 3,...)

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 49


Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHOVRL Sets the Overall rms value for octave spectra in Header
NewHeader = sethovrl(Header,Overall)

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHOVSAMP Sets the Over sampling factor in Header


NewHeader = sethovsamp(Header,OverSampl)

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHQ Sets the Q factor in Header (for Shock Response)


NewHeader = sethQ(Header,Q)
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHRD Set the reference direction in Header


Newheader = sethrd(Header, rd)
Header Old header from UNIVREAD or other import function
Newheader Updated header
rd reference direction
0: scalar
1: +X translation
-1: -X translation
2: +Y translation
-2: -Y translation
3: +Z translation
-3: -Z translation
4: +X rotation
-4: -X rotation
5: +Y rotlation
-5: -Y rotation
6: +Z rotation
-6: -Z rotation

SETHRP Set the reference point in Header


Newheader = sethrp(Header, rp)
rp reference point number
Header from UNIVREAD
Newheader Updated header

SETHTS Sets Transducer serial number in Header


NewHeader = sethts(Header,TransSerial)
TransSerial Transducer serial number string
Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHTT Sets Transducer Type in Header


NewHeader = sethtt(Header,TransType)
TransType Transducer type string

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 50


Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHWEIGHT Sets weighting type in Header


NewHeader = sethocttype(Header,WeightType)
WeightType 0 for unweighted
1 for A-weighted
3 for C-weighted

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHXL Sets x label in Header


NewHeader = sethxl(Header,xlord)
xlord x label ordinate string

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHXU Sets the x unit in Header


NewHeader = headxu(Header,xu)
xu x unit string

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHYL Sets y label(s) in Header


NewHeader = sethyl(Header,ylord,ylnum)
ylord y label ordinate string
ylnum y label numerator string ('NONE' if not given)

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SETHYU Sets the y unit in Header


NewHeader = headyu(Header)
yu y unit (ordinate) string
yunum y unit numerator string (optional)

Header from TTPTREAD, TRECREAD, UNIVREAD, DATREAD, etc

SHORT returns integer value of two bytes


f = short(st)
f return value
st vector containg two bytes
see also LONG

SIGNPACK Signal Packing for plot


[y,t] = signpack(x,fs,N)
y returned result as a column vector
the signal vector is compressed for plot purposes
t the compressed time column vector in seconds

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 51


x data vector
fs sampling frequency in Hz
N compression factor

a block of 2N samples is analyzed, and the max and min values


are stored in y.
plot(t,y) gives a picture of the signal

SIGREAD reads DACTRON *.sig time data file to MATLAB


sigread(seqno,remark,fs,FileName,FilePathName)
seqno sequence number
remark string to go to first line of header
fs sampling frequency
The file is saved as sigxxxx.mat where xxxx
is the sequence number seqno
if file and/or path not given, a dialog box is opened
Give FileName without extension!
The mat file consists of Header and Data.
Compatible with ttptread, trecread, univread
sonyread and datread, but no Xaxis

SIGTRUNC Signal truncation


[y,t] = sigtrunc(x,fs,start,stop)
y the portion of signal x between time start and stop
t corresponding time axis
x input data vector
fs sampling frequency in Hz
start start time in seconds
stop stop time in seconds

SINEFREQ Sine frequency estimate


fest = sinefreq(y,f,f0,p)
fest estimated sine frequency in HZ
y frequency spectrun from FANHANN (must be hanning window)
f frequency axis from FANHANN in Hz
f0 target frequency in Hz (first guess)
p look for max in +- p% from f0

SKEWNESS returns the skewness value of data vector


s = skewness(x)
s skewness (normalised third moment)
x data vector

SMOOTHRPM Smooth rpm(time) curve in case of noisy tach signal


[srpm,strpm] = smoothrpm(rpm,trpm,N)
srpm new rpm vector

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 52


rpm Vector with rpm readings
trpm Time vector from GETRPM
N length of smoothing filter

See also GETRPM

SONYLOOK reads Sony PCscan logfile


[ID,da,nochl,fsamp,rectime] = sonylook(FileName,FilePathName)
sonylook uses log file FileName.log
Give FileName without extension!
information is displayed and also be given to result vector
ID ID number
da date
nochl number of channels
fsamp sampling frequency
rectime record length in secons

See also SONYREAD, DATLOOK, DATREAD

SONYREAD reads Sony PCscan file to MATLAB


sonyread(p1,p2,skip,len,seqno,eupv,engu,label,FileName,FilePathName)
p1 channel
p2 downsampling factor (integer 2, 3, 4, ... 32)
skip start time in seconds (skip skip seconds before start)
len length in seconds
The file is saved as sonyxxxx.mat where xxxx
is the sequence number seqno
eupv engineering units per volt (may be given)
engu engineering units (may be given)
label signal label (may be given)
Sonyread uses log file FileName.log and data file FileName.bin
Give FileName without extension!
The mat file consists of Header and Data.
Compatible with ttptread, trecread and univread, but no Xaxis

SPRSPEC Writes formatted data to string in special format


f = sprspec(x)
writes the number x in 13.5e format
with an extra leading space and with two figures in exponent
this is the format used in Universal File Format

STATION Stationarity test value


f = station(x)
x input data vector

x is stationary if f >0.5 max(f) is 1.0

STATION uses FRAMSTAT and STATTEST

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 53


STATTEST Stationarity Test
[y,lo,hi] = stattest(x,alfa)
stattest uses the method of reverse arrangements
y number of reverse arrangements for x
lo low limit of y for stationarity
hi high limit of y for stationarity
x frame statistics vector from FRAMSTAT
(the length of x should be in the order of 20 to 40)
alfa = significance alfa 0.02, 0.05 or 0.10, alfa = 0.05 is recommended

the signal behind x is supposed to be stationary if lo < y < hi

STATTIME Stationarity test as a function of time


[y,lo,hi,t] = stattime(x,fs,N,n,alfa)
y result function
lo low comparison level
hi high comparison level
t time axis for result

x test data vector


fs sampling frequency in Hz
N number of intervals for test
n number of subintervals for stattest
alfa test parameter

compare STATTEST

STR2MD Convert direction string to numeric value for universal file


md = str2md(sd);
sd Measurement direction in output string, for example Y-
md measurement direction, +/-1 for +/-X, 2 for Y, 3 for Z etc.
If sd is a character matrix md is a row vector.
If sd contains unknown values, the number 0 is returned.

STR2MDNUM Convert direction string to numeric value for universal file


md = str2mdnum(sd);
sd Measurement direction in output string, for example Y-
md measurement direction, list number (X+=1, Y+=2...Z-=6)

If sd is a character matrix md is a row vector.

SYNCSLICE Order slice from RPM Order Map


ord = syncslice(Ms,Fs,Rs,order)
ord selected order as function of RPM (R) from RPM Order Map
Ms RPM map data matrix

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 54


Fs order vector for RPM map plot
Rs RPM vector for RPM map plot
order order #. If order is a vector, then ord is a matrix with
each order in a row.

SYNCSLICEBW Order slice from RPM Order Map using summation over frequency
band, synchronous sampling
ord = syncslicebw(Ms,Fs,Rs,order,nolines)
ord selected order as function of RPM (R) from RPM Order Map
Ms RPM map data matrix
Fs order vector for RPM map plot
Rs RPM vector for RPM map plot
order order #. If order is a vector, then ord is a matrix with
each order in a row.
nolines Number of order lines to be summed. This produces a fixed
order bandwidth. This MUST be an odd number, and should be
3 to 7.

This function assumes a Hanning window was applied for the ordermap, for example
using rpmmaph. We recommend using rpmmap and syncslice instead, which applies a
flattop window, which is less sensitive to smearing.

TAPER cosine tapering of data


y = taper(x,n,type);
y tapered output data vector
x input data vector
n length of half cosine in points
type = 1 - front tapering
type = 2 - end tapering
type = 3 - front and end tapering

The tapering is done by multiplying the data in x


by a half cosine with length n.

TEACREAD reads TEAC LX-10/20 file to MATLAB


nxtseq = teacread(seqno,FileName,FilePathName)

nxtseq gives the next sequence number (last+1)


seqno sequence number for first mat file

The files are saved as teacxxxx.mat where xxxx


are the sequence numbers
teacread uses log file FileName.hdr and data file FileName.dat
if file and/or path is not given, a dialog box is opened
Give FileName without extension!
The mat file consists of Header and Data.
Compatible with ttptread, trecread, univread etc., but no Xaxis

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 55


TERSCONT 1/3 octave Response Map, contour version
terscont(x,fs,fmin,fmax,p,v)
x data vector
fs sampling frequency in Hz
fmin low frequency
fmax high frequency
p packing (resampling factor)
v contour line vector

TERSFILT Third-octave-band filter


[b,a] = tersfilt(fs,f0)
fs sampling frequency
f0 center frequency
conforms with IEC 1260, noise bandwidth nominal

NOTE: The filter is within the IEC/ANSI limits for fs/f0 between approx 5 and 400.
For higher ratios, resample signal and call tersfilt with the new sampling frequency.

TERSMAP 1/3 octave Response Map, color map version


tersmap(x,fs,fmin,fmax,p,t0)
x data vector
fs sampling frequency in Hz
fmin low frequency
fmax high frequency
p packing (resampling factor)
t0 start time for plot

TERSMVEL 1/3 octave Response Map with conversion to velocity


tersmvel(x,fs,fmin,fmax,p,t0)
x data vector, acceleration
fs sampling frequency in Hz
fmin low frequency
fmax high frequency
p packing (resampling factor)
t0 start time for plot
see also TERSMAP

TERSVMRS 1/3 octave Velocity Maximum Response Spectrum time constant fast
[y,f] = tersvmrs(x,fs,fmin,fmax)
x data vector, acceleration m/s^2
fs sampling frequency in Hz
fmin low frequency in Hz
fmax high frequency in Hz
y result vector, m/s
f frequency vector in Hz

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 56


result is sqrt(2)* max r.m.s calculated with
125 ms time constant (fast)

TIMEH2O Waterfall Time Spectral Map, monocolor


timeh2o(x,fs,N,size,fmin,fmax,zmax)
plots the waterfall Time Spectral Map, rms scaled
x data vector
fs sampling frequency in Hz
N number of spectra
size fft size
fmin min frequency in plot
fmax max frequency in plot
zmax max rms (in z coordinate) in plot timemap

to get a flat diagram, fo for instance: set(gca,'View',[0 80])


to change color, use COLORMAP: colormap([.1 .1 .1]) makes it black

TIMEH2OH Waterfall Time Spectral Map, monocolor - using HANNING window


timeh2o(x,fs,N,size,fmin,fmax,zmax)
plots the waterfall Time Spectral Map, rms scaled
x data vector
fs sampling frequency in Hz
N number of spectra
size fft size
fmin min frequency in plot
fmax max frequency in plot
zmax max rms (in z coordinate) in plot timemap

to get a flat diagram, fo for instance: set(gca,'View',[0 80])


to change color, use COLORMAP: colormap([.1 .1 .1]) makes it black

SEE ALSO timemap timeh2o

TIMEMAP Surf Time Spectral Map


timemap(x,fs,N,size,fmin,fmax,zmax,threshold)
plots the Time Spectral Map, surf colored version
x data vector
fs sampling frequency in Hz
N number of spectra
size fft size
fmin min frequency in plot
fmax max frequency in plot
zmax max rms (in z coordinate) in plot timemap
threshold for plot in z

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 57


TIMEMAPC Color Time Spectral Map, Flat
timemapc(x,fs,N,size,fmax,zmax)
plots the Time Spectral Map in color, flat
x data vector
fs sampling frequency in Hz
N number of spectra
size fft size
fmax max frequency in plot
zmax max rms (in z coordinate) in plot

TOOCONST too constant check


c = tooconst(x)
returns a one if x is "too constant", zero otherwise
x data vector

TRECLOOK looks at a TRAS record file.


Header = treclook(FileName,FilePathName)

TRECREAD reads a TRAS record file


trecread(FileName,FilePathName)
Each record is saved as trecxxx.mat where xxx
is a sequence number (p7 in record header).
If p7 = 0 the record number is taken as the
sequence number. Each matfile consists of Header,
Xaxis and Data.

TTPTLOOK looks at a TRAS TPT file.


[Header, chls, ksamples] = ttptlook(FileName,FilePathName)
Header data header
chls a vector containing the recorded channel numbers
ksamples length of the recording in ksamples

TTPTREAD reads a TRAS TPT file.


ttptread(p1,p2,p3,p4,FileName,FilePathName)
p1 first channel
p2 last channel
p3 skip number of 1k blocks of data
p4 read number of 1k blocks of data
(p4 = -1, read to end)
Each channel is saved as ttptxxx.mat where xxx
is the channel number. Each matfile consists of

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 58


Header, Xaxis and Data.

UFFUNCLIST Make a list of Universal file (ufxxxx.mat) functions


uffunclist(FileList,SortType)
FileList Vector of file numbers in ascending order
All files in the list do not need to exist.
SortType 'FILE' (default), 'RESP', 'REF', or 'FUNC'
Sort after specified column

example:
uffunclist([1:6])
gives:

UF file Response Reference Func Type


1 1Y+ 1Z+ Coh
2 1Z+ 1Z+ Coh
3 1Y+ 1Y+ FRF
4 1Z+ 1Y+ FRF
5 1Y+ 1Y+ Coh
6 1Z+ 1Y+ Coh

uffunclist([1:2 5:6])
gives:

UF file Response Reference Func Type


1 1Y+ 1Z+ Coh
2 1Z+ 1Z+ Coh
5 1Y+ 1Y+ Coh
6 1Z+ 1Y+ Coh

UNIVHEAD makes a universal file header for UNIWRITE


header = univhead(s,p,h)
header Header for UNIWRITE
s selection of parameter to enter, see below
p parameter to enter
h old header (new parameter is added to h)
NOTE! Start by making a default header!
Then add the desired parameters

s 'default' for default header setup


'rec1' for UF record 1 max 80 ASCII
'rec2' for UF record 2 max 80 ASCII
'rec3' for UF record 3 max 80 ASCII
'rec4' for UF record 4 max 80 ASCII
'rec5' for UF record 5 max 80 ASCII
'functype' see manual
'funcid' see manual

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 59


'seqno' see manual
'lcid' see manual
'respnam' see manual
'respnode' see manual
'respdir' see manual
'refnam' see manual
'refnode' see manual
'refdir' see manual
'xmin' see manual
'xdelta' see manual
'xtype' see manual
'xlabel' see manual
'xunit' see manual
'yntype' see manual
'ynlabel' see manual
'ynunit' see manual
'ydtype' see manual
'ydlabel' see manual
'ydunit' see manual
'ztype' see manual
'zlabel' see manual
'zunit' see manual

UNIVREAD reads Universal Files type 58


nxtseq = univread(seqno,FileName,FilePathName)

nxtseq gives the next sequence number (last+1)


FileType 'ASCII' reads standard universal files (default)
FileType 'BINARY' reads binary universal files
The files are saved as ufxxxx.mat where xxxx is the
sequence number.
The sequence numbers are automatically incremented
from the first seqno
The mat file consists of Header, Xaxis and Data.

UNIVREAD picks out all type 58 records from a Universal File

UNIWRITE writes a Universal File Type 58 record


uniwrite(data,header,FileName,status,FileType)

data real or complex data, only with constant abscissa spacing


header header made with UNIVHEAD or HEADCONV
FileName name of target file, use extension .unv
status 1 means create file, first data block
2 means append to existing file
FileType 'ASCII' (default) produces a standard universal file
FileType 'BINARY' produces a binary universal file
See the manual describing the header format.
UNIWRITE is meant to be a simple file translator for time or FRF data.

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 60


See also UNIVHEAD, HEADCONV, UNIVREAD

UNIWRITE58 writes a Universal File Type 58 record


uniwrite58(data,header,FileName,status,FileType)

data real or complex data, only with constant abscissa spacing


header header made with UNIVHEAD or HEADCONV
FileName name of target file, use extension .unv
status 1 means create file, first data block
2 means append to existing file
FileType 'ASCII' (default) produces a standard universal file
FileType 'BINARY' produces a binary universal file
See the manual describing the header format.
UNIWRITE is meant to be a simple file translator for time or FRF data.
See also UNIVHEAD, HEADCONV, UNIVREAD

VKORDERM Returns order tracks using Vold-Kalman filters for multiple RPM
vectors (crossing orders).

x = vkorderm(y,fs,RPM,order,bandwidth,type)
x matrix containing RMS order tracks corresponding to each RPM column, in
columns
x is scaled so that abs(x) is the rms of each order,
and angle(x) is the phase in radians
y input data (column vector)
fs sampling frequency in Hz
RPM RPM vectors to track in columns (matrix with same number of rows as y)
order row vector with order to track for each column in RPM
bandwidth bandwidth in Hz or order, as specified by type
type determines the type of bandwidth; type <> 0 for
absolute bandwidth, type = 0 for order bandwidth

To track orders corresponding to different tacho signals, first obtain


the RPM-time by GETRPM, for each tacho signal. Then call VKORDERM with
each rpm you want to track in a column, with corresponding order in the variable
"order".
The variable x will contain the order in corresponding column.
Example: To track orders 2 and 4 of RPM1, and orders 1, 2, and 3 of
RPM2, call
Orders = vkorderm(y,fs,[RPM1 RPM1 RPM2 RPM2 RPM2],[2 4 1 2 3],.25,0);
This will track the orders using a .25 order bandwidth.

This is a rather slow and memory consuming process! You should consider
downsampling your signal to as low sampling frequency as possible,
considering the orders you want to track, to get maximum performance.

See also VKTIME VKORDERS ORDSLICE GETRPM

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 61


VKORDERS Returns order tracks using Vold-Kalman filters for single RPM
vector. (No crossing orders.)

x=vkorders(y,fs,RPM,orders,bandwidth,type)

x matrix of order tracks in columns. x is weighted so that abs(x) is


the rms value of the order, and angle(x) is the phase
in radians

y input data (column vector)


RPM RPM vector (column vector) (y and RPM are of the same length)
orders row vector with list of all orders to compute
fs sampling frequency in Hz
bandwidth bandwidth in Hz or order, as specified by type
type determines the type of the bandwidth, type <> 0 for
absolute bandwidth, type = 0 for order bandwidth

See also VKTIME VKORDERM ORDSLICE GETRPM

VKTIME Vold-Kalman time tracking filter, to extract filter time output

x = vktime(y,fs,RPM,order,bandwidth, type)
x output time data from VK tracking filter
y input data (column vector)
fs sampling frequency in Hz
RPM RPM vector (column vector) (y and RPM are of the same length)
order order to track
bandwidth bandwidth in Hz or percent, as specified by type
type determines the type of the bandwidth, type <> 0 for
absolute bandwidth, type = 0 for relative bandwidth

See also VKORDERS VKORDERM ORDSLICE GETRPM

WAVEREAD reads *.wav file to MATLAB, properly scaled


waveread(p1,p2,skip,len,seqno,chlscl,label,unit,FileName,FilePathName)
p1 = channel
p2 = downsampling factor (integer 1, 2, 3, 4, ... 32)
skip = start time in seconds (skip skip seconds before start)
len = length in seconds
The file is saved as wavxxxx.mat where xxxx
is the sequence number seqno
chlscl = channel scale factor = EU:s for full scale (32768)
label = channel label
unit = channel unit
waveread adds .wav extension

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 62


Give FileName without extension!
The mat file consists of Header and Data.
Compatible with ttptread, trecread, univread and datread

WELCHVAR variance of psd estimate with Welch's method


result = welchvar(L,D,window,K)
result calculated variance of estimate
L FFT Blocksize
D delay between blocks in samples (overlap = L-D)
window window vector, for example hann(L)
K number of averages in psd calculation

the variance in psd with overlap is according to Welch 1967


example: result = welchvar(1024,512,hann(1024),63)
gives result = 0.0167, which means that 63 averages with
50% overlap and hanning window correponds to 1/result = 59.7
non-overlapping averages

XLOGTICS sets ticks and tick labels on a log x axis


xlogtics(low,high)
low = low end
high = high end
ticks and tick labels are set in 1, 2, 5, 10 fashion

Copyright © 2000-2007, Axiom EduTech AB, All rights reserved 63

Vous aimerez peut-être aussi