{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture_20

# lecture_20 - MIT OpenCourseWare http/ocw.mit.edu 2.161...

This preview shows pages 1–6. Sign up to view the full content.

MIT OpenCourseWare http://ocw.mit.edu 2.161 Signal Processing: Continuous and Discrete Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
a f n g n n n n - b N y n f n - N 1 2 Massachusetts Institute of Technology Department of Mechanical Engineering 2.161 Signal Processing - Continuous and Discrete Fall Term 2008 Lecture 20 1 Reading: Class Handout: Direct-Form Digital Filter Structures Proakis and Manolakis: Sec. 9.1 9.3 Oppenheim, Schafer, and Buck: 6.0 6.5 Direct-Form Filter Structures Linear shift-invariant digital ﬁlters can be represented in block diagram form in terms of the three primitive elements c o e f f i c i e n t ( g a i n ) u n i t d e l a y s u m m e r y n = a f n f n z - 1 y n = f n - 1 f n y = f - g Transversal FIR Structure Let the FIR structure to be implemented be N H ( z )= b n z k k =0 so that the diﬀerence equation is N y n = b k f n k . k =0 The following block diagram is the transversal form of this system: z z z z - 1 - 1 - 1 - 1 2 1 3 b 0 b b b f n - 1 f n - 2 f f n - 3 n 1 copyright ± c D.Rowell 2008 20–1
The following MATLAB code implements this structure in a point-by-point ﬁltering function: % ------------------------------------------------------------------------- % 2.161 Classroom Example - firdf - Demonstration FIR Direct Form % implementation. % Usage : 1) Initialization: % b=[ 123454321 ]; % y = iirdf1(’initial’, b); % where b are the numerator polynomial coefficients. Example: % y = iirdf1(’initial’,[1252 1]); % Note: firdf return sy=0f or initialization % 2) Filtering: % y_out = firdf(f); % where f is a single input value, and % y_out is the computed output value. % Example: To compute the step response: % for j=1:100 % y(j) = firdf(1); % end % ------------------------------------------------------------------------- % function y_n = firdf(f_n,B) persistent f_register Bx N % % The following is initialization, and is executed once % if (ischar(f_n) && strcmp(f_n,’initial’)) N = length(B); B x=B; f_register = zeros(1,N); y _ n=0; else % Filtering: y _ for J = N:-1:2 f_register(J) = f_register(J-1); y_n = y_n + Bx(J)*f_register(J); end y_n = y_n + Bx(1)*f_n; f_register(1) = f_n; end 20–2

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
y n b x f n 3 IIR Direct Form Structures Let the IIR structure to be implemented be ± N k b n z k =0 H ( z )= ± N 1+ k =1 a k z k where it is assumed that the orders of the numerator and denominator of H ( z ) are equal. The diﬀerence equation is N N y n = a k y n k + b k f n k . k =1 k =0 Write H ( z ) as a pair of cascaded sub-systems, H ( z H 1 ( z ) H 2 ( z ) where N H 1 ( z b n z k , and H 2 ( z ± N 1 . a k z k k =0 k =1 3.1 Direct I Deﬁne an intermediate variable x n , and implement as X ( z H 1 ( z ) F ( z ) and Y ( z H 2 ( z ) X ( z ), or in diﬀerence equation form as N x n = b k f n k k =0 N y n = a k y n k + x n k =1 as shown below: z z z z z - 1 z z z a N N 1 2 1 2 3 3 0 y y y y n - 1 n - 2 n - 3 n - N n - - 1 - 1 - 1 - 1 - 1 - 1 - 1 a a a b b b b f f f f n - 1 n - 2 n - 3 n - N 20–3
The following MATLAB code implements the Direct Form I structure in a point-by-point ﬁltering function.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 15

lecture_20 - MIT OpenCourseWare http/ocw.mit.edu 2.161...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online