%****************************************************************************** % MTM Crossover Schematic % % + o--------------o--------------------------------+ % | | % | R4 % L1 | % | C4 % | | % +------------o Z1, V1 +-----------------o Z2, V2 % | | | | % | L2 | C5 % | | Zout1 | | Zout2 % Vin | o-----o-----o | +-----o-----o-----o % | | | + | | | | + % C1 L3 | L4 | | | % | | Rw | | R6 Rt % | C3 | Vout1 | L5 | | Vout2 % | | Lw | | C6 Lt % | R3 | | | | | % | | | - | | | | - % - o-o------o-----o-----o--------o-----o-----o-----o-----o % % %****************************************************************************** REVERSE_NULL = 0; WOOFER_OFFSET = 2.00; %acoustic center of woofer relative to tweeter (inches) %------------------------------------------------------------------------------ % Woofer Impedance %------------------------------------------------------------------------------ load('W18s_parallel_imp_right.zma'); Zw_freq = W18s_parallel_imp_right(:,1); Zw_mag = W18s_parallel_imp_right(:,2); Zw_phase = W18s_parallel_imp_right(:,3); interp_Zw_mag = interp1(Zw_freq, Zw_mag, 1:20000, 'pchip'); interp_Zw_phase = interp1(Zw_freq, Zw_phase, 1:20000, 'pchip'); Zw_real = interp_Zw_mag .* cos((pi/180).*interp_Zw_phase); Zw_imag = interp_Zw_mag .* sin((pi/180).*interp_Zw_phase); Zw_cplx = Zw_real + j.*Zw_imag; %------------------------------------------------------------------------------ % Tweeter Impedance %------------------------------------------------------------------------------ load('millenium_imp_right.zma'); Zt_freq = millenium_imp_right(:,1); Zt_mag = millenium_imp_right(:,2); Zt_phase = millenium_imp_right(:,3); interp_Zt_mag = interp1(Zt_freq, Zt_mag, 1:20000, 'pchip'); interp_Zt_phase = interp1(Zt_freq, Zt_phase, 1:20000, 'pchip'); Zt_real = interp_Zt_mag .* cos((pi/180).*interp_Zt_phase); Zt_imag = interp_Zt_mag .* sin((pi/180).*interp_Zt_phase); Zt_cplx = Zt_real + j.*Zt_imag; %------------------------------------------------------------------------------ % Woofer component values %------------------------------------------------------------------------------ L1 = 2.00e-3; R_L1 = 0.31; % Erse 14 gauge series inductor C1 = 35.00e-6; L2 = 0.70e-3; R_L2 = 0.18; % Erse 14 gauge series inductor L3 = 0.05e-3; R_L3 = 0.09; % Jantzen 18 gauge (notch at 4.8 kHz) C3 = 22.00e-6; R3 = 0; %------------------------------------------------------------------------------ % Tweeter component values %------------------------------------------------------------------------------ R4 = 1.5; C4 = 11.00e-6; L4 = 0.30e-3; R_L4 = 0.36; % Jantzen 20 gauge C5 = 10.00e-6; L5 = 0.60e-3; R_L5 = 0.53; % Jantzen 20 guage R6 = 2.0; C6 = 3.0e-6; %****************************************************************************** f=linspace(1,20000,20000); laplace_C1 = 1./(j*2*pi*f*C1); laplace_C3 = 1./(j*2*pi*f*C3); laplace_C4 = 1./(j*2*pi*f*C4); laplace_C5 = 1./(j*2*pi*f*C5); laplace_C6 = 1./(j*2*pi*f*C6); laplace_L1 = j*2*pi*f*L1; laplace_L2 = j*2*pi*f*L2; laplace_L3 = j*2*pi*f*L3; laplace_L4 = j*2*pi*f*L4; laplace_L5 = j*2*pi*f*L5; %********************************** Woofer ************************************ Zout1 = 1./((1./((R_L3+laplace_L3)+laplace_C3+R3)) + (1./Zw_cplx)); Vout1_over_V1 = Zout1 ./ (Zout1 + R_L2+laplace_L2); Z1 = 1./((1./laplace_C1) + (1./(Zout1 + R_L2+laplace_L2))); V1_over_Vin = Z1 ./ ((R_L1+laplace_L1) + Z1); Vout1_over_Vin = Vout1_over_V1 .* V1_over_Vin; %********************************* Tweeter ************************************ Ztemp2 = 1./((1./(R6 + laplace_C6)) + (1./Zt_cplx)); Zout2 = 1./((1./Ztemp2) + (1./(R_L5+laplace_L5))); Vout2_over_V2 = Zout2 ./ (laplace_C5 + Zout2); Z2 = 1./((1./(R_L4+laplace_L4))+(1./(laplace_C5 + Zout2))); V2_over_Vin = Z2 ./ (R4 + laplace_C4 + Z2); Vout2_over_Vin = Vout2_over_V2 .* V2_over_Vin; %****************************************************************************** H1 = Vout1_over_Vin; H2 = Vout2_over_Vin; mag1 = abs(H1); phase1 = angle(H1); mag2 = abs(H2); phase2 = angle(H2); wavelength_2150Hz_inches = 6.30698; lead_phase = (WOOFER_OFFSET / wavelength_2150Hz_inches) * 360; driver_offset_tweeter_lead_phase = (lead_phase / 2150) * (1:20000); driver_offset_tweeter_lead_IQ = cos(pi/180*driver_offset_tweeter_lead_phase)... + j.*sin(pi/180*driver_offset_tweeter_lead_phase); magTotal = abs(H1+(H2.*driver_offset_tweeter_lead_IQ)); phaseTotal = angle(H1.*H2); %****************************************************************************** figure(1) subplot(2,1,1), semilogx(f, 20*log10(mag1), 'm',... f, 20*log10(mag2), 'm'); %,... % f, 20*log10(magTotal), 'r'); title('Low and High Pass Magnitude Responses'); xlabel('Frequncy (Hz)'); ylabel('Amplitude (dB)'); axis([20 20000 -80 5]); grid; subplot(2,1,2) semilogx(f, (180/pi)*unwrap(phase1), 'm',... f, (180/pi)*unwrap(phase2), 'm'); %,... % f, (180/pi)*unwrap(phaseTotal), 'r'); title('Low and High Pass Phase Responses'); xlabel('Frequncy (Hz)'); ylabel('Phase (degrees)'); axis([20 20000 -360 360]); grid; %****************************************************************************** Zin1 = R_L1 + laplace_L1 + Z1; Zin2 = R4 + laplace_C4 + Z2; Zin = 1./((1./Zin1)+(1./Zin2)); %****************************************************************************** figure(2) subplot(2,1,1), semilogx(f, abs(Zin1), 'm',... f, abs(Zin2), 'm',... f, abs(Zin), 'r'); % semilogx(Zmeasured(:,1), Zmeasured(:,2)); title('Low Pass, High Pass, and Total Input Impedance Magnitude'); xlabel('Frequncy (Hz)'); ylabel('Impedance Magnitude'); axis([20 20000 0 35]); grid; subplot(2,1,2), semilogx(f, (180/pi)*angle(Zin1), 'm',... f, (180/pi)*angle(Zin2), 'm',... f, (180/pi)*angle(Zin), 'r'); % semilogx(Zmeasured(:,1), Zmeasured(:,3)); title('Low Pass, High Pass, and Total Input Impedance Phase'); xlabel('Frequncy (Hz)'); ylabel('Phase (degrees)'); axis([20 20000 -100 100]); grid; %****************************************************************************** %actual measured woofer response %Smoothed Frequency Response %Resolution = 1/6 octave %Numpoints = 720 %SamplingRate = 48000 Hz woofer_meas_freq = load('W18s_parallel_1meter_5ms_left.frd'); woofer_meas_freq2 = load('W18s_parallel_1meter_3p2ms_left.frd'); %correct measured to match datasheet level woofer_meas_freq(:,2) = woofer_meas_freq(:,2) + 95.5 - 3.3; % 3.3 not needed for 3p2 file interp_woofer_response =... interp1(woofer_meas_freq(:,1), woofer_meas_freq(:,2), 1:20000, 'pchip'); woofer_acoustic = interp_woofer_response + 20*log10(mag1); %----------- %actual measured tweeter response %Smoothed Frequency Response %Resolution = 1/6 octave %Numpoints = 720 %SamplingRate = 48000 Hz tweeter_meas_freq = load('millenium_1meter_3p2ms_left.frd'); %correct measured to match datasheet level tweeter_meas_freq(:,2) = tweeter_meas_freq(:,2) + 95.5; interp_tweeter_response =... interp1(tweeter_meas_freq(:,1), tweeter_meas_freq(:,2), 1:20000, 'pchip'); tweeter_acoustic = interp_tweeter_response + 20*log10(mag2); %****************************************************************************** interp_woofer_response_linear = 10.^(interp_woofer_response./20); interp_tweeter_response_linear = 10.^(interp_tweeter_response./20); woofer_cplx_acoustic_linear = interp_woofer_response_linear .* H1; if (REVERSE_NULL == 0) tweeter_cplx_acoustic_linear = interp_tweeter_response_linear .* H2; else % invert tweeter terminals tweeter_cplx_acoustic_linear =... interp_tweeter_response_linear .* H2 .* (-1 + j*0); end total_response = woofer_cplx_acoustic_linear +... (tweeter_cplx_acoustic_linear .* driver_offset_tweeter_lead_IQ); %****************************************************************************** figure(3); semilogx(1:20000, woofer_acoustic, 'm',... 1:20000, tweeter_acoustic, 'm',... 1:20000, 20*log10(abs(total_response)), 'r'); %semilogx(1:20000, 20*log10(abs(total_response)), 'r'); title('Simulated acoustic response'); axis([20 20000, 20, 95]); grid;