31/08/2025
\documentclass[english,12pt,a4paper]{report}
\usepackage[ left=5mm, right=5mm, top=10mm, bottom=15mm]{geometry}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{circuitikz} % For circuit diagrams
\begin{document}
\begin{tikzpicture}
% --- Ground line and main horizontal bus ---
\draw[](0,0)--(0,-8)--(18,-8); % vertical ground reference and bottom line
\draw[](0,1)--(0,4)--(11,4)--(11,-0.3); % vertical line to power bus
% --- Voltage source symbol (stacked lines) ---
\draw[](-0.4,1)--(0.4,1);
\draw[](-0.2,0.7)--(0.2,0.7);
\draw[](-0.4,0.4)--(0.4,0.4);
\draw[](-0.2,0)--(0.2,0);
% --- Switch S2 ---
\draw[](2,4)--(2,2)--(2.5,1.);
\draw[fill=white](2,2)circle[radius=0.1]; % node marker
\draw[](2,1)--(2,-1.5)--(5,-1.5)--(5,-0.5)--(5,-5)--(8,-5)--(8,-0.5)--(8,-5)--(11,-5)--(11,-0.5);
% --- Connection dots ---
\draw[fill=white](2,1)circle[radius=0.1];
\draw[](5,4)--(5,-0.3);
\draw[](8,4)--(8,-0.3);
% --- Output branch connections (D0, R0, C0, L, etc.) ---
\draw[](17,4)--(17,1.1);
\draw[](17,-1)--(17,-8);
\draw[](16,4)--(16,-1.3);
\draw[](16,-1.5)--(16,-8);
\draw[](18,4)--(14,4)--(14,-2)--(13.5,-2)--(13.5,-6)--(14,-7);
\draw[fill=white](13.5,-6)circle[radius=0.1]; % diode or switch connection
\draw[](13.5,-7)--(13.5,-8);
\draw[fill=white](13.5,-7)circle[radius=0.1];
% --- Switch S1 branch ---
\draw[](7.8,-5)--(7.8,-6)--(8.3,-7);
\draw[fill=white](7.8,-6)circle[radius=0.1];
\draw[](7.8,-7)--(7.8,-8);
\draw[fill=white](7.8,-7)circle[radius=0.1];
% --- Capacitors C1 and C2 ---
\draw[](5,1)--(6.5,1)--(6.5,0)--(7.,-1);
\draw[fill=white](6.5,0)circle[radius=0.1];
\draw[](6.5,-1)--(6.5,-2)--(8,-2);
\draw[fill=white](6.5,-1)circle[radius=0.1];
%%%% Repeat for C2 and C3 connections
\draw[](8,1)--(9.5,1)--(9.5,0)--(10.,-1);
\draw[fill=white](9.5,0)circle[radius=0.1];
\draw[](9.5,-1)--(9.5,-2)--(11,-2);
\draw[fill=white](9.5,-1)circle[radius=0.1];
\draw[](11,1)--(13.5,1)--(13.5,0);
\draw[](13.5,-1)--(13.5,-2);
%%%% Capacitor plate symbols (parallel lines) %%%%
\draw[](4.8,-0.3)--(5.2,-0.3);
\draw[](4.8,-0.5)--(5.2,-0.5);
\draw[](7.8,-0.3)--(8.2,-0.3);
\draw[](7.8,-0.5)--(8.2,-0.5);
\draw[](10.8,-0.3)--(11.2,-0.3);
\draw[](10.8,-0.5)--(11.2,-0.5);
\draw[](15.8,-1.3)--(16.2,-1.3);
\draw[](15.8,-1.5)--(16.2,-1.5);
%%%% Node Labels (Switches, Capacitors, Diodes, etc.) %%%%
\node[above right ] at (0,1) {$V_g$};
\node[above right ] at (2.2,1.5) {$S2$};
\node[above right ] at (5.2,2.5) {$D1$};
\node[above right ] at (5.1,-0.3) {$C1$};
\node[above right ] at (5.7,-0.5) {$S3$};
\node[above right ] at (5.2,-3.) {$D2$};
\node[above right ] at (8.2,2.5) {$D3$};
\node[above right ] at (8.1,-0.3) {$C2$};
\node[above right ] at (8.7,-0.5) {$S4$};
\node[above right ] at (8.2,-3) {$D4$};
\node[above left ] at (7.8,-7) {$S1$};
\node[above right ] at (11.2,2.5) {$D5$};
\node[above right ] at (11.2,-3) {$D6$};
\node[above right ] at (11.1,-0.3) {$C3$};
\node[above right ] at (12.1,-0.3) {$L$};
\node[above left ] at (13.1,-7) {$S5$};
\node[above right ] at (15.,4.5) {$D0$};
\node[above right ] at (16.,-1.2) {$C0$};
\node[above right ] at (17.5,-0.5) {$R0$};
% --- Current source / diode waveform symbol ---
\begin{scope}[shift={(12.1,2.7)}, rotate=-90,scale=0.55]
\draw[line width=0.4mm, domain=0:5.5, samples=300, smooth, variable=\t]
plot ({5 + \t/3.5 - 0.10*cos(4*\t r)},
{2.5 + (0.25 + 0.01*\t/6.28)*sin(4*\t r)});
\end{scope}
% --- Inductor waveform representation ---
\begin{scope}[shift={(17,-2)}, rotate=90]
\draw[line width=1pt]
(1,0) -- (1.3,0.3)
-- (1.6,-0.3)
-- (1.9,0.3)
-- (2.2,-0.3)
-- (2.5,0.3)
-- (2.8,-0.3)
-- (3.1,0);
\end{scope}
% --- Control switches (drawn as triangles) ---
\begin{scope}[shift={(6.3,-4)}, rotate=0]
\draw[fill=white](9,7.7)--(9,8.3)--(9.5,8)--(9,7.7);
\draw[](9.5,8.2)--(9.5,7.8);
\end{scope}
% --- Additional switches S? (control blocks) ---
\begin{scope}[shift={(0,6)}, rotate=-90]
\draw[fill=white](9,7.7)--(9,8.3)--(9.5,8)--(9,7.7);
\draw[](9.5,8.2)--(9.5,7.8);
\end{scope}
\begin{scope}[shift={(0,12)}, rotate=-90]
\draw[fill=white](9,7.7)--(9,8.3)--(9.5,8)--(9,7.7);
\draw[](9.5,8.2)--(9.5,7.8);
\end{scope}
\begin{scope}[shift={(-3,6)}, rotate=-90]
\draw[fill=white](9,7.7)--(9,8.3)--(9.5,8)--(9,7.7);
\draw[](9.5,8.2)--(9.5,7.8);
\end{scope}
\begin{scope}[shift={(-3,12)}, rotate=-90]
\draw[fill=white](9,7.7)--(9,8.3)--(9.5,8)--(9,7.7);
\draw[](9.5,8.2)--(9.5,7.8);
\end{scope}
\begin{scope}[shift={(3,6)}, rotate=-90]
\draw[fill=white](9,7.7)--(9,8.3)--(9.5,8)--(9,7.7);
\draw[](9.5,8.2)--(9.5,7.8);
\end{scope}
\begin{scope}[shift={(3,12)}, rotate=-90]
\draw[fill=white](9,7.7)--(9,8.3)--(9.5,8)--(9,7.7);
\draw[](9.5,8.2)--(9.5,7.8);
\end{scope}
\end{tikzpicture}
\end{document}