Advertisement
Guest User

Reverb IIR filter

a guest
Nov 26th, 2018
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.93 KB | None | 0 0
  1. function [numCoeffs, denCoeffs] = racquetIIR_impInvar()
  2. %% Define pertinent terms
  3. % Plotting vector
  4. t = -5:0.1:5;
  5. % Speed of sound, m/s
  6. c = 343;
  7. % Volume of a racquetball court in m
  8. l = 12.1212; w = 6.0606; h = w;
  9. V = l*w*h;
  10. % Incident amplitude, determined by the acoustic reflective properties of
  11. % the room's construction materials
  12. alphaS_lw = l*w*0.00000148;
  13. alphaS_wh = w*h*0.0000158;
  14. alphaS_lh = l*h*0.0000138;
  15. A = 2*(alphaS_lw + alphaS_wh  + alphaS_lh);
  16.  
  17. %% Construct equation expressing acoustic decay
  18. % Usually expressed as a ratio, I/I_0
  19. p = -(A*c)/(4*V);
  20. I = exp(p*t);
  21.  
  22. s = -5:0.01:5;
  23. %% Find s-domain model of this decay
  24. laplaceTrans = 1./(s-p);
  25.  
  26. %% Transform to digital filter using impulse invariant transform
  27. Ts = 0.01;
  28.  
  29. % Definition of the imp. invar. transform.
  30. % Return num and denom of the new transfer function after multiplying top
  31. % and bottom by z
  32. numCoeffs = [1 0];
  33. denCoeffs = [1, -exp(p*Ts)];
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement