• API
• FAQ
• Tools
• Archive
daily pastebin goal
37%
SHARE
TWEET

# Untitled

a guest Dec 13th, 2018 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. x[n]=d^[n]=e[n]+s^[n]*y[n]
2. y[n]=w[n]*x[n]
3. x'[n]=s^[n]*x[n]
4. w[n+1]=w[n]+u.e[n].x'[n]
5. e[n]=d[n]-y'[n]
6.
7. %%%%%%%%%% Initalize Wz %%%%%%%%%%
8.     Wz = zeros(M,1);          % adaptive filter weigths; coloumn array
9.
10.     %%%%%%%%%% Initalize step size mu %%%%%%%%%%
11.     % Initialize "mu"
12.
13.     %%%%%%%%%% Initialize input %%%%%%%%%%
14.     % Initialize input "x[n]" of length"N"
15.
16.     %%%%%%%%%% Generate desired response %%%%%%%%%%
17.     % Generate the desired response d[n]
18.
19.     %%%%%%%%%% Generate x'[n] %%%%%%%%%%
20.     x_prime = conv(Szh,x);           % x'[n] = x[n]*s^[n]
21.
22.     % Make sure that x and d are coloumn arrays
23.     x = x(:);
24.     d = d(:);
25.
26.     %%%%%%%%%% FBFXLMS algorithm %%%%%%%%%%
27.     for n=M:N
28.         x_reverse = x(n:-1:n-M+1);        % input in reverse order
29.         x_prime_reverse = x_prime(n:-1:n-M+1);      % x'[n] in reverse order
30.         y = Wz'*x_reverse;                % y[n] = w[n]*x[n];
31.         y_prime = conv(Sz,y);             % y'[n] = y[n]*s[n]
32.         e(n) = d(n)-y_prime(n);           % update error: e[n]=d[n]-y'[n]
33.         Wz = Wz+mu*x_prime_reverse*(e(n));         % update weigths
34.     end
35.
36.     %%%%%%%%%% generate y''[n] %%%%%%%%%%
37.     y_second = conv(Szh,y);      % y'[n] = y[n]*s[n]
38.
39.     %%%%%%%%%% generate x[n] %%%%%%%%%%
40.     x = e + y_second;            % x[n] = d^[n] = e[n]+y''[n]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top