======================ANTI_ALIASING_FILTERS================================== Butterworth Flattest response near dc moderately fast roll off attenuation rate = 6dB/octave stable phase shift fc at -3dB overshoot on step response constant amplitude>>time delay or phase response Bessel Optimum flat phase response avoids overshoot/undershoot important for pulses amplitude not as flat roll off is slow gain rool off modifiy amplitude moderate attentuation rate fc at phase shift is 1/2 rate Chebyshev Rapid attenutation above cut off some bandpass ripple squarer amplitude response than butterworth less desireable phase and time delay fc at attenuation exceeds specified ripple Cauer (Elliptical) Surpasess for critical amplitude application very sharp roll off with some ripple squarest possible amplitude response poor phase and transient responses. ----------------------------------------------------------------------------- bessel linear phase delay delta_phase/delta_freq = constant H(s) = 1/B_n(s) Bn = (2*n-1)*B_(n-1) + s^2*B_(n-2) ... nth order bessel polynomial B_0 = 1 B_1 = s+ 1 Bes_0(s) = 1 Bes_1(s) = 1/(s+1) Bes_2(s) = 3/(s^2+3*s+3) Bes_3(s) = 15/((s+2.32219)*(s^2+3.67782*s+6.4944)) Bes_4(s) = 105/((s^2+5.79242*s+9.14013)* (s^2+4.20758*s+11.4878)) Bes_5(s) = 945/((s+3.64674)*(s^2+6.70391*s+14.2725)* (s^2+4.64934*s+18.15631)) B ^ /|\ imag B | __--|--__ Bessel = linear phase delay / | \ / | \ __B______|______|__ real | | | \ | / \__ | __/ --|-- B B ----------------------------------------------------------------------------- Butter worth montonic decrease with freq poles along circle ^ /|\ imag | X_--|--__ Butter worth = maximun flat / . | . \ / .| . \ __X______|______|__ real | . | . | \ . | . / n=3 \X_ | __/ --|-- ^ /|\ imag | _X--|--__ Butter worth = maximun flat / . | . \ X . .|. . \ __|______|______|__ real | . .|. . | X . | . / n=4 \_X | __/ --|-- |_ |_\ Amax | |\ | | \__ Amin | | |\ |_|_|_\__ wc n =log((10^(Amin/10)-1)/(10^(Amax/10)-1))/(2*log(Ws/wc)) But_0(s) = 1 But_1(s) = 1/(s+1) But_2(s) = 1/(s^2+1.414*s+1) But_3(s) = 1/((s+1)*(s^2+1*s+1)) But_4(s) = 1/((s^2+0.76536*s+1)*(s^2+1.84776*s+1)) But_5(s) = 1/((s+1)*(s^2+0.6180*s+1)*(s^2+1.6180*s+1)) But_6(s) = 1/((s^2+0.5176*s+)*(s^2+1.414*s+1)* (s^2+1.9318*s+1)) But(s) =1/(a_n*s^n +a_[n-1]*s^[n-1] +... a*s+ 1) n a_1 a_2 a_3 a_4 a_5 a_6 a_7 a_8 1 1 2 sqr(2) 1 3 2 2 1 4 2.613 3.414 2.613 1 5 3.236 5.236 5.236 3.236 1 6 3.864 7.464 9.141 7.464 3.864 1 7 4.494 10.103 14.606 14.606 10.103 4.494 1 8 5.126 13.138 21.848 25.691 21.848 13.138 5.126 1 ----------------------------------------------------------------------------- Chebychev equiripple poles along elispes ^ /|\ imag | _B->C--__ Chebychev = Butter worth on ellispe / ! | . \ equal ripple in passband B->C .|. . \ __|__!___|______|__ real | ! .|. . | B->C. | . / n=4 \_ ! | __/ B->C-- <----> sigma sigma_chev=sigma_butterworth*tanh((1/n)*asinh(1/epsilon)) H(jw)^2 = 1/( ! +( epsilon*C_n(w) )^2 ripple_height = 1 -1/sqrt(1-epsilon^2) C_n(w) = a_1*w^n +a_2*w^[n-1] +... a^[n-1]*w+ a^n n a_1 a_2 a_3 a_4 a_5 a_6 a_7 a_8 2 2 0 -1 3 4 0 -3 0 4 8 0 -8 0 1 5 16 0 -20 0 5 0 6 32 0 -48 0 18 0 -1 7 64 0 -112 0 56 0 -7 0 8 128 0 -256 0 160 0 -32 0 1 ----------------------------------------------------------------------------- Cauer highest rolloff ^ /|\ imag | 0 Elliptic or Cauer filter 0 _X--|--__ X . | . \ / . .|. . \ __X______|______|__ real | . .|. . | X . | . / \_ | __/ X--|-- 0 0 ======================FILTERS_STATE_VARIABLE=============================== Filters high_pass = (s^2 )/(s^2 +(wo/Q)*s +wo^2) band_pass = ( +(wo/Q)*s )/(s^2 +(wo/Q)*s +wo^2) low_pass = ( wo^2)/(s^2 +(wo/Q)*s +wo^2) all_pass = (s^2 -(wo/Q)*s +wo^2)/(s^2 +(wo/Q)*s +wo^2) band_rej = (s^2 +wo^2)/(s^2 +(wo/Q)*s +wo^2) __ _____|b2|________________ | |__| __ | | ____|b1|_______ | | | |__| | | ___ .. | |. V_V U(z) _ / _ \ y(t)| ___ |y(t) ___ y(t) / _ \ _\|k|_\/ \ \_____|_|1/z|_|____|1/z|___\/ \ \_\ /|_| /\ /_ / |___| | |___|| /\ /_ / / \___/ | | \___/ Y(z) ^ ^ _____ | | | |___| -a2 |______| | | |_____| ___ | |_____________|-a1|_________| |___| Y(z)/U(z) =K (1+ z*b1 + z*b2) /( z^2 +a2*z +a1) __ _____|b2|________________ | |__| __ | | ____|b1|_______ | | | |__| | | ___ .. | |. V_V U(S) _ / _ \ y(t)| ___ |y(t) ___ y(t) / _ \ _\|k|_\/ \ \_____|_|1/s|_|____|1/s|___\/ \ \_\ /|_| /\ /_ / |___| | |___|| /\ /_ / / \___/ | | \___/ Y(S) ^ ^ _____ | | | |___| -a2 |______| | | |_____| ___ | |_____________|-a1|_________| |___| Y(S)/U(S) =K (1+ s*b1 + s*b2) /( s^2 +a2*s +a1) ____ ___||_ ____||_|Y(S)| | || | | ||||____| | |\ C| | |\ C | ____ Rk R | |-\ | R | |-\ | |U(S)|_/\ /\__/\ /\_|_| \_|_/\ /\_|_| \_| |____| \/ | \/ | /| \/ | /| | ____|+/ | ____|+/ | | _|_ |/ | _|_ |/ | | /// | /// | Rsum | | | | Ra2 | | _/\ /\_|_______/\ /\| | _|_ \/ | \/ Ra1 | /// |____________________/\ /\___| K =Rsum/(Rsum+Rk) \/ a2 =Rsum/(Rsum+Ra2) a1 =Rsum/(Rsum+Ra1) s=1 when Xc = R ___ .. . U(S) ___ / _ \ y(t) _____ y(t) _____ y(t) _\| k |_\/ \ \_____| 1/s |_____| 1/s |_______\ Y(S) /|___| /\ /_ / |_____| | |_____| | / \___/ | | ^ ^ _____ | | | |___| -a2 |_______| | | |_____| _____ | |_____________| -a1 |__________| |_____| Y(S)/U(S) =K/( s^2 +a2*s +a1) ----------------------------------------------------------------------------- HIPASS ________||____________ | || C | | ____/\ ___| w0 = 1/(R*C*sqrt(2+Ko)) | | \/ | __ | |___|\ KoR | Q =sqrt(2+Ko)/4 | |_||___|__||_/\ _| |+\ | ___ |__| || | || \/ R | \____|__| | | C | / |___| _/\ __| __|-/ | \/ | |/ _|_ _|_ \ / \ / gnd V V BANDPASS ________||____________ | || C1 | | ____/\ ___| wo =1/( C*sqrt(R1*R2)) | | \/ | __ | |___|\ R2 | Q =(1/2)*sqrt(R2/R1) | |_/\ _|__||______| |+\ | ___ |__| \/ R1 || | \____|__| | C2 | / |___| __|-/ | |/ _|_ \ / gnd V BANDPASS ________||____________ | || C | | ____/\ ___| w0=1/(R*C*sqrt(1+Ko)) | | \/ | __ | |___|\ KoR | Q =sqrt(1+Ko)/3 | |_/\ _|__||_/\ _| |+\ | ___ |__| \/ R || \/ R | \____|__| | C | / |___| __|-/ | |/ _|_ \ / gnd V ________||____________ | || C | | _____||____| w0 =1/sqrt(R2*C1*R3*C2) | | || C2 | __ R3 | |___|\ | Q =sqrt(C1/C2) | |_/\ _|_____/\ _| |+\ | ___ |__| \/ | \/ R2 | \____|__| | | | / |___| _||____| __|-/ | || C1 | |/ _|_ _|_ LowPASS \ / \ / gnd V V ======================FILTERS_DIGTAL================================= CD PLAYER DIGITAL FILTER a dedicated DSP IC. this the bases for oversampling. 16Bit _____ _____ _____ _____ _____\|Delay|___\|Delay|___\|Delay|___\|Delay|___\... | /|_____| | /|_____| | /|_____| | /|_____| | / _|_ _|_ _|_ _|_ _|_ | X | | X | | X | | X | | X | |___| |___| |___| |___| |___| | | | | | Sumer to 28 bit output ------------------------------------------------------------ _|_ Z(S)= 1/s*C ___ | _ _ _ /*\/ \/ \ Z(S) =s*L ___ | () () | ___ | |__| |__| | |___| |___| ------------------------------------------------------------ ^ /|\ _ | | | _ PULSE RESPONSE X |jw0 | | | | _ ______|____\ REAL |_|_|_|_|_|_____\ | / | | | |_| / Time X | | |_| alpha IMAGINARY 1/(s^2 +a*s +b) = 1/(( s +alpha +jwo )*( s +alpha -jwo )) 1/(s^2 +a*s +b) = 1/(s^2 +(wo/Q)*s +wo^2) ------------------------------------------------------------ on imaginary axes When poles are exactly on the imaginary axis it says you will have a constant sine wave at frequency 2*pi*w IMAGINARY ^ /|\ PULSE RESPONSE | _ _ _ X | | | | | | ______|____\ REAL |_|_|_|_|_|_____\ | / | | | | | | / Time X | |_| |_| | Normal poles When poles are slightly in the left half plane it says you will have a sine wave at frequency 2*pi*w which is decaying at the a rate defined the dsitance from the axis. ^ /|\ _ | | | _ PULSE RESPONSE X | | | | | _ ______|____\ REAL |_|_|_|_|_|_____\ | / | | | |_| / Time X | | |_| IMAGINARY Left Half Plane When poles are in left half plane you will have a decay at the a rate defined the dsitance from the axis. IMAGINARY ^ /|\ _ PULSE RESPONSE | - _ | - _ ___X__|____\ REAL ________________\ | / / Time | Right Half Plane When poles are in Right half plane you are unstable IMAGINARY ^ /|\ PULSE RESPONSE | _ - | _ - ______|_X__\ REAL ________________\ | / / Time | IMAGINARY IMAGINARY ^ /|\ _ PULSE RESPONSE | _ | | | X _ | | | | _______|____\ REAL |_|_|_|_|_|_____\ | / | |_| | | | / Time | X |_| | ======================CIRCUITS_FILTERS================================= HIPASS ________||____________ | || C | | ____/\ ___| w0 = 1/(R*C*sqrt(2+Ko)) | | \/ | __ | |___|\ KoR | Q =sqrt(2+Ko)/4 | |_||___|__||_/\ _| |+\ | ___ |__| || | || \/ R | \____|__| | | C | / |___| _/\ __| __|-/ | \/ | |/ _|_ _|_ \ / \ / gnd V V BANDPASS ________||____________ | || C1 | | ____/\ ___| wo =1/( C*sqrt(R1*R2)) | | \/ | __ | |___|\ R2 | Q =(1/2)*sqrt(R2/R1) | |_/\ _|__||______| |+\ | ___ |__| \/ R1 || | \____|__| | C2 | / |___| __|-/ | |/ _|_ \ / gnd V BANDPASS ________||____________ | || C | | ____/\ ___| w0=1/(R*C*sqrt(1+Ko)) | | \/ | __ | |___|\ KoR | Q =sqrt(1+Ko)/3 | |_/\ _|__||_/\ _| |+\ | ___ |__| \/ R || \/ R | \____|__| | C | / |___| __|-/ | |/ _|_ \ / gnd V ________||____________ | || C | | _____||____| w0 =1/sqrt(R2*C1*R3*C2) | | || C2 | __ R3 | |___|\ | Q =sqrt(C1/C2) | |_/\ _|_____/\ _| |+\ | ___ |__| \/ | \/ R2 | \____|__| | | | / |___| _||____| __|-/ | || C1 | |/ _|_ _|_ LowPASS \ / \ / gnd V V -----------------------------------------------------------------------------