diff --git a/Band Pass Chebyshev/band_pass_design.m b/Band Pass Chebyshev/band_pass_design.m index ca38a59..e5b1782 100644 --- a/Band Pass Chebyshev/band_pass_design.m +++ b/Band Pass Chebyshev/band_pass_design.m @@ -300,6 +300,7 @@ units_alpha = zeros([1 band_pass_number_of_poles]); units_Z2 = zeros([1 band_pass_number_of_poles]); units_Z3 = zeros([1 band_pass_number_of_poles]); unit_transfer_function = [tf(1) tf(1) tf(1) tf(1)]; +units_filter_central_frequency_gain = zeros([1 band_pass_number_of_poles]); for i=1:band_pass_number_of_poles % Calculates BW using the eq. 7-62 @@ -331,7 +332,17 @@ for i=1:band_pass_number_of_poles % Calculates the gain at the central radial frequency and the alpha % parameter using the eq. 7-89 units_central_frequency_gain(1,i) = 2*band_pass_poles_Q(1,i)^2; - units_alpha(1,i) = 1/units_central_frequency_gain(1,i); + %units_alpha(1,i) = 1/units_central_frequency_gain(1,i); + + % 11-58 + units_filter_central_frequency_gain(1,i) = sqrt((2*band_pass_poles_Q(1,i)* ... + band_pass_poles_radial_frequencies(1,i)* ... + design_geometric_central_radial_frequency)^2/ ... + ((band_pass_poles_radial_frequencies(1,i)^2- ... + design_geometric_central_radial_frequency^2)^2+ ... + ((band_pass_poles_radial_frequencies(1,i)/band_pass_poles_Q(1,i))^2* ... + design_geometric_central_radial_frequency^2))); + units_alpha(1,i) = 1/units_filter_central_frequency_gain(1,i); % Calculates the values of the resistors used to diminish the entry % using the eq. 7-90 (to include the scaling already done the equations @@ -355,12 +366,24 @@ for i=1:band_pass_number_of_poles band_pass_poles_radial_frequencies(1,i)^2]; %} unit_transfer_function(i) = tf(unit_numerator, unit_denominator); + + [units_filter_central_frequency_gain(1,i),phase] = ... + bode(unit_transfer_function(i), ... + design_geometric_central_radial_frequency); end +%{ +total_gain = units_filter_central_frequency_gain(1,1)* ... + units_filter_central_frequency_gain(1,2)* ... + units_filter_central_frequency_gain(1,3)* ... + units_filter_central_frequency_gain(1,4); +%} + total_transfer_function = series(series(series( ... unit_transfer_function(1), unit_transfer_function(2)), ... unit_transfer_function(3)), unit_transfer_function(4)); -%total_transfer_function = total_transfer_function*38.2; + +%total_transfer_function = total_transfer_function*(1/total_gain); %plot_transfer_function(unit_transfer_function(2), [1 10]); %ltiview(unit_transfer_function(1), unit_transfer_function(2), ... @@ -368,15 +391,15 @@ total_transfer_function = series(series(series( ... %ltiview(total_transfer_function); -%{ +% plot_transfer_function(total_transfer_function, ... - [specification_central_frequency ... - 941.83 ... - specification_low_stop_frequency ... + [specification_low_stop_frequency ... specification_low_pass_frequency ... + specification_central_frequency ... + 941.83 ... specification_high_pass_frequency ... specification_high_stop_frequency]); -%} +% % Clears unneeded variables from workspace clearVars = {'units_central_frequency_gain', 'i', 'units_alpha', ...