Download presentation
Presentation is loading. Please wait.
Published byGrant Todd Modified over 9 years ago
1
CHEE825 Fall 2005J. McLellan1 Spectral Analysis and Input Signal Design
2
CHEE825 Fall 2005J. McLellan2 Outline Fourier series Fourier transforms »continuous »discrete frequency spectrum spectra and dynamic elements input signal design in the frequency domain
3
CHEE825 Fall 2005J. McLellan3 Projection of Vectors Suppose we have a vector u, and we want to approximate it as the sum of two orthonormal vectors v and w - - optimal solution in least squares sense where is an inner product (dot product) residual is orthogonal to space spanned by v and w
4
CHEE825 Fall 2005J. McLellan4 Projection of Vectors Picture u v w space spanned by v and w
5
CHEE825 Fall 2005J. McLellan5 Periodic Functions and Inner Products Defn: A function f(t) is periodic if f(t+T) = f(t). Suppose the period of the function is T, and define the following inner product for functions defined on [-T/2,T/2]: functions on this interval are now the vectors this inner product maps vectors (functions on the interval) into real numbers
6
CHEE825 Fall 2005J. McLellan6 Orthogonal Bases of Periodic Functions Example {sin(kt), cos(kt)} form an orthogonal basis with respect to this inner product - with T= 2 Example { } form an orthonormal basis with respect to the following inner product where overbar denotes complex conjugate, and
7
CHEE825 Fall 2005J. McLellan7 Approximation of Periodic Functions If we have a function with period T, choose sinusoids (or complex sinusoids) with frequencies that are multiples of in order align basis with period of function. The orthogonal basis is now { } Fourier series can be developed in terms of sines and cosines, or in terms of exponentials »exponentials are more succinct, and I will use these.
8
CHEE825 Fall 2005J. McLellan8 Fourier Series Given the orthogonal basis { }, we can approximate the periodic function f(t) with period T as
9
CHEE825 Fall 2005J. McLellan9 Fourier Series Conceptual analogy v w space spanned by v and w
10
CHEE825 Fall 2005J. McLellan10 Fourier Series Issues –convergence –functions that can be approximated –definition of integral
11
CHEE825 Fall 2005J. McLellan11 What if f(t) is non-periodic? Suppose f(t) is defined on an interval [-T/2, T/2] but is not periodic. To create a periodic function, define the periodic extension of f(t): “cut and paste” to create periodic function defined on real line
12
CHEE825 Fall 2005J. McLellan12 Fourier Series of Non-Periodic Functions Work with periodic extension:
13
CHEE825 Fall 2005J. McLellan13 Towards the Fourier Transform Note that if the fundamental frequency is then and we can write the Fourier series for f * (t) as
14
CHEE825 Fall 2005J. McLellan14 Towards the Fourier Transform What if we let ? Now which is in the form of a Riemann sum
15
CHEE825 Fall 2005J. McLellan15 Towards the Fourier Transform Riemann sum Now
16
CHEE825 Fall 2005J. McLellan16 Fourier Transform Given function f(t), define F(w) as the Fourier transform of f(t):
17
CHEE825 Fall 2005J. McLellan17 Fourier Transforms of Sampled Signals Suppose that f(t) is sampled at a sampling period T s, i.e., we have { f(kT s ) }. In order to take the Fourier transform of the sampled signal, we can paste it back together using the impulse sampling representation: paste together using “stick” functions - impulse function
18
CHEE825 Fall 2005J. McLellan18 Towards the Discrete Fourier Transform Now take the Fourier transform of the impulse-sampled function:
19
CHEE825 Fall 2005J. McLellan19 Discrete Fourier Transform Given a sampled signal { f(kT s ) }, Note that because of sampling, we have periodicity on the interval so we need only consider F(w) on this interval.
20
CHEE825 Fall 2005J. McLellan20 Energy in a Signal Given a continuous signal f(t) defined on [-T/2,T/2], the squared magnitude (norm) of the signal can be defined in terms of the inner product: In terms of the Fourier series representation of f(t), this yields where Parseval’s Relation
21
CHEE825 Fall 2005J. McLellan21 Energy in a Signal The Fourier coefficients describe the breakout of energy in the signal by frequency. We can plot them as a function of frequency. E.g., for the sawtooth wave expansion - Energy is distributed at low frequencies
22
CHEE825 Fall 2005J. McLellan22 Energy in a Signal - via Fourier Transform We can examine the frequency content in a signal via the Fourier transform by plotting versus frequency. We can follow a similar approach using the Discrete Fourier Transform (DFT) to analyze the energy distribution by frequency in a sampled signal.
23
CHEE825 Fall 2005J. McLellan23 The Spectrum of a Stochastic Signal The spectrum (spectral density) of a stochastic signal is defined as the discrete Fourier transform of its autocovariance function:
24
CHEE825 Fall 2005J. McLellan24 Properties of the Spectrum 1. Since the autocovariance is an even function the spectrum is a real-valued function. Why? - next slide 2. Since cos is an even function, the spectrum is symmetric about the origin.
25
CHEE825 Fall 2005J. McLellan25 Why?
26
CHEE825 Fall 2005J. McLellan26 Example - Spectrum of an MA(1) Disturbance The MA(1) model is: with autocovariance function:
27
CHEE825 Fall 2005J. McLellan27 Example - Spectrum of MA(1) Disturbance Taking the DFT: Maple demo
28
CHEE825 Fall 2005J. McLellan28 Variance and the Spectrum We can recover the variance of the signal from the spectrum. Since we have the Fourier transform pair, then The variance is the area under the spectrum.
29
CHEE825 Fall 2005J. McLellan29 Spectra and Transfer Functions For single-input single-output transfer functions, we have the following: where
30
CHEE825 Fall 2005J. McLellan30 Check - MA(1) Disturbance Starting from the transfer function, we have Since we have
31
CHEE825 Fall 2005J. McLellan31 Sample Spectrum The spectrum can be estimated from sample autocovariance functions - “sample spectrum”. Note that the Fourier transform is taken over a finite record length –sample spectrum is an asymptotically unbiased estimator for the spectrum, in part because the sample autocovariance is an asymptotically unbiased estimator for the autocovariance Smoothing can be applied to the sample spectrum –involves weighting sample spectra values
32
CHEE825 Fall 2005J. McLellan32 Periodograms … are direct analyses of the frequency content in a signal »compute directly from data, instead of via the sample autocovariance function compute Fourier series over the finite data record length –requires inner product over the finite data record length, and different complex exponential basis functions that are orthogonal over the data record –basis functions are
33
CHEE825 Fall 2005J. McLellan33 Periodograms Fourier series coefficients are computed for the series in terms these basis functions squared magnitudes of coefficients vs. frequency (term number) indicates frequency breakdown in data
34
CHEE825 Fall 2005J. McLellan34 The Cross-Spectrum … is defined in a manner similar to the (auto)spectrum. Given the cross-covariance function between stochastic signals y and u, Transfer function relationship:
35
CHEE825 Fall 2005J. McLellan35 The Cross-Spectrum Note - Since the cross-covariance function is not necessarily even (symmetric about the origin), in general the cross-spectrum will be complex-valued Consider - Co-spectrum - real component Quadrature spectrum - imaginary component OR… Amplitude spectrum - magnitude Phase spectrum - phase angle
36
CHEE825 Fall 2005J. McLellan36 Input Signal Design Recall our general process+disturbance model: and the prediction error formulation: If our model structure is correct, then with perfect knowledge of the parameters, {e(t)} would be the random shocks driving the disturbance. What happens if there are differences in model structure?
37
CHEE825 Fall 2005J. McLellan37 Input Signal Design Model Bias Case: True plant - where {a(t)} is an iid random shock sequence. Examining the prediction errors under this scenario,
38
CHEE825 Fall 2005J. McLellan38 Input Signal Design The spectrum of the residuals {e(t)} is related to that of the input and random shocks: We can express the variance of the residuals as:
39
CHEE825 Fall 2005J. McLellan39 Input Signal Design Expanding The impact of the input signal design on residual variance due to model bias is
40
CHEE825 Fall 2005J. McLellan40 Bias-Oriented Designs If we choose a low frequency test signal, we are penalizing the prediction of low frequency process behaviour the greatest »bias will be reduced in low frequency range Recall our design cost function discussion earlier...
41
CHEE825 Fall 2005J. McLellan41 Experimental Design Objective Design input sequence to minimize the following: design cost errorin predictedfrequencyresponse importance function our design objectives difference in predicted vs. true behaviour - function of frequency, and the input signal used
42
CHEE825 Fall 2005J. McLellan42 Accounting for Model Error - Interpretation Optimal solution in terms of frequency content: spectral density frequency error in model vs. true process spectral density frequency importance to our application low high very important not important * J=
43
CHEE825 Fall 2005J. McLellan43 Accounting for Model Error Consider frequency content matching Goal - best model for final application is obtained by minimizing J JGeGeCjd jTjT frequency range ()()() 2 } bias in frequency content modeling } importance of matching - weighting function
44
CHEE825 Fall 2005J. McLellan44 Example - Importance Function for Model Predictive Control spectral density frequency high frequency disturbance rejection performed by base-level controllers - > accuracy not important in this range require good estimate of steady state gain, slower dynamics
45
CHEE825 Fall 2005J. McLellan45 Bias-Oriented Designs in Closed-Loop ID Recall from earlier that in the case of a dither signal w(t) introduced in closed-loop experimentation, our input is effectively The model is estimated between u(t) and y(t) pretending that it is open-loop: and the prediction error expression is again
46
CHEE825 Fall 2005J. McLellan46 Bias-Oriented Designs in Closed-Loop ID Now the output in this instance is and this leads to which can be simplified to:
47
CHEE825 Fall 2005J. McLellan47 Bias-Oriented Designs in Closed-Loop ID The variance of the residuals is: The imposition of closed-loop experimentation essentially introduces additional weighting by the “sensitivity function” of the true plant:
48
CHEE825 Fall 2005J. McLellan48 Bias-Oriented Designs in Closed-Loop ID Running the experiment in closed-loop introduces a component in the “importance function” that weights frequency prediction in the range associated with disturbance rejection / setpoint tracking.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.