Digital Signal Processing (2)

Source: Internet
Author: User

I. Filtering Basics

 

Ii. Difference Equation

1. Definition

2. Solutions to the Difference Equation

(1)

% Solution difference equation Y [N]-0.95y [n-1] + 0.9025y [N-2] = 1/3 [x [N] + X [n-1] + X [N-2], n> = 0% X [N] = cos (PIN/3), Y [-1] =-2, Y [-2] =-3, X [-1] = 1, x [-2] = 1B = [0.95, 1]/3; A = [1,-0.9025,]; y = [-2,-3]; X = [0.5]; xic = filtic (B, A, Y, x) bxplus = [1,-]; axplus = [1,-1, 1]; ayplus = Conv (A, axplus) byplus = Conv (B, bxplus) + Conv (xic, axplus) [R, P, c] = residuez (byplus, ayplus) MP = ABS (P), AP = angle (P)/pin = [0: 50]; X = cos (pI * n/3 ); y = filter (B, A, X, xic); plot (n, Y), title ('System response curve ');

Here, xic = fitltic (B, A, Y, x), that is, the initial condition for the implementation of the transpose directly type 2 filter.

(2)

% Solution difference equation Y [N]-0.95y [n-1] + 0.9025y [N-2] = 1/3 [x [N] + X [n-1] + X [N-2], n> = 0% X [N] indicates the collected signal. Y [-1] =-2, Y [-2] =-3, X [-1] = 1, X [-2] = 1B = [0.95, 1]/3; A = [1,-0.9025,]; y = [-2,-3]; X = [0.5]; xic = filtic (B, A, Y, x) bxplus = [1,-]; axplus = [1,-]; ayplus = Conv (A, axplus) byplus = Conv (B, bxplus) + Conv (xic, axplus) [R, P, C] = residuez (byplus, ayplus) MP = ABS (P), AP = angle (P)/pin = [0: 50]; [x, FS] = audioread ('e: test1.wma '); % self-input WMA file x = x (:, 1); % Single Channel ? Y = filter (B, A, X, xic); figuresubplot (211), plot (x), title ('input signal curve '); subplot (212 ), plot (Y), title ('signal curve after differential equation operation Process') Sound (x, FS); sound (Y, FS)

 

 

% Solution difference equation Y [N]-0.95y [n-1] + 0.9025y [N-2] = 1/3 [x [N] + X [n-1] + X [N-2], n> = 0% X [N] indicates the collected signal. Y [-1] =-2, Y [-2] =-3, X [-1] = 1, X [-2] = 1B = [0.95, 1]/3; A = [1,-0.9025,]; y = [-2,-3]; X = [0.5]; xic = filtic (B, A, Y, x) bxplus = [1,-]; axplus = [1,-]; ayplus = Conv (A, axplus) byplus = Conv (B, bxplus) + Conv (xic, axplus) [R, P, C] = residuez (byplus, ayplus) MP = ABS (P), AP = angle (P)/pin = [0: 50]; [x, FS, BITs] = wavread ('d: liulili.wav '); % self-input WAV file x = x (:, 1 ); % Single channel? Y = filter (B, A, X, xic); figuresubplot (211), plot (x), title ('input signal curve '); subplot (212 ), plot (Y), title ('signal curve after differential equation operation Process') Sound (x, FS); sound (Y, FS)

 

Digital Signal Processing (2)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.