Matlab code examples. Appendix A. A.1 The simple harmonic oscillator

Size: px
Start display at page:

Download "Matlab code examples. Appendix A. A.1 The simple harmonic oscillator"

Transcription

1 Appix A Matlab code examples In this appix, various simple code fragments are provided. All can be viewed as prototypes for physical modeling sound synthesis. The coding style reflects something of a compromise between efficiency, on the one hand, and brevity and intelligibility, on the other. The choice of Matlab as a programming environment definitely reflects the latter sensibility, though the use of Matlab as an actual synthesis engine is not recommed. Some of these examples make use of constructs and features which need not appear in a code fragment inted for synthesis, including various calls to plotting functions, as well as the demonstration of energy conservation in some cases. It should be clear, in all cases, which elements of these examples may be neglected in an actual implementation. For the sake of brevity, these examples are too crude for actual synthesis purposes, but many features, discussed at various points in the texts and exercises, may be added. A.1 The simple harmonic oscillator % matlab script sho.m % finite difference scheme for simple harmonic oscillator f0 = 1000; TF = 1.0; u0 = 0.3; v0 = 0.0; % fundamental frequency (Hz) % duration of simulation (s) % initial displacement % initial velocity %%%%%% global parameters % check that stability condition is satisfied if(sr<=pi*f0) error( Stability condition violated ); N ume ric al Sound Sy nthe sis: Finite Diffe re nc e Sc he m e s and Simulation in M usic al Ac oustic s 2009 John Wiley & Sons, Ltd. ISBN: Stefan Bilbao

2 392 APPENDIX A % derived parameters coef = 2-k^2*(2*pi*f0)^2; NF = floor(tf*sr); % scheme update coefficient % initialize state of scheme u1 = u0+k*v0; u2 = u0; % last value of time series % one before last value of time series % initialize readout out = zeros(nf,1); out(1) = u2; out(2) = u1; u=coef*u1-u2; out(n) = u; u2 = u1; u1 = u; % difference scheme calculation % read value to output vector % update state of difference scheme %%%%%% main loop soundsc(out,sr); plot([0:nf-1]*k, out, k ); xlabel( t ); ylabel( u ); title( SHO: Scheme Output ); axis tight A.2 Hammer collision with mass spring system % matlab script hammermass.m % hammer collision with a mass-spring system xh0 = ; vh0 = 2; TF = 0.05; w0 = 2000; MR = 10; wh = 1000; alpha = 2; % initial conditions of hammer % duration of simulation (s) % angular frequency of mass-spring system % hammer/target mass ratio % stiffness parameter for hammer % hammer stiffness nonlinearity exponent %%%%%% global parameters % derived parameters NF = floor(tf*sr);

3 APPENDIX A 393 % initialization uh2 = xh0; uh1 = xh0+k*vh0; u2 = 0; u1 = 0; out = zeros(nf,1); f = zeros(nf,1); out(1) = u2; out(2) = u1; % hammer % mass-spring system if(uh1>u1) f(n-1) = wh^(1+alpha)*(uh1-u1)^alpha; else f(n-1) = 0; uh = 2*uH1-uH2-k^2*f(n-1); u = 2*u1-u2-w0^2*k^2*u1+MR*k^2*f(n-1); out(n) = u; u2 = u1; u1 = u; uh2 = uh1; uh1 = uh; %%%%%% main loop % plots of displacement of target mass and force subplot(2,1,1) plot([0:nf-1]*k, out, k ); title( Position of Target Mass ); xlabel( t ); axis tight subplot(2,1,2) plot([0:nf-1]*k, f, k ); title( Hammer Force/Mass ); xlabel( t ); axis tight A.3 Bowed mass spring system % matlab script bowmass.m % finite difference scheme for a bowed mass-spring system % soft friction characteristic w/iterative Newton-Raphson method f0 = 200; FB = 500; TF = 0.1; vb = 0.2; sig = 100; tol = 1e-4; % oscillator frequency (Hz) % bow force/mass (m/s^2) % simulation duration (s) % bow velocity (m/s) % friction law free parameter (1/m^2) % tolerance for Newton-Raphson method %%%%%% global parameters % derived parameters NF = floor(tf*sr); A = exp(1/2)*sqrt(2*sig);

4 394 APPENDIX A % initialize time series/iterative method u = zeros(nf,1); f = zeros(nf,1); vr = zeros(nf,1); qlast = 0; restrictions if(k>min(1/(pi*f0),exp(1)/(fb*sqrt(2*sig)))) error( Time step too large ); % Newton-Raphson method to determine relative velocity b = (2*pi*f0)^2*u(n-1)-(2/k^2)*(u(n-1)-u(n-2))+(2/k)*vB; eps = 1; while eps>tol q=qlast-(fb*a*qlast*exp(-sig*qlast^2)+2*qlast/k+b)/... (FB*A*(1-2*sig*qlast^2)*exp(-sig*qlast^2)+2/k); eps = abs(q-qlast); qlast = q; % update position of mass and relative bow velocity u(n) = 2*k*(q+vB)+u(n-2); vr(n-1) = q; %%%%%% main loop % plot mass displacement and relative bow velocity tax = [0:NF-1]*k; subplot(2,1,1); plot(tax, u, k ); title( Displacement of Mass ); xlabel( time (s) ); subplot(2,1,2); plot(tax, vr, k ); title( Relative Bow Velocity ); xlabel( time (s) ); A.4 The 1D wave equation: finite difference scheme % matlab script waveeq1dfd.m % finite difference scheme for the 1D wave equation % fixed boundary conditions % raised cosine initial conditions f0 = 330; % fundamental frequency (Hz) TF = 1; % duration of simulation (s) ctr = 0.7; wid = 0.1; % center location/width of excitation u0 = 1; v0 = 0; % maximum initial displacement/velocity rp = 0.3; % position of readout (0-1) lambda = 1; % Courant number %%%%%% global parameters

5 APPENDIX A 395 % begin derived parameters gamma = 2*f0; NF = floor(sr*tf); % wave equation free parameter % stability condition/scheme parameters h = gamma*k/lambda; N = floor(1/h); h = 1/N; lambda = gamma*k/h; s0 = 2*(1-lambda^2); s1 = lambda^2; % readout interpolation parameters rp_int = 1+floor(N*rp); rp_frac = 1+rp/h-rp_int; % rounded grid index for readout % fractional part of readout location % create raised cosine xax = [0:N] *h; ind = sign(max(-(xax-ctr-wid/2).*(xax-ctr+wid/2),0)); rc = 0.5*ind.*(1+cos(2*pi*(xax-ctr)/wid)); % initialize grid functions and output u2 = u0*rc; u1 = (u0+k*v0)*rc; u = zeros(n+1,1); out = zeros(nf,1); u(2:n) = -u2(2:n)+s0*u1(2:n)+s1*(u1(1:n-1)+u1(3:n+1)); % scheme calculation out(n) = (1-rp_frac)*u(rp_int)+rp_frac*u(rp_int+1); % readout u2 = u1; u1 = u; % update of grid variables %%%%%% main loop plot([0:nf-1]*k, out, k ); xlabel( t ); ylabel( u ); title( 1D Wave Equation: FD Output ); axis tight soundsc(out,sr); A.5 The 1D wave equation: digital waveguide synthesis % matlab script waveeq1ddw.m % digital waveguide method for the 1D wave equation % fixed boundary conditions % raised cosine initial conditions f0 = 441; % fundamental frequency (Hz)

6 396 APPENDIX A TF = 1; % duration of simulation (s) ctr = 0.7; wid = 0.1; % center location/width of excitation u0 = 1; v0 = 0; % maximum initial displacement/velocity rp = 0.3; % position of readout (0-1) %%%%%% global parameters % begin derived parameters NF = floor(sr*tf); N = floor(0.5*sr/f0); rp_int = 1+floor(N*rp); rp_frac = 1+rp*N-rp_int; % length of delay lines % rounded grid index for readout % fractional part of readout location % initialize delay lines and output wleft = zeros(n,1); wright = zeros(n,1); out = zeros(nf,1); % create raised cosine and integral xax = ([1:N] -1/2)/N; ind = sign(max(-(xax-ctr-wid/2).*(xax-ctr+wid/2),0)); rc = 0.5*ind.*(1+cos(2*pi*(xax-ctr)/wid)); rcint = zeros(n,1); for qq=2:n rcint(qq) = rcint(qq-1)+rc(qq)/n; % set initial conditions wleft = 0.5*(u0*rc+v0*rcint/(2*f0)); wright = 0.5*(u0*rc-v0*rcint/(2*f0)); temp1 = wright(n); temp2 = wleft(1); wright(2:n) = wright(1:n-1); wleft(1:n-1) = wleft(2:n); wright(1) = -temp2; wleft(n) = -temp1; % readout out(n) = (1-rp_frac)*(wleft(rp_int)+wright(rp_int))... +rp_frac*(wleft(rp_int+1)+wright(rp_int+1)); %%%%%% main loop plot([0:nf-1]*k, out, k ); xlabel( t ); ylabel( u ); title( 1D Wave Equation: Digital Waveguide Synthesis Output ); axis tight soundsc(out,sr);

7 APPENDIX A 397 A.6 The 1D wave equation: modal synthesis % matlab script waveeq1dmod.m % modal synthesis method for the 1D wave equation % fixed boundary conditions % raised cosine initial conditions f0 = 441; % fundamental frequency (Hz) TF = 1; % duration of simulation (s) ctr = 0.7; wid = 0.1; % center location/width of excitation u0 = 1; v0 = 0; % maximum initial displacement/velocity rp = 0.3; % position of readout (0-1) %%%%%% global parameters % begin derived parameters/temporary storage NF = floor(sr*tf); N = floor(0.5*sr/f0); % number of modes temp = 2*pi*[1:N] *f0/sr; coeff = 2*cos(temp); outexp = sin([1:n]*pi*rp); % initialize grid functions and output U = zeros(n,1); U1 = zeros(n,1); U2 = zeros(n,1); out2 = zeros(nf,1); % create raised cosine and find Fourier coefficients xax = [0:N-1] /N; ind = sign(max(-(xax-ctr-wid/2).*(xax-ctr+wid/2),0)); rc = 0.5*ind.*(1+cos(2*pi*(xax-ctr)/wid)); rcfs = -imag(fft([rc; zeros(n,1)])); rcfs = 2*rcfs(2:N+1)/N; % set initial conditions U2(1:N) = u0*rcfs; U1(1:N) = (u0*cos(temp)+v0*sin(temp)./(2*pi*[1:n] *f0)).*rcfs; U = -U2+coeff.*U1; out(n) = outexp*u; U2 = U1; U1 = U; % scheme calculation % readout % update of modal weights %%%%%% main loop plot([0:nf-1]*k, out, k ); xlabel( t ); ylabel( u ); title( 1D Wave Equation: Modal Synthesis Output ); axis tight

8 398 APPENDIX A soundsc(out,sr); A.7 The ideal bar % matlab script idealbarfd.m % finite difference scheme for the ideal bar equation % clamped/pivoting boundary conditions % raised cosine initial conditions K = 10; % stiffness parameter TF = 1; % duration of simulation (s) ctr = 0.7; wid = 0.1; % center location/width of excitation u0 = 1; v0 = 0; % maximum initial displacement/velocity mu = 0.5; % scheme free parameter rp = 0.85; % position of readout (0-1) bc = [2 2]; % boundary condition type, [left right] with % 1: clamped, 2: pivoting %%%%%% global parameters % begin derived parameters NF = floor(sr*tf); % stability condition/scheme parameters h = sqrt(k*k/mu); N = floor(1/h); h = 1/N; mu = K*k/h^2; s0 = 2*(1-3*mu^2); s1 = 4*mu^2; s2 = -mu^2; % readout interpolation parameters rp_int = 1+floor(N*rp); rp_frac = 1+rp/h-rp_int; % rounded grid index for readout % fractional part of readout location % create raised cosine xax = [0:N] *h; ind = sign(max(-(xax-ctr-wid/2).*(xax-ctr+wid/2),0)); rc = 0.5*ind.*(1+cos(2*pi*(xax-ctr)/wid)); % initialize grid functions and output u2 = u0*rc; u1 = (u0+k*v0)*rc; u = zeros(n+1,1); out = zeros(nf,1); % scheme calculation (interior) u(3:n-1) = -u2(3:n-1)+s0*u1(3:n-1)+s1*(u1(2:n-2)+u1(4:n))...

9 APPENDIX A 399 +s2*(u1(1:n-3)+u1(5:n+1)); % calculations at boundary points if(bc(1)==2) u(2) = -u2(2)+(s0-s2)*u1(2)+s1*u1(3)+s2*u1(4); if(bc(2)==2) u(n) = -u2(n)+(s0-s2)*u1(n)+s1*u1(n-1)+s2*u1(n-2); out(n) = (1-rp_frac)*u(rp_int)+rp_frac*u(rp_int+1); u2 = u1; u1 = u; % readout % update %%%%% main loop plot([0:nf-1]*k, out, k ); xlabel( t ); ylabel( u ); title( Ideal Bar Equation: FD Output ); axis tight soundsc(out,sr); A.8 The stiff string % matlab script ssfd.m % finite difference scheme for the stiff string % clamped boundary conditions % raised cosine initial conditions % stereo output % implicit scheme: matrix update form % two-parameter frequency-depent loss % sample rate(hz) B = 0.001; % inharmonicity parameter (>0) f0 = 100; % fundamental(hz) TF = 2; % duration of simulation(s) ctr = 0.1; wid = 0.05; % center location/width of excitation u0 = 1; v0 = 0; % maximum initial displacement/velocity rp = [ ]; % positions of readout(0-1) loss = [100, 10; 1000, 8]; % loss [freq.(hz), T60(s), freq.(hz), T60(s)] theta = 1.0; % implicit scheme free parameter (>0.5) %%%%%% global parameters % begin derived parameters NF = floor(sr*tf); gamma = 2*f0; K = sqrt(b)*(gamma/pi); % set parameters % stability conditions

10 400 APPENDIX A h = sqrt((gamma^2*k^2+sqrt(gamma^4*k^4+16*k^2*k^2*(2*theta-1)))/ (2*(2*theta-1))); N = floor(1/h); h = 1/N; mu = K*k/h^2; lambda = gamma*k/h; % readout interpolation parameters rp_int = 1+floor(N*rp); rp_frac = 1+rp/h-rp_int; % rounded grid index for readout % fractional part of readout location % set scheme loss parameters zeta1 = (-gamma^2+sqrt(gamma^4+4*k^2*(2*pi*loss(1,1))^2))/(2*k^2); zeta2 = (-gamma^2+sqrt(gamma^4+4*k^2*(2*pi*loss(2,1))^2))/(2*k^2); sig0 = 6*log(10)*(-zeta2/loss(1,2)+zeta1/loss(2,2))/(zeta1-zeta2); sig1 = 6*log(10)*(1/loss(1,2)-1/loss(2,2))/(zeta1-zeta2); % create update matrices M = sparse(toeplitz([theta (1-theta)/2 zeros(1,n-3)])); A = M+sparse(toeplitz([sig1*k/(h^2)+sig0*k/2 -sig1*k/(2*h^2) zeros(1,n-3)])); C = M+sparse(toeplitz([-sig1*k/(h^2)-sig0*k/2 sig1*k/(2*h^2) zeros(1,n-3)])); B = 2*M+sparse(toeplitz([-2*lambda^2-6*mu^2 lambda^2+4*mu^2 -mu^2... zeros(1,n-4)])); % create raised cosine xax = [1:N-1] *h; ind = sign(max(-(xax-ctr-wid/2).*(xax-ctr+wid/2),0)); rc = 0.5*ind.*(1+cos(2*pi*(xax-ctr)/wid)); % set initial conditions u2 = u0*rc; u1 = (u0+k*v0)*rc; u = zeros(n+1,1); out = zeros(nf,2); u = A\(B*u1-C*u2); out(n,:) = (1-rp_frac).*u(rp_int) +rp_frac.*u(rp_int+1) ; % readout u2 = u1; u1 = u; % update %%%%%% main loop subplot(2,1,1); plot([0:nf-1]*k, out(:,1), k ); xlabel( t ); ylabel( u ); title( Stiff String Equation: FD Output (left) ); subplot(2,1,2); plot([0:nf-1]*k, out(:,2), k ); xlabel( t ); ylabel( u ); title( Stiff String Equation: FD Output (right) ); axis tight soundsc(out,sr);

11 APPENDIX A 401 A.9 The Kirchhoff Carrier equation % matlab script kcfd.m % finite difference scheme for the Kirchhoff-Carrier equation % fixed boundary conditions % triangular initial conditions f0 = 200; % fundamental frequency (Hz) alpha = 10; % nonlinear string parameter TF = 0.03; % duration of simulation (s) ctr = 0.5; % center location of excitation (0-1) u0 = 0.05; % maximum initial displacement rp = 0.5; % position of readout (0-1) lambda = 0.7; % Courant number %%%%%% global parameters % begin derived parameters gamma = 2*f0; NF = floor(sr*tf); % wave equation free parameter % stability condition h = gamma*k/lambda; N = floor(1/h); h = 1/N; lambda = gamma*k/h; % readout interpolation parameters rp_int = 1+floor(N*rp); rp_frac = 1+rp/h-rp_int; % rounded grid index for readout % fractional part of readout location % create triangular function xax = [0:N] *h; tri = min(xax/ctr-1,0)+1+min((1-xax)/(1-ctr)-1,0); % initialize grid functions and output u2 = u0*tri; u1 = u2; u = zeros(n+1,1); out = zeros(nf,1); for n=1:nf % calculate nonlinearity g u1x = (u1(2:n+1)-u1(1:n))/h; u1xx = (u1x(2:n)-u1x(1:n-1))/h; g = (1+0.5*alpha^2*h*sum(u1x.*u1x))/... (1+0.25*alpha^2*k^2*gamma^2*h*sum(u1xx.*u1xx)); % scheme update u(2:n) = 2*u1(2:N)-u2(2:N)+g*gamma^2*k^2*u1xx(1:N-1); % calculation out(n) = (1-rp_frac)*u(rp_int)+rp_frac*u(rp_int+1); % readout

12 402 APPENDIX A u2 = u1; u1 = u; % update %%%%% main loop plot([0:nf-1]*k, out, k ); xlabel( t ); ylabel( u ); title( Kirchhoff-Carrier Equation: FD Output ); axis tight A.10 Vocal synthesis % matlab script vocalfd.m % finite difference vocal tract simulation % radiation loss included % simple glottal source waveform % static pitch L = 0.17; % tract length (m) S0 = ; % vocal tract surface area, left (m^2) c = 340; % wave speed (m/s) f0 = 120; % fundamental frequency (Hz) TF = 1; % simulation duration (s) % vocal tract profile, non-dimensional [pos S] pairs % /E/ S = [0 1; ; ; ; ; ; ; ; ; ; ; ;0.74 1; ; ;0.88 2;0.91 2; ;1 3.2]; % /A/ % S = [0 1; ; ; ; ; ; ;... % ;0.47 1; ;0.59 2; ; ;0.94 2;1 2]; %%%%% global parameters % begin derived parameters NF = floor(tf*sr); gamma = c/l; % sample duration % stability condition/scheme parameters h = gamma*k; N = floor(1/h); h = 1/N; lambda = gamma*k/h; S = interp1(s(:,1),s(:,2),[0:h:1]) ; % interpolate vocal tract profile alf = *L*sqrt(1/(S0*S(N+1))); % radiation parameter bet = /gamma; % radiation parameter Sav = [S(1); 0.25*(S(3:N+1)+2*S(2:N)+S(1:N-1)); S(N+1)]; Sr = 1.5*S(N+1)-0.5*S(N); sr = 0.5*lambda^2*((S(2:N)+S(3:N+1))./Sav(2:N)); sl = 0.5*lambda^2*((S(2:N)+S(1:N-1))./Sav(2:N)); s0 = 2*(1-lambda^2);

13 APPENDIX A 403 q1 = alf*gamma^2*k^2*sr/(sav(n+1)*h); q2 = bet*gamma^2*k*sr/(sav(n+1)*h); r1 = 2*lambda^2/(1+q1+q2); r2 = -(1+q1-q2)/(1+q1+q2); g1 = -(k^2*gamma^2/h/s(1))*(3*s(1)-s(2)); % initialize grid functions and output, generate glottal waveform Psi = zeros(n+1,1); Psi1 = zeros(n+1,1); Psi2 = zeros(n+1,1); uin = sin(2*pi*[0:nf-1]*k*f0); uin = 0.5*(uin+abs(uin)); out = zeros(nf,1); %%%%%% begin main loop for n=1:nf; Psi(2:N) = s0*psi1(2:n)+sl.*psi1(1:n-1)+sr.*psi1(3:n+1)-psi2(2:n); Psi(N+1) = r1*psi1(n)+r2*psi2(n+1); Psi(1) = s0*psi1(1)+2*lambda^2*psi1(2)-psi2(1)+g1*uin(n); out(n) = SR*(Psi(N+1)-Psi1(N+1)); Psi2 = Psi1; Psi1 = Psi; %%%%%% main loop % plot vocal tract profile and output spectrum subplot(2,1,1); plot([0:h:1], sqrt(s), k, [0:h:1], -sqrt(s), k ) title( Vocal Tract Profile ); xlabel( x ); ylabel( sqrt(s) ); subplot(2,1,2); plot([0:nf-1]*sr/nf, 10*log10(abs(fft(out))), k ); title( Output Spectrum ); xlabel( f );ylabel( pressure (db) ); soundsc(out, SR); A.11 The 2D wave equation % matlab script waveeq2dloss.m % finite difference scheme for the 2D wave equation with loss % fixed boundary conditions % raised cosine initial conditions % bilinear interpolation SR = 16000; gamma = 200 T60 = 8; epsilon = 1.3; TF = 2; ctr = [ ]; wid = 0.15; u0 = 0; v0 = 1; rp = [ ]; lambda = 1/sqrt(2); % sample rate(hz) % wave speed (1/s) % 60 db decay time (s) % domain aspect ratio % duration of simulation(s) % center location/width of excitation % maximum initial displacement/velocity % position of readout([0-1,0-1]) % Courant number %%%%%% global parameters

14 404 APPENDIX A % begin derived parameters NF = floor(sr*tf); sig0 = 6*log(10)/T60; % loss parameter % stability condition/scheme parameters h = gamma*k/lambda; Nx = floor(sqrt(epsilon)/h); Ny = floor(1/(sqrt(epsilon)*h)); h = sqrt(epsilon)/nx; lambda = gamma*k/h; s0 = (2-4*lambda^2)/(1+sig0*k); s1 = lambda^2/(1+sig0*k); t0 = -(1-sig0*k)/(1+sig0*k); % readout interpolation parameters rp_int = 1+floor([Nx Ny].*rp); rp_frac = 1+rp/h-rp_int; % create 2D raised cosine % find grid spacing % number of x-subdivisions of spatial domain % number of y-subdivisions of spatial domain % reset Courant number [X, Y] = meshgrid([0:nx]*h, [0:Ny]*h); dist = sqrt((x-ctr(1)).^2 +(Y-ctr(2)).^2); ind = sign(max(-dist+wid/2,0)); rc = 0.5*ind.*(1+cos(2*pi*dist /wid)); % set initial conditions u2 = u0*rc; u1 = (u0+k*v0)*rc; u = zeros(nx+1,ny+1); out = zeros(nf,2); u(2:nx,2:ny) = s1*(u1(3:nx+1,2:ny)+u1(1:nx-1,2:ny)+u1(2:nx,3:ny+1)+... u1(2:nx,1:ny-1))+s0*u1(2:nx,2:ny)+t0*u2(2:nx,2:ny); out(n,:) = (1-rp_frac(1))*(1-rp_frac(2))*u(rp_int(1),rp_int(2))+... (1-rp_frac(1))*rp_frac(2)*u(rp_int(1),rp_int(2)+1)+... rp_frac(1)*(1-rp_frac(2))*u(rp_int(1)+1,rp_int(2))+... rp_frac(1)*rp_frac(2)*u(rp_int(1)+1,rp_int(2)+1); u2 = u1; u1 = u; %%%%% main loop plot([0:nf-1]*k, out, k ); xlabel( t ); ylabel( u ); title( 2D Wave Equation with Loss: FD Output ); axis tight soundsc(out,sr);

15 APPENDIX A 405 A.12 Thin plate % matlab script plateloss.m % finite difference scheme for the thin plate equation with loss % simply supported boundary conditions % raised cosine initial conditions % vector/matrix update form % zeroth-order interpolation K = 20; T60 = 8; epsilon = 1.2; TF = 2; ctr = [ ]; wid = 0.3; u0 = 0; v0 = 1; rp = [ ]; mu = 0.25; % sample rate(hz) % plate stiffness parameter (1/s) % 60 db decay time (s) % domain aspect ratio % duration of simulation(s) % center location/width of excitation % maximum initial displacement/velocity % position of readout([0-1,0-1]) % scheme free parameter %%%%%% global parameters % begin derived parameters NF = floor(sr*tf); sig0 = 6*log(10)/T60; % loss parameter % stability condition/scheme parameters h = sqrt(k*k/mu); % find grid spacing Nx = floor(sqrt(epsilon)/h); % number of x-subdivisions of spatial domain Ny = floor(1/(sqrt(epsilon)*h)); % number of y-subdivisions of spatial domain h = sqrt(epsilon)/nx; ss = (Nx-1)*(Ny-1); % total grid size % generate difference matrix/scheme matrices Dxx = sparse(toeplitz([-2/h^2;1/h^2;zeros(nx-3,1)])); Dyy = sparse(toeplitz([-2/h^2;1/h^2;zeros(ny-3,1)])); D = kron(eye(nx-1), Dyy)+kron(Dxx, eye(ny-1)); DD = D*D; B = sparse((2*eye(ss)-k^2*k^2*dd)/(1+sig0*k)); C = ((1-sig0*k)/(1+sig0*k))*sparse(eye(ss)); % readout interpolation parameters rp_index = (Ny-1)*floor(rp(1)*Nx)+floor(rp(2)*Ny); % create 2D raised cosine [X, Y] = meshgrid([1:nx-1]*h, [1:Ny-1]*h); dist = sqrt((x-ctr(1)*sqrt(epsilon)).^2+(y-ctr(2)/sqrt(epsilon)).^2); ind = sign(max(-dist+wid/2,0)); rc = 0.5*ind.*(1+cos(2*pi*dist/wid)); rc = reshape(rc, ss,1);

16 406 APPENDIX A % set initial conditions/initialize output u2 = u0*rc; u1 = (u0+k*v0)*rc; u = zeros(ss,1);out = zeros(nf,1); u = B*u1-C*u2; u2 = u1; u1 = u; out(n) = u(rp_index); %%%%%% main loop plot([0:nf-1]*k, out, k ); xlabel( t ); ylabel( u ); title( Thin Plate Equation with Loss: FD Output ); axis tight soundsc(out,sr);

Numerical Sound Synthesis

Numerical Sound Synthesis Numerical Sound Synthesis Finite Difference Schemes and Simulation in Musical Acoustics Stefan Bilbao Acoustics and Fluid Dynamics Group/Music, University 01 Edinburgh, UK @WILEY A John Wiley and Sons,

More information

MATLAB/SIMULINK Programs for Flutter

MATLAB/SIMULINK Programs for Flutter H MATLAB/SIMULINK Programs for Flutter In this appix, some sample MATLAB programs are given for the calculation of the aeroelastic behaviour of a binary aeroelastic system, its response to control surface

More information

Phonon dispersion relation and density of states of a simple cubic lattice

Phonon dispersion relation and density of states of a simple cubic lattice Phonon dispersion relation and density of states of a simple cubic lattice Student project for the course Molecular and Solid State Physics by Eva Meisterhofer Contents 1 The linear spring model 3 1.1

More information

Introduction to Signal Analysis Parts I and II

Introduction to Signal Analysis Parts I and II 41614 Dynamics of Machinery 23/03/2005 IFS Introduction to Signal Analysis Parts I and II Contents 1 Topics of the Lecture 11/03/2005 (Part I) 2 2 Fourier Analysis Fourier Series, Integral and Complex

More information

a) Find the equation of motion of the system and write it in matrix form.

a) Find the equation of motion of the system and write it in matrix form. .003 Engineering Dynamics Problem Set Problem : Torsional Oscillator Two disks of radius r and r and mass m and m are mounted in series with steel shafts. The shaft between the base and m has length L

More information

Boundary Element Method Calculations of LDOS and Decay Rates

Boundary Element Method Calculations of LDOS and Decay Rates Appendix A Boundary Element Method Calculations of LDOS and Decay Rates A.1 Decay Rates in Atomic Units This appendix provides a brief tutorial for BEM calculations of the total and radiative decay rates,

More information

1 Electromechanical Effects

1 Electromechanical Effects 1 Electromechanical Effects Stefan Bilbao A rather special family of audio effects consists of those which employ mechanical elements in conjunction with analog electronics though many classic effects

More information

The Z-Transform. For a phasor: X(k) = e jωk. We have previously derived: Y = H(z)X

The Z-Transform. For a phasor: X(k) = e jωk. We have previously derived: Y = H(z)X The Z-Transform For a phasor: X(k) = e jωk We have previously derived: Y = H(z)X That is, the output of the filter (Y(k)) is derived by multiplying the input signal (X(k)) by the transfer function (H(z)).

More information

Perturbation Theory: Why do /i/ and /a/ have the formants they have? Tuesday, March 3, 15

Perturbation Theory: Why do /i/ and /a/ have the formants they have? Tuesday, March 3, 15 Perturbation Theory: Why do /i/ and /a/ have the formants they have? Vibration: Harmonic motion time 1 2 3 4 5 - A x 0 + A + A Block resting on air hockey table, with a spring attaching it to the side

More information

MAE 143B - Homework 7

MAE 143B - Homework 7 MAE 143B - Homework 7 6.7 Multiplying the first ODE by m u and subtracting the product of the second ODE with m s, we get m s m u (ẍ s ẍ i ) + m u b s (ẋ s ẋ u ) + m u k s (x s x u ) + m s b s (ẋ s ẋ u

More information

Physical Modeling Synthesis

Physical Modeling Synthesis Physical Modeling Synthesis ECE 272/472 Audio Signal Processing Yujia Yan University of Rochester Table of contents 1. Introduction 2. Basics of Digital Waveguide Synthesis 3. Fractional Delay Line 4.

More information

Grid Functions and Finite Difference Operators in 2D

Grid Functions and Finite Difference Operators in 2D Chapter 10 Grid Functions and Finite Difference Operators in 2D This chapter is concerned with the extension of the difference operators introduced in Chapter 5 to two spatial dimensions. The 2D case is

More information

A Real Time Piano Model Including Longitudinal Modes

A Real Time Piano Model Including Longitudinal Modes Introduction String Modeling Implementation Issues A Real Time Piano Model Including Longitudinal Modes Stefano Zambon and Federico Fontana Dipartimento di Informatica Università degli Studi di Verona

More information

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Electric Machines

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Electric Machines Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.685 Electric Machines Problem Set 1 Solutions September 1, 5 Problem 1: If we assume, as suggested in the

More information

Direct Fatigue Damage Spectrum Calculation for a Shock Response Spectrum

Direct Fatigue Damage Spectrum Calculation for a Shock Response Spectrum Direct Fatigue Damage Spectrum Calculation for a Shock Response Spectrum By Tom Irvine Email: tom@vibrationdata.com June 25, 2014 Introduction A fatigue damage spectrum (FDS) was calculated for a number

More information

4.2 Acoustics of Speech Production

4.2 Acoustics of Speech Production 4.2 Acoustics of Speech Production Acoustic phonetics is a field that studies the acoustic properties of speech and how these are related to the human speech production system. The topic is vast, exceeding

More information

Advanced Laser Technologies Homework #2

Advanced Laser Technologies Homework #2 Advanced Laser Technologies Homework #2 Chih-Han Lin student ID: r99245002 Graduate Institute of Applied Physics, National Taiwan University I. DEMONSTRATION OF MODE-LOCKING PULSES Assume that complex

More information

35H MPa Hydraulic Cylinder 3.5 MPa Hydraulic Cylinder 35H-3

35H MPa Hydraulic Cylinder 3.5 MPa Hydraulic Cylinder 35H-3 - - - - ff ff - - - - - - B B BB f f f f f f f 6 96 f f f f f f f 6 f LF LZ f 6 MM f 9 P D RR DD M6 M6 M6 M. M. M. M. M. SL. E 6 6 9 ZB Z EE RC/ RC/ RC/ RC/ RC/ ZM 6 F FP 6 K KK M. M. M. M. M M M M f f

More information

MATH 552 Spectral Methods Spring Homework Set 5 - SOLUTIONS

MATH 552 Spectral Methods Spring Homework Set 5 - SOLUTIONS MATH 55 Spectral Methods Spring 9 Homework Set 5 - SOLUTIONS. Suppose you are given an n n linear system Ax = f where the matrix A is tridiagonal b c a b c. A =.........,. a n b n c n a n b n with x =

More information

Chapter 1: Introduction

Chapter 1: Introduction Chapter 1: Introduction Definition: A differential equation is an equation involving the derivative of a function. If the function depends on a single variable, then only ordinary derivatives appear and

More information

Chapter 9. Linear Predictive Analysis of Speech Signals 语音信号的线性预测分析

Chapter 9. Linear Predictive Analysis of Speech Signals 语音信号的线性预测分析 Chapter 9 Linear Predictive Analysis of Speech Signals 语音信号的线性预测分析 1 LPC Methods LPC methods are the most widely used in speech coding, speech synthesis, speech recognition, speaker recognition and verification

More information

Distortion Analysis T

Distortion Analysis T EE 435 Lecture 32 Spectral Performance Windowing Spectral Performance of Data Converters - Time Quantization - Amplitude Quantization Quantization Noise . Review from last lecture. Distortion Analysis

More information

Chapter 9 Implicit Methods for Linear and Nonlinear Systems of ODEs

Chapter 9 Implicit Methods for Linear and Nonlinear Systems of ODEs Chapter 9 Implicit Methods for Linear and Nonlinear Systems of ODEs In the previous chapter, we investigated stiffness in ODEs. Recall that an ODE is stiff if it exhibits behavior on widelyvarying timescales.

More information

Perturbation Theory: Why do /i/ and /a/ have the formants they have? Wednesday, March 9, 16

Perturbation Theory: Why do /i/ and /a/ have the formants they have? Wednesday, March 9, 16 Perturbation Theory: Why do /i/ and /a/ have the formants they have? Components of Oscillation 1. Springs resist displacement from rest position springs return to rest position ẋ = k(x x 0 ) Stiffness

More information

Rotational Motion. Figure 1: Torsional harmonic oscillator. The locations of the rotor and fiber are indicated.

Rotational Motion. Figure 1: Torsional harmonic oscillator. The locations of the rotor and fiber are indicated. Rotational Motion 1 Purpose The main purpose of this laboratory is to familiarize you with the use of the Torsional Harmonic Oscillator (THO) that will be the subject of the final lab of the course on

More information

SPEECH COMMUNICATION 6.541J J-HST710J Spring 2004

SPEECH COMMUNICATION 6.541J J-HST710J Spring 2004 6.541J PS3 02/19/04 1 SPEECH COMMUNICATION 6.541J-24.968J-HST710J Spring 2004 Problem Set 3 Assigned: 02/19/04 Due: 02/26/04 Read Chapter 6. Problem 1 In this problem we examine the acoustic and perceptual

More information

FREE VIBRATION WITH COULOMB DAMPING Revision A

FREE VIBRATION WITH COULOMB DAMPING Revision A By Tom Irvine Email: tomirvine@aol.com June 5, 010 FREE VIBRATION WITH COULOMB DAMPING Revision A g m F sgn () & Figure 1. Coulomb damping is dry friction damping. Consider the free vibration response

More information

Vibrations of string. Henna Tahvanainen. November 8, ELEC-E5610 Acoustics and the Physics of Sound, Lecture 4

Vibrations of string. Henna Tahvanainen. November 8, ELEC-E5610 Acoustics and the Physics of Sound, Lecture 4 Vibrations of string EEC-E5610 Acoustics and the Physics of Sound, ecture 4 Henna Tahvanainen Department of Signal Processing and Acoustics Aalto University School of Electrical Engineering November 8,

More information

CMPT 889: Lecture 5 Filters

CMPT 889: Lecture 5 Filters CMPT 889: Lecture 5 Filters Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University October 7, 2009 1 Digital Filters Any medium through which a signal passes may be regarded

More information

Midterm EXAM PHYS 401 (Spring 2012), 03/20/12

Midterm EXAM PHYS 401 (Spring 2012), 03/20/12 Midterm EXAM PHYS 401 (Spring 2012), 03/20/12 Name: Signature: Duration: 75 minutes Show all your work for full/partial credit! In taking this exam you confirm to adhere to the Aggie Honor Code: An Aggie

More information

2D Plotting with Matlab

2D Plotting with Matlab GEEN 1300 Introduction to Engineering Computing Class Meeting #22 Monday, Nov. 9 th Engineering Computing and Problem Solving with Matlab 2-D plotting with Matlab Script files User-defined functions Matlab

More information

Digital Filters. Linearity and Time Invariance. Linear Time-Invariant (LTI) Filters: CMPT 889: Lecture 5 Filters

Digital Filters. Linearity and Time Invariance. Linear Time-Invariant (LTI) Filters: CMPT 889: Lecture 5 Filters Digital Filters CMPT 889: Lecture 5 Filters Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University October 7, 29 Any medium through which a signal passes may be regarded as

More information

FINITE DIFFERENCE METHODS (II): 1D EXAMPLES IN MATLAB

FINITE DIFFERENCE METHODS (II): 1D EXAMPLES IN MATLAB 1.723 - COMPUTATIONAL METHODS FOR FLOW IN POROUS MEDIA Spring 2009 FINITE DIFFERENCE METHODS (II): 1D EXAMPLES IN MATLAB Luis Cueto-Felgueroso 1. COMPUTING FINITE DIFFERENCE WEIGHTS The function fdcoefs

More information

ECE382/ME482 Spring 2005 Homework 1 Solution February 10,

ECE382/ME482 Spring 2005 Homework 1 Solution February 10, ECE382/ME482 Spring 25 Homework 1 Solution February 1, 25 1 Solution to HW1 P2.33 For the system shown in Figure P2.33 on p. 119 of the text, find T(s) = Y 2 (s)/r 1 (s). Determine a relationship that

More information

Numerical simulation of a piano soundboard under downbearing. Adrien Mamou-Mani, Joël Frelat, and Charles Besnainou. Institut Jean Le Rond d Alembert,

Numerical simulation of a piano soundboard under downbearing. Adrien Mamou-Mani, Joël Frelat, and Charles Besnainou. Institut Jean Le Rond d Alembert, Numerical simulation of a piano soundboard under downbearing Adrien Mamou-Mani, Joël Frelat, and Charles Besnainou Institut Jean Le Rond d Alembert, UPMC/CNRS (Dated: December 27, 2007) 1 Abstract A finite

More information

Thursday, October 29, LPC Analysis

Thursday, October 29, LPC Analysis LPC Analysis Prediction & Regression We hypothesize that there is some systematic relation between the values of two variables, X and Y. If this hypothesis is true, we can (partially) predict the observed

More information

Index. Index. More information. in this web service Cambridge University Press

Index. Index. More information.  in this web service Cambridge University Press A-type elements, 4 7, 18, 31, 168, 198, 202, 219, 220, 222, 225 A-type variables. See Across variable ac current, 172, 251 ac induction motor, 251 Acceleration rotational, 30 translational, 16 Accumulator,

More information

Physical Acoustics. Hearing is the result of a complex interaction of physics, physiology, perception and cognition.

Physical Acoustics. Hearing is the result of a complex interaction of physics, physiology, perception and cognition. Physical Acoustics Hearing, auditory perception, or audition is the ability to perceive sound by detecting vibrations, changes in the pressure of the surrounding medium through time, through an organ such

More information

Spring 2016 Network Science Solution of Homework Assignment #5

Spring 2016 Network Science Solution of Homework Assignment #5 Spring 216 Network Science Solution of Homework Assignment #5 Problem 1 [PGFL and Its Application] (4%) In a wireless cellular network, suppose users associate with a base station (BS) by the nearest BS

More information

Chap. 15: Simple Harmonic Motion

Chap. 15: Simple Harmonic Motion Chap. 15: Simple Harmonic Motion Announcements: CAPA is due next Tuesday and next Friday. Web page: http://www.colorado.edu/physics/phys1110/phys1110_sp12/ Examples of periodic motion vibrating guitar

More information

Homework Assignment 3

Homework Assignment 3 ECE382/ME482 Fall 2008 Homework 3 Solution October 20, 2008 1 Homework Assignment 3 Assigned September 30, 2008. Due in lecture October 7, 2008. Note that you must include all of your work to obtain full

More information

Dynamics and control of mechanical systems

Dynamics and control of mechanical systems Dynamics and control of mechanical systems Date Day 1 (03/05) - 05/05 Day 2 (07/05) Day 3 (09/05) Day 4 (11/05) Day 5 (14/05) Day 6 (16/05) Content Review of the basics of mechanics. Kinematics of rigid

More information

Dynamics of structures

Dynamics of structures Dynamics of structures 2.Vibrations: single degree of freedom system Arnaud Deraemaeker (aderaema@ulb.ac.be) 1 Outline of the chapter *One degree of freedom systems in real life Hypothesis Examples *Response

More information

Velocity estimates from sampled position data

Velocity estimates from sampled position data Velocity estimates from sampled position data It is often the case that position information has been sampled from continuous process and it is desired to estimate the velocity and acceleration. Example

More information

Advanced Vibrations. Distributed-Parameter Systems: Exact Solutions (Lecture 10) By: H. Ahmadian

Advanced Vibrations. Distributed-Parameter Systems: Exact Solutions (Lecture 10) By: H. Ahmadian Advanced Vibrations Distributed-Parameter Systems: Exact Solutions (Lecture 10) By: H. Ahmadian ahmadian@iust.ac.ir Distributed-Parameter Systems: Exact Solutions Relation between Discrete and Distributed

More information

Laboratory handout 5 Mode shapes and resonance

Laboratory handout 5 Mode shapes and resonance laboratory handouts, me 34 82 Laboratory handout 5 Mode shapes and resonance In this handout, material and assignments marked as optional can be skipped when preparing for the lab, but may provide a useful

More information

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP In this laboratory session we will learn how to. Use MATLAB solvers for solving scalar IVP 2. Use MATLAB solvers for solving higher order ODEs and

More information

Application of the Shannon-Kotelnik theorem on the vortex structures identification

Application of the Shannon-Kotelnik theorem on the vortex structures identification IOP Conference Series: Earth and Environmental Science OPEN ACCESS Application of the Shannon-Kotelnik theorem on the vortex structures identification To cite this article: F Pochylý et al 2014 IOP Conf.

More information

Curve Fitting Analytical Mode Shapes to Experimental Data

Curve Fitting Analytical Mode Shapes to Experimental Data Curve Fitting Analytical Mode Shapes to Experimental Data Brian Schwarz, Shawn Richardson, Mar Richardson Vibrant Technology, Inc. Scotts Valley, CA ABSTRACT In is paper, we employ e fact at all experimental

More information

PREPARED PIANO SOUND SYNTHESIS

PREPARED PIANO SOUND SYNTHESIS Proc. of the 9 th Int. Conference on Digital Audio Effects (DAFx-6), Montreal, Canada, September 8-, 6 PREPARED PIANO SOUND SYNTHESIS Stefan Bilbao Music University of Edinburgh United Kingdom sbilbao@staffmail.ed.ac.uk

More information

Contents. Dynamics and control of mechanical systems. Focus on

Contents. Dynamics and control of mechanical systems. Focus on Dynamics and control of mechanical systems Date Day 1 (01/08) Day 2 (03/08) Day 3 (05/08) Day 4 (07/08) Day 5 (09/08) Day 6 (11/08) Content Review of the basics of mechanics. Kinematics of rigid bodies

More information

Lab 11. Spring-Mass Oscillations

Lab 11. Spring-Mass Oscillations Lab 11. Spring-Mass Oscillations Goals To determine experimentally whether the supplied spring obeys Hooke s law, and if so, to calculate its spring constant. To find a solution to the differential equation

More information

FILTERING IN THE FREQUENCY DOMAIN

FILTERING IN THE FREQUENCY DOMAIN 1 FILTERING IN THE FREQUENCY DOMAIN Lecture 4 Spatial Vs Frequency domain 2 Spatial Domain (I) Normal image space Changes in pixel positions correspond to changes in the scene Distances in I correspond

More information

Modal Analysis: What it is and is not Gerrit Visser

Modal Analysis: What it is and is not Gerrit Visser Modal Analysis: What it is and is not Gerrit Visser What is a Modal Analysis? What answers do we get out of it? How is it useful? What does it not tell us? In this article, we ll discuss where a modal

More information

Discrete-time modelling of musical instruments

Discrete-time modelling of musical instruments INSTITUTE OF PHYSICS PUBLISHING Rep. Prog. Phys. 69 (2006) 1 78 REPORTS ON PROGRESS IN PHYSICS doi:10.1088/0034-4885/69/1/r01 Discrete-time modelling of musical instruments Vesa Välimäki, Jyri Pakarinen,

More information

DOING PHYSICS WITH MATLAB FOURIER ANALYSIS FOURIER TRANSFORMS

DOING PHYSICS WITH MATLAB FOURIER ANALYSIS FOURIER TRANSFORMS DOING PHYSICS WITH MATLAB FOURIER ANALYSIS FOURIER TRANSFORMS Ian Cooper School of Physics, University of Sydney ian.cooper@sydney.edu.au DOWNLOAD DIRECTORY FOR MATLAB SCRIPTS maths_ft_01.m mscript used

More information

S(c)/ c = 2 J T r = 2v, (2)

S(c)/ c = 2 J T r = 2v, (2) M. Balda LMFnlsq Nonlinear least squares 2008-01-11 Let us have a measured values (column vector) y depent on operational variables x. We try to make a regression of y(x) by some function f(x, c), where

More information

Improved frequency-dependent damping for time domain modelling of linear string vibration

Improved frequency-dependent damping for time domain modelling of linear string vibration String Instruments: Paper ICA16-81 Improved frequency-dependent damping for time domain modelling of linear string vibration Charlotte Desvages (a), Stefan Bilbao (b), Michele Ducceschi (c) (a) Acoustics

More information

ENGR Spring Exam 2

ENGR Spring Exam 2 ENGR 1300 Spring 013 Exam INSTRUCTIONS: Duration: 60 minutes Keep your eyes on your own work! Keep your work covered at all times! 1. Each student is responsible for following directions. Read carefully..

More information

Differential Equations and Linear Algebra Exercises. Department of Mathematics, Heriot-Watt University, Edinburgh EH14 4AS

Differential Equations and Linear Algebra Exercises. Department of Mathematics, Heriot-Watt University, Edinburgh EH14 4AS Differential Equations and Linear Algebra Exercises Department of Mathematics, Heriot-Watt University, Edinburgh EH14 4AS CHAPTER 1 Linear second order ODEs Exercises 1.1. (*) 1 The following differential

More information

Numerical Integration of Ordinary Differential Equations for Initial Value Problems

Numerical Integration of Ordinary Differential Equations for Initial Value Problems Numerical Integration of Ordinary Differential Equations for Initial Value Problems Gerald Recktenwald Portland State University Department of Mechanical Engineering gerry@me.pdx.edu These slides are a

More information

EFFECTIVE MODAL MASS & MODAL PARTICIPATION FACTORS Revision F

EFFECTIVE MODAL MASS & MODAL PARTICIPATION FACTORS Revision F EFFECTIVE MODA MASS & MODA PARTICIPATION FACTORS Revision F By Tom Irvine Email: tomirvine@aol.com March 9, 1 Introduction The effective modal mass provides a method for judging the significance of a vibration

More information

ME 563 HOMEWORK # 7 SOLUTIONS Fall 2010

ME 563 HOMEWORK # 7 SOLUTIONS Fall 2010 ME 563 HOMEWORK # 7 SOLUTIONS Fall 2010 PROBLEM 1: Given the mass matrix and two undamped natural frequencies for a general two degree-of-freedom system with a symmetric stiffness matrix, find the stiffness

More information

CHAPTER 8 SCREWS, FASTENERS, NONPERMANENT JOINTS

CHAPTER 8 SCREWS, FASTENERS, NONPERMANENT JOINTS CHAPTER 8 SCREWS, FASTENERS, NONPERMANENT JOINTS This chapter deals with the design and analysis of nonpermanent fasteners such as bolts, power screws, cap screws, setscrews, eys and pins. 8- Standards

More information

INFINITE-IMPULSE RESPONSE DIGITAL FILTERS Classical analog filters and their conversion to digital filters 4. THE BUTTERWORTH ANALOG FILTER

INFINITE-IMPULSE RESPONSE DIGITAL FILTERS Classical analog filters and their conversion to digital filters 4. THE BUTTERWORTH ANALOG FILTER INFINITE-IMPULSE RESPONSE DIGITAL FILTERS Classical analog filters and their conversion to digital filters. INTRODUCTION 2. IIR FILTER DESIGN 3. ANALOG FILTERS 4. THE BUTTERWORTH ANALOG FILTER 5. THE CHEBYSHEV-I

More information

Recovering f0 using autocorelation. Tuesday, March 31, 15

Recovering f0 using autocorelation. Tuesday, March 31, 15 Recovering f0 using autocorelation More on correlation More on correlation The correlation between two vectors is a measure of whether they share the same pattern of values at corresponding vector positions

More information

NUMERICAL MODELLING OF RUBBER VIBRATION ISOLATORS

NUMERICAL MODELLING OF RUBBER VIBRATION ISOLATORS NUMERICAL MODELLING OF RUBBER VIBRATION ISOLATORS Clemens A.J. Beijers and André de Boer University of Twente P.O. Box 7, 75 AE Enschede, The Netherlands email: c.a.j.beijers@utwente.nl Abstract An important

More information

EF 152 Exam 2 - Spring, 2017 Page 1 Copy 223

EF 152 Exam 2 - Spring, 2017 Page 1 Copy 223 EF 152 Exam 2 - Spring, 2017 Page 1 Copy 223 Instructions Do not open the exam until instructed to do so. Do not leave if there is less than 5 minutes to go in the exam. When time is called, immediately

More information

Experiment: Oscillations of a Mass on a Spring

Experiment: Oscillations of a Mass on a Spring Physics NYC F17 Objective: Theory: Experiment: Oscillations of a Mass on a Spring A: to verify Hooke s law for a spring and measure its elasticity constant. B: to check the relationship between the period

More information

Nonlinear Static - 1D Plasticity - Isotropic and Kinematic Hardening Walla Walla University

Nonlinear Static - 1D Plasticity - Isotropic and Kinematic Hardening Walla Walla University Nonlinear Static - 1D Plasticity - Isotropic and Kinematic Hardening Walla Walla University Professor Louie L. Yaw c Draft date January 18, 2017 Copyright is reserved. Individual copies may be made for

More information

Broadband Vibration Response Reduction Using FEA and Optimization Techniques

Broadband Vibration Response Reduction Using FEA and Optimization Techniques Broadband Vibration Response Reduction Using FEA and Optimization Techniques P.C. Jain Visiting Scholar at Penn State University, University Park, PA 16802 A.D. Belegundu Professor of Mechanical Engineering,

More information

PHY2048 Final Exam Review, Spring 2017

PHY2048 Final Exam Review, Spring 2017 1. A 4kg block is at rest on a frictionless horizontal track. A constant horizontal force acts on the block at t = 0s. A graph of the position of the block at 1 second time intervals is shown in the figure.

More information

Unit assessments are composed of multiple choice and free response questions from AP exams.

Unit assessments are composed of multiple choice and free response questions from AP exams. AP Physics B Text: Serway, Raymond A., and Jerry S. Faugh, College Physics, 7 th ed. Belmont, CA: Thomson Brooks/Cole, 2006. Course evaluation: - Grade determination Final Exam 15% Unit Exams 42.5% Daily

More information

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.061/6.690 Introduction to Power Systems

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.061/6.690 Introduction to Power Systems Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.061/6.690 Introduction to Power Systems Problem Set 9 Solutions April 18, 011 Problem 1: Chapter 9, Problem

More information

Mechanical and Structural Vibration: Theory and Applications

Mechanical and Structural Vibration: Theory and Applications Mechanical and Structural Vibration: Theory and Applications Jerry H. Ginsberg Errata to the First Printing: 17 August 2001 Pg. 15, second line:...and L 2 + x 2 x 1, respectively,... Pg. 15, 2nd eq. and

More information

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Electric Machines

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Electric Machines Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.685 Electric Machines Problem Set 4 Solutions October 0, 2005 Problem : The problem statement should have

More information

Lecture Notes on Numerical Schemes for Flow and Transport Problems

Lecture Notes on Numerical Schemes for Flow and Transport Problems Lecture Notes on Numerical Schemes for Flow and Transport Problems by Sri Redeki Pudaprasetya sr pudap@math.itb.ac.id Department of Mathematics Faculty of Mathematics and Natural Sciences Bandung Institute

More information

Supplement to Effects of Air Loading on the Acoustics of an. Indian Musical Drum

Supplement to Effects of Air Loading on the Acoustics of an. Indian Musical Drum Supplement to Effects of Air Loading on the Acoustics of an Indian Musical Drum Sankalp Tiwari and Anurag Gupta Department of Mechanical Engineering, Indian Institute of Technology, Kanpur 08016, India

More information

REAL-TIME REVERB SIMULATION FOR ARBITRARY OBJECT SHAPES

REAL-TIME REVERB SIMULATION FOR ARBITRARY OBJECT SHAPES REAL-TIME REVERB SIMULATION FOR ARBITRARY OBJECT SHAPES Cynthia Bruyns Maxwell University of California at Berkeley Computer Science Department Center for New Music and Audio Technologies Berkeley, California

More information

ECE 6390 Homework 2: Look Angles

ECE 6390 Homework 2: Look Angles ECE 6390 Homework 2: Look Angles Solutions Problem 1: Numerical Analysis of Orbits The continuous time equations we start with are: r = r θ 2 GM p r 2 θ = 2ṙ θ r First, let our discrete representations

More information

Theoretical Manual Theoretical background to the Strand7 finite element analysis system

Theoretical Manual Theoretical background to the Strand7 finite element analysis system Theoretical Manual Theoretical background to the Strand7 finite element analysis system Edition 1 January 2005 Strand7 Release 2.3 2004-2005 Strand7 Pty Limited All rights reserved Contents Preface Chapter

More information

Dynamics inertia, mass, force. Including centripetal acceleration

Dynamics inertia, mass, force. Including centripetal acceleration For the Singapore Junior Physics Olympiad, no question set will require the use of calculus. However, solutions of questions involving calculus are acceptable. 1. Mechanics Kinematics position, displacement,

More information

Lecture XXVI. Morris Swartz Dept. of Physics and Astronomy Johns Hopkins University November 5, 2003

Lecture XXVI. Morris Swartz Dept. of Physics and Astronomy Johns Hopkins University November 5, 2003 Lecture XXVI Morris Swartz Dept. of Physics and Astronomy Johns Hopins University morris@jhu.edu November 5, 2003 Lecture XXVI: Oscillations Oscillations are periodic motions. There are many examples of

More information

Solutions. Chapter 1. Problem 1.1. Solution. Simulate free response of damped harmonic oscillator

Solutions. Chapter 1. Problem 1.1. Solution. Simulate free response of damped harmonic oscillator Chapter Solutions Problem. Simulate free response of damped harmonic oscillator ẍ + ζẋ + x = for different values of damping ration ζ and initial conditions. Plot the response x(t) and ẋ(t) versus t and

More information

Linear Prediction 1 / 41

Linear Prediction 1 / 41 Linear Prediction 1 / 41 A map of speech signal processing Natural signals Models Artificial signals Inference Speech synthesis Hidden Markov Inference Homomorphic processing Dereverberation, Deconvolution

More information

Lab 9a. Linear Predictive Coding for Speech Processing

Lab 9a. Linear Predictive Coding for Speech Processing EE275Lab October 27, 2007 Lab 9a. Linear Predictive Coding for Speech Processing Pitch Period Impulse Train Generator Voiced/Unvoiced Speech Switch Vocal Tract Parameters Time-Varying Digital Filter H(z)

More information

Vibration Dynamics and Control

Vibration Dynamics and Control Giancarlo Genta Vibration Dynamics and Control Spri ringer Contents Series Preface Preface Symbols vii ix xxi Introduction 1 I Dynamics of Linear, Time Invariant, Systems 23 1 Conservative Discrete Vibrating

More information

FIRST YEAR MATHS FOR PHYSICS STUDENTS NORMAL MODES AND WAVES. Hilary Term Prof. G.G.Ross. Question Sheet 1: Normal Modes

FIRST YEAR MATHS FOR PHYSICS STUDENTS NORMAL MODES AND WAVES. Hilary Term Prof. G.G.Ross. Question Sheet 1: Normal Modes FIRST YEAR MATHS FOR PHYSICS STUDENTS NORMAL MODES AND WAVES Hilary Term 008. Prof. G.G.Ross Question Sheet : Normal Modes [Questions marked with an asterisk (*) cover topics also covered by the unstarred

More information

ECE382/ME482 Spring 2005 Homework 7 Solution April 17, K(s + 0.2) s 2 (s + 2)(s + 5) G(s) =

ECE382/ME482 Spring 2005 Homework 7 Solution April 17, K(s + 0.2) s 2 (s + 2)(s + 5) G(s) = ECE382/ME482 Spring 25 Homework 7 Solution April 17, 25 1 Solution to HW7 AP9.5 We are given a system with open loop transfer function G(s) = K(s +.2) s 2 (s + 2)(s + 5) (1) and unity negative feedback.

More information

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP MATLAB sessions: Laboratory 4 MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP In this laboratory session we will learn how to. Use MATLAB solvers for solving scalar IVP 2. Use MATLAB solvers for

More information

DOING PHYSICS WITH MATLAB WAVE MOTION STANDING WAVES IN AIR COLUMNS

DOING PHYSICS WITH MATLAB WAVE MOTION STANDING WAVES IN AIR COLUMNS DOING PHYSICS WITH MATLAB WAVE MOTION STANDING WAVES IN AIR COLUMNS Ian Cooper School of Physics, University of Sydney ian.cooper@sydney.edu.au DOWNLOAD DIRECTORY FOR MATLAB SCRIPTS air_columns.m This

More information

AP Physics 1. Course Overview

AP Physics 1. Course Overview Radnor High School Course Syllabus AP Physics 1 Credits: Grade Weighting: Yes Prerequisites: Co-requisites: Length: Format: 1.0 Credit, weighted Honors chemistry or Advanced Chemistry Honors Pre-calculus

More information

Step 1: Mathematical Modeling

Step 1: Mathematical Modeling 083 Mechanical Vibrations Lesson Vibration Analysis Procedure The analysis of a vibrating system usually involves four steps: mathematical modeling derivation of the governing uations solution of the uations

More information

MATH REFRESHER ANSWER SHEET (Note: Only this answer sheet and the following graph page will be evaluated)

MATH REFRESHER ANSWER SHEET (Note: Only this answer sheet and the following graph page will be evaluated) NAME: SCORE: /50 MATH REFRESHER ANSWER SHEET (Note: Only this answer sheet and the following graph page will be evaluated) 1. 23. 2. 24. 3. 25. 4. 26. 5. 27. 6. 28. 7. 29. 8. 30. 9. 31. 10. 32. 11. 33.

More information

Lecture 9: Eigenvalues and Eigenvectors in Classical Mechanics (See Section 3.12 in Boas)

Lecture 9: Eigenvalues and Eigenvectors in Classical Mechanics (See Section 3.12 in Boas) Lecture 9: Eigenvalues and Eigenvectors in Classical Mechanics (See Section 3 in Boas) As suggested in Lecture 8 the formalism of eigenvalues/eigenvectors has many applications in physics, especially in

More information

Nonlinear Least Squares Curve Fitting

Nonlinear Least Squares Curve Fitting Nonlinear Least Squares Curve Fitting Jack Merrin February 12, 2017 1 Summary There is no general solution for the minimization of chi-squared to find the best estimates of the parameters when the model

More information

EFFECTS OF PRESTRESSES ON NATURAL FREQUENCIES OF A BUCKLED WOODEN PLATE: A NUMERICAL AND EXPERIMENTAL INVESTIGATION

EFFECTS OF PRESTRESSES ON NATURAL FREQUENCIES OF A BUCKLED WOODEN PLATE: A NUMERICAL AND EXPERIMENTAL INVESTIGATION EFFECTS OF PRESTRESSES ON NATURAL FREQUENCIES OF A BUCKLED WOODEN PLATE: A NUMERICAL AND EXPERIMENTAL INVESTIGATION Adrien Mamou-Mani, Sylvie Le Moyne, Joël Frelat, Charles Besnainou, François Ollivier

More information

Numerical Linea Algebra Assignment 009

Numerical Linea Algebra Assignment 009 Numerical Linea Algebra Assignment 009 Nguyen Quan Ba Hong Students at Faculty of Math and Computer Science, Ho Chi Minh University of Science, Vietnam email. nguyenquanbahong@gmail.com blog. http://hongnguyenquanba.wordpress.com

More information

Oscillations. Oscillations and Simple Harmonic Motion

Oscillations. Oscillations and Simple Harmonic Motion Oscillations AP Physics C Oscillations and Simple Harmonic Motion 1 Equilibrium and Oscillations A marble that is free to roll inside a spherical bowl has an equilibrium position at the bottom of the bowl

More information

Applied Mathematics B Study Guide

Applied Mathematics B Study Guide Science, Engineering and Technology Portfolio School of Life and Physical Sciences Foundation Studies (Applied Science/Engineering) Applied Mathematics B Study Guide Topics Kinematics Dynamics Work, Energy

More information