From 7ef8058639414f627b84e00f9ea55a8d0e252274 Mon Sep 17 00:00:00 2001 From: Apostolof Date: Tue, 2 Oct 2018 13:52:11 +0300 Subject: [PATCH] Minor fixes --- .../band_elimination_design.m | 24 +- Band Pass Chebyshev/band_pass_design.m | 22 +- High Pass Butterworth/high_pass_design.m | 10 +- report/2_band_pass/2_band_pass_design.pug | 18 +- .../matlab_band_pass_chebyshev_zero_pole.svg | 280 +++++++++--------- 5 files changed, 189 insertions(+), 165 deletions(-) diff --git a/Band Elimination Chebyshev/band_elimination_design.m b/Band Elimination Chebyshev/band_elimination_design.m index 4ab0ee8..6111f9b 100644 --- a/Band Elimination Chebyshev/band_elimination_design.m +++ b/Band Elimination Chebyshev/band_elimination_design.m @@ -536,22 +536,22 @@ for i=1:2 (1/normalized_transfer_function_zero^2); % Calculates R2 using the eq. 7-138 high_pass_notch_units_R2(1,i) = band_elimination_poles_Q(1,unit_index)^2* ... - (high_pass_notch_units_k1(1,i)+2)^2; + (high_pass_notch_units_k1(1,i)+2)^2; % Ohm % Assumes that R3 is 1 Ohm and the radial frequency is 1 rad/s - high_pass_notch_units_R3(1,i) = 1; + high_pass_notch_units_R3(1,i) = 1; % Ohm % Calculates R4 using the eq. 7-139 high_pass_notch_units_R4(1,i) = (high_pass_notch_units_k1(1,i)+2)* ... - band_elimination_poles_Q(1,unit_index)^2; + band_elimination_poles_Q(1,unit_index)^2; % Ohm % Calculates C using the eq. 7-140 high_pass_notch_units_C(1,i) = 1/ ... (band_elimination_poles_Q(1,unit_index)* ... - (high_pass_notch_units_k1(1,i)+2)); + (high_pass_notch_units_k1(1,i)+2)); % Farad % Initial axioms of the design were: % C1 = k1 * C high_pass_notch_units_C1(1,i) = high_pass_notch_units_k1(1,i)* ... - high_pass_notch_units_C(1,i); + high_pass_notch_units_C(1,i); % Farad % R1 = 1 Ohm - high_pass_notch_units_R1(1,i) = 1; + high_pass_notch_units_R1(1,i) = 1; % Ohm % Selects the appropriate frequency scale factor to transfer the % normalized radial frequency back to the original @@ -565,19 +565,19 @@ for i=1:2 % Performs scaling high_pass_notch_units_R1(1,i) = high_pass_notch_units_R1(1,i)* ... - high_pass_notch_units_amplitude_scale_factors(1,i); + high_pass_notch_units_amplitude_scale_factors(1,i); % Ohm high_pass_notch_units_R2(1,i) = high_pass_notch_units_R2(1,i)* ... - high_pass_notch_units_amplitude_scale_factors(1,i); + high_pass_notch_units_amplitude_scale_factors(1,i); % Ohm high_pass_notch_units_R3(1,i) = high_pass_notch_units_R3(1,i)* ... - high_pass_notch_units_amplitude_scale_factors(1,i); + high_pass_notch_units_amplitude_scale_factors(1,i); % Ohm high_pass_notch_units_R4(1,i) = high_pass_notch_units_R4(1,i)* ... - high_pass_notch_units_amplitude_scale_factors(1,i); + high_pass_notch_units_amplitude_scale_factors(1,i); % Ohm high_pass_notch_units_C(1,i) = high_pass_notch_units_C(1,i)/ ... (high_pass_notch_units_frequency_scale_factors(1,i)* ... - high_pass_notch_units_amplitude_scale_factors(1,i)); + high_pass_notch_units_amplitude_scale_factors(1,i)); % Farad high_pass_notch_units_C1(1,i) = high_pass_notch_units_C1(1,i)/ ... (high_pass_notch_units_frequency_scale_factors(1,i)* ... - high_pass_notch_units_amplitude_scale_factors(1,i)); + high_pass_notch_units_amplitude_scale_factors(1,i)); % Farad % Builds unit's transfer function using the eq. 7-129, 7-130, 7-131 high_pass_notch_unit_numerator = [1 ... diff --git a/Band Pass Chebyshev/band_pass_design.m b/Band Pass Chebyshev/band_pass_design.m index 2b33a90..6eeaa9e 100644 --- a/Band Pass Chebyshev/band_pass_design.m +++ b/Band Pass Chebyshev/band_pass_design.m @@ -394,12 +394,12 @@ for i=1:band_pass_number_of_poles units_BW(1,i) = band_pass_poles_radial_frequencies(1,i)/ ... band_pass_poles_Q(1,i); % Calculates C21 (=C22=C) using the eq. 7-87 - units_C21(1,i) = 1/(2*band_pass_poles_Q(1,i)); - units_C22(1,i) = units_C21(1,i); + units_C21(1,i) = 1/(2*band_pass_poles_Q(1,i)); % Farad + units_C22(1,i) = units_C21(1,i); % Farad % Using the eq. 7-86 - units_R1(1,i) = 1; + units_R1(1,i) = 1; % Ohm % Calculates R12 using the eq. 7-87 - units_R2(1,i) = 4*band_pass_poles_Q(1,i)^2; + units_R2(1,i) = 4*band_pass_poles_Q(1,i)^2; % Ohm % Selects the appropriate frequency scale factor to transfer the % normalized radial frequency back to the original @@ -411,10 +411,10 @@ for i=1:band_pass_number_of_poles (units_frequency_scale_factors(1,i)*0.1*10^(-6)); % Scales the circuit elements - units_C21(1,i) = 0.1*10^(-6); - units_C22(1,i) = 0.1*10^(-6); - units_R1(1,i) = units_amplitude_scale_factors(1,i); - units_R2(1,i) = units_R2(1,i)*units_amplitude_scale_factors(1,i); + units_C21(1,i) = 0.1*10^(-6); % Farad + units_C22(1,i) = 0.1*10^(-6); % Farad + units_R1(1,i) = units_amplitude_scale_factors(1,i); % Ohm + units_R2(1,i) = units_R2(1,i)*units_amplitude_scale_factors(1,i); % Ohm % Calculates the gain at the central radial frequency and the alpha % parameter using the eq. 7-89 @@ -434,9 +434,9 @@ for i=1:band_pass_number_of_poles % Calculates the values of the resistors used to diminish the entry % using the eq. 7-90 (to include the scaling already done the equations % are used in the form presented at example 7.2) - units_Z2(1,i) = units_R1(1,i)/units_alpha(1,i); - units_Z3(1,i) = units_R1(1,i)/(1-units_alpha(1,i)); - unit_Z_parallel = (units_Z2(1,i)*units_Z3(1,i))/(units_Z2(1,i)+units_Z3(1,i)); + units_Z2(1,i) = units_R1(1,i)/units_alpha(1,i); % Ohm + units_Z3(1,i) = units_R1(1,i)/(1-units_alpha(1,i)); % Ohm + unit_Z_parallel = (units_Z2(1,i)*units_Z3(1,i))/(units_Z2(1,i)+units_Z3(1,i)); % Ohm % unit_numerator = [-1/(units_Z2(1,i)*units_C21(1,i)) ... diff --git a/High Pass Butterworth/high_pass_design.m b/High Pass Butterworth/high_pass_design.m index e1e085c..9d4fc3c 100644 --- a/High Pass Butterworth/high_pass_design.m +++ b/High Pass Butterworth/high_pass_design.m @@ -314,7 +314,7 @@ units_transfer_functions = [tf(1) tf(1)]; for i=1:high_pass_number_of_poles % Calculates k and r2 using the eq. 6-75 - units_r2(1,i) = 2-1/high_pass_poles_Q(1,i); + units_r2(1,i) = 2-1/high_pass_poles_Q(1,i); % Ohm units_k(1,i) = 3-1/high_pass_poles_Q(1,i); % Selects the appropriate frequency scale factor to transfer the @@ -329,12 +329,12 @@ for i=1:high_pass_number_of_poles % Performs scaling units_R(1,i) = units_R(1,i)* ... - units_amplitude_scale_factors(1,i); - units_C(1,i) = 0.1*10^(-6); + units_amplitude_scale_factors(1,i); % Ohm + units_C(1,i) = 0.1*10^(-6); % Farad units_r1(1,i) = units_r1(1,i)* ... - units_amplitude_scale_factors(1,i); + units_amplitude_scale_factors(1,i); % Ohm units_r2(1,i) = units_r2(1,i)* ... - units_amplitude_scale_factors(1,i); + units_amplitude_scale_factors(1,i); % Ohm % Builds unit's transfer function % Builds numerator and denominator of the transfer function using the diff --git a/report/2_band_pass/2_band_pass_design.pug b/report/2_band_pass/2_band_pass_design.pug index 80d23ab..325e128 100644 --- a/report/2_band_pass/2_band_pass_design.pug +++ b/report/2_band_pass/2_band_pass_design.pug @@ -21,7 +21,7 @@ h4 Υπολογισμός συνάρτησης μεταφοράς p Αρχικά υπολογίζεται η κεντρική συχνότητα χρησιμοποιώντας την εξίσωση #[span.course-notes-equation 11-2]: p.latex-equation. - $$\omega_0 = \sqrt{\omega_1\omega_2}=\sqrt{5026.548*6361.725}=5654.867$$ + $$\omega_0 = \sqrt{\omega_1\omega_2}=\sqrt{5026.548*6361.725}=5654.867\frac{\text{rad}}{\text{s}}$$ p. Η κεντρική συχνότητα που υπολογίστηκε προκύπτει ίση με αυτή που δίνεται στην εκφώνηση, επιβεβαιώνεται έτσι ότι οι συχνότητες ω#[sub 1] - ω#[sub 4] υπολογίστηκαν σωστά. @@ -30,7 +30,7 @@ p. Υπολογίζεται το εύρος ζώνης διόδου χρησιμοποιώντας την εξίσωση #[span.course-notes-equation 11-52]: p.latex-equation. - $$bw = \omega_2-\omega_1=6361.725-5026.548=1335.177$$ + $$bw = \omega_2-\omega_1=6361.725-5026.548=1335.177\text{ rad}$$ p. Σχεδιάζεται ένα πρότυπο κατωδιαβατό Chebyshev φίλτρο, το οποίο αργότερα θα μετατραπεί στο επιθυμητό ζωνοδιαβατό Chebyshev. @@ -46,7 +46,7 @@ p Οι προδιαγραφές απόσβεσης παραμένουν ίδιε p Υπολογίζεται η τάξη του φίλτρου χρησιμοποιώντας την εξίσωση #[span.course-notes-equation 9-83]: p.latex-equation. - $$n = \left \lceil \frac{cos^{-1}\bigg(\sqrt{\frac{10^{\frac{a_{min}}{10}}-1}{10^{\frac{a_{max}}{10}}-1}}\bigg)}{cosh^{-1}\Omega_S} \right \rceil = \left \lceil \frac{cos^{-1}\bigg(\sqrt{\frac{10^{2.8556}-1}{10^{0.0667}-1}}\bigg)}{cosh^{-1}(2.2)} \right \rceil = \left \lceil \frac{4.87789}{1.42542} \right \rceil = \left \lceil 3.422 \right \rceil = 4$$ + $$n = \left \lceil \frac{\cosh^{-1}\bigg(\sqrt{\frac{10^{\frac{a_{min}}{10}}-1}{10^{\frac{a_{max}}{10}}-1}}\bigg)}{\cosh^{-1}\Omega_S} \right \rceil = \left \lceil \frac{\cosh^{-1}\bigg(\sqrt{\frac{10^{2.8556}-1}{10^{0.0667}-1}}\bigg)}{\cosh^{-1}(2.2)} \right \rceil = \left \lceil \frac{4.87789}{1.42542} \right \rceil = \left \lceil 3.422 \right \rceil = 4$$ p. Από τον παραπάνω τύπο φαίνεται ότι κατά τον υπολογισμό της τάξης του φίλτρου γίνεται στρογγυλοποίηση της τάξης προς τον επόμενο #[strong μεγαλύτερο] ακέραιο. Αυτό γίνεται επειδή δεν είναι δυνατή η υλοποίηση ενός φίλτρου ρητής τάξεως, έτσι είναι απαραίτητο η τάξη να στρογγυλοποιηθεί. Η στρογγυλοποίηση είναι σημαντικό να γίνει προς τα επάνω (ceiling) ώστε να επιτευχθούν οι προδιαγραφές του φίλτρου. Μία πιθανή στρογγυλοποίηση προς τα κάτω θα είχε ως αποτέλεσμα την αποτυχία στη σχεδίαση. @@ -224,6 +224,9 @@ figure.block-center.width-15cm tr td Q td 10.9546 + tr + td ω#[sub z] + td 0+0j tr td Angle td ±87.38° @@ -352,6 +355,9 @@ figure.block-center.width-15cm tr td Q td 10.9546 + tr + td ω#[sub z] + td 0+0j tr td Angle td ±87.38° @@ -480,6 +486,9 @@ figure.block-center.width-15cm tr td Q td 26.599 + tr + td ω#[sub z] + td 0+0j tr td Angle td ±88.92° @@ -608,6 +617,9 @@ figure.block-center.width-15cm tr td Q td 26.599 + tr + td ω#[sub z] + td 0+0j tr td Angle td ±88.92° diff --git a/report/2_band_pass/assets/diagrams/matlab_band_pass_chebyshev_zero_pole.svg b/report/2_band_pass/assets/diagrams/matlab_band_pass_chebyshev_zero_pole.svg index 585f204..9be76e8 100644 --- a/report/2_band_pass/assets/diagrams/matlab_band_pass_chebyshev_zero_pole.svg +++ b/report/2_band_pass/assets/diagrams/matlab_band_pass_chebyshev_zero_pole.svg @@ -1,7 +1,7 @@ + viewBox="903.7 -12.6 1526.9 776.3" style="enable-background:new 903.7 -12.6 1526.9 776.3;" xml:space="preserve"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -6000 - - - -5000 - - - -4000 - - - -3000 - - - -2000 - - - -1000 - - - 1000 - - - 2000 - - - 3000 - - - 4000 - - - 5000 - - - 6000 - - - Zero-Poles plot + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -7000 + + + -6000 + + + -5000 + + + -4000 + + + -3000 + + + -2000 + + + -1000 + + + 1000 + + + 2000 + + + 3000 + + + 4000 + + + 5000 + + + 6000 + + + 7000 + + + Zero-Poles plot - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - ω + + ω - - 01 + + 01 - - ω + + ω - - 02 + + 02 - - ω + + ω - - 03 + + 03 - - ω + + ω - - 04 + + 04 - - ω + + ω - - 01 + + 01 - - ω + + ω - - 02 + + 02 - - ω + + ω - - 03 + + 03 - - ω + + ω - - 04 + + 04 - - 4 zeros + + 4 zeros - - - - - - - - - + + + + + + + + + + + - - + +