From c64b4b8179c9f4732a3435ad09da512e62a49cf4 Mon Sep 17 00:00:00 2001 From: Huanyin Liu <13316560709@189.cn> Date: Wed, 19 Oct 2022 15:49:09 +0000 Subject: [PATCH] Update the formulas for Tee and Pi Attenuators This makes clear that we are utilizing the voltage attenuation formula while keeping the correct formulation as it is implemented in the code Fixes https://gitlab.com/kicad/code/kicad/-/issues/12659 --- pcb_calculator/attenuators/pi_formula.h | 3 ++- pcb_calculator/attenuators/pi_formula.md | 3 ++- pcb_calculator/attenuators/tee_formula.h | 3 ++- pcb_calculator/attenuators/tee_formula.md | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pcb_calculator/attenuators/pi_formula.h b/pcb_calculator/attenuators/pi_formula.h index 33c5ffb9cb..6fea7a3971 100644 --- a/pcb_calculator/attenuators/pi_formula.h +++ b/pcb_calculator/attenuators/pi_formula.h @@ -4,7 +4,8 @@ _HKI( "### Pi Attenuator\n" "___Zin___ is desired input impedance in Ω
\n" "___Zout___ is desired output impedance in Ω
\n" "\n" -"___L = 10a/20___
\n" +"___K = VI/VO = 10a/20___
\n" +"___L = K2 = 10a/10___
\n" "___A = (L+1) / (L−1)___

\n" "___R2 = (L−1) / 2·√(Zin · Zout / L)___
\n" "___R1 = 1 / (A/Zin − 1/R2)___
\n" diff --git a/pcb_calculator/attenuators/pi_formula.md b/pcb_calculator/attenuators/pi_formula.md index 68785d254b..a2fb20b8b9 100644 --- a/pcb_calculator/attenuators/pi_formula.md +++ b/pcb_calculator/attenuators/pi_formula.md @@ -3,7 +3,8 @@ ___a___ is attenuation in dB
___Zin___ is desired input impedance in Ω
___Zout___ is desired output impedance in Ω
-___L = 10a/20___
+___K = VI/VO = 10a/20___
+___L = K2 = 10a/10___
___A = (L+1) / (L−1)___

___R2 = (L−1) / 2·√(Zin · Zout / L)___
___R1 = 1 / (A/Zin − 1/R2)___
diff --git a/pcb_calculator/attenuators/tee_formula.h b/pcb_calculator/attenuators/tee_formula.h index 49b2244e82..61e39460a5 100644 --- a/pcb_calculator/attenuators/tee_formula.h +++ b/pcb_calculator/attenuators/tee_formula.h @@ -4,7 +4,8 @@ _HKI( "### Tee Attenuator\n" "___Zin___ is desired input impedance in Ω
\n" "___Zout___ is desired output impedance in Ω
\n" "\n" -"___L = 10a/20___
\n" +"___K = VI/VO = 10a/20___
\n" +"___L = K2 = 10a/10___
\n" "___A = (L+1) / (L−1)___

\n" "___R2 = 2·√(L · Zin · Zout) / (L−1)___
\n" "___R1 = Zin · A − R2___
\n" diff --git a/pcb_calculator/attenuators/tee_formula.md b/pcb_calculator/attenuators/tee_formula.md index e341e31cbf..8da5bfc9b0 100644 --- a/pcb_calculator/attenuators/tee_formula.md +++ b/pcb_calculator/attenuators/tee_formula.md @@ -3,7 +3,8 @@ ___a___ is attenuation in dB
___Zin___ is desired input impedance in Ω
___Zout___ is desired output impedance in Ω
-___L = 10a/20___
+___K = VI/VO = 10a/20___
+___L = K2 = 10a/10___
___A = (L+1) / (L−1)___

___R2 = 2·√(L · Zin · Zout) / (L−1)___
___R1 = Zin · A − R2___