Lab1 code

Lab1 code - GdB = 20*log10(Gain) plot(S/(2*pi)/1000,GdB) h...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 j = sqrt(-1) Ra = 598 Rb = 32152 test = 100 clf h R1 = Ra R2 = Rb C1 = Ca C2 = Ca Wp = sqrt(1/(R1*R2*C1^2)) Qp = 3.6666 B = Wp/Qp h for counter=1:100 figure(1) h hold on R1 = Ra*((rand(1)/10)+.95) R2 = Rb*((rand(1)/10)+.95) C1 = Ca*((rand(1)/10)+.95) C2 = Ca*((rand(1)/10)+.95) Wp = sqrt(1/(R1*R2*C1^2)) Qp = 3.6666 B = Wp/Qp h h S = linspace(2*pi*1e3,40000*2*pi,500) Gain = (Kb.*(Wp/Qp)*S.*j)./((S.*j).^2 + B.*S.*j+Wp^2) Gain = sqrt((real(Gain)).^2+(imag(Gain)).^2)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: GdB = 20*log10(Gain) plot(S/(2*pi)/1000,GdB) h end h R1 = Ra R2 = Rb C1 = Ca C2 = Ca h Kb = -0.5*(R2/R1) Wp = sqrt(1/(R1*R2*C1^2)) Qp = 3.6666 B = Wp/Qp h S = linspace(2*pi*1e3,40000*2*pi,500) Cah = 3.3*1e-9 Cbh = 3.3*1e-9 Kb =h-0.5*(R2/R1) Kb =h-0.5*(R2/R1) Sheet1 Page 2 Gain = (Kb.*(Wp/Qp)*S.*j)./((S.*j).^2 + B.*S.*j+Wp^2) Gain = sqrt((real(Gain)).^2+(imag(Gain)).^2) GdB = 20*log10(Gain) plot(S/(2*pi)/1000,GdB,'g')...
View Full Document

Page1 / 2

Lab1 code - GdB = 20*log10(Gain) plot(S/(2*pi)/1000,GdB) h...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online