system identification & parameter estimation · system identification & parameter...
TRANSCRIPT
March 13, 2007
1
System Identification & Parameter Estimation
Lecture 6: Perturbation signal design
WB2301
Alfred C. Schouten ([email protected])
Faculty of 3MEDepartment of Biomechanical Engineering
March 13, 2007 2
Contents
• Sources for error in estimators: • Aliasing• Leakage• Signal-to-noise ratio
• Improve the estimate• Optimal perturbation signals• Filtered white noise• Multisine signals
March 13, 2007 3
Recording of signals
• In practical situations a limited time is recorded and digitized with a given sample frequency
• What errors can/do occur as a result• The sampling theorem (also Nyquist or Shannon)
• Signal > Fs/2 => aliasing• Resolution in frequency domain
• Δf=T-1
• What if frequency does not ‘fit’ on Δf
March 13, 2007 4
Example aliasing• Matlab: AliasingDemo.m
• 9 Hz sine• Fs = 10 Hz
• 9 Hz sine > Fs/2, and a 1 Hz sine is ‘seen’.
• Frequencies above the Nyquist frequency are mirrored
March 13, 2007 5
How to prevent aliasing
• Apply anti-aliasing filter, before digitizing!• Analog filter! • Rule of thumb: sample frequency should be at least
2.5 times the cut-off frequency (preferably more)
March 13, 2007 6
Example leakage• Matlab: LeakageDemo.m
• 1 second observation=> resolution: 1Hz
• 5 Hz and 5.5 Hz sine
• Only frequencies with integer number of period are correctly observed!• Other frequencies will ‘leak’ to neighboring frequencies
March 13, 2007 7
Effect of observation time
• Signal has infinite and a finite observation is made• Theoretical concept: signal is multiplied with a
window• window(t) = 1 within observation time• window(t) = 0 elsewhere
• What is effect of windowing?
March 13, 2007 8
Window and it’s Fourier transform• Note: multiplication in time-domain is convolution in frequency-domain (and vice versa)
March 13, 2007 9
Theory leakage
March 13, 2007 10
Theory leakage
March 13, 2007 11
How to prevent leakage
• White noise contains all frequencies, so leakage will always occur (at least in theory)
• Can we make ‘leakage’ free signals?
March 13, 2007 12
Signal-to-Noise ratio
• SNR: ratio between signal power and noise power• Definition:
⎟⎟⎠
⎞⎜⎜⎝
⎛=⎟⎟
⎠
⎞⎜⎜⎝
⎛=
⎟⎟⎠
⎞⎜⎜⎝
⎛==
noise
signal
noise
signal
noise
signal
noise
signal
AA
PP
dBSNR
AA
PP
SNR
log20log10)( 1010
2
March 13, 2007 13
Signal-to-Noise Ratio (SNR)
• Improve SNR by increasing signal (u), or decreasing noise (n)
• Increase signal: turn up the volume!• Decrease noise: average (in time or frequency)
? y(t)u(t)
n(t)
March 13, 2007 14
Ideal perturbation
Properties• Persistently exciting• Introducing no bias and varianceAdditional• Long enough to gain sufficient frequency resolution• Short enough to limit measurement time
(Humans: fatigue, attention, etc)
March 13, 2007 15
White noise vs. colored noise
• White noise • Leakage and aliasing, bad SNR
• Colored noise (=filtered white noise)• Improved SNR, no aliasing, leakage not solved. • Note that discrete noise is ‘colored’ by sample
frequency
March 13, 2007 16
Example colored noise: boost the signal
• Matlab: ColoredNoise.m
• If white and colored noise have the same variance• The power in colored noise is concentrated in a limited
number of frequencies • => the power per frequency will be higher (parseval!)• => better SNR (within the bandwidth)
March 13, 2007 17
Improving the estimate 1
Bias (structural errors):• Main causes
• finite observation of stochastic input (leakage!)• frequency averaging
• Cure• application of 'leakage free' deterministic
perturbation signals• moderate frequency averaging• apple method that do not need frequency averaging
March 13, 2007 18
Improving the estimate 2
Variance (random errors):• Main causes
• noise• Cure
• improve SNR• averaging (time or frequency domain)
March 13, 2007 19
Multisine signals• With a limited observation time only the frequencies
with an integer number of period can be ‘seen’ by spectral estimators.
• Idea: construct signal with all frequencies with integer number op period
• => Multisine signals
• Advantages:• no leakage, no aliasing• better SNR compared to white noise
March 13, 2007 20
Example multisine signal
• Matlab: xxx.m
• If white noise and multisine have same variance• The power in multisine is concentrated in a limited
number of frequencies • => the power per frequency is higher in multisine
(parseval!)• => better SNR• => no leakage, no aliasing
March 13, 2007 21
Cresting
• A multisine signal (as white noise) has many outliers• Probability density function is gaussian (matlab)• Reduces the variance of the multisine signal, by
removing outliers: cresting• Crest factor = max|x(t)| / σx
• Even more improved SNR
March 13, 2007 22
More advanced multisine tricksBasically two possibilities to improve multisine• Reduce number of frequencies
• Power per frequency can be increased, better SNR• Example: linear frequency spacing• Example: (quasi-)logarithmic frequency spacing
• Shape of the gain per frequency• shape input signal such that output signal becomes
flat (ideal case for white noise disturbance on the output)
• shape input signal such that output signal has same shape as output noise
March 13, 2007 23
Reducing variance
• Average in time• Losing frequency resolution• Improves SNR
• Average adjacent frequencies• Can introduce bias
• Average in frequency domain• Multiple realizations or chop in multiple segments. Calculate
spectral densities for each segment and average spectral densities over the segments (‘Welch’ method)
• Losing frequency resolution• Improves SNR
March 13, 2007 24
Assignment 6: compare the signals
Effect of perturbation signal on estimate of the FRF:• White noise• Filtered white noise• Multisine• Crested multisine• Crested multisine with gain optimized for system• Logarithmically-distributed crested multisine• Log-distributed crested multisine with optimized gain
March 13, 2007 25
Next week
• So far identification of SISO systems in open and closed loop• SISO: single-input single-output
Next week:• Multivariable closed-loop system identification
• MIMO: multi-input multi-output