load '../definitions.gnuplot' #LOUDSPEAKER MODEL---use your model from Lab 5 # The model here is for a low-frequency "puck" for shaking furniture, # and is NOT appropriate for other loudspeakers Zloud(f) = Rnom+Zlsemi(f,Lhi,Lhipow)+Zpar(Rs,Zpar(Zl(f,Ls),Zc(f,Cs))) Rnom=14.20 Lhi= 48.0E-03 ; Lhipow = 0.682 Ls=5.28E-3 ; Cs=6.84E-3 ; Rs=26.15 # CHOOSE A SERIES RESISTOR IF YOU PLAN TO MEASURE LOUDSPEAKER CURRENT Rseries = 0.0 # extra resistor for displaying current on scope # real power into loudspeaker with no filter (voltage from amplifier V at frequency f) nofilter_power(V,f)=real_power(V*divider(Rseries,Zloud(f)), Zloud(f)) # LC FILTER MODEL # Lf=100e-6; Rf=0.108 # parameters for AIUR-06-101 inductor # Lf=220e-6; Rf=0.252 # parameters for AIUR-06-221 inductor Lf=330e-6; Rf=0.394 # parameters for AIUR-06-331 inductor # Lf=1e-3; Rf=1.2 # parameters for AIUR-06-102 inductor # Lf=2.2e-3; Rf=2.4 # parameters for AIUR-06-222 inductor # Lf=10e-3; Rf=10.5 # parameters for AIUR-06-103 inductor # voltage divider with Lf+Rf and (Cf || loudspeaker+resistor) gain(f,Lf,Rf,Cf) = \ divider(Zl(f,Lf)+Rf, Zpar(Zloud(f)+Rseries,Zc(f,Cf))) # total impedance, in case we want to plot that also Ztotal(f,Lf,Rf,Cf) = Zl(f,Lf)+Rf + Zpar(Zloud(f)+Rseries,Zc(f,Cf)) # real power into loudspeaker with voltage from amplifier V at frequency f # using the LC filter loud_power(V,f,Lf,Rf,Cf) = \ real_power(V*gain(f,Lf,Rf,Cf)*divider(Rseries,Zloud(f)), Zloud(f)) # CHOOSE YOUR SUPPLY VOLTAGE (note: 8V is too large for our components!) V_supply=8 # +/- power supply voltage V_RMS = V_supply/sqrt(2) # RMS voltage for largest sine wave from supply peak_power_freq = 33 # approximate frequency where power is maximized half_power=0.5*loud_power(V_RMS,peak_power_freq,Lf,Rf,3.3e-6) # half the peak power set title sprintf("Low-pass LC filter, louspeaker+%.3gohm resistor, %.1gV to H-bridge ",Rseries,V_supply) set yrange [1e-4:40] set ylabel 'Real power to speaker' set format y '%.1s%cW' plot half_power title sprintf("half-power=%.3gW",half_power), \ nofilter_power(V_RMS,x) title "no filter", \ loud_power(V_RMS,x,Lf,Rf,10e-6) title sprintf("L=%.3guH+%.3gohm C=%.3guF", Lf*1e6, Rf, 10), \ loud_power(V_RMS,x,Lf,Rf,4.7e-6) title sprintf("L=%.3guH+%.3gohm C=%.3guF", Lf*1e6, Rf, 4.7), \ loud_power(V_RMS,x,Lf,Rf,2.2e-6) title sprintf("L=%.3guH+%.3gohm C=%.3guF", Lf*1e6, Rf, 2.2), \ loud_power(V_RMS,x,Lf,Rf,1e-6) title sprintf("L=%.3guH+%.3gohm C=%.3guF", Lf*1e6, Rf, 1), \ loud_power(V_RMS,x,Lf,Rf,0.47e-6) title sprintf("L=%.3guH+%.3gohm C=%.3guF", Lf*1e6, Rf, 0.47), \ loud_power(V_RMS,x,Lf,Rf,0.22e-6) title sprintf("L=%.3guH+%.3gohm C=%.3guF", Lf*1e6, Rf, 0.22), \ loud_power(V_RMS,x,Lf,Rf,0.1e-6) title sprintf("L=%.3guH+%.3gohm C=%.3guF", Lf*1e6, Rf, 0.1)