Signal Processing Toolbox |
The following sections describe the Vector Transition Processing demo.
Vector Transition Demo--Background Information
In addition to spectral analysis, you can use windowing functions to obtain good spectral performance for time-limited functions. Good spectral performance, in this context, is reasonably good rejection of high-frequency energy components for a finite-duration waveform.
High-frequency energy can create problems in mechanical systems with weakly damped resonances. Exciting these resonances causes the system to have a prolonged settling time. One way to improve the settling time is to reduce the energy in frequencies near a resonance, hence the desire to reduce high-frequency energy.
Another advantage of reducing high-frequency content occurs in linear systems with finite bandwidth. Such a system tends to reject input frequencies that exceed the system bandwidth. In a closed-loop system, such as mechanical servos or phase locked loop (PLL), tracking errors occur because the system is not able to follow the input waveform. By reducing high-frequency content, tracking performance is improved.
Reducing Settling Time by Smoothing
This example uses an elliptical filter to demonstrate reducing settling time by smoothing. The filter input is an abrupt step, which includes lots of high-frequency energy. The resulting output oscillates and has a prolonged settling time. Next, a smoothed step implemented with a sine function is input to the same filter. The ringing is much less and the settling time is improved.
[b,a] = ellip(10,2,10,0.5) stepI = ones(1,100); % abrupt step yI = filter(b,a,stepI); stepIS = [0.5*(1-cos(pi*(0:16)/16)) ones(1,83)];% sine curve yS = filter(b,a,stepIS); % smoothed plot([yI; yS]'); legend('Step Input','Smoothed Step');
Using Windows for Smoothing
Using the same elliptical filter example as above, but taking the first derivative of the sinusoidal smoothing function produces an output that resembles a spectral window.
derM = [0 diff(stepIS(1:18))]/0.0975; winH = hann(length(derM)); plot([derM' winH]); legend('Derivative of Smoothed Step','Hann Window');
Conversely, integrating a Hann window produces a smoothed step. Passing this new windowed step through the same elliptical filter produces similar performance improvements.
windowF = cumsum(hann(17))'; stepIW = [ windowF/windowF(end) ones(1,100-length(windowF))]; yW = filter(b,a,stepIW); plot([yI; yS; yW]'); legend('Step Input','Smoothed Step', 'Window-based Step');
If you zoom on the resulting waveforms at time t = 20, you see that the windowed input produces even less ripple in the settled output. This is due to the reduced energy content in the windowed waveform in the vicinity of the elliptical filter's resonance frequency.
For more information, see Dowd, A and Thanos, M. "Vector Motion Processing Using Spectral Windows." IEEE Control Magazine. Oct. 2000. p. 8-19.
Other Sidebar Buttons | Example--Airplane Takeoff |
© 1994-2005 The MathWorks, Inc.