Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts.

Slides:



Advertisements
Similar presentations
3. Systems and Transfer function
Advertisements

Digital Signal Processing IIR Filter IIR Filter Design by Approximation of Derivatives Analogue filters having rational transfer function H(s) can be.
Nonrecursive Digital Filters
Analog and Digital Control 1
Digital Signal Processing – Chapter 11 Introduction to the Design of Discrete Filters Prof. Yasser Mostafa Kadah
ELEN 5346/4304 DSP and Filter Design Fall Lecture 7: Z-transform Instructor: Dr. Gleb V. Tcheslavski Contact:
AMI 4622 Digital Signal Processing
Review of Frequency Domain
Laplace Transforms Important analytical method for solving linear ordinary differential equations. - Application to nonlinear ODEs? Must linearize first.
Lecture 19: Discrete-Time Transfer Functions
Frequency Response Methods and Stability
1 The Mathematics of Signal Processing - an Innovative Approach Peter Driessen Faculty of Engineering University of Victoria.
EE-2027 SaS, L18 1/12 Lecture 18: Discrete-Time Transfer Functions 7 Transfer Function of a Discrete-Time Systems (2 lectures): Impulse sampler, Laplace.
Computational Geophysics and Data Analysis
EE513 Audio Signals and Systems Digital Signal Processing (Systems) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
The sampling of continuous-time signals is an important topic It is required by many important technologies such as: Digital Communication Systems ( Wireless.
Discrete-Time and System (A Review)
DTFT And Fourier Transform
1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms.
Properties of the z-Transform
Sistem Kontrol I Kuliah II : Transformasi Laplace Imron Rosyadi, ST 1.
Motivation Music as a combination of sounds at different frequencies
CHAPTER 8 DSP Algorithm Implementation Wang Weilian School of Information Science and Technology Yunnan University.
Chapter 6 Digital Filter Structures
System Function of discrete-time systems
Z Transform Chapter 6 Z Transform. z-Transform The DTFT provides a frequency-domain representation of discrete-time signals and LTI discrete-time systems.
1 Z-Transform. CHAPTER 5 School of Electrical System Engineering, UniMAP School of Electrical System Engineering, UniMAP NORSHAFINASH BT SAUDIN
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
Z TRANSFORM AND DFT Z Transform
Motivation Thus far we have dealt primarily with the input/output characteristics of linear systems. State variable, or state space, representations describe.
THE LAPLACE TRANSFORM LEARNING GOALS Definition
ES97H Biomedical Signal Processing
Digital Signal Processing
EE313 Linear Systems and Signals Fall 2010 Initial conversion of content to PowerPoint by Dr. Wade C. Schwartzkopf Prof. Brian L. Evans Dept. of Electrical.
Lecture 5 – 6 Z - Transform By Dileep Kumar.
Linear Constant-Coefficient Difference Equations
ECE 8443 – Pattern Recognition EE 3512 – Signals: Continuous and Discrete Objectives: FIR Filters Design of Ideal Lowpass Filters Filter Design Example.
Topics 1 Specific topics to be covered are: Discrete-time signals Z-transforms Sampling and reconstruction Aliasing and anti-aliasing filters Sampled-data.
Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts.
Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts.
What is filter ? A filter is a circuit that passes certain frequencies and rejects all others. The passband is the range of frequencies allowed through.
Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts.
Chapter 2 The z Transform.
Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts.
Math for CS Fourier Transforms
Chapter 2 The z-transform and Fourier Transforms The Z Transform The Inverse of Z Transform The Prosperity of Z Transform System Function System Function.
Real-time Digital Signal Processing Digital Filters.
Review of DSP.
Digital Signal Processing
Properties of the z-Transform
Chapter 4 Dynamical Behavior of Processes Homework 6 Construct an s-Function model of the interacting tank-in-series system and compare its simulation.
Linear Constant-Coefficient Difference Equations
Chapter 4 Dynamical Behavior of Processes Homework 6 Construct an s-Function model of the interacting tank-in-series system and compare its simulation.
Review of DSP.
CHAPTER 5 Z-Transform. EKT 230.
3.1 Introduction Why do we need also a frequency domain analysis (also we need time domain convolution):- 1) Sinusoidal and exponential signals occur.
EE Audio Signals and Systems
LAPLACE TRANSFORMS PART-A UNIT-V.
ECET 345 Competitive Success/snaptutorial.com
ECET 345 Education for Service-- snaptutorial.com.
ECET 345 Teaching Effectively-- snaptutorial.com.
The sampling of continuous-time signals is an important topic
Research Methods in Acoustics Lecture 9: Laplace Transform and z-Transform Jonas Braasch.
Chapter 5 DT System Analysis : Z Transform Basil Hamed
Z TRANSFORM AND DFT Z Transform
Chapter 2 Ideal Sampling and Nyquist Theorem
Review of DSP.
Laplace Transforms Important analytical method for solving linear ordinary differential equations. - Application to nonlinear ODEs? Must linearize first.
Laplace Transforms Important analytical method for solving linear ordinary differential equations. - Application to nonlinear ODEs? Must linearize first.
Electrical Communications Systems ECE
Presentation transcript:

Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts Directorate Bldg 1209, Room 128B, M/S North Dryden Street Hampton, VA Page: 1 Introduction to Digital Signal Processing (DSP) Part 3 of 4 (“Implementing Discrete Filters”)

Learning from the Past, Looking to the Future Overview Part 1, “Mathematical Concepts” – Definitions, mathematical pre-requisites, and application techniques Fourier transforms and convolution Discrete Fourier transforms (DFT) and Fast Fourier transforms (FFT) Shannon Sampling Theorem and data aliasing Part 2, “Power Spectral Density Basics” – Power Spectral Density (PSD) to estimate spectral characteristics of waveforms – PSD Demonstration Part 3 “Implementing Discrete Filters” – Converting from continuous Laplace domain filters to discrete Z-domain filters (Tustin’s rule, or bilinear transformation) – Recursive filter implementations for discrete filters Part 4 “Typical GN&C Applications” – Normalized frequency – Methods to verify transfer function magnitude/phase of discrete filters using DFT (or FFT) – Example use of discrete filter to implement a notch filter Page: 2

Learning from the Past, Looking to the Future Implementing Continuous or Discrete Filters Filters are used to condition signals, either to remove unwanted content at certain frequencies or to change the stability characteristics of a control loop Filters can be implemented as continuous filters (using Laplace transforms) or discrete filters (using Z Transforms and recursive equations) Most modern control systems utilize digital controllers, so discrete filters are more commonly used in the GN&C applications – But, more often the specifications of filters or stability analyses of a control loop will be performed in the continuous, or Laplace domain – Thus, there is a need to convert between the two forms Page: 3

Learning from the Past, Looking to the Future Laplace Transform to Z Transform – Tustin’s rule Tustin’s rule (or bilinear transformation) can be used for converting from continuous Laplace domain filters to discrete Z domain filters Laplace transform and its inverse are defined as: Z transform and its inverse are defined as: where C denotes a counterclockwise closed path encircling the origin and entirely in the function’s region of convergence, and containing all the poles of X(z) Z transform is a generalization of the discrete-time Fourier transform Page: 4

Learning from the Past, Looking to the Future Derivation of Tustin’s Rule From the definitions of the Laplace transform and the Z transform, it can be shown that the Laplace operator, s, is related to the Z transform operator, z, by z = e sT or s = 1/T log e (z) where T is the sample time of the discrete system, and log e is natural logarithm Now, since | z | < 1 (the domain of z is entirely within the unit circle around the origin), the natural log of z can be approximated by This results in the bilinear transformation, or Tustin’s rule, for substituting s for z -1 in a transfer function, G(s) Note also that z -1 = e -sT represents a delay of one sample of a discrete sequence at T seconds per sample Page: 5

Learning from the Past, Looking to the Future Implementation of Continuous Filters Consider a Laplace domain transfer function, G(s), which defines a filter with a lead frequency,  l, and a lag frequency,  n : To implement this filter in a time-domain simulation, first break the transfer function into two parts, with the lag part first, introduce a temporary state, w, re- arrange terms, substitute the time derivative for the Laplace operator, s, and solve for the highest derivative of the output, y: E.G. – Page: 6

Learning from the Past, Looking to the Future First Order Continuous Domain Filter Implementation To implement this transfer function, define a state, w, to be integrated, and compute its derivative from eq (1), and then the filter output at any time is the value of, y, from eq (2): Page: 7

Learning from the Past, Looking to the Future Second Order Continuous Domain Filter Implementation Now, consider a 2 nd order transfer function To implement this transfer function, define two states, y and w, to be integrated, and compute their derivatives from eqs (1) & (2), and the filter output at any time is the integrated value of the state, y Page: 8

Learning from the Past, Looking to the Future Tustin’s Rule Implementation Now, to implement the previous first order lead/lag example filter as a discrete filter, with an update rate of T seconds, substitute the Laplace operator, s, with the z- transform operator, z, using Tustin’s rule: Page: 9 This is the recursive equation for implementing this discrete filter

Learning from the Past, Looking to the Future Implementation of Discrete Filter With Recursive Equation Now that we have defined the transfer function, G(z), to implement the discrete form of the original Laplace filter, how do we implement it? Since z -1 = e -sT, it is a delay of one sample, T, and the equation above can be re- written in terms of current and previous samples of the input signal x[n], and the output y[n]: Note that implementation of the discrete filter does not require integration of any states, just algebraic equations, which are easier to implement in digital controllers Page: 10

Learning from the Past, Looking to the Future Another Form for G(z) Page: 11

Learning from the Past, Looking to the Future Recursive Equation for Implementing Discrete Filters One general form † of recursive filter implementation is: The recursion coefficients a 0, a 1,... and b 1, b 2,... can be computed as described on the previous slides using Tustin’s rule to convert a Laplace domain transfer function, G(s), to its discrete Z- transform form, G(z) In these recursive filter implementations, the filter update time interval is defined as T in the bilinear transformation used to define the coefficients; z -1 represents the previous value of the parameters x or y, z -2 represents the previous value of the previous value (e.g. – second oldest), etc. † Care should be exercised when someone gives you recursive filter coefficients, as some people define the polarity of the denominator coefficients, b i, as positive rather than negative as shown above, and sometimes the leading factor of 1 in the denominator is instead another constant, b 0 Page: 12

Learning from the Past, Looking to the Future Continuous Filters vs. Discrete Filters Advantages of recursive filters versus continuous filters: – can be implemented as “stand-alone” algebraic functions which do not require numerical integration and its interface with the controlling process The most common causes of problems with discrete filters are: – Denominator polynomial coefficient polarities are not as expected (see note on previous page) – Discrete filter is not defined in the “standard form” shown in the example: the filter coefficients are not defined so that the denominator leading coefficient is 1 the polarities of the denominator coefficients are positive instead of negative – Recursive filter is called, or updated, at a rate inconsistent with the time interval “T” used to define the recursion coefficients with Tustin’s rule This results in a frequency shift of the filter characteristics, so that the actual natural frequency of the discrete filter is different than intended – Past states for input (x n, x n-1,...) and output (y n, y n-1,...) are not properly initialized or saved from update to update of the recursive filter – Confusion over converting from “real” frequency to normalized frequency Page: 13

Learning from the Past, Looking to the Future Numerical Example of Discrete Lead/Lag Filter Consider the lead/lag filter example previously shown to illustrate Tustin’s rule Now, assign some values to the lead,  l, and lag,  n, frequencies and the discrete sample interval, T: – Lead frequency,  l = 2  * 10 hertz = rad/sec – Lag frequency,  n = 2  * 1 hertz = rad/sec – Discrete filter sample interval, T = 0.01 seconds (100 hertz)  Page: 14

Learning from the Past, Looking to the Future Matlab / Octave Commands For Example Page: 15 % define lag frequency of 1 hz, lead frequency of 10 hz, sample frequency of 100 hz fn = 1;, wn = 2*pi*fn; fl = 10.;, wl = 2*pi*fl; fs=100;, T=1/fs; % compute the continuous frequency response of the specified lead/lag filter [magc,phasec,freqc]=mybode( tf2sys( [1/wl 1], [1/wn 1] ), logspace(-3,2,1000) ); % compute the recursive filter coefficients b1 = exp(-wn*T); a0 = ( 1 - b1 ) / ( 1 - exp(-wl*T) ); a1 = -a0 * exp(-wl*T); a = [a0 a1]; % define 4096 point impulse response function ( 1 for first sample; 0 for all others ) impulse = zeros(size([1:4096]));, impulse(1) = 1; % define the 4096 point impulse response of the lead-lag filter x=recursive_filter(impulse,a,b1); % compute the frequency response of the impulse response of the filter with discrete Fourier transform (with FFT implementation) [mag,phase,freq]=dft_fft(x,4096);

Learning from the Past, Looking to the Future Frequency Response of Example Lead/Lag Discrete Filter Page: 16 Note frequency range from DFT is “zero” to 1 (frequency is normalized to the sample frequency) Note last frequency computed is 0.5

Learning from the Past, Looking to the Future Compare Frequency Response of Digital & Continuous Lead/Lag Filter Page: 17 semilogx(freqc/2/pi,magc,'-rx;continuous;') hold on semilogx(freq*fs,mag,'-bo;discrete;') semilogx(freqc/2/pi,phasec,'-rx;continuous;') hold on semilogx(freq*fs,phase,'-bo;discrete;')

Learning from the Past, Looking to the Future Introduction to DSP, Part 3 of 4 Summary In Part 1, “Mathematical Concepts” we covered the following: – Definitions, mathematical pre-requisites, and application techniques Fourier transforms and convolution Discrete Fourier transforms (DFT) and Fast Fourier transforms (FFT) Shannon Sampling Theorem and data aliasing In Part 2, “Power Spectral Density Basics”, we covered the following: – Power Spectral Density (PSD) to estimate spectral characteristics of waveforms – PSD Demonstration In Part 3 “Implementing Discrete Filters” we have covered the following: – Converting from continuous Laplace domain filters to discrete Z-domain filters (Tustin’s rule, or bilinear transformation) – Recursive filter implementations for discrete filters In Part 4 “Typical GN&C Applications” we will cover the following: – Normalized frequency – Methods to verify transfer function magnitude/phase of discrete filters using DFT (or FFT) – Example use of discrete filter to implement a notch filter Page: 18