You are on page 1of 94

Spectral Analysis &

Linear Prediction
Toolbox
For Use with MATLAB

Reference Guide (Version 1.1)

Sven Semmelrodt
Department of RF-Techniques / Communication Systems
University of Kassel

2001 – 2003
SALP-Toolbox Reference Guide

Preface
The SALP-Toolbox has been mainly developed within the framework of the research project
‘Predictive Channel Estimation for Adaptive Transmission Techniques in Mobile
Communications’ at the department of RF-Techniques / Communication Systems of the
University of Kassel. This project has been funded by the ‘Deutsche
Forschungsgemeinschaft’ (DFG).

The SALP-Toolbox is intended to provide a uniform platform combining many different tools
for analyzing and predicting multi-component time series or signals, respectively. Its
application is focused on the field of science, research and education without the purpose of
any commercial benefit. It rather appears as a foundation of a basic collection with standard
algorithms, which may be validated, improved and extended by all users in the form of an
open source project. By this way, future toolbox versions will provide well-tried and tested
algorithms, which can be adopted by the researchers to their specific application and hence
the toolbox may support scientific progress in an efficient way. In its initial version the
toolbox does not claim for completeness, thus every user is requested to provide comments,
bug reports or further algorithms to extend this toolbox to a comprehensive tool collection.

The toolbox assembles many classical as well as very advanced algorithms providing a
uniform functional interface to support a user-friendly handling. Therefore, some routines,
which are already implemented in the MATLAB software, are also included in this toolbox
equipped with the unique SALP-Toolbox user-interface.

Comments, bug reports and extensions should be sent to:


sven.semmelrodt@gmx.de.

Further information concerning updates can be found at the MATLAB Central website on:
www.mathworks.com/matlabcentral.

3
SALP-Toolbox Reference Guide

Table of Contents
Introduction............................................................................................................................6
Background, System Requirements and Installation................................................................6
Reference Guide .....................................................................................................................7
Abbreviations .....................................................................................................................7
Function Reference (Ordered by Subjects)..........................................................................8
Signal generation Files....................................................................................................8
Power Spectral Density Estimation .................................................................................8
Harmonic Parameter Estimation......................................................................................8
Chirp-Parameter Estimation............................................................................................9
Linear Prediction ............................................................................................................9
Utilities.........................................................................................................................10
Function Reference (in Alphabetical Order)......................................................................10
add_noise......................................................................................................................13
amplitude_fit ................................................................................................................14
anti_eye ........................................................................................................................15
arma_psd ......................................................................................................................16
beep ..............................................................................................................................18
chirp_pu .......................................................................................................................19
chirp_rrm......................................................................................................................20
chirp_sage ....................................................................................................................22
clr .................................................................................................................................24
cost_func ......................................................................................................................25
edit_figure ....................................................................................................................26
em ................................................................................................................................27
em_opts ........................................................................................................................28
ic ..................................................................................................................................30
is_even .........................................................................................................................31
lp_burg .........................................................................................................................32
lp_lms...........................................................................................................................33
lp_mcov........................................................................................................................34
lp_multi ........................................................................................................................35
lp_nlms.........................................................................................................................36
lp_qrrls .........................................................................................................................37
lp_rls ............................................................................................................................38
lp_single .......................................................................................................................39
lut_init ..........................................................................................................................40
marker ..........................................................................................................................41
model_func...................................................................................................................42
peak_detect...................................................................................................................43
pi_real ..........................................................................................................................44
psd_arma ......................................................................................................................45
psd_bartlett ...................................................................................................................47
psd_blackman...............................................................................................................48
psd_burg.......................................................................................................................50
psd_capon.....................................................................................................................51
psd_corr........................................................................................................................52
psd_correl.....................................................................................................................53
psd_cov ........................................................................................................................54
psd_mcov .....................................................................................................................55
4
SALP-Toolbox Reference Guide

psd_mem ......................................................................................................................56
psd_min_norm..............................................................................................................57
psd_music.....................................................................................................................58
psd_period ....................................................................................................................59
psd_period_2d ..............................................................................................................60
psd_prony.....................................................................................................................61
psd_stmcb.....................................................................................................................63
psd_welch.....................................................................................................................64
psd_yule .......................................................................................................................66
relax .............................................................................................................................67
relax_2d........................................................................................................................68
relax_opts .....................................................................................................................69
root_min_norm .............................................................................................................70
root_music....................................................................................................................71
sage_2d.........................................................................................................................72
sg_chirp ........................................................................................................................74
sg_cissoid .....................................................................................................................75
sg_cissoid_2d ...............................................................................................................76
sg_cissoid_3d ...............................................................................................................77
sg_cissoid_4d ...............................................................................................................78
sg_sinusoid ...................................................................................................................79
sg_wideband.................................................................................................................80
smooth_2d ....................................................................................................................81
smooth_3d ....................................................................................................................82
smooth_4d ....................................................................................................................83
ssd ................................................................................................................................84
std_esprit ......................................................................................................................85
uni_esprit......................................................................................................................86
uni_esprit_2d ................................................................................................................87
uni_esprit_3d ................................................................................................................88
uni_esprit_4d ................................................................................................................90
window_2d ...................................................................................................................92
References............................................................................................................................93

5
Introduction SALP-Toolbox Reference Guide

Introduction
The SALP-Toolbox is a collection of m­files developed for the analysis of stationary and
non­stationary signals using classical and up to date spectral and parameter estimation
schemes, respectively. The toolbox includes three groups of m-files:
 the signal generation files, which permit the synthesis of different kinds of stationary
and non­stationary signals,
 the processing files, including the spectral analysis and parameter estimation as well
as other related processing functions and
 a second class of processing file used in context with linear prediction of time series.

As usual under MATLAB, each function of the toolbox has a help entry that can be referred
to by typing
» help <m-file>
at the prompt of the MATLAB command window. In almost every case, a simple example is
given, which facilitates the use of the m-file. Furthermore, four demonstration m­files are also
available, which provide sequences of examples illustrating the capabilities of the SALP-
Toolbox. These files are summarized in the table below.

M-File Description
demo_psd Demonstration of how to use the spectral estimation schemes
demo_param Demonstration of how to use the parameter estimation schemes
demo_chirp Analyzing a time-varying signal with linear frequency
modulated components employing chirp parameter estimation
tools
demo_lp Prediction of multiple signal samples of a time series using
block-oriented and adaptive filter algorithms

Background, System Requirements and Installation


The SALP-Toolbox is intended for researchers and engineers with some knowledge on signal
processing theory. In particular, the concepts of Fourier transform, Shannon’s sampling
theorem and stationarity are important for a correct usage of the toolbox features. For better
understanding most of the algorithms are implemented in a clear and non-optimized fashion,
and can be adopted by the advanced user for further improvements with respect to efficiency
and computational load.

The SALP-Toolbox requires MATLAB v. 5.3.1 (R11.1) as well as the Signal Processing
Toolbox v. 4.3 (R11.1) and the Optimization Toolbox v. 2.0 (R11) or later versions. Maybe
earlier versions will work also, but have not been tested. The toolbox has been tested on
systems with Microsoft Windows operation system only but probably it will work likewise
on UNIX systems.

For installation of the toolbox create a directory, which is located in the toolbox subdirectory
within your specific MATLAB root path, e. g. <matlab_root_path>\toolbox\salp. In a next
step, the compressed toolbox m-files can be extracted from the downloaded archive file
‘SALP_Toolbox_Vxx.zip’ to the abovementioned directory. After the toolbox functions are
installed the MATLAB path has to be updated by the user. This can be done manually by
typing

6
SALP-Toolbox Reference Guide Reference Guide

» addpath(‘<matlab_root_path>\toolbox\salp’)
at the prompt of the MATLAB command window every time MATLAB is started or once by
using the ‘Set Path’ feature from the MATLAB menu (see menu item ‘File’ of the MATLAB
command window). For further information refer to the MATLAB User’s Guide.

For having an overview of all available toolbox commands type


» help salp
at the prompt of the MATLAB command window or refer to the m-file contents. Run the
demonstration files to become familiar with the abilities of the toolbox.

Reference Guide
This section contains detailed descriptions of all SALP-Toolbox functions. It starts with a
glossary and a list of functions grouped by subject area and continues with the reference
entries in alphabetical order. Information about every m-file is also available through the
online help facility.

Abbreviations
AR Auto Regressive
ARMA Auto Regressive Moving Average
EM Expectation Maximization
ESPRIT Estimation of Signal Parameter by Rotational Invariance Techniques
FT Fourier Transform
FFT Fast Fourier Transform
LMS Least Mean Square
LP Linear Predictor
LS Least Squares
LUT Look-up-table
MA Moving Average
MEM Maximum Entropy Method
MCOV Modified Covariance Approach
MUSIC Multiple Signal Classification
NLMS Normalized Least Mean Square
OSF Over-Sampling Factor
PSD Power Spectral Density
QR-RLS QR-Decomposition based Recursive Least Squares
RLS Recursive Least Squares
SAGE Space Alternating Generalized Expectation Maximization
SALP Spectral Analysis and Linear Prediction
SNR Signal to Noise Ratio
SSD Simultaneous Schur Decomposition
SVD Singular Value Decomposition

7
Reference Guide SALP-Toolbox Reference Guide

Function Reference (Ordered by Subjects)


Signal generation Files
M-File Description Page
add_noise Adds real/complex white noise to a discrete signal 13
sg_chirp Generates a complex-valued multi-component chirp-signal 74
sg_cissoid Generates a complex-valued multi-component harmonic signal 75
sg_cissoid_2d Generates a 2D complex-valued multi-component harmonic signal 76
sg_cissoid_3d Generates a 3D complex-valued multi-component harmonic signal 77
sg_cissoid_4d Generates a 4D complex-valued multi-component harmonic signal 78
sg_sinusoid Generates a real-valued multi-component harmonic signal 79
sg_wideband Generates a complex-valued wideband signal 80

Power Spectral Density Estimation


M-File Description Page
arma_psd Computes a PSD for given ARMA model coefficients 16
peak_detect Detection of local maxima in a given PSD estimate 43
psd_arma PSD estimate based on an ARMA model using two-stage least 45
squares
psd_bartlett FT-based PSD estimate by Bartlett 47
psd_blackman FT based PSD estimate by the method of Blackman and Tukey 48
psd_burg AR model based PSD estimate employing Burg’s algorithm 50
psd_capon High-resolution PSD estimate via Capon’s method 51
psd_corr AR model based PSD estimate using the autocorrelation approach 52
psd_correl PSD estimate via the correlogram 53
psd_cov AR model based PSD estimate using the covariance approach 54
psd_mcov AR model based PSD estimate using the modified covariance 55
approach
psd_mem AR model based PSD estimate using the maximum entropy method 56
psd_min_norm Subspace-based pseudo PSD estimate via the minimum norm 57
method
psd_music Subspace-based PSD estimate using the MUSIC algorithm 58
psd_period PSD estimate via the periodogram 59
psd_period_2d PSD estimate via the periodogram for two-dimensional signals 60
psd_prony PSD estimate based on an ARMA model using Prony’s method 61
psd_stmcb PSD estimate based on an ARMA model using the method of 63
Steiglitz-McBride
psd_welch FT-based PSD estimate by Welch 64
psd_yule AR model based PSD estimate using the Yule-Walker approach 66

Harmonic Parameter Estimation


M-File Description Page
amplitude_fit Signal amplitude estimation using linear regression 14

8
SALP-Toolbox Reference Guide Reference Guide

em Maximum Likelihood based EM algorithm 27


em_opts Returns default EM/SAGE parameter settings 28
relax Parameter estimation using recursive Fourier transforms 67
relax_2d Two-dimensional RELAX algorithm 68
relax_opts Returns default RELAX parameter settings 69

M-File Description Page


root_min_norm Subspace-based parameter estimation via the minimum norm 70
method
root_music Noise-Subspace-based parameter estimation algorithm 71
sage_2d Maximum Likelihood based 2D parameter estimation using the 72
SAGE algorithm
std_esprit Subspace-based parameter estimation via the Standard ESPRIT 85
uni_esprit Subspace-based parameter estimation via the Unitary-ESPRIT 86
uni_esprit_2d Subspace-based 2D parameter estimation via the Unitary-ESPRIT 87
uni_esprit_3d Subspace-based 3D parameter estimation via the Unitary-ESPRIT 88
uni_esprit_4d Subspace-based 4D parameter estimation via the Unitary-ESPRIT 90

Subroutines Description Page


anti_eye Returns a permutation matrix of dimension [d  d] 15
cost_func Cost function for parameter optimization 25
ic Interference cancellation algorithm 30
model_func Signal model function for parameter optimization 42
pi_real Returns a Pi-real matrix of dimension [d  d] 44
smooth_2d 2D Subspace smoothing algorithm 81
smooth_3d 3D Subspace smoothing algorithm 82
smooth_4d 4D Subspace smoothing algorithm 83
ssd Simultaneous Schur decomposition 84

Chirp-Parameter Estimation
M-File Description Page
chirp_pu Chirp-signal parameter estimation using phase unwrapping 19
techniques
chirp_rrm Subspace-based chirp-signal parameter estimation 20
chirp_sage Chirp-signal parameter estimation via the SAGE algorithm 22
lut_init Initialization of the chirp bandwidth correction look-up-table 40

Linear Prediction
M-File Description Page
lp_burg Computes the LP coefficients via Burg’s method 32
lp_lms Least Mean Square algorithm for calculating the LP coefficients 33
lp_mcov Computes the LP coefficients via the modified covariance approach 34
lp_multi Multiple step linear predictor 35

9
Reference Guide SALP-Toolbox Reference Guide

lp_nlms Normalized LMS algorithm for calculating the LP coefficients 36


lp_qrrls QR-decomposition based RLS algorithm for calculating the LP 37
coefficients
lp_rls Recursive Least Squares algorithm for calculating the LP 38
coefficients
lp_single Single step linear predictor 39

Utilities
M-File Description Page
beep Acoustic signal 18
clr Clean up MATLAB environment 24
M-File Description Page
edit_figure Edits figure options for improved visualization 26
is_even Check for even/odd numbers 31
marker Visualization of graph coordinates via mouse click 41
window_2d Windowing of a two-dimensional signal 92

Function Reference (in Alphabetical Order)


M-File Description Page
add_noise Adds real/complex white noise to a discrete signal 13
amplitude_fit Signal amplitude estimation using linear regression 14
anti_eye Returns a permutation matrix of dimension [d  d] 15
arma_psd Computes a PSD for given ARMA model coefficients 16
beep Acoustic signal 18
chirp_pu Chirp-signal parameter estimation using phase unwrapping 19
techniques
chirp_rrm Subspace-based chirp-signal parameter estimation 20
chirp_sage Chirp-signal parameter estimation via the SAGE algorithm 22
clr Clean up MATLAB environment 24
cost_func Cost function for parameter optimization 25
edit_figure Edits figure options for improved visualization 26
em Maximum Likelihood based EM algorithm 27
em_opts Returns default EM/SAGE parameter settings 28
ic Interference cancellation algorithm 30
is_even Check for even/odd numbers 31
lp_burg Computes the LP coefficients via Burg’s method 32
lp_lms Least Mean Square algorithm for calculating the LP coefficients 33
lp_mcov Computes the LP coefficients via the modified covariance approach 34
lp_multi Multiple step linear predictor 35
lp_nlms Normalized LMS algorithm for calculating the LP coefficients 36
lp_qrrls QR-decomposition based RLS algorithm for calculating the LP 37
coefficients
lp_rls Recursive Least Squares algorithm for calculating the LP 38

10
SALP-Toolbox Reference Guide Reference Guide

coefficients
lp_single Single step linear predictor 39
lut_init Initialization of the chirp bandwidth correction look-up-table 40
marker Visualization of graph coordinates via mouse click 41
model_func Signal model function for parameter optimization 42
peak_detect Detection of local maxima in a given PSD estimate 43
pi_real Returns a Pi-real matrix of dimension [d  d] 44
psd_arma PSD estimate based on an ARMA model using two-stage Least 45
Squares
psd_bartlett FT-based PSD estimate by Bartlett 47
psd_blackman FT based PSD estimate by the method of Blackman and Tukey 48
psd_burg AR model based PSD estimate employing Burg’s algorithm 50
psd_capon High-resolution PSD estimate via Capon’s method 51
psd_corr AR model based PSD estimate using the autocorrelation approach 52
psd_correl PSD estimate via the correlogram 53
psd_cov AR model based PSD estimate using the covariance approach 54

M-File Description Page


psd_mcov AR model based PSD estimate using the modified covariance 55
approach
psd_mem AR model based PSD estimate using the maximum entropy method 55
psd_min_norm Subspace-based pseudo PSD estimate via the minimum norm 57
method
psd_music Subspace-based pseudo PSD estimate using the MUSIC algorithm 58
psd_period PSD estimate via the periodogram 59
psd_period_2d PSD estimate via the periodogram for two-dimensional signals 60
psd_prony PSD estimate based on an ARMA model using Prony’s method 61
psd_stmcb PSD estimate based on an ARMA model using the method of 63
Steiglitz-McBride
psd_welch FT-based PSD estimate by Welch 64
psd_yule AR model based PSD estimate using the Yule-Walker approach 66
relax Parameter estimation using recursive Fourier-Transforms 67
relax_2d Two-dimensional RELAX algorithm 68
relax_opts Returns default RELAX parameter settings 69
root_min_norm Subspace-based parameter estimate via the minimum norm method 70
root_music Noise-Subspace-based parameter estimation based on the MUSIC 71
algorithm
sage_2d Maximum Likelihood based 2D parameter estimation using the 72
SAGE algorithm
sg_chirp Generates a complex-valued multi-component chirp-signal 74
sg_cissoid Generates a complex-valued multi-component harmonic signal 75
sg_cissoid_2d Generates a 2D complex-valued multi-component harmonic signal 76
sg_cissoid_3d Generates a 3D complex-valued multi-component harmonic signal 77

11
Reference Guide SALP-Toolbox Reference Guide add_n

sg_cissoid_4d Generates a 4D complex-valued multi-component harmonic signal 78


sg_sinusoid Generates a real-valued multi-component harmonic signal 79
sg_wideband Generates a complex-valued wideband signal 80
smooth_2d 2D Subspace smoothing algorithm 81
smooth_3d 3D Subspace smoothing algorithm 82
smooth_4d 4D Subspace smoothing algorithm 83
ssd Simultaneous Schur decomposition 84
std_esprit Subspace-based parameter estimation via the Standard ESPRIT 85
uni_esprit Subspace-based parameter estimation via the Unitary-ESPRIT 86
uni_esprit_2d Subspace-based 2D parameter estimation via the Unitary-ESPRIT 87
uni_esprit_3d Subspace-based 3D parameter estimation via the Unitary-ESPRIT 88
uni_esprit_4d Subspace-based 4D parameter estimation via the Unitary-ESPRIT 90
window_2d Windowing of a two-dimensional signal 92

12
SALP-Toolbox Reference Guide add_noise

add_noise

Purpose
Noise generator for real- or complex-valued white noise.

Synopsis
[y, Ps, Pn] = add_noise(x, SNR)

Description
Adds real- or complex-valued white Gaussien noise to a one-, two-, three- or four-
dimensional real- or complex-valued discrete signal x, respectively. The signal to
noise ratio of the resulting (noisy) signal y corresponds to the value of SNR in dB.
Additionally the computed signal and noise power Ps and Pn, respectively, is
returned.

Example
This example plots superimposed weighted real-valued sinusoids with and
without additive white noise, i.e., a signal to noise ratio of SNR =  dB and SNR =
30 dB, respectively.

x = sg_sinusoid([1 0.5 0.1], [0.1 0.25 0.4], 100, 10);


y = add_noise(x, 30);
plot(x, 'g-'), hold on, plot(y, 'r:')

See Also
sg_sinusoid, sg_chirp, sg_cissoid, sg_wideband

13
amplitude_fit SALP-Toolbox Reference Guide

amplitude_fit

Purpose
Estimation of the complex amplitudes of superimposed harmonic signals using
linear regression techniques.

Synopsis
[beta, A] = amplitude_fit(y, f)

Description
Estimation of the complex-valued weights beta of a one-, two-, three or four-
dimensional multi-component harmonic signal, respectively, using a linear
regression between the observed signal samples y and the underlying stationary
(in this specific case: one-dimensional) signal model
p
j i n
y n   e i with  i  2 f i
i 1

employing the frequency parameters specified in vector f. For estimation


problems of dimension m the parameter f is a matrix of dimension [p x m]
containing the frequency vectors of dimension [p x 1] in the mth column of f. The
second return argument A corresponds to the so-called shift-matrix containing the
phase shifts for every signal component (columns) and sample location (rows),
respectively. For detailed information refer to [12,14,15].

Example
This example synthesizes a one-dimensional harmonic signal in white noise (SNR
= 30 dB), and estimates the signal amplitudes based on the signal model of
superimposed harmonic signals using the original frequency parameters. A
comparison of the original and the estimated amplitudes illustrates the estimation
error due to noise effects.

beta_ref = [1 0.5 0.1].', f_ref = [0.1 0.25 0.4].'


y = sg_cissoid(beta_ref, f_ref, 20, 1, 30);
beta = amplitude_fit(y, f_ref);
e = abs(beta_ref - beta)

See Also
peak_detect

14
SALP-Toolbox Reference Guide anti_eye

anti_eye

Purpose
Returns a symmetric permutation matrix.

Synopsis
Pi = anti_eye(d)

Description
Returns a symmetric [d  d] permutation matrix Pi (also called exchange matrix)
with ones on its anti-diagonal. Pre-multiplication of a matrix by Pi will reverse the
order of its rows, whereas post-multiplication of a matrix results in a reversed
order of its columns.

Example
This example illustrates the permutation properties of the exchange matrix Pi.

Pi = anti_eye(5)
X = vander(1:5)
Pi*X
X*Pi
Pi*X*Pi

15
arma_psd SALP-Toolbox Reference Guide

arma_psd

Purpose
Computes a power spectral density (PSD) for given ARMA coefficients.

Synopsis
[PSD, f] = arma_psd(a, b)
[PSD, f] = arma_psd(a, b, var)
[PSD, f] = arma_psd(a, b, var, N_FFT)
[PSD, f] = arma_psd(a, b, var, N_FFT, fs)

Description
Computes an ARMA model based PSD for the specified AR coefficients in vector
a and the MA coefficients in vector b. The PSD is calculated for N_FFT points in
the frequency domain. If N_FFT is not specified the default value of N_FFT =
512 points is used instead. The return argument f contains the corresponding
frequency axis, which is scaled to the sampling frequency fs (1 Hz by default).
The parameter var corresponds to the noise variance of the signal and is employed
to scale the PSD. If this parameter is not specified, empty or zero the PSD is
scaled to its maximum value. Without output arguments the m-file plots the
corresponding PSD in linear and logarithmic scale. For detailed information refer
to [1,15].

Examples
This example synthesizes a three component complex-valued harmonic signal
with closely spaced spectral components. The corresponding AR model
parameters are calculated using the modified covariance method and afterwards
the PSD is computed and plotted.

y = sg_cissoid([1 1 0.1], [0.23 0.25 0.4], 25, 1, 30);


a = lp_mcov(y, 6);
arma_psd(a, 1, [], 1024)

Position the mouse-cursor above the PSD peaks and click on the left mouse-
button. After the routine has acknowledged the user input by a short beep signal
the pointed graph coordinates will be displayed in the headline of the figure.

Algorithm
The MATLAB command freqz is employed for calculating the frequency
response of the ARMA process [15].

See Also

16
SALP-Toolbox Reference Guide arma_psd

peak_detect, freqz©

17
beep SALP-Toolbox Reference Guide

beep

Purpose
Acoustic signal via system loudspeaker.

Synopsis
beep

18
SALP-Toolbox Reference Guide chirp_pu

chirp_pu

Purpose
Estimation of the center frequency and bandwidth of a mono-component linear
frequency modulated signal.

Synopsis
[fc, B] = chirp_pu(y)
[fc, B] = chirp_pu(y, fs)

Description
Computes an estimate of the center frequency fc and bandwidth B (including the
chirp direction) of a mono-component complex-valued linear frequency
modulated signal y. The optional parameter fs can be used to scale the signal
parameters to the actual sampling frequency (1 Hz by default).

Examples
This example synthesizes a mono-component complex-valued chirp-signal and
subsequently computes estimates of the center frequency and the bandwidth of the
signal.

y = sg_chirp(1, 0.3, 0.2, 50, 1, 30);


[fc, B] = chirp_pu(y)

Algorithm
The algorithm employs phase unwrapping techniques combined with linear
regression for computing the start frequency and the chirp-rate of the signal (refer
to [2]). The chirp-rate is scaled to the number of samples to yield the chirp
bandwidth. Finally the center frequency is determined using start frequency and
the resulting bandwidth parameter.

See Also
sg_chirp, chirp_rrm, chirp_sage

19
chirp_rrm SALP-Toolbox Reference Guide

chirp_rrm

Purpose
Estimation of the center frequency and bandwidth of a mono-component linear
frequency modulated signal using rank reduction methods.

Synopsis
[fc, B, B_LUT] = chirp_rrm(y, N_Seg, OSF)
[fc, B, B_LUT] = chirp_rrm(y, N_Seg, OSF, fs)
[fc, B, B_LUT] = chirp_rrm(y, N_Seg, OSF, fs, B_LUT)

Description
Computes an estimate of the center frequency fc and bandwidth B of a mono-
component complex-valued linear frequency modulated signal y, a so-called
chirp-signal. Since the observed signal is segmented in overlapping segments for
calculating the signal subspace, parameter N_Seg specifies the number of samples
within one signal segment. On account of the underlying stationary signal model
only a short segment size will result in reliable estimates at least for the bandwidth
parameter B. The parameter OSF specifies the over-sampling factor of the signal
to be analyzed. The optional parameter fs can be used to scale the signal
parameters to the actual sampling frequency (1 Hz by default). The parameter
B_LUT contains the bandwidth correction look-up-table, which is calculated and
returned by this function and can be reused for the same type of signal with
respect to sample count and sampling frequency to reduce the overall
computational load.

Examples
This example synthesizes a mono-component complex-valued chirp-signal and
computes estimates of the center frequency and the bandwidth of the signal.

y = sg_chirp(1, 0.2, 0.3, 100, 5, 30);


[fc, B] = chirp_rrm(y, 10, 5, 5)

Algorithm
The subspace-based Unitary-ESPRIT parameter estimation algorithm is used for
computing the frequencies of two stationary components. Likewise the Root-
MUSIC algorithm can be utilized instead. It can be shown (refer to [17]) that the
center frequency of the chirp signal is located in between the two resulting
frequency estimates. The bandwidth, which corresponds to the difference between
both frequency values, is corrected using a pre-calculated look-up-table using a
reference chirp-signal with identical sample count and over-sampling factor.

See Also
20
SALP-Toolbox Reference Guide chirp_rrm

lut_init, sg_chirp, chirp_pu, chirp_sage

21
chirp_sage SALP-Toolbox Reference Guide

chirp_sage

Purpose
Estimates the weights, center frequencies and bandwidth parameters of a multi-
component chirp-signal.

Synopsis
[beta, fc, B] = chirp_sage(y, p)
[beta, fc, B] = chirp_sage(y, p, opts)
[beta, fc, B] = chirp_sage(y, p, fs, opts)

Description
Computes an estimate of the weights beta, the center frequencies fc and the
bandwidths B (including the chirp direction) of a signal y composed by p
superimposed complex-valued linear frequency modulated signals. The optional
parameter fs can be used to scale the signal parameters to the actual sampling
frequency (1 Hz by default). The algorithm can be parameterized passing an
options data structure opts to the algorithm, which can be setup with default
parameters using the m-file em_opts.

Examples
This example synthesizes a two-component complex-valued chirp-signal and
subsequently computes estimates of the weights, the center frequency and the
bandwidth of this signal using default parameter settings.

y = sg_chirp([1 1], [0.2 0.4], [0.3 0.43], 50, 1, 30);


options = em_opts
[beta, fc, B] = chirp_sage(y([50/2-5:50/2+5]), 2, [], options)

Algorithm
The Maximum Likelihood based SAGE algorithm [5] is an advanced derivative of
the EM method [4]. It employs interference canceling to separate the single chirp-
signals (expectation step) and determines the signal parameters center frequency
and bandwidth by two sequential optimization procedures (maximization step)
using the MATLAB command fminbnd [16]. Initialization of the algorithm is
done employing serial signal separation and Fourier-based parameter estimation
of the center frequency as well as line-search based optimization of the bandwidth
parameter. Due to this property the chirp bandwidth in the considered observation
interval has to be small (B  0.01 Hz for two Nyquist-samples). For more Details
refer to [14].

See Also

22
SALP-Toolbox Reference Guide chirp_sage

sg_chirp, chirp_rrm, chirp_pu, em_opts

23
clr SALP-Toolbox Reference Guide

clr

Purpose
Clears up the MATLAB command window (variables and screen) and closes all
figures.

Synopsis
clr

24
SALP-Toolbox Reference Guide cost_func

cost_func

Purpose
Evaluation of several cost functions for optimization procedures like the EM,
SAGE or RELAX based algorithms, respectively.

Synopsis
c = cost_func(paramval, paramindex, theta_i, x_i, modeltype, modeflag)

Description
This function evaluates a cost function specified by the string modeltype (‘static-
1d’, ‘static_2d’, ‘linear_1d’) for a given parameter vector theta_i with respect to
the signal observation x_i. Parameter modeflag selects one of several modes, i.e.,
in which way the specified cost function is evaluated. Finally the parameters
paramval and paramindex are used for diagnostics, i.e., for evaluation of the
cost function at different values (paramval) of specific parameters (referred by
paramindex).

See Also
model_func, em, chirp_sage, sage_2d, relax, relax_2d

25
edit_figure SALP-Toolbox Reference Guide

edit_figure

Purpose
Edits figure options for improved visualization.

Synopsis
edit_figure(fontsize)
edit_figure(fontsize, linewidth)
edit_figure(fontsize, linewidth, markersize)

Description
This utility function can be used to improve the visualization and readability of
plots and graphs. Using the parameter fontsize the font size of all axis, label and
title objects of the current figure is changed to the specified value. Furthermore
the line width and the marker size of the corresponding plots and graphs can be
adjusted using linewidth and markersize, respectively. By default, the figure
background is changed to white color and the axis grids are turned on.

26
SALP-Toolbox Reference Guide em

em

Purpose
Estimates weights and frequency parameters of a multi-component harmonic one-
dimensional signal using the expectation maximization algorithm.

Synopsis
[beta, f] = em(y, p)
[beta, f] = em(y, p , fs)
[beta, f] = em(y, p , fs, opts)

Description
Computes an estimate of the weights beta, the frequencies f of a signal y
composed by p superimposed complex-valued harmonic components. The
optional parameter fs can be used to scale the signal parameters to the actual
sampling frequency (1 Hz by default). The algorithm can be parameterized using
the options data structure opts employing the m-file em_opts to setup a default
data structure.

Examples
This example synthesizes a two-component complex-valued harmonic signal and
computes estimates of the weights and the frequency parameters of all signal
components using default parameter settings.

y = sg_cissoid([1 1], [0.2 0.25], 21, 1, 30);


options = em_opts
[beta, f] = em(y, 2, [], options)

Algorithm
The Maximum Likelihood based EM algorithm [4] employs interference
canceling to separate the single harmonic components (expectation step) and
determines the frequency parameters by optimizing a cost function (maximization
step) using the MATLAB command fminbnd [16]. Initialization is done by serial
signal separation and Fourier-based estimation of the frequency parameters. The
weights are found by evaluating the cost function at the location of the optimized
frequencies.

See Also
em_opts, relax, relax_2d, sage_2d

27
em_opts SALP-Toolbox Reference Guide

em_opts

Purpose
Returns a data structure with default parameter settings for EM and SAGE based
optimization procedures.

Synopsis
options = em_opts

Description
The elements of the options data structure and their default values are explained in
the following table (pay attention on spelling when changing options !!!).

Name Description Default


dispmode if non-zero command line output is active 0
plotmode if non-zero initialization procedure is visualized 0
diagmode ‘iter’ displays line-search state on command line ‘off’
ic_mode ‘serial’ selects sequential interference cancellation ‘parallel’
maxitercnt maximum number of iterations in the line-search 50
algorithm
maxfunceval maximum number of cost function evaluations of the 20
line-search algorithm
maxcyclecnt maximum number of EM cycles 250
st
n1_fft FFT length in the 1 dimension 1024
n2_fft FFT length in the 2nd dimension, n2_fft = 0 means 0
automatic parameter setup
tol_em minimum parameter difference for two EM-cycles, 0
tol_em = 0 means automatic parameter setup
tol_ls minimum parameter difference for two iterations of 1e-6
the line-search algorithm (convergence criterion)
dynamicrange range between the smallest and the strongest 30
component in dB for detecting the number of
significant components

Examples
This example synthesizes a five-component complex-valued signal and computes
estimates of the signal parameters. For diagnostics the algorithm parameters are
changed for command line information of the EM and the line-search algorithm.

y = sg_cissoid([1 1 0.5 0.5 0.25], [-0.2 0.1 0.2 0.275 0.38], 21);
options = em_opts, options.plotmode = 1; options.diagmode = 'iter';
[beta, f] = em(y, 5, [], options)

28
SALP-Toolbox Reference Guide em_opts

See Also
em, chirp_sage, sage_2d, relax_opts

29
ic SALP-Toolbox Reference Guide

ic

Purpose
Interference cancellation algorithm for the separation of superimposed signals [3].

Synopsis
x_i = ic(y, theta, i, modeltype, ic_mode)

Description
Based on the underlying signal model specified by the parameter modeltype
(‘static-1d’, ‘static_2d’, ‘linear_1d’) the signal component x_i is separated from
the observation y. If ic_mode = ‘serial’ a sequential separation, i.e., from the
most dominant component up to the ith component, is calculated otherwise if
ic_mode = ‘parallel’ all components, apart from x_i, will be subtracted from the
signal y. The matrix theta contains in its columns the parameters, which depend
on the underlying model, of each component. Parameter i is an index to the
component to be separated from the observed signal.

See Also
model_func

30
SALP-Toolbox Reference Guide is_even

is_even

Purpose
True for even numbers/arguments.

Synopsis
flag = is_even(arg)

Description
If arg is an even number or a vector with even numbers the function returns a
value of ‘1’, otherwise the return value is zero.

31
lp_burg SALP-Toolbox Reference Guide

lp_burg

Purpose
Estimates the coefficients of an AR model using Burg’s algorithm.

Synopsis
[a, var] = lp_burg(y, p)

Description
The observed complex-valued harmonic signal y is modeled by an AR process of
order p. The corresponding AR coefficients a are computed employing the
algorithm of Burg. Return value var corresponds to the variance estimate of the
white noise input to the AR model.

Examples
This example synthesizes a four-component complex-valued harmonic signal and
computes estimates of the AR parameters from the first half of the signal
employing Burg’s algorithm. Using a multi-step linear predictor the second half of
the signal is predicted based on the estimated AR coefficients.

y_ref = sg_cissoid([1 1 0.5 1], [0.2 0.25 0.3 0.41], 50, 4);
a = lp_burg(y_ref(1 :25), 10) ;
y = lp_multi(y_ref(1:25), a, 25);
plot(abs(y_ref), 'g-'), hold on, plot([26:50], abs(y), 'r:')

Algorithm
The Burg algorithm obtains the AR coefficients by minimizing the forward and
backward prediction error energies, subject to the constraint that the AR
parameters satisfy the Levinson-Durbin recursion [10]. The MATLAB command
arburg is employed for computing the parameters [16].

See Also
lp_single, lp_multi, lp_mcov, arburg©

32
SALP-Toolbox Reference Guide lp_lms

lp_lms

Purpose
Computes the coefficients of an AR model using the adaptive Least Mean Square
(LMS) filter algorithm.

Synopsis
[a, e, yp] = lp_lms(y, p, mu)

Description
The observed complex-valued harmonic signal y is modeled by an AR process of
order p. The AR coefficients are determined at each sample location (parameter
set of location n is stored in the nth row of matrix a) as well as the a-priori error e
and the a-priori prediction value yp. The scalar 0 < mu < 1 describes the step size
of the iterative adaptation process and represents a tradeoff between convergence
rate and noise sensitivity of the algorithm.

Examples
This example synthesizes a four-component complex-valued harmonic signal and
computes estimates of the AR parameters from the first three quarters of the
signal employing the LMS algorithm. Using a multi-step linear predictor the fourth
quarter of the signal is predicted based on the estimated AR coefficients.

y_ref = sg_cissoid([1 1 0.5 1], [0.2 0.25 0.3 0.41], 120, 4);
a = lp_lms(y_ref(1:90), 10, 0.005);
y = lp_multi(y_ref(1:90), a(90, :), 30);
plot(abs(y_ref), 'g-'), hold on, plot([91:120], abs(y), 'r:')

Algorithm
The LMS algorithm calculates the a-priori prediction error based on the current
AR coefficients using a linear predictor and corrects the AR coefficients to
minimize the prediction error energy depending on the selected step size
parameter (refer to [9,10]).

See Also
lp_single, lp_multi, lp_nlms, lp_rls, lp_qrrls

33
lp_mcov SALP-Toolbox Reference Guide

lp_mcov

Purpose
Determination of the coefficients of an AR model using the modified covariance
approach.

Synopsis
[a, var] = lp_mcov(y, p)

Description
The observed complex-valued harmonic signal y is modeled by an AR process of
order p. The AR model coefficients in vector a are computed in a least squares
sense. Return value var corresponds to the variance estimate of the white noise
input to the AR model.

Examples
This example synthesizes a four-component complex-valued harmonic signal in
white noise and computes estimates of the AR parameters from the first half of the
signal employing the modified covariance algorithm. Using a multi-step linear
predictor the second half of the signal is predicted based on the estimated AR
coefficients.

y_ref = sg_cissoid([1 1 0.5 1], [0.2 0.25 0.3 0.41], 50, 4, 30);
a = lp_mcov(y_ref(1:25), 10);
y = lp_multi(y_ref(1:25), a, 25);
plot(abs(y_ref), 'g-'), hold on, plot([26:50], abs(y), 'r:')

Algorithm
The modified covariance approach (also known as the least squares method)
minimizes the forward and backward prediction error energies in a least square
sense (refer to [10,15]). The MATLAB command armcov is employed to
compute the parameters of the AR process [16].

See Also
lp_single, lp_multi, lp_burg, armcov©

34
SALP-Toolbox Reference Guide lp_multi

lp_multi

Purpose
Calculates a multi-step linear prediction of a one-dimensional complex-valued
signal.

Synopsis
yp = lp_multi(y, a, Np)

Description
Predicts Np samples of a one-dimensional complex-valued multi-component
harmonic signal y using cascaded linear predictors. The predictor coefficients in
vector a are identical to the parameters of a corresponding AR model, which
describes the signal y.

Examples
This example synthesizes a four-component complex-valued harmonic signal and
computes estimates of the AR parameters from the first half of the signal
employing the modified covariance algorithm. Using a multi-step linear predictor
the second half of the signal is predicted based on the estimated AR coefficients.

y_ref = sg_cissoid([1 1 0.5 1], [0.2 0.25 0.3 0.41], 50, 4, 40);
a = lp_mcov(y_ref(1:25), 10);
y = lp_multi(y_ref(1:25), a, 25);
plot(abs(y_ref), 'g-'), hold on, plot([26:50], abs(y), 'r:')

Algorithm
By reusing the output of a single step linear predictor, the signal is extrapolated
and thus can be employed as input of a second linear predictor, which utilizes the
same predictor (AR) coefficients [3,14,19]. By this way an arbitrary number of
samples can be predicted into the future. However, in practice the prediction
horizon is limited due to error accumulation within the stages of the multi-step
predictor [19].

See Also
lp_single, lp_burg, lp_mcov, lp_lms, lp_nlms, lp_rls, lp_qrrls

35
lp_nlms SALP-Toolbox Reference Guide

lp_nlms

Purpose
Computes the coefficients of an AR model using the normalized LMS adaptive
filter algorithm.

Synopsis
[a, e, yp] = lp_nlms(y, p, mu)

Description
The observed complex-valued harmonic signal y is modeled by an AR process of
order p. The AR coefficients are determined at each sample location (parameter
set of location n is stored in the nth row of matrix a) as well as the a-priori error e
and the a-priori prediction value yp. The scalar 0 < mu < 1 describes the step size
of the iterative adaptation process and represents a tradeoff between convergence
rate and noise sensitivity of the algorithm.

Examples
This example synthesizes a four-component complex-valued harmonic signal and
computes estimates of the AR parameters from the first three quarters of the
signal employing NLMS algorithm. Using a multi-step linear predictor the fourth
quarter of the signal is predicted based on the estimated AR coefficients.

y_ref = sg_cissoid([1 1 0.5 1], [0.2 0.25 0.3 0.41], 120, 4);
a = lp_nlms(y_ref(1:90), 10, 0.18);
y = lp_multi(y_ref(1:90), a(90, :), 30);
plot(abs(y_ref), 'g-'), hold on, plot([91:120], abs(y), 'r:')

Algorithm
The NLMS algorithm [9] is almost identical to the LMS-algorithm, but due to the
additional normalization of the a-priori error, this method is more robust
especially when strong variations of the signal energy occurs.

See Also
lp_single, lp_multi, lp_lms, lp_rls, lp_qrrls

36
SALP-Toolbox Reference Guide lp_qrrls

lp_qrrls

Purpose
Computes the coefficients of an AR model using the adaptive QR-decomposition
based RLS filter algorithm.

Synopsis
[a, e, yp] = lp_qrrls(y, p, lambda)

Description
The observed complex-valued harmonic signal y is modeled by an AR process of
order p. The AR coefficients are determined at each sample location (parameter
set of location n is stored in the nth row of matrix a) as well as the a-priori error e
and the a-priori prediction value yp. The scalar 0 < lambda < 1 describes the
forgetting factor of the iterative adaptation process and determines the influence
of past signal samples when updating the current coefficients.

Examples
This example synthesizes a four-component complex-valued harmonic signal in
white noise and computes estimates of the AR parameters employing QR-RLS
algorithm. The first plots illustrate the a priori error (learning curve) and the
second one compares the envelope of the original signal with the a priori
prediction.

y_ref = sg_cissoid([1 1 0.5 1], [0.2 0.25 0.3 0.41], 100, 4, 30);
[a, e, yp] = lp_qrrls(y_ref(1:100), 10, 0.99);
plot(abs(e)), figure, plot(abs(y_ref), 'g-'), hold on, plot(abs(yp), 'r:')

Algorithm
This algorithm is based on the iterative QR-decomposition of the observed signal
sequence employing givens rotations [9]. It’s a recursive implementation of the
standard least squares approach and provides high accuracy at reduced
computational load. Due to its fast convergence this filter algorithm is especially
appropriate for analyzing time-varying signals.

See Also
lp_single, lp_multi, lp_lms, lp_nlms, lp_rls

37
lp_rls SALP-Toolbox Reference Guide

lp_rls

Purpose
Computes the coefficients of an AR model using the RLS adaptive filter
algorithm.

Synopsis
[a, e, yp] = lp_rls(y, p, lambda)

Description
The observed complex-valued harmonic signal y is modeled by an AR Process of
order p. The AR coefficients are determined at each sample location (parameter
set of location n is stored in the nth row of matrix a) as well as the a-priori error e
and the a-priori prediction value yp. The scalar 0 < lambda < 1 describes the
forgetting factor of the iterative adaptation process and determines the influence
of past signal samples when updating the current coefficients.

Examples
This example synthesizes a four-component complex-valued harmonic signal in
white noise and computes estimates of the AR parameters employing RLS
algorithm. The first plots illustrate the a priori error (learning curve) and the
second one compares the envelope of the original signal with the a priori
prediction.

y_ref = sg_cissoid([1 1 0.5 1], [0.2 0.25 0.3 0.41], 100, 4, 30);
[a, e, yp] = lp_rls(y_ref(1 :100), 10, 0.99);
plot(abs(e)), figure, plot(abs(y_ref), 'g-'), hold on, plot(abs(yp), 'r:')

Algorithm
This algorithm is based on the recursive implementation of the standard least
squares approach and provides moderate accuracy [9]. The computational load is
reduced as compared with the block-oriented least squares approach by
calculating the inverse of the correlation or observation matrix, respectively, using
the matrix inversion lemma. Like the QR-RLS algorithm this adaptive filter
approach is also appropriate for analyzing moderate time-varying signals.

See Also
lp_single, lp_multi, lp_lms, lp_nlms, lp_qrrls

38
SALP-Toolbox Reference Guide lp_single

lp_single

Purpose
Computes a single-step linear prediction of a one-dimensional complex-valued
signal.

Synopsis
yp = lp_single(y, a)

Description
Predicts one sample of a one-dimensional complex-valued multi-component
harmonic signal y using a linear predictor. The predictor coefficients in vector a
are identical to the parameters of a corresponding AR model.

Examples
This example synthesizes a four-component complex-valued harmonic signal and
computes estimates of the AR parameters employing the modified covariance
algorithm. Using a single-step linear predictor the last sample of the sequence is
predicted and compared with the original sample.

y_ref = sg_cissoid([1 1 0.5 1], [0.2 0.25 0.3 0.41], 25, 4, 30);
a = lp_mcov(y_ref(1 :24), 10);
e = abs(y_ref(25) - lp_single(y_ref(1:24), a))

Algorithm
The linear predictor calculates a future signal sample by a linear combination of
past signal samples [9]. The LP coefficients are identical to the coefficients of an
AR process, which represents the observed signal.

See Also
lp_multi, lp_burg, lp_mcov, lp_lms, lp_nlms, lp_rls, lp_qrrls

39
lut_init SALP-Toolbox Reference Guide

lut_init

Purpose
Computes a subspace correction look-up-table used for the subspace-based chirp
parameter estimation scheme.

Synopsis
B_LUT = lut_init(N_LUT, N, N_Seg, OSF)

Description
Based on the parameters look-up-table length N_LUT, signal length N, sample
count within one signal segment N_Seg and the over-sampling factor OSF a
reference chirp signal with a bandwidth from zero up to 0.5 Hz is used for
calculating the bandwidth correction look-up-table B_LUT for subspace-based
chirp parameter estimation. For more details refer to [17].

Examples
This example synthesizes a mono-component complex-valued chirp-signal and
computes estimates of the center frequency and the bandwidth of the signal. The
corresponding bandwidth correction look-up-table is calculated in advance.

B_LUT = lut_init(200, 10, 5, 1);


y = sg_chirp(1, 0.1, 0.2, 10, 1);
[fc, B] = chirp_rrm(y, 5, 1, 1, B_LUT)

See Also
chirp_rrm

40
SALP-Toolbox Reference Guide marker

marker

Purpose
Visualization of 2-D graph coordinates via mouse click.

Synopsis
marker(gca)
marker(h)

Description
This tool can be employed for extracting coordinates of an arbitrary location of a
two-dimensional graph created by the MATLAB command plot. After initializing
the marker command by passing the corresponding axis handle h or by utilizing
the gca value, the mouse cursor is changing to ‘crosshair’ shape. Now the cursor
can be positioned over the corresponding graph plot and the selected coordinates
will be displayed in the figure headline after a click on the left mouse button. To
make sure, the coordinates are updated, a beep signal acknowledges every correct
user input via the mouse. Even multiple axis objects of one figure can be handled
by the marker command.

Examples
This example plots a two-dimensional graph and runs the marker tool by passing
the plot handle. The coordinates will be displayed at the figures headline if an
arbitrary location of the graph is selected by a mouse click.

y = sg_cissoid([1 1 0.5 1], [0.2 0.25 0.3 0.41], 25, 4);


figure, subplot(2,1,1), plot(abs(y)), marker;
subplot(2,1,2), plot(psd_period(y)), marker;

41
model_func SALP-Toolbox Reference Guide

model_func

Purpose
Implements several signal models used in the context with optimization
procedures like the EM, SAGE or RELAX based algorithms, respectively.

Synopsis
y = model_func(theta, dim, modeltype)

Description
This function evaluates the model function specified by the parameter modeltype
(‘static-1d’, ‘static-2d’, ‘linear-1d’) for a given parameter matrix theta and
synthesizes a signal y of dimension dim. The parameter matrix contains column
wise the parameters of each component.

See Also
cost_func, em, chirp_sage, sage_2d, relax, relax_2d

42
SALP-Toolbox Reference Guide peak_detect

peak_detect

Purpose
Detects spectral peaks within in a one-dimensional line spectrum.

Synopsis
[peakval, peakpos] = peak_detect(psd, p)
[peakval, peakpos] = peak_detect(psd, p, threshold)

Description
This command detects all local maxima within the discrete line spectrum psd and
returns the amplitude value and the position index of the p most dominant peaks.
To prevent detection of spurious components the optional parameter threshold
specifies the lower bound a spectral peak is found to be valid. If no such
parameter is specified, all but maximum p peaks are detected.

Examples
This example synthesizes a complex-valued signal composed of five partially
closely spaced spectral components and the MUSIC algorithm is used to estimate
the PSD, which is analyzed by the peak detection algorithm. The detected peak
positions are finally scaled to the corresponding frequency axis.

y = sg_cissoid([1 0.8 0.6 0.5 0.3], [0.2 0.24 0.26 0.3 0.35], 50, 1, 30);
[psd, f] = psd_music(y, 5, 35);
[dummy, index] = peak_detect(psd, 5);
sort(f(index))

See Also
amplitude_fit

43
pi_real SALP-Toolbox Reference Guide

pi_real

Purpose
Returns a -real transformation matrix.

Synopsis
Q = pi_real(d)

Description
Returns a symmetric [d  d] -real transformation matrix Q used for a real-
valued implementation of the ESPRIT algorithm [7,8].

See Also
uni_esprit

44
SALP-Toolbox Reference Guide psd_arma

psd_arma

Purpose
Calculates an ARMA model based PSD estimate using a two-stage least squares
approach.

Synopsis
[psd, f] = psd_arma(y, p_AR, p_MA, p_k)
[psd, f] = psd_arma(y, p_AR, p_MA, p_k, N_FFT)
[psd, f] = psd_arma(y, p_AR, p_MA, p_k, N_FFT, fs)

Description
Computes an ARMA model based PSD estimate psd of the complex-valued
multi-component harmonic signal y. By supplying the parameters p_AR and
p_MA, which represent the AR and the MA model order, respectively, as well as
the model order of the initial infinite AR model p_k a PSD with N_FFT points is
computed. If no PSD length is specified the default value of N_FFT = 512 is used.
The return argument f contains the corresponding frequency axis, which is scaled
to the sampling frequency fs (1 Hz by default). Without output arguments the
psd_arma command plots the PSD in linear and logarithmic scale.

Examples
This example synthesizes a three-component complex-valued harmonic signal,
which is superimposed to a wideband signal (a kind of colored noise). The
resulting signal is analyzed using the two-stage Least Squares algorithm, which is
able to resolve both the three narrowband components and the single wideband
signal.

y1 = sg_cissoid([1 1 1], [0.2 0.3 0.4], 100, 1, 30);


y2 = sg_wideband(1, -0.3, -0.1, 100);
psd_arma(y1+y2, 8, 5, 20);

Algorithm
An ARMA process can be described by an AR process with an infinite model
order. Since the observed signal is finite, this AR model is determined using not
an infinite but a large model order pk. This can be employed to obtain the noise
sequence of the corresponding ARMA process. Thus, the calculation of the
truncated AR and MA coefficients reduces to an input-output-identification
problem [15].

See Also
arma_psd, psd_stmcb, psd_prony, peak_detect

45
psd_arma SALP-Toolbox Reference Guide

46
SALP-Toolbox Reference Guide psd_bartlett

psd_bartlett

Purpose
Determines a classical Fourier-based PSD estimate using the method of Bartlett.

Synopsis
[psd, f] = psd_bartlett(y, N_Seg)
[psd, f] = psd_bartlett(y, N_Seg, N_FFT)
[psd, f] = psd_bartlett(y, N_Seg, N_FFT, fs)

Description
Computes a Fourier-based PSD estimate psd of the complex-valued multi-
component harmonic signal y. The Bartlett method averages the periodograms of
non-overlapping rectangular windowed signal segments, which contain N_Seg
samples each. N_Seg will be truncated, if segmentation of the input signal without
overlap fails. The PSD length is specified by the parameter N_FFT. If no such
value is available the default value of N_FFT = 512 is used. The return argument f
contains the corresponding frequency axis, which is scaled to the sampling
frequency fs (1 Hz by default). Without output arguments the psd_bartlett
command plots the PSD in linear and logarithmic scale.

Examples
This example synthesizes a three-component complex-valued harmonic signal in
white noise and plots the corresponding PSD estimate using the method of
Bartlett.

y = sg_cissoid([1 0.5 0.25], [0.2 0.3 0.4], 100, 1, 30);


psd_bartlett(y, 100, 1024, 1);

Algorithm
The psd_welch command with a rectangular window and no overlap is employed
[15].

See Also
psd_period, psd_welch, peak_detect

47
psd_blackman SALP-Toolbox Reference Guide

psd_blackman

Purpose
Computes a PSD estimate using the Fourier-based method of Blackman and
Tukey.

Synopsis
[psd, f] = psd_blackman(y)
[psd, f] = psd_blackman(y, win)
[psd, f] = psd_blackman(y, win, N_FFT)
[psd, f] = psd_blackman(y, win, N_FFT, fs)

Description
Computes a Fourier-based PSD estimate psd of the complex-valued multi-
component harmonic signal y. The method of Blackman and Tukey computes the
correlogram via a windowed (refer to MATLAB function boxcar, triang,
bartlett, hanning, hamming, blackman, kaiser or chebwin) correlation
sequence of the observed signal. The window is specified by the vector win,
which contains the window taps. win must be a vector of length (2N1), where N
is the length of y. If no window is specified, a rectangular weighting function is
used by default. The PSD length is specified by the parameter N_FFT. If no such
value is available the default value of N_FFT = 512 is used. The return argument f
contains the corresponding frequency axis, which is scaled to the sampling
frequency fs (1 Hz by default). Without output arguments the psd_blackman
command plots the PSD in linear and logarithmic scale.

Examples
This example synthesizes a three-component complex-valued harmonic signal in
white noise and computes the corresponding PSD estimate using the method of
Blackman and Tukey. Finally the three most dominant spectral peaks within the
PSD are located.

y = sg_cissoid([1 0.5 0.25], [0.2 0.3 0.4], 100, 1, 30);


[PSD, f] = psd_blackman(y, hamming(2*100-1), 1024, 1);
[dummy, pos] = peak_detect(PSD, 3);
f(pos)

Algorithm
The Blackman and Tukey approach calculates the PSD by the Fourier transform
of the windowed correlation function of the observed signal [15].

See Also
48
SALP-Toolbox Reference Guide psd_blackman

psd_correl, peak_detect

49
psd_burg SALP-Toolbox Reference Guide

psd_burg

Purpose
Calculates an AR model based PSD estimate using the Burg algorithm.

Synopsis
[psd, f] = psd_burg(y, p)
[psd, f] = psd_burg(y, p, N_FFT)
[psd, f] = psd_burg(y, p, N_FFT, fs)

Description
The observed complex-valued harmonic signal y is modeled by an AR Process of
order p. The psd is calculated based on the AR coefficients, which are computed
employing the algorithm of Burg. The PSD length is specified by the parameter
N_FFT. If no such value is available the default value of N_FFT = 512 is used. The
return argument f contains the corresponding frequency axis, which is scaled to
the sampling frequency fs (1 Hz by default). Without output arguments the
psd_burg command plots the PSD in linear and logarithmic scale.

Examples
This example synthesizes a complex-valued harmonic signal in white noise with
two closely spaced spectral lines and plots the corresponding PSD estimate using
the method of Burg.

y = sg_cissoid([1 1], [0.24 0.26], 50, 2, 60);


psd_burg(y, 2, 1024, 2);

Algorithm
The Burg algorithm obtains the AR coefficients by minimizing the forward and
backward prediction error energies, subject to the constraint that the AR
parameters satisfy the Levinson-Durbin recursion [10]. The MATLAB command
arburg is employed for computing the parameters [16].

See Also
arma_psd, psd_mcov, psd_cov, psd_corr, peak_detect, arburg©

50
SALP-Toolbox Reference Guide psd_capon

psd_capon

Purpose
Calculates a PSD estimate using Capon’s method.

Synopsis
[psd, f] = psd_capon(y, p)
[psd, f] = psd_capon(y, p, N_FFT)
[psd, f] = psd_capon(y, p, N_FFT, fs)

Description
This command computes the psd of a signal y composed of p complex-valued
harmonic components using the method of Capon. The PSD length is specified by
the parameter N_FFT. If no such value is available the default value of N_FFT =
512 is used. The return argument f contains the corresponding frequency axis,
which is scaled to the sampling frequency fs (1 Hz by default). Without output
arguments the psd_capon command plots the PSD in linear and logarithmic
scale.

Examples
This example synthesizes a complex-valued harmonic signal in white noise with
two closely spaced spectral lines and plots the corresponding PSD estimate using
the method of Capon.

x = sg_cissoid([1 1], [0.24 0.26], 25);


y = add_noise(x, 60) ;
psd_capon(y, 2, 1024);

Algorithm
In contrast to the Fourier transform, Capon’s method can be seen as a filter bank
approach with a bandpass filter, which is purposely designed to the signal under
inspection [10,12,15].

See Also
arma_psd, psd_mem, peak_detect

51
psd_corr SALP-Toolbox Reference Guide

psd_corr

Purpose
Calculates an AR model based PSD estimate using the autocorrelation approach.

Synopsis
[psd, f] = psd_corr(y, p)
[psd, f] = psd_corr(y, p, N_FFT)
[psd, f] = psd_corr(y, p, N_FFT, fs)

Description
The observed complex-valued harmonic signal y is modeled by an AR process of
order p. The psd is calculated based on the AR coefficients, which are computed
employing the autocorrelation approach. The PSD length is specified by the
parameter N_FFT. If no such value is available the default value of N_FFT = 512 is
used. The return argument f contains the corresponding frequency axis, which is
scaled to the sampling frequency fs (1 Hz by default). Without output arguments
the psd_corr command plots the PSD in linear and logarithmic scale.

Examples
This example synthesizes a three-component complex-valued harmonic signal and
plots the corresponding PSD estimate using the autocorrelation method.

y = sg_cissoid([1 0.5 0.25], [0.2 0.3 0.4], 50, 1, inf);


psd_corr(y, 3);

Algorithm
Based on the linear predictor equation a direct data approach can be considered to
compute the AR parameters employing least squares. If a pre- and post-windowed
signal is used to form the observation matrix the resulting solution is called the
autocorrelation approach [10,15].

See Also
arma_psd, psd_cov, psd_yule, psd_burg, psd_mcov, peak_detect

52
SALP-Toolbox Reference Guide psd_correl

psd_correl

Purpose
Calculates a Fourier-based PSD estimate using the correlogram.

Synopsis
[psd, f] = psd_correl(y)
[psd, f] = psd_correl(y, N_FFT)
[psd, f] = psd_correl(y, N_FFT, fs)

Description
Computes a Fourier-based PSD estimate psd of the complex-valued multi-
component harmonic signal y. The correlogram is the Fourier transformed
autocorrelation sequence of the observed signal. The PSD length is specified by
the parameter N_FFT. If no such value is available the default value of N_FFT =
512 is used. The return argument f contains the corresponding frequency axis,
which is scaled to the sampling frequency fs (1 Hz by default). Without output
arguments the psd_correl command plots the PSD in linear and logarithmic
scale.

Examples
This example synthesizes a three-component complex-valued harmonic signal in
white noise and plots the corresponding PSD estimate using the correlogram.

y = sg_cissoid([1 0.5 0.25], [0.2 0.3 0.4], 50, 1, 10);


psd_correl(y, []);

Algorithm
The psd_correl command utilizes the psd_blackman m-file with a rectangular
window. By definition this estimator is equivalent to the periodogram algorithm
[10,15].

See Also
psd_blackman, psd_period, psd_bartlett, psd_welch, peak_detect

53
psd_cov SALP-Toolbox Reference Guide

psd_cov

Purpose
Calculates an AR model based PSD estimate using the covariance method.

Synopsis
[psd, f] = psd_cov(y, p)
[psd, f] = psd_cov(y, p, N_FFT)
[psd, f] = psd_cov(y, p, N_FFT, fs)

Description
The observed complex-valued harmonic signal y is modeled by an AR process of
order p. The psd is calculated based on the AR coefficients, which are computed
employing the covariance approach. The PSD length is specified by the parameter
N_FFT. If no such value is available the default value of N_FFT = 512 is used. The
return argument f contains the corresponding frequency axis, which is scaled to
the sampling frequency fs (1 Hz by default). Without output arguments the
psd_cov command plots the PSD in linear and logarithmic scale.

Examples
This example synthesizes a complex-valued harmonic signal in white noise with
two closely spaced spectral lines and plots the corresponding PSD estimate using
the covariance approach.

y = sg_cissoid([1 1 ], [0.24 0.26], 100, 2, 50);


psd_cov(y, 2, 1024, 2);

Algorithm
Based on the linear predictor equation a direct data approach can be considered to
compute the AR parameters employing least squares. If a non pre- and non post-
windowed signal is used to form the observation matrix the resulting solution is
called the covariance approach [10,15]. For computing the AR coefficients the
MATLAB command arcov is employed [16].

See Also
arma_psd, psd_burg, psd_mcov, psd_yule, psd_corr, peak_detect, arcov©

54
SALP-Toolbox Reference Guide psd_mcov

psd_mcov

Purpose
Calculates an AR model based PSD estimate using the modified covariance
method.

Synopsis
[psd, f] = psd_mcov(y, p)
[psd, f] = psd_mcov(y, p, N_FFT)
[psd, f] = psd_mcov(y, p, N_FFT, fs)

Description
The observed complex-valued harmonic signal y is modeled by an AR process of
order p. The psd is calculated based on the AR coefficients, which are computed
employing the covariance approach. The PSD length is specified by the parameter
N_FFT. If no such value is available the default value of N_FFT = 512 is used. The
return argument f contains the corresponding frequency axis, which is scaled to
the sampling frequency fs (1 Hz by default). Without output arguments the
psd_mcov command plots the PSD in linear and logarithmic scale.

Examples
This example synthesizes a complex-valued harmonic signal in white noise with
two closely spaced spectral lines and plots the corresponding PSD estimate using
the modified covariance approach.

y = sg_cissoid([1 1], [0.24 0.26], 50, 2, 50);


psd_mcov(y, 2, 1024, 2);

Algorithm
Based on the linear predictor equation a direct data approach can be employed to
compute the AR parameters employing least squares. If forward and backward
prediction is considered to form the observation matrix the solution is called the
modified covariance approach [15]. For computing the AR coefficients the
MATLAB command armcov is employed [16].

See Also
arma_psd, psd_burg, psd_cov, psd_yule, psd_corr, peak_detect, armcov©

55
psd_mem SALP-Toolbox Reference Guide

psd_mem

Purpose
Calculates an AR model based PSD estimate using the Maximum Entropy
Method (MEM) of Burg.

Synopsis
[psd, f] = psd_mem(y, p)
[psd, f] = psd_mem(y, p, N_FFT)
[psd, f] = psd_mem(y, p, N_FFT, fs)

Description
This command computes the psd of a signal y composed of p complex-valued
harmonic components using the MEM of Burg. The PSD length is specified by
the parameter N_FFT. If no such value is available the default value of N_FFT =
512 is used. The return argument f contains the corresponding frequency axis,
which is scaled to the sampling frequency fs (1 Hz by default). Without output
arguments the psd_mem command plots the PSD in linear and logarithmic scale.

Examples
This example synthesizes a complex-valued harmonic signal in white noise with
one spectral line in a sufficient distance to two closely spaced spectral lines.
Afterward a plot of the corresponding PSD estimate using the MEM approach is
generated.

y = sg_cissoid([1 1 1], [0.1 0.34 0.36], 50, 2, 20);


psd_mem(y, 3, [], 2);

Algorithm
The high-resolution abilities of the MEM spectrum are due to the extrapolation of
the signals autocorrelation sequence by still keeping the signals entropy
maximized [10]. For computing the PSD the MATLAB command pmem is
employed [16].

See Also
arma_psd, psd_capon, peak_detect, pmem©

56
SALP-Toolbox Reference Guide psd_min_norm

psd_min_norm

Purpose
Calculates a subspace based PSD estimate using the minimum norm method by
Kumaresan and Tufts.

Synopsis
[psd, f, lambda] = psd_min_norm(y, p, N_Seg)
[psd, f, lambda] = psd_min_norm(y, p, N_Seg, N_FFT)
[psd, f, lambda] = psd_min_norm(y, p, N_Seg, N_FFT, fs)

Description
This command computes the psd of a signal y, which is composed of p complex-
valued harmonic components, using the minimum norm approach. The
observation matrix for estimating the subspace is formed by signal segments of
length N/2 < N_Seg < 2/3N, where N is the overall number of signal samples. The
PSD length is specified by the parameter N_FFT. If no such value is available the
default value of N_FFT = 512 is used. The return argument f contains the
corresponding frequency axis, which is scaled to the sampling frequency fs (1 Hz
by default). Furthermore the Eigenvalues of the covariance matrix lambda are
computed. Without output arguments the psd_min_norm command plots the
PSD in linear and logarithmic scale.

Examples
This example synthesizes a complex-valued harmonic signal in white noise with
two closely spaced spectral lines and plots the corresponding PSD estimate using
the minimum norm method.

y = sg_cissoid([1 1], [0.24 0.26], 20, 1, 30);


psd_min_norm(y, 2, 10, 1024);

Algorithm
The minimum norm algorithm is a simplified version of the MUSIC algorithm,
which exploits the orthogonality of the noise and signal subspace, i.e. the noise
eigenvectors and the shift vectors of the signal components. The minimum norm
solution calculates one vector with minimum norm, which is orthogonal to all
signal components and thus can be evaluated to compute the PSD [15].

See Also
arma_psd, psd_music, root_min_norm, peak_detect

57
psd_music SALP-Toolbox Reference Guide

psd_music

Purpose
Calculates a subspace based PSD estimate using the MUSIC algorithm by
Schmidt.

Synopsis
[psd, f, lambda] = psd_music(y, p, N_Seg)
[psd, f, lambda] = psd_music(y, p, N_Seg, N_FFT)
[psd, f, lambda] = psd_music(y, p, N_Seg, N_FFT, fs)

Description
This command computes the psd of a signal y composed of p complex-valued
harmonic components using the MUSIC approach. The observation matrix for
estimating the subspace is formed by signal segments of length N/2 < N_Seg <
2/3N, where N is the overall number of signal samples. The PSD length is
specified by the parameter N_FFT. If no such value is available the default value
of N_FFT = 512 is used. The return argument f contains the corresponding
frequency axis, which is scaled to the sampling frequency fs (1 Hz by default).
Furthermore the Eigenvalues of the covariance matrix lambda are computed
Without output arguments the psd_music command plots the PSD in linear and
logarithmic scale.

Examples
This example synthesizes a complex-valued harmonic signal in white noise with
two closely spaced spectral lines and plots the corresponding PSD estimate using
the MUSIC algorithm.

y = sg_cissoid([1 1 ], [0.24 0.26], 20, 1, 30);


psd_music(y, 2, 10, 1024);

Algorithm
The MUSIC algorithm exploits the orthogonality of the noise and signal subspace,
i.e. the noise eigenvectors and the shift vectors of the signal components [12,15].

See Also
arma_psd, psd_min_norm, root_music, peak_detect

58
SALP-Toolbox Reference Guide psd_period

psd_period

Purpose
Calculates a Fourier-based PSD estimate using the periodogram.

Synopsis
[psd, f] = psd_period(y)
[psd, f] = psd_period(y, N_FFT)
[psd, f] = psd_period(y, N_Seg, fs)

Description
Computes a Fourier-based PSD estimate psd of the complex-valued multi-
component harmonic signal y. The PSD length is specified by the parameter
N_FFT. If no such value is available the default value of N_FFT = 512 is used. The
return argument f contains the corresponding frequency axis, which is scaled to
the sampling frequency fs (1 Hz by default). Without output arguments the
psd_period command plots the PSD in linear and logarithmic scale.

Examples
This example synthesizes a three-component complex-valued harmonic signal in
white noise and plots the corresponding PSD estimate using the periodogram.

y = sg_cissoid([1 0.5 0.25], [0.2 0.3 0.4], 50, 1, 10);


psd_period(y);

Algorithm
The periodogram is the squared Fourier transform of the observed signal [10, 15].

See Also
psd_blackman, psd_correl, psd_bartlett, psd_welch, peak_detect

59
psd_period_2d SALP-Toolbox Reference Guide

psd_period_2d

Purpose
Calculates a Fourier-based PSD estimate of a two-dimensional signal using the
periodogram.

Synopsis
[psd, f1, f2] = psd_period_2d(y)
[psd, f1, f2] = psd_period_2d(y, wintype)
[psd, f1, f2] = psd_period_2d(y, wintype, N_FFT)
[psd, f1, f2] = psd_period_2d(y, wintype, N_FFT, fs)

Description
Computes a Fourier-based PSD estimate psd of the two-dimensional complex-
valued multi-component harmonic signal y employing a twofold Fourier
transform. The observed signal can be windowed by a weighting function
specified by the parameter wintype, which contains a string of the MATLAB
window functions (‘boxcar’, ‘triang’, ‘bartlett’, ‘hanning’, ‘hamming’,
‘blackman’). The PSD dimension is specified by vector N_FFT, whose elements
contain the sample count of the corresponding dimension. If no such value is
available the default value of N_FFT = [512 512] is used. The return arguments f1
and f2 contain the corresponding axes scaled to the sampling frequencies in
vector fs (1 Hz for both dimensions by default). Without output arguments the
psd_period_2d command plots the PSD in linear and logarithmic scale.

Examples
This example synthesizes a two-dimensional signal in white noise consisting of
three complex-valued harmonics and plots the corresponding PSD estimate using
the two-dimensional periodogram with an Hanning weighting function.

y = sg_cissoid_2d([0.6 0.8 1], [0.2 0.3 0.4] , [0.3 0.2 0.4], [50, 25], [], 10);
psd_period_2d(y, 'hann', [512 256]);

Algorithm
The periodogram is the squared twofold Fourier transform of the observed signal.

See Also
window_2d

60
SALP-Toolbox Reference Guide psd_prony

psd_prony

Purpose
Calculates an ARMA model based PSD estimate using Prony’s method.

Synopsis
[psd, f] = psd_prony(y, p_AR, p_MA)
[psd, f] = psd_prony(y, p_AR, p_MA, N_FFT)
[psd, f] = psd_prony(y, p_AR, p_MA, N_FFT, fs)

Description
Computes an ARMA model based PSD estimate psd of the complex-valued
multi-component harmonic signal y. By supplying the parameters p_AR and
p_MA, which represent the AR and the MA model order, respectively, an ARMA
model based PSD with N_FFT points is computed. If no PSD length is specified
the default value of N_FFT = 512 is used. The return argument f contains the
corresponding frequency axis, which is scaled to the sampling frequency fs (1 Hz
by default). Without output arguments the psd_prony command plots the PSD in
linear and logarithmic scaling automatically.

Examples
This example synthesizes a three-component complex-valued harmonic signal,
which is superimposed to a wideband signal (a kind of colored noise). The
resulting signal is analyzed using the two-stage Least Squares algorithm, which is
able to resolve both the three narrowband components and the single wideband
signal.

y1 = sg_cissoid([1 1 1], [0.2 0.3 0.4], 100, 1, 30);


y2 = sg_wideband(1, -0.3, -0.1, 100);
psd_prony(y1+y2, 10, 5);

Algorithm
The MATLAB filter design command prony [16] is employed for calculating the
ARMA coefficients based on the interpolation technique of Baron de Prony
[10,15].

See Also
arma_psd, psd_arma, psd_stmcb, peak_detect, prony©

61
SALP-Toolbox Reference Guide

62
SALP-Toolbox Reference Guide psd_stmcb

psd_stmcb

Purpose
Calculates an ARMA model based PSD estimate using the method of Steiglitz and
McBride.

Synopsis
[psd, f] = psd_stmcb(y, p_AR, p_MA)
[psd, f] = psd_stmcb(y, p_AR, p_MA, N_FFT)
[psd, f] = psd_stmcb(y, p_AR, p_MA, N_FFT, fs)

Description
Computes an ARMA model based PSD estimate psd of the complex-valued
multi-component harmonic signal y. By supplying the parameters p_AR and
p_MA, which represent the AR and the MA model order, respectively, an ARMA
model based PSD with N_FFT points is computed. If no PSD length is specified
the default value of N_FFT = 512 is used. The return argument f contains the
corresponding frequency axis, which is scaled to the sampling frequency fs (1 Hz
by default). Without output arguments the psd_stmcb command plots the PSD in
linear and logarithmic scaling automatically.

Examples
This example synthesizes a three-component complex-valued harmonic signal,
which is superimposed to a wideband signal (a kind of colored noise). The
resulting signal is analyzed using the Steiglitz-McBride algorithm, which is able
to resolve both the three narrowband components and the single wideband signal.

y1 = sg_cissoid([1 1 1], [0.2 0.3 0.4], 100, 1, 30);


y2 = sg_wideband(1, -0.3, -0.1, 100);
psd_stmcb(y1+y2, 10, 5);

Algorithm
The MATLAB filter design command stmcb is employed for calculating the
ARMA coefficients based on the iteration-based technique of Steiglitz and
McBride [16].

See Also
arma_psd, psd_arma, psd_prony, peak_detect, stmcb©

63
psd_welch SALP-Toolbox Reference Guide

psd_welch

Purpose
Calculates a Fourier-based PSD estimate using the method by Welch.

Synopsis
[psd, f] = psd_welch(y)
[psd, f] = psd_welch(y, win)
[psd, f] = psd_welch(y, win, N_Overlap)
[psd, f] = psd_welch(y, win, N_Overlap, N_FFT)
[psd, f] = psd_welch(y, win, N_Overlap, N_FFT, fs)

Description
Computes a Fourier-based PSD estimate psd of the complex-valued multi-
component harmonic signal y. The Welch method averages the periodograms of
overlapping windowed (refer to MATLAB function boxcar, triang, bartlett,
hanning, hamming, blackman, kaiser, chebwin) signal segments, where
N_Overlap specifies the number of overlapping signal samples. N_Overlap will
be truncated, if segmentation of the input signal with the specified overlap fails.
The PSD length is specified by the parameter N_FFT. If no such value is available
the default value of N_FFT = 512 is used. The return argument f contains the
corresponding frequency axis, which is scaled to the sampling frequency fs (1 Hz
by default). Without output arguments the psd_welch command plots the PSD in
linear and logarithmic scale.

Examples
This example synthesizes a three-component complex-valued harmonic signal in
white noise and plots the corresponding PSD estimate using the method of Welch.

y = sg_cissoid([1 0.5 0.25], [0.2 0.3 0.4], 100, 1, 10);


psd_welch(y, hann(50), 49, 1024);

Algorithm
The psd_welch command computes the PSD by averaging over the periodograms
of overlapping windowed segments of the observed signal [15]. The MATLAB
command pwelch is utilized to determine the PSD [16].

See Also
psd_blackman, psd_correl, psd_bartlett, psd_period, peak_detect,
pwelch©

64
SALP-Toolbox Reference Guide psd_welch

65
psd_yule SALP-Toolbox Reference Guide

psd_yule

Purpose
Calculates an AR model based PSD estimate using the Yule-Walker method
employing the Levinson-Durbin algorithm.

Synopsis
[psd, f] = psd_yule(y, p)
[psd, f] = psd_yule(y, p, N_FFT)
[psd, f] = psd_yule(y, p, N_FFT, fs)

Description
The observed complex-valued harmonic signal y is modeled by an AR process of
order p. The psd is calculated based on the AR coefficients, which are computed
employing the Yule-Walker approach. The PSD length is specified by the
parameter N_FFT. If no such value is available the default value of N_FFT = 512 is
used. The return argument f contains the corresponding frequency axis, which is
scaled to the sampling frequency fs (1 Hz by default). Without output arguments
the psd_yule command plots the PSD in linear and logarithmic scale.

Examples
This example synthesizes a three-component complex-valued harmonic signal and
plots the corresponding PSD estimate using the Yule-Walker method.

y = sg_cissoid([1 0.5 0.25], [0.2 0.3 0.4], 25, 1, inf);


psd_yule(y, 3, 1024);

Algorithm
The psd_yule command utilizes the MATLAB command aryule command [16]
to compute the AR coefficients based on the Yule-Walker equations employing
the Levinson-Durbin recursion [10,15].

See Also
arma_psd, psd_cov, psd_corr, psd_burg, psd_mcov, peak_detect, aryule©

66
SALP-Toolbox Reference Guide relax

relax

Purpose
Estimates weights and frequency parameters of a multi-component harmonic one-
dimensional signal using recursive FFT calculations.

Synopsis
[beta, f] = relax(y, p)
[beta, f] = relax(y, p, fs)
[beta, f] = relax(y, p, fs, opts)

Description
Computes an estimate of the weights beta, the frequencies f of a signal y
composed by p superimposed complex-valued harmonic components. The return
argument f contains the corresponding frequency parameters, which are scaled to
the sampling frequency fs (1 Hz by default). The algorithm can be parameterized
using the options data structure opts employing the m-file relax_opts to setup a
default data structure.

Examples
This example synthesizes a two-component complex-valued harmonic signal and
subsequently computes estimates of the weights and the frequency parameters of
all signal components using default parameter settings.

y = sg_cissoid([1 1], [0.2 0.25], 21, 1, 30);


options = relax_opts
[beta, f] = relax(y, 2, [], options)

Algorithm
Employing interference canceling the signal components are serially separated
and the corresponding weight and frequency parameters are determined via the
periodogram. Due to recursive processing the influence of dominant components
on the estimates of less significant parts of the signal is reduced. For more details
refer to [11,14].

See Also
relax_opts, relax_2d, em, sage_2d

67
relax_2d SALP-Toolbox Reference Guide

relax_2d

Purpose
Estimates weights and frequency parameters of a multi-component harmonic two-
dimensional signal using recursive FFT calculations.

Synopsis
[beta, f1, f2] = relax_2d(y, p)
[beta, f1, f2] = relax_2d(y, p, fs)
[beta, f1, f2] = relax_2d(y, p, fs, opts)

Description
Computes an estimate of the weights beta, the frequencies f1 and f2 of a two-
dimensional signal y composed by p superimposed complex-valued harmonic
signals. The return argument f1 and f2 contains the corresponding frequency
parameters, which are scaled to the sampling frequencies in vector fs (1 Hz for
both dimensions by default). The algorithm can be parameterized passing the
options data structure opts to the algorithm. A default data structure can be setup
using the m-file relax_opts.

Examples
This example synthesizes a four-component two-dimensional signal and
subsequently computes estimates of the weights and the frequency parameters of
all signal components using default parameter settings.

y = sg_cissoid_2d([1 1 1 1], [0.1 0.2 0.25 0.4], [0.4 0.25 0.2 0.2], [21 10],
[1 1], 30);
options = relax_opts
[beta, f1, f2] = relax_2d(y, 4, [], options)

Algorithm
Employing interference canceling the signal components are serially separated
and the corresponding weight and frequency parameters are determined via the
one- or two-dimensional periodogram. Due to recursive processing the influence
of dominant components on the estimates of less significant parts of the signal is
reduced. For more details refer to [11,14].

See Also
relax, em, sage_2d

68
SALP-Toolbox Reference Guide relax_opts

relax_opts

Purpose
Returns a data structure with default parameter settings for RELAX algorithm.

Synopsis
options = relax_opts

Description
The elements of the options data structure and their default values are explained in
the following table (pay attention on spelling and lower case letters !!!).

Name Description Default


dispmode if non-zero command line output is active 0
plotmode if non-zero initialization procedure is plotted 0
fft_mode ‘2d’ selects joint FFT processing ‘1d’
maxcyclecnt maximum number of recursions 250
n1_fft FFT length in the 1st dimension 1024
n2_fft FFT length in the 2nd dimension, n2_fft = 0 means 0
automatic calculation
tol minimum parameter difference for two recursion- 0
cycles, tol = 0 means automatic calculation
dynamicrange range between the smallest and the strongest 30
component in dB for detecting the number of
significant components

Examples
This example synthesizes a four-component complex-valued signal and computes
estimates of the signal parameters. For diagnostics the algorithm parameters are
changed for command line information and plots of the initialization process.

y = sg_cissoid([1 1 1 1], [0.2 0.25 0.35 0.43], 21, 1, 30);


options = relax_opts
options.plotmode = 1;
options.dispmode = 1;
[beta, f] = relax(y, 4, [], options)

See Also
relax, relax_2d, opts_em

69
root_min_norm SALP-Toolbox Reference Guide

root_min_norm

Purpose
Estimates the frequency parameters of a multi-component harmonic signal using
the minimum norm algorithm.

Synopsis
[f, lambda] = root_min_norm(y, p, N_Seg)
[f, lambda] = root_min_norm(y, p, N_Seg, fs)

Description
This algorithm analyzes one-dimensional signal y composed of p complex-valued
harmonic components and returns estimates of the frequency parameters f and the
Eigenvalue sequence lambda of the corresponding covariance matrix. Since the
observed signal is segmented in overlapping segments for calculating the signal
and noise subspaces, parameter N_Seg specifies the number of samples within
one signal segment. Best results are obtained when the segment size is within the
interval N/2 < N_Seg < N-1 with N the number of available samples. The return
argument f contains the corresponding frequency parameters, which are scaled to
the sampling frequency fs (1 Hz by default).

Examples
This example synthesizes a complex-valued signal composed of two closely
spaced spectral components. This signal is analyzed by the minimum norm
algorithm and the frequency locations of the components are returned.

y = sg_cissoid([1 1], [0.24 0.26], 20, 1, 30);


f = root_min_norm(y, 2, 15)

Algorithm
The minimum norm algorithm is a simplified version of the MUSIC algorithm,
which exploits the orthogonality of the noise and signal subspace, i.e. the noise
eigenvectors and the shift vectors of the signal components. The minimum norm
solution calculates one vector with minimum norm, which is orthogonal to all
signal components and thus can be evaluated to compute the frequency
parameters by polynomial rooting [15]. Forward-Backward averaging is included.

See Also
esprit, root_music, em, relax, psd_min_norm

70
SALP-Toolbox Reference Guide root_music

root_music

Purpose
Estimates the frequency parameters of a multi-component harmonic signal using
the MUSIC algorithm.

Synopsis
[f, lambda] = root_music(y, p, N_Seg)
[f, lambda] = root_music(y, p, N_Seg, fs)

Description
This algorithm analyzes a one-dimensional signal y composed of p complex-
valued harmonic components and returns estimates of the frequency parameters f
and the Eigenvalue sequence lambda of the corresponding covariance matrix.
Since the observed signal is segmented in overlapping segments for calculating
the signal and noise subspaces, parameter N_Seg specifies the number of samples
within one signal segment. Best results are obtained when the segment size is
within the interval N/2 < N_Seg < 2/3N with N the number of available samples.
The return argument f contains the corresponding frequency parameters, which
are scaled to the sampling frequency fs (1 Hz by default).

Examples
This example synthesizes a complex-valued signal composed of two closely
spaced spectral components. This signal is analyzed by the Root-MUSIC
algorithm and the frequency locations of the components are returned.

y = sg_cissoid([1 1], [0.24 0.26], 20, 1, 30);


f = root_music(y, 2, 15)

Algorithm
The MUSIC algorithm exploits the orthogonality of the noise and signal subspace,
i.e. the noise eigenvectors and the shift vectors of the signal components. By
polynomial rooting techniques the frequency parameters can be extracted directly
[12, 15]. Forward-Backward averaging is included.

See Also
esprit, root_min_norm, em, relax, psd_music

71
sage_2d SALP-Toolbox Reference Guide

sage_2d

Purpose
Estimates weights and frequency parameters of a multi-component harmonic two-
dimensional signal using the SAGE algorithm.

Synopsis
[beta, f1, f2] = sage_2d(y, p)
[beta, f1, f2] = sage_2d(y, p , fs)
[beta, f1, f2] = sage_2d(y, p , fs, opts)

Description
Computes an estimate of the weights beta, the frequencies f1 and f2 of a two-
dimensional signal y composed by p superimposed complex-valued harmonic
signals. The return argument f1 and f2 contains the corresponding frequency
parameters, which are scaled to the sampling frequencies in vector fs (1 Hz for
both dimensions by default). The algorithm can be parameterized using the
options data structure opts employing the m-file em_opts to setup a default data
structure.

Examples
This example synthesizes a two-component complex-valued harmonic signal and
computes estimates of the weights and the frequency parameters of all signal
components using default parameter settings. Calculation of this example takes a
little time depending on the performance of the employed system

y = sg_cissoid_2d([1 1], [0.2 0.3] , [0.1 0.1], [21 5], [5 2], 30);
options = em_opts
[beta, f1, f2] = sage_2d(y, 2, [5 2], options)

Algorithm
The Maximum Likelihood based SAGE algorithm [5] is an advanced derivate of
the EM algorithm [3] and therefore employs as well interference canceling to
separate the single harmonic signals (expectation step) and determines the
frequency parameter by optimizing the cost function (maximization step). In
contrast to the EM algorithm the two-dimensional optimization problem is solved
by two serial one-dimensional optimization procedures. After several EM cycles
the algorithm converges to constant signal parameters. Initialization is done by
serial signal separation and Fourier-based parameter estimation of the frequency
parameters. The signal weights are found by evaluating the cost function at the
location of the optimized frequency parameters. For more details refer to [14].

See Also
72
SALP-Toolbox Reference Guide sage_2d

relax, relax_2d, em

73
sg_chirp SALP-Toolbox Reference Guide

sg_chirp

Purpose
Synthesizes a multi-component linear frequency modulated complex-valued
signal.

Synopsis
[y, t] = sg_chirp(beta, f_start, f_end, Dim)
[y, t] = sg_chirp(beta, f_start, f_end, Dim, OSF)
[y, t] = sg_chirp(beta, f_start, f_end, Dim, OSF, SNR)

Description
This command synthesizes a multi-component linear frequency modulated
complex-valued (chirp) signal y specified by its complex amplitude beta, the start
frequency f_start and the end frequency f_end. For multi-component signals,
these parameters must be vectors of the same length. The resulting signal consists
of Dim signal samples and is over-sampled with respect to the Nyquist-frequency
as specified by the over-sampling factor OSF (OSF = 1 by default). The signal can
be embedded in a white noise sequence, such that the resulting signal provides a
signal to noise ratio of SNR in dB. By default no noise is added. The return
argument t contains the corresponding time axis, which is scaled to the chosen
over-sampling.

Examples
This example synthesizes and plots a one-dimensional complex-valued signal of
two superimposed weighted chirp signals with different center frequency and
bandwidth parameters. The signal is over-sampled for an improved visualization.

sg_chirp(ones(2,1), [-0.4 0.2], [-0.3 0.1], 100, 5, 30);

See Also
sg_sinusoid, sg_cissoid, sg_cissoid_2d, sg_cissoid_3d, sg_cissoid_4d,
sg_wideband, add_noise

74
SALP-Toolbox Reference Guide sg_cissoid

sg_cissoid

Purpose
Synthesizes a multi-component complex-valued one-dimensional harmonic
signal.

Synopsis
[y, t] = sg_cissoid(beta, f, Dim)
[y, t] = sg_cissoid(beta, f, Dim, OSF)
[y, t] = sg_cissoid(beta, f, Dim, OSF, SNR)

Description
This command synthesizes a multi-component complex-valued harmonic signal y
specified by its complex amplitude beta and the frequency f. For multi-
component signals, these parameters must be vectors of the same length. The
resulting signal consists of Dim signal samples and is over-sampled with respect
to the Nyquist-frequency as specified by the over-sampling factor OSF (OSF = 1
by default). The signal can be embedded in a white noise sequence, such that the
resulting signal provides a signal to noise ratio of SNR in dB. By default no noise
is added. The return argument t contains the corresponding time axis, which is
scaled to the chosen over-sampling.

Examples
This example synthesizes and plots a one-dimensional complex-valued signal of
four superimposed weighted harmonic components in white noise. The signal is
over-sampled for an improved visualization.

sg_cissoid([1 0.3 0.5 0.7 ], [0.1 0.2 0.25 0.48], 100, 5, 30);

See Also
sg_sinusoid, sg_chirp, sg_cissoid_2d, sg_cissoid_3d, sg_cissoid_4d,
sg_wideband, add_noise

75
sg_cissoid_2d SALP-Toolbox Reference Guide

sg_cissoid_2d

Purpose
Synthesizes a multi-component complex-valued harmonic two-dimensional
signal.

Synopsis
[y, t1, t2] = sg_cissoid_2d(beta, f1, f2, Dim)
[y, t1, t2] = sg_cissoid_2d (beta, f1, f2, Dim, OSF)
[y, t1, t2] = sg_cissoid_2d (beta, f1, f2, Dim, OSF, SNR)

Description
This command synthesizes a two-dimensional multi-component complex-valued
harmonic signal y specified by its complex amplitude beta and the frequencies f1
and f2. For multi-component signals, these parameters must be vectors of the
same length. The dimensions are specified in vector dim and the signal is over-
sampled with respect to the Nyquist-frequency as specified by the over-sampling
factors in vector OSF (OSF = 1 for both dimensions by default). The signal can be
embedded in a white noise sequence, such that the resulting signal provides a
signal to noise ratio of SNR in dB. By default no noise is added. The return
arguments t1 and t2 contain the corresponding axis description, which is scaled
to the chosen over-sampling.

Examples
This example synthesizes a two-dimensional complex-valued signal of four
superimposed weighted harmonic components in white noise. The signal is
Fourier transformed and the squared envelope of the two-dimensional line-
spectrum is plotted.

sg_cissoid_2d([1 0.3 0.5 0.7 ], [0.1 0.2 0.25 0.48], [0.4 0.32 0.15 0.4],
[100 100], [5 5], 30);

See Also
sg_sinusoid, sg_chirp, sg_cissoid, sg_cissoid_3d, sg_cissoid_4d,
sg_wideband, add_noise

76
SALP-Toolbox Reference Guide sg_cissoid_3d

sg_cissoid_3d

Purpose
Synthesizes a multi-component complex-valued harmonic three-dimensional
signal.

Synopsis
[y, t1, t2, t3] = sg_cissoid_3d(beta, f1, f2, f3, Dim)
[y, t1, t2, t3] = sg_cissoid_3d (beta, f1, f2, f3, Dim, OSF)
[y, t1, t2, t3] = sg_cissoid_3d (beta, f1, f2, f3, Dim, OSF, SNR)

Description
This command synthesizes a three-dimensional multi-component complex-valued
harmonic signal y specified by its complex amplitude beta and the frequencies f1,
f2 and f3. For multi-component signals, these parameters must be vectors of the
same length. The dimensions are specified in vector dim and the signal is over-
sampled with respect to the Nyquist-frequency as specified by the over-sampling
factors in vector OSF (OSF = 1 for every dimension by default). The signal can be
embedded in a white noise sequence, such that the resulting signal provides a
signal to noise ratio of SNR in dB. By default no noise is added. The return
arguments t1, t2 and t3 contain the corresponding axis description, which is
scaled to the chosen over-sampling.

Examples
This example synthesizes and plots a three-dimensional complex-valued signal
with one weighted harmonic component in white noise. The signal is over-
sampled in every domain for an improved visualization.

sg_cissoid_3d(1, 0.5, 0.25, 0.45, [10 10 10], [5 5 5], 40);

See Also
sg_sinusoid, sg_chirp, sg_cissoid, sg_cissoid_2d, sg_cissoid_4d,
sg_wideband, add_noise

77
sg_cissoid_4d SALP-Toolbox Reference Guide

sg_cissoid_4d

Purpose
Synthesizes a multi-component complex-valued harmonic four-dimensional
signal.

Synopsis
[y, t1, t2, t3, t4] = sg_cissoid_3d(beta, f1, f2, f3, f4, Dim)
[y, t1, t2, t3, t4] = sg_cissoid_3d (beta, f1, f2, f3, f4, Dim, OSF)
[y, t1, t2, t3, t4] = sg_cissoid_3d (beta, f1, f2, f3, f4, Dim, OSF, SNR)

Description
This command synthesizes a four-dimensional multi-component complex-valued
harmonic signal y specified by its complex amplitude beta and the frequencies f1,
f2, f3 and f4. For multi-component signals, these parameters must be vectors of
the same length. The dimensions are specified in vector dim and the signal is
over-sampled with respect to the Nyquist-frequency as specified by the over-
sampling factors in vector OSF (OSF = 1 for every dimension by default). The
signal can be embedded in a white noise sequence, such that the resulting signal
provides a signal to noise ratio of SNR in dB. By default no noise is added. The
return arguments t1, t2, t3 and t4 contain the corresponding axis description,
which is scaled to the chosen over-sampling.

Examples
This example synthesizes and plots a three-dimensional complex-valued signal
with two superimposed weighted harmonic components without additional noise.
The signal is over-sampled in every domain for an improved visualization.

sg_cissoid_4d([1 1], [0 0.1], [0 0.2], [0 0.3], [0 0.4], [10 10 10 10], [5 5 5


5], inf);

See Also
sg_sinusoid, sg_chirp, sg_cissoid, sg_cissoid_2d, sg_cissoid_3d,
sg_wideband, add_noise

78
SALP-Toolbox Reference Guide sg_sinusoid

sg_sinusoid

Purpose
Synthesizes a multi-component real-valued one-dimensional harmonic signal.

Synopsis
[y, t] = sg_sinusoid(beta, f, Dim)
[y, t] = sg_sinusoid(beta, f, Dim, OSF)
[y, t] = sg_sinusoid(beta, f, Dim, OSF, SNR)

Description
This command synthesizes a multi-component real-valued harmonic signal y
specified by its complex amplitude beta and the frequency f. For multi-
component signals, these parameters must be vectors of the same length. The
resulting signal consists of Dim signal samples and is over-sampled with respect
to the Nyquist-frequency as specified by the over-sampling factor OSF (OSF = 1
by default). The signal can be embedded in a white noise sequence, such that the
resulting signal provides a signal to noise ratio of SNR in dB. By default no noise
is added. The return argument t contains the corresponding time axis, which is
scaled to the chosen over-sampling.

Examples
This example synthesizes and plots a one-dimensional real-valued signal of four
superimposed weighted harmonic components in white noise. The signal is over-
sampled for an improved visualization.

sg_sinusoid([1 0.3 0.5 0.7 ], [0.1 0.2 0.25 0.48], 100, 5, 30);

See Also
sg_chirp, sg_cissoid, sg_cissoid_2d, sg_cissoid_3d, sg_cissoid_4d,
sg_wideband, add_noise

79
sg_wideband SALP-Toolbox Reference Guide

sg_wideband

Purpose
Synthesizes a complex-valued wideband signal (comparable to colored noise).

Synopsis
[y, t] = sg_wideband(beta, f1, f2, Dim)
[y, t] = sg_wideband(beta, f1, f2, Dim, OSF)

Description
This command synthesizes a complex-valued wideband signal y specified by its
complex amplitude beta and the start and stop frequency f1 and f2. The resulting
signal consists of Dim signal samples and is over-sampled with respect to the
Nyquist-frequency as specified by the over-sampling factor OSF (OSF = 1 by
default). The return argument t contains the corresponding time axis, which is
scaled to the chosen over-sampling.

Examples
This example synthesizes and plots a complex-valued wideband signal within the
frequency interval of 0.1 Hz < f < 0.3 Hz. The signal is over-sampled for an
improved visualization.

sg_wideband(1, 0.1, 0.3, 1000, 5);

See Also
sg_chirp, sg_sinusoid, sg_cissoid, sg_cissoid_2d, sg_cissoid_3d,
sg_cissoid_4d, add_noise

80
SALP-Toolbox Reference Guide smooth_2d

smooth_2d

Purpose
Subspace smoothing and stacking operation to generate an observation matrix of a
two-dimensional signal for subspace based estimation schemes.

Synopsis
[Y, K_Seg] = smooth_2d(y, N1_Seg, N2_Seg)

Description
The two-dimensional signal y is divided into K_Seg segments having maximum
overlap with dimension [N1_Seg  N2_Seg] and reshaped to a vector
representation by employing a column-wise stacking operation. The vectors of
every segment form the observation matrix Y. For more details refer to [8].

See Also
uni_esprit_2d, smooth_3d, smooth_4d

81
smooth_3d SALP-Toolbox Reference Guide

smooth_3d

Purpose
Subspace smoothing and stacking operation to generate an observation matrix of a
three-dimensional signal for subspace based estimation schemes.

Synopsis
[Y, K_Seg] = smooth_3d(y, N1_Seg, N2_Seg, N3_Seg)

Description
The three-dimensional signal y is divided into K_Seg segments having maximum
overlap with dimension [N1_Seg  N2_Seg  N3_Seg] and reshaped to a vector
representation by employing a stacking operation. The vectors of every segment
form the observation matrix Y. For more details refer to [8].

See Also
uni_esprit_3d, smooth_2d, smooth_4d

82
SALP-Toolbox Reference Guide smooth_4d

smooth_4d

Purpose
Subspace smoothing and stacking operation to generate an observation matrix of a
four-dimensional signal for subspace based estimation schemes.

Synopsis
[Y, K_Seg] = smooth_4d(y, N1_Seg, N2_Seg, N3_Seg, N4_Seg)

Description
The four-dimensional signal y is divided into K_Seg segments having maximum
overlap with dimension [N1_Seg  N2_Seg  N3_Seg  N4_Seg] and reshaped
to a vector representation by employing a stacking operation. The vectors of every
segment form the observation matrix Y. For more details refer to [8].

See Also
uni_esprit_4d, smooth_2d, smooth_3d

83
ssd SALP-Toolbox Reference Guide

ssd

Purpose
Computes the simultaneous Schur decomposition used for the Unitary-ESPRIT
joint 3-D, 4-D, …, m-D parameter estimation with automatic pairing.

Synopsis
[Ur, Theta, costfunc] = ssd(Upsilon)

Description
The solutions of the ESPRIT invariance equations are stacked to matrix Upsilon
and the simultaneous Schur Decomposition is computed, where Ur is the
decomposition of Upsilon and Theta is the transformation matrix. For diagnostics
the cost function costfunc of the underlying optimization procedure is returned.
For more details refer to [6,8].

See Also
uni_esprit_3d, uni_esprit_4d

84
SALP-Toolbox Reference Guide std_esprit

std_esprit

Purpose
Estimates the frequency parameters of a multi-component harmonic signal using
the ESPRIT algorithm.

Synopsis
[f, lambda] = std_esprit(y, p, N_Seg)
[f, lambda] = std_esprit(y, p, N_Seg, fs)

Description
This algorithm analyzes one-dimensional signal y composed of p complex-valued
harmonic components and returns estimates of the frequency parameters f and the
Eigenvalue sequence lambda of the corresponding covariance matrix. Since the
observed signal is segmented in overlapping segments for calculating the signal
and noise subspaces, parameter N_Seg specifies the number of samples within
one signal segment. Best results are obtained when the segment size is within the
interval N/2 < N_Seg < 2/3N with N the number of available samples. The return
argument f contains the corresponding frequency parameters, which are scaled to
the sampling frequency fs (1 Hz by default).

Examples
This example synthesizes a complex-valued signal composed of two closely
spaced spectral components. The signal is analyzed using the ESPRIT algorithm
and the frequency locations of the components are returned.

y = sg_cissoid([1 1], [0.24 0.26], 20, 1, 30);


f = std_esprit(y, 2, 15)

Algorithm
The ESPRIT algorithm exploits the shift invariance of the signal model and the
signal subspace, respectively, for extracting the frequency parameters
[8,12,14,15]. Forward-Backward averaging is included.

See Also
uni_esprit, root_music, em, relax, root_min_norm

85
uni_esprit SALP-Toolbox Reference Guide

uni_esprit

Purpose
Estimates the frequency parameters of a multi-component harmonic signal using
the Unitary-ESPRIT algorithm.

Synopsis
[f, lambda] = uni_esprit(y, p, N_Seg)
[f, lambda] = uni_esprit(y, p, N_Seg, fs)

Description
This algorithm analyzes one-dimensional signal y composed of p complex-valued
harmonic components and returns estimates of the frequency parameters f and the
Eigenvalue sequence lambda of the corresponding covariance matrix. Since the
observed signal is segmented in overlapping segments for calculating the signal
and noise subspaces, parameter N_Seg specifies the number of samples within
one signal segment. Best results are obtained when the segment size is within the
interval N/2 < N_Seg < 2/3N with N the number of available samples. The return
argument f contains the corresponding frequency parameters, which are scaled to
the sampling frequency fs (1 Hz by default).

Examples
This example synthesizes a complex-valued signal composed of two closely
spaced spectral components. This signal is analyzed by the Unitary-ESPRIT
algorithm and the frequency locations of the components are returned.

y = sg_cissoid([1 1], [0.24 0.26], 20, 1, 30);


f = uni_esprit(y, 2, 15)

Algorithm
The ESPRIT algorithm exploits the shift invariance of the signal model and the
signal subspace, respectively, for extracting the frequency parameters. In contrast
to the standard ESPRIT algorithm for the Unitary-ESPRIT only real-valued
computations are necessary, which reduces the computational complexity. For
more details refer to [7,8,18]

See Also
std_esprit, root_music, em, relax, root_min_norm

86
SALP-Toolbox Reference Guide uni_esprit_2d

uni_esprit_2d

Purpose
Estimates the frequency parameters of a multi-component two-dimensional
harmonic signal using the Unitary-ESPRIT algorithm.

Synopsis
[f1, f2, lambda] = uni_esprit_2d(y, p, N_Seg)
[f1, f2, lambda] = uni_esprit_2d(y, p, N_Seg, fs)

Description
This algorithm analyzes one-dimensional signal y composed of p complex-valued
harmonic components and returns estimates of the frequency parameters f and the
Eigenvalue sequence lambda of the corresponding covariance matrix. Since the
observed signal is segmented in overlapping segments for calculating the signal
and noise subspaces, vector N_Seg specifies the number of samples within one
signal segment in each dimension. Best results are obtained when the segment
size is within the interval N/2 < N_Seg < 2/3N with N the number of available
samples. The return argument f1 and f2 contains the corresponding frequency
parameters, which are scaled to the sampling frequencies in vector fs (1 Hz for
both dimensions by default).

Examples
This example synthesizes a complex-valued two-dimensional signal composed of
two closely spaced spectral components. This signal is analyzed by the Unitary-
ESPRIT algorithm and the frequency locations of the components are returned.

y = sg_cissoid_2d([1 1], [0.24 0.26] , [0.24 0.26], [20 10], [1 1], 30);
[f1, f2] = uni_esprit_2d(y, 2, [15 5])

Algorithm
The ESPRIT algorithm exploits the shift invariance of the signal model and the
signal subspace, respectively, for extracting the frequency parameters. In contrast
to the standard ESPRIT algorithm for the Unitary-ESPRIT only real-valued
computations are necessary, which reduces the computational complexity.
Automatic pairing of the signal parameters is guaranteed by joint EVD of the
solutions of the two shift-variance equations. For more details refer to [7,8,18]

See Also
psd_period_2d, sage_2d, relax_2d

87
uni_esprit_3d SALP-Toolbox Reference Guide

uni_esprit_3d

Purpose
Estimates the frequency parameters of a multi-component three-dimensional
harmonic signal using the Unitary-ESPRIT algorithm.

Synopsis
[f1, f2, f3, lambda] = uni_esprit_3d(y, p, N_Seg)
[f1, f2, f3, lambda] = uni_esprit_3d(y, p, N_Seg, fs)

Description
This algorithm analyzes one-dimensional signal y composed of p complex-valued
harmonic components and returns estimates of the frequency parameters f and the
Eigenvalue sequence lambda of the corresponding covariance matrix. Since the
observed signal is segmented in overlapping segments for calculating the signal
and noise subspaces, vector N_Seg specifies the number of samples within one
signal segment in each dimension. Best results are obtained when the segment
size is within the interval N/2 < N_Seg < 2/3N with N the number of available
samples. The return argument f1, f2 and f3 contains the corresponding frequency
parameters, which are scaled to the sampling frequencies in vector fs (1 Hz for
every dimension by default).

Examples
This example synthesizes a complex-valued three-dimensional signal composed
of two closely spaced spectral components. This signal is analyzed by the
Unitary-ESPRIT algorithm and the frequency locations of the components are
returned. Calculation of this example takes a few seconds depending on the
performance of the employed system

y = sg_cissoid_3d([1 1], [0.24 0.26] ,[0.24 0.26] ,[0.24 0.26], [20 10 10],
[], 30);
[f1, f2, f3] = uni_esprit_3d(y, 2, [15 5 2])

Algorithm
The ESPRIT algorithm exploits the shift invariance of the signal model and the
signal subspace, respectively, for extracting the frequency parameters. In contrast
to the standard ESPRIT algorithm for the Unitary-ESPRIT only real-valued
computations are necessary, which reduces the computational complexity.
Automatic pairing of the signal parameters is guaranteed by using a SSD of the
solutions of the three shift-variance equations. For more details refer to [6,7,8,18]

See Also

88
SALP-Toolbox Reference Guide uni_esprit_3d

uni_esprit, uni_esprit_2d, uni_esprit_4d

89
uni_esprit_4d SALP-Toolbox Reference Guide

uni_esprit_4d

Purpose
Estimates the frequency parameters of a multi-component four-dimensional
harmonic signal using the Unitary-ESPRIT algorithm.

Synopsis
[f1, f2, f3, f4, lambda] = uni_esprit_4d(y, p, N_Seg)
[f1, f2, f3, f4, lambda] = uni_esprit_4d(y, p, N_Seg, fs)

Description
This algorithm analyzes one-dimensional signal y composed of p complex-valued
harmonic components and returns estimates of the frequency parameters f and the
Eigenvalue sequence lambda of the corresponding covariance matrix. Since the
observed signal is segmented in overlapping segments for calculating the signal
and noise subspaces, vector N_Seg specifies the number of samples within one
signal segment in each dimension. Best results are obtained when the segment
size is within the interval N/2 < N_Seg < 2/3N with N the number of available
samples. The return argument f1, f2, f3 and f4 contains the corresponding
frequency parameters, which are scaled to the sampling frequencies in vector fs (1
Hz for every dimension by default).

Examples
This example synthesizes a complex-valued four-dimensional signal composed of
two closely spaced spectral components. This signal is analyzed by the Unitary-
ESPRIT algorithm and the frequency locations of the components are returned.
Calculation of this example takes a few minutes depending on the performance of
the employed system

y = sg_cissoid_4d([1 1], [0.24 0.26], [0.24 0.26], [0.24 0.26], [0.2 0.4],
[10 10 10 5], [2 2 1 1], 30);
[f1, f2, f3, f4] = uni_esprit_4d(y, 2, [5 5 2 2], [2 2 1 1])

Algorithm
The ESPRIT algorithm exploits the shift invariance of the signal model and the
signal subspace, respectively, for extracting the frequency parameters. In contrast
to the standard ESPRIT algorithm for the Unitary-ESPRIT only real-valued
computations are necessary, which reduces the computational complexity.
Automatic pairing of the signal parameters is guaranteed by using a SSD of the
solutions of the four shift-variance equations. For more details refer to [6,7,8,18]

See Also
90
SALP-Toolbox Reference Guide uni_esprit_4d

uni_esprit, uni_esprit_2d, uni_esprit_3d

91
window_2d SALP-Toolbox Reference Guide

window_2d

Purpose
Can be used for windowing/weighting of a two-dimensional signal.

Synopsis
[y_win, scale] = window_2d(y, wintype)

Description
The two-dimensional signal y is windowed by a two-dimensional function with a
weighting characteristic specified by the string in wintype (‘boxcar’, ‘triang’,
‘bartlett’, ‘hanning’, ‘hamming’, ‘blackman’). The windowed signal y_win as
well as a scaling factor scale, i.e., the mean value of the weighting function for
power or energy compensation of the weighted signal, respectively, is returned.

See Also
psd_period_2d

92
SALP-Toolbox Reference Guide References

References
[1] B. Buttkus, "Spectral Analysis and Filter Theory in Applied Geophysics” Springer-
Verlag, Berlin, 2000.

[2] P. M. Djuric and S. M. Kay, “Parameter Estimation of Chirp Signals”, IEEE


Transactions on Acoustic Speech and Signal Processing, vol. 38, pp. 2118-2126,
December 1990

[3] D.E. Dudgeon and R.M. Mersereau, “Multidimensional Digital Signal Processing,
Prentice-Hall, New Jersey, 1984

[4] M. Feder and E. Weinstein, „Parameter Estimation of Superimposed Signals Using the
EM Algorithm”, IEEE Transactions on Acoustics, Speech and Signal Processing, vol.
36, no. 4, pp. 477-489, April 1988

[5] J. A. Fessler, A.O. Hero: “Space-Alternating Generalized Expectation-Maximization


Algorithm”, IEEE Transactions on Signal Processing, vol. 42, no. 10, October 1994,
pp. 2664-2676

[6] M. Haardt, and J.A. Nossek: “Simultaneous Schur Decomposition of Several


Nonsymmetric Matrices to Achieve Automatic Pairing in Multidimensional Harmonic
Retrieval Problems”, IEEE Trans. Signal Processing, Vol. 46, No. 1, January 1998, pp.
161-169

[7] M. Haardt and J. Nossek: “Unitary ESPRIT: How to Obtain Increased Accuracy with a
Reduced Computational Burden”, IEEE Trans. Signal Processing, Vol. 43, No. 5, May
1995, pp. 1232-1242

[8] M. Haardt: “Efficient One-, Two- and Multi-Dimensional High-Resolution Array


Processing”, Doctoral thesis at the Technical University of Munich, Shaker Verlag,
Aachen, 1996, ISBN 3-8265-2220-6

[9] S. Haykin: “Adaptive Filter Theory”, Third Edition, Prentice-Hall Inc., Englewood
Cliffs, New Jersey, 1991

[10] S. M. Kay and S. L. Marple: “Spectrum Analysis – A Modern Perspective”,


Proceedings of the IEEE, vol. 69, no. 11, pp. 1380-1419, November 1981

[11] J. Li and P. Stoica: “Efficient Mixed-Spectrum Estimation with Applications to Target


Feature Extraction”, IEEE Transactions on Signal Processing, vol. 44, no. 2, February
1996, pp. 281-295

93
References SALP-Toolbox Reference Guide

[12] S. U. Pillai, “Array Signal Processing“, Springer-Verlag, New York, 1989

[13] S. Semmelrodt, “Maximum Likelihood Based Chirp Parameter Estimation of Multi-


Component Signals”, accepted for FREQUENZ, No. 1-2, 2004

[14] S. Semmelrodt, “Methods for Predictive Channel Estimation for Adaptive


Transmission Techniques in Mobile Communications”, Doctoral thesis at the
University of Kassel (in german), Kassel, 2003

[15] P. Stoica and R. Moses: “Introduction to Spectral Analysis”, Prentice Hall, New York,
1997

[16] The Math Works Inc., Signal Processing Toolbox - User’s Guide, Release 11.1, 2000

[17] B. Völcker and B. Ottersten, “Chirp Parameter Estimation from a Sample Covariance
Matrix”, IEEE Transactions on Signal Processing, vol. 49, no. 3, pp. 603-612, March
2001

[18] M.D. Zoltowski, M. Haardt and C.P. Mathews: “Closed Form 2-D Angle Estimation
with Rectangular Arrays in Element Space or Beamspace via Unitary ESPRIT”, IEEE
Trans. Signal Processing, Vol. 44, No. 2, February 1996, pp. 316-327

[19] L. Zou and B. Liu, On Resolving Two-Dimensional Sinusoids in White Noise Using
Different Spectral Estimates, IEEE Transactions on Acoustics, Speech and Signal
Processing, vol. 36, no. 8, pp. 1338-1349, August 1988

94

You might also like