From d798587420f77647590da1c4984e8bf19f70fc85 Mon Sep 17 00:00:00 2001 From: alexander Date: Sun, 8 Feb 2026 13:25:46 +0100 Subject: [PATCH 1/4] Started compleating zweitor table --- src/cheatsheets/Schaltungstheorie.typ | 412 +++++++++++++----- .../schaltungstheorie/tumCustomSymbols.typ | 28 +- 2 files changed, 338 insertions(+), 102 deletions(-) diff --git a/src/cheatsheets/Schaltungstheorie.typ b/src/cheatsheets/Schaltungstheorie.typ index b1c7b7d..7de7847 100644 --- a/src/cheatsheets/Schaltungstheorie.typ +++ b/src/cheatsheets/Schaltungstheorie.typ @@ -266,6 +266,7 @@ $R_i$: Innenwiderstand $R_i = U_0/I_0$ + *Quell Wandlung* #table( columns: (1fr, 1fr), fill: (x, y) => if calc.rem(x, 2) == 1 { tableFillLow } else { tableFillHigh }, @@ -319,7 +320,7 @@ )) wire((0, -1.5), (1.75, -1.5)) - cetz.draw.content((0.62, -0.75), [$R_i$]) + cetz.draw.content((0.9, -0.4), [$R_i$]) cetz.draw.set-style(mark: (end: ">", fill: black, scale: 0.6)) cetz.draw.content((1.95, -0.75), [$u$]) cetz.draw.line((1.75, -0.1), (1.75, -1.4), stroke: 0.5pt) @@ -334,9 +335,18 @@ $i = G_i u - I_0$ ], - align(center, text(size: 7mm, $-->$)), [$G_i = 1/R_i \ I_0 = U_0 G_i$], - [$R_i = 1/G_i \ U_0 = I_0 R_i$], align(center, text(size: 7mm, $<--$)), + table.cell(colspan: 2)[ + #align(center, [*$u"-gesteuert" --> i"-gestuert"$*]) + + $ R_i = 1/G_i quad quad quad U_0 = -I_0 1/G_i $ + ], + + table.cell(colspan: 2, fill: tableFillLow)[ + #align(center, [*$i"-gesteuert" --> u"-gestuert"$*]) + + $ G_i = 1/R_i quad quad quad I_0 = -U_0 1/R_i $ + ], ) ] @@ -513,6 +523,19 @@ #bgBlock(fill: colorAnalyseVerfahren)[ #subHeading(fill: colorAnalyseVerfahren)[Graphen und Matrizen] + $n:$ Knotenanzahle (mit Referenzknoten) + + $b:$ Zweiganzahle + + *Lineare Unabhänige KCL/KVLs* + + Für $2b$ unbekannte ($b$ Ströme + $b$ Spannungen) + + KCLs: $n-1$\ + KVLs: $b-(n-1)$ + + #line(length: 100%, stroke: (thickness: 0.2mm)) + $bold(i_b)$ (oder $bold(i)$): Zweigstrom-Vektor \ $bold(u_b)$ (oder $bold(u)$): Zweigspannungs-Vektor \ $bold(i_m)$ : Maschenstrom-Vektor \ @@ -590,15 +613,41 @@ // Baumkonzept #bgBlock(fill: colorAnalyseVerfahren)[ #subHeading(fill: colorAnalyseVerfahren)[Baumkonzept] - KCLs: $n-1$\ - KVLs: $b-(n-1)$ - Baum einzeichnen (Keine Schleifen!) + + 1. Baum einzeichnen (Keine Schleifen!) \ + Muss alle Knoten umfassen + + 2. $n-1$ KCLs: \ + Superknoten mit NUR einer Baumkante \ + $jMat(A) = mat(jMat(1)_(n-1), jMat(A)_e)$ \ + + + 3. $b - (n-1)$ KVLs: \ + Maschen mit NUR einer NICHT Baumkante \ + $jMat(B) = mat(jMat(B)_t, jMat(1)_(b-(n-1)))$ + + + *Nur bei Baumkonzept:* $B_t = - A_e^T$ + ] // Tablauematrix #bgBlock(fill: colorAnalyseVerfahren)[ #subHeading(fill: colorAnalyseVerfahren)[Tablauematrix] + + Alle Element Gleichungen in Nullraum + KVLs/KCLs in eine Matrix + + KCLs: $jMat(A) jVec(i) = jVec(0)$\ + KVLs: $jMat(B) jVec(u) = jVec(0)$\ + Elementgleichungen: $jMat(N) jVec(u) + jMat(M) jVec(i) = jVec(e)$ + + $ mat( + jMat(B), jMat(0); + jMat(0), jMat(A); + jMat(M), jMat(N) + ) vec(jVec(u), jVec(i)) = vec(jVec(0), jVec(0), jVec(e)) $ + ] // Machenstrom-/Knotenpotenzial-Analyse #bgBlock(fill: colorAnalyseVerfahren)[ @@ -1209,32 +1258,6 @@ #let NodeBlue = rgb("#6156ff") #let NodeYellow = rgb("#ffa856") -#let nodeSymbol(s, center, color, ..style) = { - import cetz.draw: * - ( - ctx => { - // Define a default style - let def-style = (n: 5, inner-radius: .5, radius: 1, stroke: auto, fill: auto) - - // Resolve center to a vector - let (ctx, center) = cetz.coordinate.resolve(ctx, center) - - // Resolve the current style ("star") - let style = cetz.styles.resolve(ctx.style, merge: style.named(), base: def-style, root: "star") - - let paths = ( - cetz.drawable.ellipse(center.at(0), center.at(1), 0, 0.25, 0.25, fill: color, stroke: black), - cetz.drawable.content((center.at(0),center.at(1) + 0.025), 1, 1, none, s), - ) - ( - ctx: ctx, - drawables: cetz.drawable.apply-transform(ctx.transform, paths) - ) - }, - ) -} - - #columns(2)[ #bgBlock(fill: colorAnalyseVerfahren)[ #subHeading(fill: colorAnalyseVerfahren)[Knotenpotenzial-Analyse Komponetent] @@ -1322,10 +1345,10 @@ joham.norator("norator1",(0,0), (-1.75,0)) })) ], - [ + align(horizon+center, [ $u = "bel." \ i = "bel."$ - ], + ]), [ #scale(x: 75%, y: 75%, cetz.canvas({ import cetz.draw: * @@ -1361,11 +1384,10 @@ })) ], - [ - $u = 0$ - - i = bel. - ], + align(horizon+center, [ + $u = 0 \ + i = "bel."$ + ]), [ #scale(x: 75%, y: 75%, cetz.canvas({ import cetz.draw: * @@ -1393,10 +1415,10 @@ wire((1,0), (1.25,0)) })) ], - [ + align(horizon+center, [ $u = "bel." \ i = 0$ - ], + ]), [ #scale(x: 75%, y: 75%, cetz.canvas({ import cetz.draw: * @@ -1420,17 +1442,17 @@ import zap: * import cetz.draw: content, line vsource( + fill: none, "b1", (0, 0), (1.75, 0), ) })) ], - [ - $u = U_0$ - - i = bel. - ], + align(horizon+center, [ + $u = U_0 \ + i = "bel."$ + ]), [ #scale(x: 75%, y: 75%, cetz.canvas({ import cetz.draw: * @@ -1454,17 +1476,17 @@ import zap: * import cetz.draw: content, line isource( + fill: none, "b1", (0, 0), (1.75, 0), ) })) ], - [ - u = bel. - - $i = I_0$ - ], + align(horizon+center, [ + $u = "bel." \ + i = I_0$ + ]), [ #scale(x: 75%, y: 75%, cetz.canvas({ import cetz.draw: * @@ -1565,13 +1587,13 @@ #scale(x: 100%, y: 100%, zap.circuit({ import zap: * import cetz.draw: content, line - diode("b1", (0, 0), (1., 0), stroke: black, fill: white) + diode("b1", (0, 0), (1., 0), stroke: black, fill: none) })) ], - [ - $u=0$ falls $i>0$ - $i=0$ falls $u<0$ - ], + align(horizon+center, [ + $u=0 &"falls" i>0 \ + i=0 &"falls" u<0$ + ]), [ /* #scale(x: 50%, y: 50%, @@ -1612,10 +1634,10 @@ })) ], - [ + align(horizon+center, [ $u_D = u_T dot ln((i_D/I_S)+1) \ i_D = I_S dot (e^(u_D/U_T)-1)$ - ], + ]), [ #scale(x: 75%, y: 75%, cetz.canvas({ import cetz.draw: * @@ -1638,7 +1660,7 @@ })) ], align(horizon+center, - $i = I_S*(e^(u_D/U_T)-1)- i_L$ + $i = I_S dot (e^(u_D/U_T)-1)- i_L$ ), [ #scale(x: 75%, y: 75%, cetz.canvas({ @@ -1666,10 +1688,10 @@ zener("b1", (0, 0), (1., 0), stroke: black, fill: black) })) ], - [ + align(horizon+center, [ Durchbruch bei $u=U_Z$ : $u<=U_Z$ stark leitend - ], + ]), [ ], @@ -1702,13 +1724,37 @@ ] // Zwei-Tor Tabelle -#bgBlock(fill: colorZweiTore, width: 100%)[ + +#grid(columns: (2fr, 1fr))[ + #bgBlock(fill: colorZweiTore, width: 100%)[ #subHeading(fill: colorZweiTore)[Zwei-Tor-Übersichts] + + #let opampSymbol = zap.circuit({ + import zap : wire, node + import cetz.draw : line, rect + + joham.ideal-opamp("Op", (0,0), scale: 0.7, invert: true) + + wire("Op.plus", (rel: (-0.25, 0))) + wire("Op.minus", (rel: (-0.25, 0))) + wire("Op.ground", (rel: (0, -0.3))) + wire("Op.out", (rel: (0.2,0))) + + node("a", (to: "Op.plus", rel: (-0.25, 0)), fill: false, label: (content: text($alpha$, fill: rgb("#8b2000")), anchor: "west", distance: 0.05)) + node("b", (to: "Op.minus", rel: (-0.25, 0)), fill: false, label: (content: text($beta$, fill: rgb("#8b2000")), anchor: "west", distance: 0.05)) + node("c", (to: "Op.out", rel: (0.25, 0)), fill: false, label: (content: text($gamma$, fill: rgb("#00318b")), anchor: "east", distance: 0.05)) + node("d", (to: "Op.ground", rel: (0, -0.3)), fill: false, label: (content: text($delta$, fill: rgb("#00318b")), anchor: "south", distance: 0.05)) + + joham.voltage((to: "Op.plus", rel: (-0.25, 0)), (to: "Op.minus", rel: (-0.25, 0)), $u_"in"$) + + joham.voltage((to: "Op.out", rel: (0.25, 0)), (to: "Op.out", rel: (0.25, -0.7)), $u_"out"$, anchor: "west") + }) + #table( fill: (x, y) => if calc.rem(y, 2) == 0 { tableFillHigh } else { tableFillLow }, - columns: (auto, auto, auto, 1fr, 1fr, 1fr), - [*Name*], [*Schaltbild*], [*Ersatz-Schaltbild*], [*Eigenschaften*], [*Beschreibung*], [*Knotenspannungs Analyse*], + columns: (auto, auto, auto, auto, auto), + [*Name*], [*Schaltbild*], [*Ersatz-Schaltbild*], [*Eigenschaften*], [*Beschreibung*], [Nullor], [], [#scale(x: 50%, y: 50%, zap.circuit({ import zap: * @@ -1716,7 +1762,14 @@ joham.nullor("nullor", (0,0)) }))], [], [$ A = mat(0, 0; 0, 0) $], [], - [OpAmp \ lin], [], [], [], [], [], + rect((-0.2,-0.1), (0.7,1.1), + stroke: (paint: rgb("#666666"), dash: "densely-dashed") + ) + })], + [ + - Verlustlos + - Reziprok + ], [$ A = mat(0, 0; 0, 0) $], [OpAmp \ $U_"sat+"$\ (4-polig)], [#scale(x: 100%, y: 100%, zap.circuit({ import zap: * @@ -1738,7 +1791,10 @@ }))], [], [], [], [], - [OpAmp \ $U_"sat-"$], [], [], [], [], [], + node("a", (to: (0, 1), rel: (-0.4, 0)), fill: false, label: (content: text($alpha$, fill: rgb("#8b2000")), anchor: "west", distance: 0.05)) + node("b", (to: (0, 0), rel: (-0.4, 0)), fill: false, label: (content: text($beta$, fill: rgb("#8b2000")), anchor: "west", distance: 0.05)) + node("c", (to: (0.5, 1), rel: (0.4, 0)), fill: false, label: (content: text($gamma$, fill: rgb("#00318b")), anchor: "east", distance: 0.05)) + node("d", (to: (0.6, 0), rel: (0, -0.25)), fill: false, label: (content: text($delta$, fill: rgb("#00318b")), anchor: "east", distance: 0.05)) [VCVS], [#scale(x: 100%, y: 100%, zap.circuit({ import zap: * @@ -1763,31 +1819,197 @@ }))], [], [], [$ H' = mat(0, 0; mu, 0) quad A = mat(1/mu, 0; 0, 0) $], [], - [VCCS], [], [], [], [$ G = mat(0, 0; g, 0) quad A = mat(0, -1/g; 0, 0) $], [], + [OpAmp \ $U_"sat+"$], opampSymbol, [#zap.circuit({ + import zap : wire, vsource, node + import cetz.draw : line, rect - [CCVS], [], [], [], [$ R = mat(0, 0; r, 0) quad A = mat(0, 0; 1/r, 0) $], [], + node("a", (0,1), fill: false, label: (content: text($alpha$, fill: rgb("#8b2000")), anchor: "west", distance: 0.05)) + node("b", (0,0), fill: false, label: (content: text($beta$, fill: rgb("#8b2000")), anchor: "west", distance: 0.05)) - [CCCS], [], [], [], [$ H = mat(0, 0; beta, 0) quad A = mat(0, 0; 0, -1/beta) $], [], + wire((0,1), (0.4, 1)) + wire((0,0), (0.4, 0)) - [Übertrager], [], [], - [], - [$ H = mat(0, ü; -ü, 0) quad + joham.voltage((0.4, 1), (0.4, 0), $u_d$) + joham.voltage((1.3, 1), (1.3, 0), $U_"sat"$, anchor: "west") + + vsource("v", (1,1), (1,0), scale: 0.4, fill: none) + + wire((1,1), (1.3,1)) + wire((1,0), (1.3,0)) + + node("c", (1.3,1), fill: false, label: (content: text($gamma$, fill: rgb("#00318b")), anchor: "east", distance: 0.05)) + node("d", (1.3,0), fill: false, label: (content: text($delta$, fill: rgb("#00318b")), anchor: "east", distance: 0.05)) + })], [], [], + + [OpAmp \ $U_"sat-"$], opampSymbol, [#zap.circuit({ + import zap : wire, vsource, node + import cetz.draw : line, rect + + node("a", (0,1), fill: false, label: (content: text($alpha$, fill: rgb("#8b2000")), anchor: "west", distance: 0.05)) + node("b", (0,0), fill: false, label: (content: text($beta$, fill: rgb("#8b2000")), anchor: "west", distance: 0.05)) + node("c", (1.3,1), fill: false, label: (content: text($gamma$, fill: rgb("#00318b")), anchor: "east", distance: 0.05)) + node("d", (1.3,0), fill: false, label: (content: text($delta$, fill: rgb("#00318b")), anchor: "east", distance: 0.05)) + + wire((0,1), (0.4, 1)) + wire((0,0), (0.4, 0)) + + joham.voltage((0.4, 1), (0.4, 0), $u_d$) + joham.voltage((1.3, 1), (1.3, 0), $- U_"sat"$, anchor: "west") + + vsource("v", (1,1), (1,0), scale: 0.4, fill: none) + + wire((1,1), (1.3,1)) + wire((1,0), (1.3,0)) + + + })], [], [], + + [VCVS], [#zap.circuit({ + import zap : vsource, node, disource, dvsource, wire + import cetz.draw : line, rect, mark, content + + node("A", (0,0), fill: false) + node("B", (0,1), fill: false) + node("C", (0.8,0), fill: false) + node("D", (0.8,1), fill: false) + + joham.voltage((0, 1), (0, 0), $u_"in"$, anchor: "west") + dvsource("S", (0.8,0), (0.8,1), fill: none, scale: 0.4) + + joham.voltage((1.1, 1), (1.1, 0), $u_"out" = mu u_"in"$, anchor: "west") + })], [], [ + - NICHT Verlustlos + - NICHT Reziprok + - Aktiv + - NICHT Symetrisch + ], [$ H' = mat(0, 0; mu, 0) quad A = mat(1/mu, 0; 0, 0) $], + + [VCCS], [#zap.circuit({ + import zap : vsource, node, disource, dvsource, wire + import cetz.draw : line, rect, mark, content + + node("A", (0,0), fill: false) + node("B", (0,1), fill: false) + node("C", (0.8,0), fill: false) + node("D", (0.8,1), fill: false) + + joham.voltage((0, 1), (0, 0), $u_"in"$, anchor: "west") + disource("S", (0.8,0), (0.8,1), fill: none, scale: 0.4) + + line((0.8,0.10), (0.8,0.09), mark: (end: ">", scale: 0.4, fill: black)) + content((0.9, 0.15), $i_"out" = g i_"in"$, anchor: "west") + + })], [], [ + - NICHT Verlustlos + - NICHT Reziprok + - Aktiv + - NICHT Symetrisch + ], [$ G = mat(0, 0; g, 0) quad A = mat(0, -1/g; 0, 0) $], + + [CCVS], [#zap.circuit({ + import zap : vsource, node, disource, dvsource, wire + import cetz.draw : line, rect, mark, content + + node("A", (0,0), fill: false) + node("B", (0,1), fill: false) + node("C", (0.8,0), fill: false) + node("D", (0.8,1), fill: false) + + wire((0,0), (0,1), i: (content: $i_"in"$, invert: true, anchor: "east", distance: 0.1), size: 0.2) + dvsource("S", (0.8,0), (0.8,1), fill: none, scale: 0.4) + + joham.voltage((1.1, 1), (1.1, 0), $u_"out" = r i_"in"$, anchor: "west") + })], [], [ + - NICHT Verlaustlos + - NICHT Reziprok + - Aktiv + - NICHT Symetrisch + ], [$ R = mat(0, 0; r, 0) quad A = mat(0, 0; 1/r, 0) $], + + [CCCS], [#zap.circuit({ + import zap : vsource, node, disource, dvsource, wire + import cetz.draw : line, rect, mark, content + + node("A", (0,0), fill: false) + node("B", (0,1), fill: false) + node("C", (0.8,0), fill: false) + node("D", (0.8,1), fill: false) + + wire((0,0), (0,1), i: (content: $i_"in"$, invert: true, anchor: "east", distance: 0.1), size: 0.2) + disource("S", (0.8,0), (0.8,1), fill: none, scale: 0.4) + + line((0.8,0.15), (0.8,0.1), mark: (end: ">", scale: 0.2, fill: black)) + content((0.9, 0.15), $i_"out" = beta i_"in"$, anchor: "west") + })], [], [ + - NICHT Verlustlos + - NICHT Reziprok + - Aktiv + - NICHT Symetrisch + ], [$ H = mat(0, 0; beta, 0) quad A = mat(0, 0; 0, -1/beta) $], + + [Übertrager], [#zap.circuit({ + import zap : vsource, node, disource, dvsource, wire + import cetz.draw : line, rect, mark, content + + joham.transformer("T", (0,0), scale: 0.35) + + line((-0.6,0.58), (-0.5,0.58), mark: (end: ">", scale: 0.4, fill: black)) + line((0.5,0.58), (0.6,0.58), mark: (start: ">", scale: 0.4, fill: black)) + + content((0.5, 0.8), $i_2$, anchor: "west") + content((-0.65, 0.8), $i_1$, anchor: "west") + joham.voltage((0.9, 0.7), (0.9, -0.7), $u_2$, anchor: "west") + joham.voltage((-0.9, 0.7), (-0.9, -0.7), $u_1$, anchor: "east") + }) + $ i_2 &= - ü i_1 &quad i_1 &= - 1/ü i_2 \ + u_2 &= 1/ü u_1 &quad u_1 &= ü u_2 + $ + ], [], + [ + - Verlustlos + - Reziprok + - Passiv + - Schief-Symetrisch (Symetrisch für $ü = plus.minus 1$) + + ], + [$ H = mat(0, ü; -ü, 0) &quad H' = mat(0, -1/ü; 1/ü, 0) \ - A = mat(ü, 0; 0, 1/ü) quad A' = mat(1/ü, 0; 0, ü) + A = mat(ü, 0; 0, 1/ü) &quad A' = mat(1/ü, 0; 0, ü) \ + + M = mat(1, -ü; 0, 0) &quad N = mat(0, 0; ü, 1) $], - [], + [Gyrator], - [], + [#zap.circuit({ + import zap : * + import cetz.draw : line, rect, mark, content + + joham.gyrator("G", (0, 0), scale: 0.35) + + line((-0.6,0.58), (-0.5,0.58), mark: (end: ">", scale: 0.4, fill: black)) + line((0.5,0.58), (0.6,0.58), mark: (start: ">", scale: 0.4, fill: black)) + + content((0.5, 0.8), $i_2$, anchor: "west") + content((-0.65, 0.8), $i_1$, anchor: "west") + joham.voltage((1, 0.7), (1, -0.7), $u_2$, anchor: "west") + joham.voltage((-1, 0.7), (-1, -0.7), $u_1$, anchor: "east") + + content((-0.7, -0.8), text([Output $cal(F)^d$], fill: rgb("#8b2000"))) + + content((0.8, -0.8), text([Input $cal(F)$], fill: rgb("#00318b"))) + + })], [], [ - - Antireziprok, Antisymetrisch - - Auch Positiv-Immitanz-Inverter + - Verlustlos + - NICHT Reziprok (Antireziprok) + - Nicht Symetrisch (schiefsysmetrisch) + + Der Pfeil zeigt AUF die NORMAL Eintor ], - [$ R = mat(0, -R_d; R_d, 0) quad G = mat(0, G_d; -G_d, 0) \ A = mat(0, R_d; 1/R_d, 0) quad A' = mat(0, -R_d; -1/R_d, 0) - quad + [$ R = mat(0, -R_d; R_d, 0) &quad G = mat(0, G_d; -G_d, 0) \ A = mat(0, R_d; 1/R_d, 0) &quad A' = mat(0, -R_d; -1/R_d, 0) $], - [], [NIK], [], @@ -1797,27 +2019,11 @@ - Antireziprok - Symetrisch für $abs(k) = 1$ ], - [$ H = mat(0, -k; -k, 0) quad H' = mat(0, -1/k; -1/k, 0) \ A = mat(-k, 0; 0, 1/k) quad A'= mat(-1/k, 0; 0, k) $], - [], - - [T-Glied], - [], - [], - [], - [ - - ], - [], - - [$pi$-Glied], - [], - [], - [ - - ], + [$ H = mat(0, -k; -k, 0) quad H' = mat(0, -1/k; -1/k, 0) \ A = mat(-k, 0; 0, 1/k) quad A'= mat(-1/k, 0; 0, k) $] ) ] +] // Knoten Spannungs Analyse // Tor Eigenschaften @@ -1834,8 +2040,9 @@ [*passiv*\ (nimmt Energie auf)\ $not$aktiv], [$forall (u,i) in cal(F): u dot i >= 0$], [ - $jMat(U)^T jMat(I) + jMat(I)^T jMat(U)$\ - $forall vec(jVec(u), jVec(v)) in cal(F) : jVec(u)^T jVec(i) >=0$ + $jMat(U)^T jMat(I) + jMat(I)^T jMat(U) = 0$\ + $forall vec(jVec(u), jVec(v)) in cal(F) : jVec(u)^T jVec(i) >=0 \ + jMat(G) = - jMat(G)^T quad jMat(R) = - jMat(R)^T$ ], [], @@ -1883,13 +2090,16 @@ $jMat(G) = jMat(P) jMat(G) jMat(P), space jMat(R) = jMat(P) jMat(R) jMat(P), quad jMat(P) = mat(0, 1; 1, 0) \ det(H) = 1,$ + Streng Linear $=>$ Umkehrbar + ], [], [*Reziprok*], [Immer Reziprok], [ - $cal(F)$ symetrisch $=> cal(F)$ reziprok + Symetrisch $=>$ Reziprok \ + Streng Linear $=>$ Reziprok $jMat(U)^T jMat(I) - jMat(I)^T jMat(U) = 0 \ jMat(R)^T = jMat(R), quad jMat(G)^T = jMat(G) quad h_21 = -h_12 \ det(jMat(A)) = 1 quad det(jMat(A')) = 1 quad h'_21 = -h'_12$], diff --git a/src/lib/schaltungstheorie/tumCustomSymbols.typ b/src/lib/schaltungstheorie/tumCustomSymbols.typ index 570214f..60a9190 100644 --- a/src/lib/schaltungstheorie/tumCustomSymbols.typ +++ b/src/lib/schaltungstheorie/tumCustomSymbols.typ @@ -259,7 +259,7 @@ let custom-style = ( width: 5 * scale, height: 5 * scale, - length: 0.5 * scale, + length: 0, ) let draw(ctx, position, style) = { @@ -428,3 +428,29 @@ voltage(from, to, anchor: anchor, distance: if anchor in ("east", "north") { -distance } else { distance }, label) } + +#let labeledNode(s, center, color: rgb("#00000000"), scale_t: 1, ..style) = { + + ( + ctx => { + // Define a default style + let def-style = (n: 5, inner-radius: .5, radius: 1, stroke: auto, fill: auto) + + // Resolve center to a vector + let (ctx, center) = cetz.coordinate.resolve(ctx, center) + + // Resolve the current style ("star") + let style = cetz.styles.resolve(ctx.style, merge: style.named(), base: def-style, root: "star") + + let paths = ( + cetz.drawable.ellipse(center.at(0), center.at(1), 0, scale_t*0.15, scale_t*0.15, fill: color, stroke: (paint: black, thickness: scale_t + *0.25mm)), + cetz.drawable.content((center.at(0),center.at(1)+0.03), 1, 1, none, text(size: 7pt * scale_t, s)), + ) + ( + ctx: ctx, + drawables: cetz.drawable.apply-transform(ctx.transform, paths) + ) + }, + ) +} \ No newline at end of file From 29c5d3dfeb3f7b88264fb5ca2bd67455d094a505 Mon Sep 17 00:00:00 2001 From: alexander Date: Sun, 8 Feb 2026 13:32:42 +0100 Subject: [PATCH 2/4] Got stuff working after merg --- src/cheatsheets/Schaltungstheorie.typ | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/cheatsheets/Schaltungstheorie.typ b/src/cheatsheets/Schaltungstheorie.typ index 7de7847..0c528f7 100644 --- a/src/cheatsheets/Schaltungstheorie.typ +++ b/src/cheatsheets/Schaltungstheorie.typ @@ -1757,15 +1757,11 @@ [*Name*], [*Schaltbild*], [*Ersatz-Schaltbild*], [*Eigenschaften*], [*Beschreibung*], [Nullor], [], [#scale(x: 50%, y: 50%, zap.circuit({ - import zap: * - import cetz.draw: content, line - joham.nullor("nullor", (0,0)) - }))], [], [$ A = mat(0, 0; 0, 0) $], [], + import zap: * + import cetz.draw: content, line, rect + joham.nullor("nullor", (0,0)) - rect((-0.2,-0.1), (0.7,1.1), - stroke: (paint: rgb("#666666"), dash: "densely-dashed") - ) - })], + }))], [ - Verlustlos - Reziprok @@ -1789,12 +1785,13 @@ (0.2,0),(0.2,0), scale: .4) - }))], [], [], [], [], + node("a", (to: (0, 1), rel: (-0.4, 0)), fill: false, label: (content: text($alpha$, fill: rgb("#8b2000")), anchor: "west", distance: 0.05)) node("b", (to: (0, 0), rel: (-0.4, 0)), fill: false, label: (content: text($beta$, fill: rgb("#8b2000")), anchor: "west", distance: 0.05)) node("c", (to: (0.5, 1), rel: (0.4, 0)), fill: false, label: (content: text($gamma$, fill: rgb("#00318b")), anchor: "east", distance: 0.05)) node("d", (to: (0.6, 0), rel: (0, -0.25)), fill: false, label: (content: text($delta$, fill: rgb("#00318b")), anchor: "east", distance: 0.05)) + }))], [], [], [], [], [VCVS], [#scale(x: 100%, y: 100%, zap.circuit({ import zap: * @@ -2022,8 +2019,8 @@ [$ H = mat(0, -k; -k, 0) quad H' = mat(0, -1/k; -1/k, 0) \ A = mat(-k, 0; 0, 1/k) quad A'= mat(-1/k, 0; 0, k) $] ) ] - ] + // Knoten Spannungs Analyse // Tor Eigenschaften From 69129c32fdae643378f03c883aeb4a9587532a22 Mon Sep 17 00:00:00 2001 From: alexander Date: Sun, 8 Feb 2026 13:38:42 +0100 Subject: [PATCH 3/4] Cleand Up zweitor Tabel Added All controlled voltage sources --- src/cheatsheets/Schaltungstheorie.typ | 57 ++------------------------- 1 file changed, 4 insertions(+), 53 deletions(-) diff --git a/src/cheatsheets/Schaltungstheorie.typ b/src/cheatsheets/Schaltungstheorie.typ index 0c528f7..e26a114 100644 --- a/src/cheatsheets/Schaltungstheorie.typ +++ b/src/cheatsheets/Schaltungstheorie.typ @@ -1767,54 +1767,7 @@ - Reziprok ], [$ A = mat(0, 0; 0, 0) $], - [OpAmp \ $U_"sat+"$\ (4-polig)], [#scale(x: 100%, y: 100%, zap.circuit({ - import zap: * - import cetz.draw: content, line - zap.opamp("opamp", variant: "ieee",(0,0)) - - //- - zap.wire((0,0.45),(-1.3,0.45)) - //+ - zap.wire((0,-0.45),(-1.3,-0.45)) - //out - zap.wire((0,0),(1.3,0)) - // mass - zap.wire((0,0),(0,-1.1)) - - joham.norator("null-op", - (0.2,0),(0.2,0), - scale: .4) - - - - node("a", (to: (0, 1), rel: (-0.4, 0)), fill: false, label: (content: text($alpha$, fill: rgb("#8b2000")), anchor: "west", distance: 0.05)) - node("b", (to: (0, 0), rel: (-0.4, 0)), fill: false, label: (content: text($beta$, fill: rgb("#8b2000")), anchor: "west", distance: 0.05)) - node("c", (to: (0.5, 1), rel: (0.4, 0)), fill: false, label: (content: text($gamma$, fill: rgb("#00318b")), anchor: "east", distance: 0.05)) - node("d", (to: (0.6, 0), rel: (0, -0.25)), fill: false, label: (content: text($delta$, fill: rgb("#00318b")), anchor: "east", distance: 0.05)) - }))], [], [], [], [], - - [VCVS], [#scale(x: 100%, y: 100%, zap.circuit({ - import zap: * - import cetz.draw: content, line - //tor1 - wire((-1,0), (-1.75,0)) - node("n2_1", (-1.75, 0)) - - wire((-1.75,2.5),(-1,2.5), i: (content: $i_1$, anchor: "south")) - node("n2_1", (-1.75, 2.5), f:$f$) - - - //tor 2 - zap.dvsource("dv1", - (0,2.5),(0,0), u:$alpha u_1$, i:$i_2$) - - - wire((0,0), (1.3,0)) - node("n2_1", (1.3, 0)) - wire((0,2.5), (1.3,2.5)) - node("n2_2", (1.3,2.5), n:"o-o") - - }))], [], [], [$ H' = mat(0, 0; mu, 0) quad A = mat(1/mu, 0; 0, 0) $], [], + [OpAmp \ $U_"sat+"$\ (4-polig)], opampSymbol, [], [], [], [OpAmp \ $U_"sat+"$], opampSymbol, [#zap.circuit({ import zap : wire, vsource, node @@ -1857,8 +1810,6 @@ wire((1,1), (1.3,1)) wire((1,0), (1.3,0)) - - })], [], [], [VCVS], [#zap.circuit({ @@ -1879,7 +1830,7 @@ - NICHT Reziprok - Aktiv - NICHT Symetrisch - ], [$ H' = mat(0, 0; mu, 0) quad A = mat(1/mu, 0; 0, 0) $], + ], [$ H' = mat(0, 0; mu, 0) quad A = mat(1/mu, 0; 0, 0) $], [VCCS], [#zap.circuit({ import zap : vsource, node, disource, dvsource, wire @@ -1901,7 +1852,7 @@ - NICHT Reziprok - Aktiv - NICHT Symetrisch - ], [$ G = mat(0, 0; g, 0) quad A = mat(0, -1/g; 0, 0) $], + ], [$ G = mat(0, 0; g, 0) quad A = mat(0, -1/g; 0, 0) $], [CCVS], [#zap.circuit({ import zap : vsource, node, disource, dvsource, wire @@ -1921,7 +1872,7 @@ - NICHT Reziprok - Aktiv - NICHT Symetrisch - ], [$ R = mat(0, 0; r, 0) quad A = mat(0, 0; 1/r, 0) $], + ], [$ R = mat(0, 0; r, 0) quad A = mat(0, 0; 1/r, 0) $], [CCCS], [#zap.circuit({ import zap : vsource, node, disource, dvsource, wire From 5f0bd74756d5ba89a758a584105ff658f12191eb Mon Sep 17 00:00:00 2001 From: alexander Date: Sun, 8 Feb 2026 13:41:48 +0100 Subject: [PATCH 4/4] Added NIk Symbol --- src/cheatsheets/Schaltungstheorie.typ | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/cheatsheets/Schaltungstheorie.typ b/src/cheatsheets/Schaltungstheorie.typ index e26a114..04fa904 100644 --- a/src/cheatsheets/Schaltungstheorie.typ +++ b/src/cheatsheets/Schaltungstheorie.typ @@ -1765,6 +1765,8 @@ [ - Verlustlos - Reziprok + - Passiv + - Symetrisch ], [$ A = mat(0, 0; 0, 0) $], [OpAmp \ $U_"sat+"$\ (4-polig)], opampSymbol, [], [], [], @@ -1960,7 +1962,9 @@ $], [NIK], - [], + [#zap.circuit({ + joham.zweitor("NIK", (0,0), label: "NIK") + })], [], [ - Aktiv @@ -2038,7 +2042,7 @@ $jMat(G) = jMat(P) jMat(G) jMat(P), space jMat(R) = jMat(P) jMat(R) jMat(P), quad jMat(P) = mat(0, 1; 1, 0) \ det(H) = 1,$ - Streng Linear $=>$ Umkehrbar + Für Eintore: Streng Linear $=>$ Umkehrbar ], [], @@ -2047,7 +2051,7 @@ [Immer Reziprok], [ Symetrisch $=>$ Reziprok \ - Streng Linear $=>$ Reziprok + Für Eintore: Streng Linear $=>$ Reziprok $jMat(U)^T jMat(I) - jMat(I)^T jMat(U) = 0 \ jMat(R)^T = jMat(R), quad jMat(G)^T = jMat(G) quad h_21 = -h_12 \ det(jMat(A)) = 1 quad det(jMat(A')) = 1 quad h'_21 = -h'_12$],