diff --git a/coder.lua b/coder.lua index 79f7f51..76d1b26 100644 --- a/coder.lua +++ b/coder.lua @@ -1,4 +1,4 @@ -input_code = {1, 0, 1, 1, 1, 1, 0, 0, 1} +input_code = {1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0} -- Logical sum function m2s(a, b) @@ -28,6 +28,10 @@ function coder(input_code) return result, states end +function decoder(input_code) + +end + result, states = coder(input_code) for _, v in ipairs(states) do print(v..' ') end diff --git a/decoder.tex b/decoder.tex index 384c197..5bd1b74 100644 --- a/decoder.tex +++ b/decoder.tex @@ -1,441 +1,1094 @@ -\begin{tikzpicture}[x=1.2cm, y=-1cm] +\begin{figure} + \begin{tikzpicture}[x=1.2cm, y=-1cm] - \node at (-0.5,0) [left] {$s_1=00$}; - \node at (-0.5,1) [left] {$s_2=10$}; - \node at (-0.5,2) [left] {$s_3=01$}; - \node at (-0.5,3) [left] {$s_4=11$}; + \node at (-0.5,0) [left] {$s_1=00$}; + \node at (-0.5,1) [left] {$s_2=10$}; + \node at (-0.5,2) [left] {$s_3=01$}; + \node at (-0.5,3) [left] {$s_4=11$}; - % Nodes - \foreach \x in {0,...,9} { - \node at (\x,-.7) {$\x$}; - \foreach \y in {0,...,3} { - \node (s\x\y) at (\x,\y) [circle,fill=black,scale=0.7] {}; + % Nodes + \foreach \x in {0,...,9} { + \node at (\x,-.7) {$\x$}; + \foreach \y in {0,...,3} { + \node (s\x\y) at (\x,\y) [circle,fill=black,scale=0.7] {}; + } } - } - \node at (0,0) [highlight] {}; - \node at (1,0) [highlight,label=left:{$2$}] {}; - \node at (1,1) [highlight,label=left:{$0$}] {}; + \node at (0,0) [highlight] {}; + \node at (1,0) [highlight,label=left:{$2$}] {}; + \node at (1,1) [highlight,label=left:{$0$}] {}; - \node at (2,0) [highlight,label=left:{$0$}] {}; - \node at (2,1) [highlight,label=left:{$2$}] {}; - \node at (2,2) [highlight,label=left:{$1$}] {}; - \node at (2,3) [highlight,label=left:{$1$}] {}; + \node at (2,0) [highlight,label=left:{$0$}] {}; + \node at (2,1) [highlight,label=left:{$2$}] {}; + \node at (2,2) [highlight,label=left:{$1$}] {}; + \node at (2,3) [highlight,label=left:{$1$}] {}; - \node at (3,0) [highlight,label=left:{$\frac{0}{2}$}] {}; - \node at (3,1) [highlight,label=left:{$\frac{2}{0}$}] {}; - \node at (3,2) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (3,3) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (3,0) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (3,1) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (3,2) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (3,3) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (4,0) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (4,1) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (4,2) [highlight,label=left:{$\frac{2}{0}$}] {}; - \node at (4,3) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (4,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (4,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (4,2) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (4,3) [highlight,label=left:{$\frac{0}{2}$}] {}; - \node at (5,0) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (5,1) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (5,2) [highlight,label=left:{$\frac{0}{2}$}] {}; - \node at (5,3) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (5,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (5,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (5,2) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (5,3) [highlight,label=left:{$\frac{2}{0}$}] {}; - \node at (6,0) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (6,1) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (6,2) [highlight,label=left:{$\frac{0}{2}$}] {}; - \node at (6,3) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (6,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (6,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (6,2) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (6,3) [highlight,label=left:{$\frac{2}{0}$}] {}; - \node at (7,0) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (7,1) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (7,2) [highlight,label=left:{$\frac{2}{0}$}] {}; - \node at (7,3) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (7,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (7,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (7,2) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (7,3) [highlight,label=left:{$\frac{0}{2}$}] {}; - \node at (8,0) [highlight,label=left:{$\frac{2}{0}$}] {}; - \node at (8,1) [highlight,label=left:{$\frac{0}{2}$}] {}; - \node at (8,2) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (8,3) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (8,0) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (8,1) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (8,2) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (8,3) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (9,0) [highlight,label=left:{$\frac{2}{0}$}] {}; - \node at (9,1) [highlight,label=left:{$\frac{0}{2}$}] {}; - \node at (9,2) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (9,3) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (9,0) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (9,1) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (9,2) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (9,3) [highlight,label=left:{$\frac{1}{1}$}] {}; - % Edges - \trellisEdges{0}{0} - \trellisEdges{1}{0} - \trellisEdges{1}{1} - \foreach \x in {2,...,8} { - \foreach \y in {0,...,3} { - \trellisEdges{\x}{\y} + % Edges + \trellisEdges{0}{0} + \trellisEdges{1}{0} + \trellisEdges{1}{1} + \foreach \x in {2,...,8} { + \foreach \y in {0,...,3} { + \trellisEdges{\x}{\y} + } } - } - % Inputs - \node at (-0.5,4) [left, align=right] {Входная\\пара}; + % Inputs + \node at (-0.5,4) [left, align=right] {Входная\\пара}; - \trellisIn{0}{11} - \trellisIn{1}{00} - \trellisIn{2}{00} - \trellisIn{3}{01} - \trellisIn{4}{10} - \trellisIn{5}{10} - \trellisIn{6}{01} - \trellisIn{7}{11} - \trellisIn{8}{11} -\end{tikzpicture} + \trellisIn{0}{11} + \trellisIn{1}{00} + \trellisIn{2}{00} + \trellisIn{3}{01} + \trellisIn{4}{10} + \trellisIn{5}{10} + \trellisIn{6}{01} + \trellisIn{7}{11} + \trellisIn{8}{11} + \end{tikzpicture} -Сегмент решетки декодера от $t=0$, до $t=3$. + \caption{Решетка декодера} \label{fig:decoder} +\end{figure} -\begin{tikzpicture}[x=2cm, y=-1cm] +\begin{figure} + \begin{tikzpicture}[x=2cm, y=-1cm] - \node at (-0.5,0) [left] {$s_1=00$}; - \node at (-0.5,1) [left] {$s_2=10$}; - \node at (-0.5,2) [left] {$s_3=01$}; - \node at (-0.5,3) [left] {$s_4=11$}; + \node at (-0.5,0) [left] {$s_1=00$}; + \node at (-0.5,1) [left] {$s_2=10$}; + \node at (-0.5,2) [left] {$s_3=01$}; + \node at (-0.5,3) [left] {$s_4=11$}; - % Nodes - \foreach \x in {0,...,3} { - \node at (\x,-.7) {$\x$}; - \foreach \y in {0,...,3} { - \node (s\x\y) at (\x,\y) [circle,fill=black,scale=0.7] {}; + % Nodes + \foreach \x in {0,...,3} { + \node at (\x,-.7) {$\x$}; + \foreach \y in {0,...,3} { + \node (s\x\y) at (\x,\y) [circle,fill=black,scale=0.7] {}; + } } - } - % Edges - \trellisEdges{0}{0} - \trellisEdges{1}{0} - \trellisEdges{1}{1} - \foreach \x in {2,...,2} { - \foreach \y in {0,...,3} { - \trellisEdges{\x}{\y} + % Edges + \trellisEdges{0}{0} + \trellisEdges{1}{0} + \trellisEdges{1}{1} + \foreach \x in {2,...,2} { + \foreach \y in {0,...,3} { + \trellisEdges{\x}{\y} + } } - } - \draw[activeedge] (s00) -- (s10); - \draw[activeedge] (s00) -- (s11); - \draw[activeedge] (s10) -- (s20); - \draw[activeedge] (s11) -- (s22); - \draw[activeedge] (s20) -- (s30); - \draw[activeedge] (s22) -- (s31); - \draw[activeedge] (s11) -- (s23); - \draw[activeedge] (s23) -- (s32); - \draw[activeedge] (s23) -- (s33); + \draw[activeedge] (s00) -- (s10); + \draw[activeedge] (s00) -- (s11); + \draw[activeedge] (s10) -- (s20); + \draw[activeedge] (s11) -- (s22); + \draw[activeedge] (s20) -- (s30); + \draw[activeedge] (s22) -- (s31); + \draw[activeedge] (s11) -- (s23); + \draw[activeedge] (s23) -- (s32); + \draw[activeedge] (s23) -- (s33); - \node at (0,0) [highlight] {}; - \node at (1,0) [highlight,label=left:{$2$}] {}; - \node at (1,1) [highlight,label=left:{$0$}] {}; + \node at (0,0) [highlight] {}; + \node at (1,0) [highlight,label=left:{$2$}] {}; + \node at (1,1) [highlight,label=left:{$0$}] {}; - \node at (2,0) [highlight,label=left:{$0$}] {}; - \node at (2,1) [highlight,label=left:{$2$}] {}; - \node at (2,2) [highlight,label=left:{$1$}] {}; - \node at (2,3) [highlight,label=left:{$1$}] {}; + \node at (2,0) [highlight,label=left:{$0$}] {}; + \node at (2,1) [highlight,label=left:{$2$}] {}; + \node at (2,2) [highlight,label=left:{$1$}] {}; + \node at (2,3) [highlight,label=left:{$1$}] {}; - \node at (3,0) [highlight,label=left:{$\frac{0}{2}$}] {$\frac23$}; - \node at (3,1) [highlight,label=left:{$\frac{2}{0}$}] {$\frac41$}; - \node at (3,2) [highlight,label=left:{$\frac{1}{1}$}] {$\frac52$}; - \node at (3,3) [highlight,label=left:{$\frac{1}{1}$}] {$\frac52$}; + \node at (3,0) [highlight,label=left:{$\frac{0}{2}$}] {$\frac23$}; + \node at (3,1) [highlight,label=left:{$\frac{2}{0}$}] {$\frac41$}; + \node at (3,2) [highlight,label=left:{$\frac{1}{1}$}] {$\frac52$}; + \node at (3,3) [highlight,label=left:{$\frac{1}{1}$}] {$\frac52$}; - \node at (2.5,1) [text=red] {$\times$}; - \node at (2.5,0.5) [text=red] {$\times$}; - \node at (2.5,1.5) [text=red] {$\times$}; - \node at (2.5,2) [text=red] {$\times$}; - \node at (1.5,0.5) [text=red] {$\times$}; + \node at (2.5,1) [text=red] {$\times$}; + \node at (2.5,0.5) [text=red] {$\times$}; + \node at (2.5,1.5) [text=red] {$\times$}; + \node at (2.5,2) [text=red] {$\times$}; + \node at (1.5,0.5) [text=red] {$\times$}; - % Inputs and Outputs - \node at (-0.5,4) [left, align=right] {Входная\\пара}; + % Inputs and Outputs + \node at (-0.5,4) [left, align=right] {Входная\\пара}; - \trellisIn{0}{11} - \trellisIn{1}{00} - \trellisIn{2}{00} -\end{tikzpicture} + \trellisIn{0}{11} + \trellisIn{1}{00} + \trellisIn{2}{00} + \end{tikzpicture} -Сегмент решетки декодера от $t=0$, до $t=4$. + \caption{Сегмент решетки декодера от $t=0$, до $t=3$.} +\end{figure} -\begin{tikzpicture}[x=2cm, y=-1cm] +\begin{figure} + \begin{tikzpicture}[x=2cm, y=-1cm] - \node at (-0.5,0) [left] {$s_1=00$}; - \node at (-0.5,1) [left] {$s_2=10$}; - \node at (-0.5,2) [left] {$s_3=01$}; - \node at (-0.5,3) [left] {$s_4=11$}; + \node at (-0.5,0) [left] {$s_1=00$}; + \node at (-0.5,1) [left] {$s_2=10$}; + \node at (-0.5,2) [left] {$s_3=01$}; + \node at (-0.5,3) [left] {$s_4=11$}; - % Nodes - \foreach \x in {0,...,4} { - \node at (\x,-.7) {$\x$}; - \foreach \y in {0,...,3} { - \node (s\x\y) at (\x,\y) [circle,fill=black,scale=0.7] {}; + % Nodes + \foreach \x in {0,...,4} { + \node at (\x,-.7) {$\x$}; + \foreach \y in {0,...,3} { + \node (s\x\y) at (\x,\y) [circle,fill=black,scale=0.7] {}; + } } - } - % Edges - \trellisEdges{0}{0} - \trellisEdges{1}{0} - \trellisEdges{1}{1} - \foreach \x in {2,...,3} { - \foreach \y in {0,...,3} { - \trellisEdges{\x}{\y} + % Edges + \trellisEdges{0}{0} + \trellisEdges{1}{0} + \trellisEdges{1}{1} + \foreach \x in {2,...,3} { + \foreach \y in {0,...,3} { + \trellisEdges{\x}{\y} + } } - } - \draw[activeedge] (s00) -- (s11); - \draw[activeedge] (s11) -- (s22); - \draw[activeedge] (s22) -- (s31); - \draw[activeedge] (s11) -- (s23); - \draw[activeedge] (s23) -- (s32); - \draw[activeedge] (s23) -- (s33); + \draw[activeedge] (s00) -- (s11); + \draw[activeedge] (s11) -- (s22); + \draw[activeedge] (s22) -- (s31); + \draw[activeedge] (s11) -- (s23); + \draw[activeedge] (s23) -- (s32); + \draw[activeedge] (s23) -- (s33); - \draw[activeedge] (s31) -- (s43); - \draw[activeedge] (s32) -- (s41); - \draw[activeedge] (s32) -- (s40); - \draw[activeedge] (s33) -- (s42); + \draw[activeedge] (s31) -- (s43); + \draw[activeedge] (s32) -- (s41); + \draw[activeedge] (s32) -- (s40); + \draw[activeedge] (s33) -- (s42); - \node at (0,0) [highlight] {}; - \node at (1,0) [highlight,label=left:{$2$}] {}; - \node at (1,1) [highlight,label=left:{$0$}] {}; + \node at (0,0) [highlight] {}; + \node at (1,0) [highlight,label=left:{$2$}] {}; + \node at (1,1) [highlight,label=left:{$0$}] {}; - \node at (2,0) [highlight,label=left:{$0$}] {}; - \node at (2,1) [highlight,label=left:{$2$}] {}; - \node at (2,2) [highlight,label=left:{$1$}] {}; - \node at (2,3) [highlight,label=left:{$1$}] {}; + \node at (2,0) [highlight,label=left:{$0$}] {}; + \node at (2,1) [highlight,label=left:{$2$}] {}; + \node at (2,2) [highlight,label=left:{$1$}] {}; + \node at (2,3) [highlight,label=left:{$1$}] {}; - \node at (3,0) [highlight,label=left:{$\frac{0}{2}$}] {}; - \node at (3,1) [highlight,label=left:{$\frac{2}{0}$}] {}; - \node at (3,2) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (3,3) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (3,0) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (3,1) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (3,2) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (3,3) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (2.5,1) [text=red] {$\times$}; - \node at (2.5,0.5) [text=red] {$\times$}; - \node at (2.5,1.5) [text=red] {$\times$}; - \node at (2.5,2) [text=red] {$\times$}; - \node at (1.5,0.5) [text=red] {$\times$}; - \node at (1.5,0) [text=red] {$\times$}; - \node at (0.5,0) [text=red] {$\times$}; + \node at (2.5,1) [text=red] {$\times$}; + \node at (2.5,0.5) [text=red] {$\times$}; + \node at (2.5,1.5) [text=red] {$\times$}; + \node at (2.5,2) [text=red] {$\times$}; + \node at (1.5,0.5) [text=red] {$\times$}; + \node at (1.5,0) [text=red] {$\times$}; + \node at (0.5,0) [text=red] {$\times$}; - \node at (4,0) [highlight,label=left:{$\frac{1}{1}$}] {$\frac33$}; - \node at (4,1) [highlight,label=left:{$\frac{1}{1}$}] {$\frac33$}; - \node at (4,2) [highlight,label=left:{$\frac{2}{0}$}] {$\frac32$}; - \node at (4,3) [highlight,label=left:{$\frac{0}{2}$}] {$\frac14$}; + \node at (4,0) [highlight,label=left:{$\frac{1}{1}$}] {$\frac33$}; + \node at (4,1) [highlight,label=left:{$\frac{1}{1}$}] {$\frac33$}; + \node at (4,2) [highlight,label=left:{$\frac{2}{0}$}] {$\frac32$}; + \node at (4,3) [highlight,label=left:{$\frac{0}{2}$}] {$\frac14$}; - \node at (3.5,0) [text=red] {$\times$}; - \node at (3.5,0.5) [text=red] {$\times$}; - \node at (3.5,1.5) [text=red] {$\times$}; - \node at (3.5,3) [text=red] {$\times$}; - \node at (2.5,0) [text=red] {$\times$}; + \node at (3.5,0) [text=red] {$\times$}; + \node at (3.5,0.5) [text=red] {$\times$}; + \node at (3.5,1.5) [text=red] {$\times$}; + \node at (3.5,3) [text=red] {$\times$}; + \node at (2.5,0) [text=red] {$\times$}; - % Inputs and Outputs - \node at (-0.5,4) [left, align=right] {Входная\\пара}; + % Inputs and Outputs + \node at (-0.5,4) [left, align=right] {Входная\\пара}; - \trellisIn{0}{11} - \trellisIn{1}{00} - \trellisIn{2}{00} - \trellisIn{3}{01} -\end{tikzpicture} + \trellisIn{0}{11} + \trellisIn{1}{00} + \trellisIn{2}{00} + \trellisIn{3}{01} + \end{tikzpicture} -Сегмент решетки декодера от $t=0$, до $t=5$. + \caption{Сегмент решетки декодера от $t=0$, до $t=4$.} +\end{figure} -\begin{tikzpicture}[x=2cm, y=-1cm] +\begin{figure} + \begin{tikzpicture}[x=2cm, y=-1cm] - \node at (-0.5,0) [left] {$s_1=00$}; - \node at (-0.5,1) [left] {$s_2=10$}; - \node at (-0.5,2) [left] {$s_3=01$}; - \node at (-0.5,3) [left] {$s_4=11$}; + \node at (-0.5,0) [left] {$s_1=00$}; + \node at (-0.5,1) [left] {$s_2=10$}; + \node at (-0.5,2) [left] {$s_3=01$}; + \node at (-0.5,3) [left] {$s_4=11$}; - % Nodes - \foreach \x in {0,...,5} { - \node at (\x,-.7) {$\x$}; - \foreach \y in {0,...,3} { - \node (s\x\y) at (\x,\y) [circle,fill=black,scale=0.7] {}; + % Nodes + \foreach \x in {0,...,5} { + \node at (\x,-.7) {$\x$}; + \foreach \y in {0,...,3} { + \node (s\x\y) at (\x,\y) [circle,fill=black,scale=0.7] {}; + } } - } - % Edges - \trellisEdges{0}{0} - \trellisEdges{1}{0} - \trellisEdges{1}{1} - \foreach \x in {2,...,4} { - \foreach \y in {0,...,3} { - \trellisEdges{\x}{\y} + % Edges + \trellisEdges{0}{0} + \trellisEdges{1}{0} + \trellisEdges{1}{1} + \foreach \x in {2,...,4} { + \foreach \y in {0,...,3} { + \trellisEdges{\x}{\y} + } } - } - \draw[activeedge] (s00) -- (s11); - \draw[activeedge] (s11) -- (s22); - \draw[activeedge] (s22) -- (s31); - \draw[activeedge] (s11) -- (s23); - \draw[activeedge] (s23) -- (s32); - \draw[activeedge] (s23) -- (s33); + \draw[activeedge] (s00) -- (s11); + \draw[activeedge] (s11) -- (s22); + \draw[activeedge] (s22) -- (s31); + \draw[activeedge] (s11) -- (s23); + \draw[activeedge] (s23) -- (s32); + \draw[activeedge] (s23) -- (s33); - \draw[activeedge] (s31) -- (s43); - \draw[activeedge] (s32) -- (s41); - \draw[activeedge] (s33) -- (s42); + \draw[activeedge] (s31) -- (s43); + \draw[activeedge] (s32) -- (s41); + \draw[activeedge] (s33) -- (s42); - \draw[activeedge] (s41) -- (s52); - \draw[activeedge] (s42) -- (s50); - \draw[activeedge] (s42) -- (s51); - \draw[activeedge] (s43) -- (s53); + \draw[activeedge] (s41) -- (s52); + \draw[activeedge] (s42) -- (s50); + \draw[activeedge] (s42) -- (s51); + \draw[activeedge] (s43) -- (s53); - \node at (0,0) [highlight] {}; - \node at (1,0) [highlight,label=left:{$2$}] {}; - \node at (1,1) [highlight,label=left:{$0$}] {}; + \node at (0,0) [highlight] {}; + \node at (1,0) [highlight,label=left:{$2$}] {}; + \node at (1,1) [highlight,label=left:{$0$}] {}; - \node at (2,0) [highlight,label=left:{$0$}] {}; - \node at (2,1) [highlight,label=left:{$2$}] {}; - \node at (2,2) [highlight,label=left:{$1$}] {}; - \node at (2,3) [highlight,label=left:{$1$}] {}; + \node at (2,0) [highlight,label=left:{$0$}] {}; + \node at (2,1) [highlight,label=left:{$2$}] {}; + \node at (2,2) [highlight,label=left:{$1$}] {}; + \node at (2,3) [highlight,label=left:{$1$}] {}; - \node at (3,0) [highlight,label=left:{$\frac{0}{2}$}] {}; - \node at (3,1) [highlight,label=left:{$\frac{2}{0}$}] {}; - \node at (3,2) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (3,3) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (3,0) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (3,1) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (3,2) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (3,3) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (2.5,1) [text=red] {$\times$}; - \node at (2.5,0.5) [text=red] {$\times$}; - \node at (2.5,1.5) [text=red] {$\times$}; - \node at (2.5,2) [text=red] {$\times$}; - \node at (1.5,0.5) [text=red] {$\times$}; - \node at (1.5,0) [text=red] {$\times$}; - \node at (0.5,0) [text=red] {$\times$}; + \node at (2.5,1) [text=red] {$\times$}; + \node at (2.5,0.5) [text=red] {$\times$}; + \node at (2.5,1.5) [text=red] {$\times$}; + \node at (2.5,2) [text=red] {$\times$}; + \node at (1.5,0.5) [text=red] {$\times$}; + \node at (1.5,0) [text=red] {$\times$}; + \node at (0.5,0) [text=red] {$\times$}; - \node at (4,0) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (4,1) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (4,2) [highlight,label=left:{$\frac{2}{0}$}] {}; - \node at (4,3) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (4,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (4,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (4,2) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (4,3) [highlight,label=left:{$\frac{0}{2}$}] {}; - \node at (3.5,0) [text=red] {$\times$}; - \node at (3.5,0.5) [text=red] {$\times$}; - \node at (3.5,1.5) [text=red] {$\times$}; - \node at (3.5,3) [text=red] {$\times$}; - \node at (2.5,0) [text=red] {$\times$}; + \node at (3.5,0) [text=red] {$\times$}; + \node at (3.5,0.5) [text=red] {$\times$}; + \node at (3.5,1.5) [text=red] {$\times$}; + \node at (3.5,3) [text=red] {$\times$}; + \node at (2.5,0) [text=red] {$\times$}; - \node at (5,0) [highlight,label=left:{$\frac{1}{1}$}] {$\frac43$}; - \node at (5,1) [highlight,label=left:{$\frac{1}{1}$}] {$\frac43$}; - \node at (5,2) [highlight,label=left:{$\frac{0}{2}$}] {$\frac33$}; - \node at (5,3) [highlight,label=left:{$\frac{2}{0}$}] {$\frac51$}; + \node at (5,0) [highlight,label=left:{$\frac{1}{1}$}] {$\frac43$}; + \node at (5,1) [highlight,label=left:{$\frac{1}{1}$}] {$\frac43$}; + \node at (5,2) [highlight,label=left:{$\frac{0}{2}$}] {$\frac33$}; + \node at (5,3) [highlight,label=left:{$\frac{2}{0}$}] {$\frac51$}; - \node at (4.5,0) [text=red] {$\times$}; - \node at (4.5,0.5) [text=red] {$\times$}; - \node at (4.5,2.5) [text=red] {$\times$}; - \node at (4.5,2) [text=red] {$\times$}; - \node at (3.5,1) [text=red] {$\times$}; + \node at (4.5,0) [text=red] {$\times$}; + \node at (4.5,0.5) [text=red] {$\times$}; + \node at (4.5,2.5) [text=red] {$\times$}; + \node at (4.5,2) [text=red] {$\times$}; + \node at (3.5,1) [text=red] {$\times$}; - % Inputs and Outputs - \node at (-0.5,4) [left, align=right] {Входная\\пара}; + % Inputs and Outputs + \node at (-0.5,4) [left, align=right] {Входная\\пара}; - \trellisIn{0}{11} - \trellisIn{1}{00} - \trellisIn{2}{00} - \trellisIn{3}{01} - \trellisIn{4}{10} -\end{tikzpicture} + \trellisIn{0}{11} + \trellisIn{1}{00} + \trellisIn{2}{00} + \trellisIn{3}{01} + \trellisIn{4}{10} + \end{tikzpicture} -Сегмент решетки декодера от $t=0$, до $t=6$. + \caption{Сегмент решетки декодера от $t=0$, до $t=5$.} +\end{figure} -\begin{tikzpicture}[x=1.8cm, y=-1cm] +\begin{figure} + \begin{tikzpicture}[x=1.8cm, y=-1cm] - \node at (-0.5,0) [left] {$s_1=00$}; - \node at (-0.5,1) [left] {$s_2=10$}; - \node at (-0.5,2) [left] {$s_3=01$}; - \node at (-0.5,3) [left] {$s_4=11$}; + \node at (-0.5,0) [left] {$s_1=00$}; + \node at (-0.5,1) [left] {$s_2=10$}; + \node at (-0.5,2) [left] {$s_3=01$}; + \node at (-0.5,3) [left] {$s_4=11$}; - % Nodes - \foreach \x in {0,...,6} { - \node at (\x,-.7) {$\x$}; - \foreach \y in {0,...,3} { - \node (s\x\y) at (\x,\y) [circle,fill=black,scale=0.7] {}; + % Nodes + \foreach \x in {0,...,6} { + \node at (\x,-.7) {$\x$}; + \foreach \y in {0,...,3} { + \node (s\x\y) at (\x,\y) [circle,fill=black,scale=0.7] {}; + } } - } - % Edges - \trellisEdges{0}{0} - \trellisEdges{1}{0} - \trellisEdges{1}{1} - \foreach \x in {2,...,5} { - \foreach \y in {0,...,3} { - \trellisEdges{\x}{\y} + % Edges + \trellisEdges{0}{0} + \trellisEdges{1}{0} + \trellisEdges{1}{1} + \foreach \x in {2,...,5} { + \foreach \y in {0,...,3} { + \trellisEdges{\x}{\y} + } } - } - \draw[activeedge] (s00) -- (s11); - \draw[activeedge] (s11) -- (s22); - \draw[activeedge] (s22) -- (s31); - \draw[activeedge] (s11) -- (s23); - \draw[activeedge] (s23) -- (s32); - \draw[activeedge] (s23) -- (s33); + \draw[activeedge] (s00) -- (s11); + \draw[activeedge] (s11) -- (s22); + \draw[activeedge] (s22) -- (s31); + \draw[activeedge] (s11) -- (s23); + \draw[activeedge] (s23) -- (s32); + \draw[activeedge] (s23) -- (s33); - \draw[activeedge] (s31) -- (s43); - \draw[activeedge] (s32) -- (s41); - \draw[activeedge] (s33) -- (s42); + \draw[activeedge] (s31) -- (s43); + \draw[activeedge] (s32) -- (s41); + \draw[activeedge] (s33) -- (s42); - \draw[activeedge] (s41) -- (s52); - \draw[activeedge] (s42) -- (s51); - \draw[activeedge] (s43) -- (s53); + \draw[activeedge] (s41) -- (s52); + \draw[activeedge] (s42) -- (s51); + \draw[activeedge] (s43) -- (s53); - \draw[activeedge] (s51) -- (s62); - \draw[activeedge] (s52) -- (s61); - \draw[activeedge] (s52) -- (s60); - \draw[activeedge] (s53) -- (s63); + \draw[activeedge] (s51) -- (s62); + \draw[activeedge] (s52) -- (s61); + \draw[activeedge] (s52) -- (s60); + \draw[activeedge] (s53) -- (s63); - \node at (0,0) [highlight] {}; - \node at (1,0) [highlight,label=left:{$2$}] {}; - \node at (1,1) [highlight,label=left:{$0$}] {}; + \node at (0,0) [highlight] {}; + \node at (1,0) [highlight,label=left:{$2$}] {}; + \node at (1,1) [highlight,label=left:{$0$}] {}; - \node at (2,0) [highlight,label=left:{$0$}] {}; - \node at (2,1) [highlight,label=left:{$2$}] {}; - \node at (2,2) [highlight,label=left:{$1$}] {}; - \node at (2,3) [highlight,label=left:{$1$}] {}; + \node at (2,0) [highlight,label=left:{$0$}] {}; + \node at (2,1) [highlight,label=left:{$2$}] {}; + \node at (2,2) [highlight,label=left:{$1$}] {}; + \node at (2,3) [highlight,label=left:{$1$}] {}; - \node at (3,0) [highlight,label=left:{$\frac{0}{2}$}] {}; - \node at (3,1) [highlight,label=left:{$\frac{2}{0}$}] {}; - \node at (3,2) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (3,3) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (3,0) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (3,1) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (3,2) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (3,3) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (2.5,1) [text=red] {$\times$}; - \node at (2.5,0.5) [text=red] {$\times$}; - \node at (2.5,1.5) [text=red] {$\times$}; - \node at (2.5,2) [text=red] {$\times$}; - \node at (1.5,0.5) [text=red] {$\times$}; - \node at (1.5,0) [text=red] {$\times$}; - \node at (0.5,0) [text=red] {$\times$}; + \node at (2.5,1) [text=red] {$\times$}; + \node at (2.5,0.5) [text=red] {$\times$}; + \node at (2.5,1.5) [text=red] {$\times$}; + \node at (2.5,2) [text=red] {$\times$}; + \node at (1.5,0.5) [text=red] {$\times$}; + \node at (1.5,0) [text=red] {$\times$}; + \node at (0.5,0) [text=red] {$\times$}; - \node at (4,0) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (4,1) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (4,2) [highlight,label=left:{$\frac{2}{0}$}] {}; - \node at (4,3) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (4,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (4,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (4,2) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (4,3) [highlight,label=left:{$\frac{0}{2}$}] {}; - \node at (3.5,0) [text=red] {$\times$}; - \node at (3.5,0.5) [text=red] {$\times$}; - \node at (3.5,1.5) [text=red] {$\times$}; - \node at (3.5,3) [text=red] {$\times$}; - \node at (2.5,0) [text=red] {$\times$}; + \node at (3.5,0) [text=red] {$\times$}; + \node at (3.5,0.5) [text=red] {$\times$}; + \node at (3.5,1.5) [text=red] {$\times$}; + \node at (3.5,3) [text=red] {$\times$}; + \node at (2.5,0) [text=red] {$\times$}; - \node at (5,0) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (5,1) [highlight,label=left:{$\frac{1}{1}$}] {}; - \node at (5,2) [highlight,label=left:{$\frac{0}{2}$}] {}; - \node at (5,3) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (5,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (5,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (5,2) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (5,3) [highlight,label=left:{$\frac{2}{0}$}] {}; - \node at (4.5,0) [text=red] {$\times$}; - \node at (4.5,0.5) [text=red] {$\times$}; - \node at (4.5,2.5) [text=red] {$\times$}; - \node at (4.5,2) [text=red] {$\times$}; - \node at (3.5,1) [text=red] {$\times$}; + \node at (4.5,0) [text=red] {$\times$}; + \node at (4.5,0.5) [text=red] {$\times$}; + \node at (4.5,2.5) [text=red] {$\times$}; + \node at (4.5,2) [text=red] {$\times$}; + \node at (3.5,1) [text=red] {$\times$}; - \node at (6,0) [highlight,label=left:{$\frac{1}{1}$}] {$\frac44$}; - \node at (6,1) [highlight,label=left:{$\frac{1}{1}$}] {$\frac44$}; - \node at (6,2) [highlight,label=left:{$\frac{0}{2}$}] {$\frac33$}; - \node at (6,3) [highlight,label=left:{$\frac{2}{0}$}] {$\frac51$}; + \node at (6,0) [highlight,label=left:{$\frac{1}{1}$}] {$\frac44$}; + \node at (6,1) [highlight,label=left:{$\frac{1}{1}$}] {$\frac44$}; + \node at (6,2) [highlight,label=left:{$\frac{0}{2}$}] {$\frac33$}; + \node at (6,3) [highlight,label=left:{$\frac{2}{0}$}] {$\frac51$}; - \node at (5.5,0) [text=red] {$\times$}; - \node at (5.5,0.5) [text=red] {$\times$}; - \node at (5.5,2.5) [text=red] {$\times$}; - \node at (5.5,2) [text=red] {$\times$}; - \node at (4.5,1) [text=red] {$\times$}; + \node at (5.5,0) [text=red] {$\times$}; + \node at (5.5,0.5) [text=red] {$\times$}; + \node at (5.5,2.5) [text=red] {$\times$}; + \node at (5.5,2) [text=red] {$\times$}; + \node at (4.5,1) [text=red] {$\times$}; - % Inputs and Outputs - \node at (-0.5,4) [left, align=right] {Входная\\пара}; + % Inputs and Outputs + \node at (-0.5,4) [left, align=right] {Входная\\пара}; - \trellisIn{0}{11} - \trellisIn{1}{00} - \trellisIn{2}{00} - \trellisIn{3}{01} - \trellisIn{4}{10} - \trellisIn{5}{10} -\end{tikzpicture} + \trellisIn{0}{11} + \trellisIn{1}{00} + \trellisIn{2}{00} + \trellisIn{3}{01} + \trellisIn{4}{10} + \trellisIn{5}{10} + \end{tikzpicture} + + \caption{Сегмент решетки декодера от $t=0$, до $t=6$.} +\end{figure} + +\begin{figure} + \begin{tikzpicture}[x=1.58cm, y=-1cm] + + \node at (-0.5,0) [left] {$s_1=00$}; + \node at (-0.5,1) [left] {$s_2=10$}; + \node at (-0.5,2) [left] {$s_3=01$}; + \node at (-0.5,3) [left] {$s_4=11$}; + + % Nodes + \foreach \x in {0,...,7} { + \node at (\x,-.7) {$\x$}; + \foreach \y in {0,...,3} { + \node (s\x\y) at (\x,\y) [circle,fill=black,scale=0.7] {}; + } + } + + % Edges + \trellisEdges{0}{0} + \trellisEdges{1}{0} + \trellisEdges{1}{1} + \foreach \x in {2,...,6} { + \foreach \y in {0,...,3} { + \trellisEdges{\x}{\y} + } + } + + + \draw[activeedge] (s00) -- (s11); + \draw[activeedge] (s11) -- (s22); + \draw[activeedge] (s22) -- (s31); + \draw[activeedge] (s11) -- (s23); + \draw[activeedge] (s23) -- (s33); + + \draw[activeedge] (s31) -- (s43); + \draw[activeedge] (s33) -- (s42); + + \draw[activeedge] (s42) -- (s51); + \draw[activeedge] (s43) -- (s53); + + \draw[activeedge] (s51) -- (s62); + \draw[activeedge] (s53) -- (s63); + + \draw[activeedge] (s62) -- (s70); + \draw[activeedge] (s62) -- (s71); + \draw[activeedge] (s63) -- (s72); + \draw[activeedge] (s63) -- (s73); + + \node at (0,0) [highlight] {}; + \node at (1,0) [highlight,label=left:{$2$}] {}; + \node at (1,1) [highlight,label=left:{$0$}] {}; + + \node at (2,0) [highlight,label=left:{$0$}] {}; + \node at (2,1) [highlight,label=left:{$2$}] {}; + \node at (2,2) [highlight,label=left:{$1$}] {}; + \node at (2,3) [highlight,label=left:{$1$}] {}; + + \node at (3,0) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (3,1) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (3,2) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (3,3) [highlight,label=left:{$\frac{1}{1}$}] {}; + + \node at (2.5,1) [text=red] {$\times$}; + \node at (2.5,0.5) [text=red] {$\times$}; + \node at (2.5,1.5) [text=red] {$\times$}; + \node at (2.5,2) [text=red] {$\times$}; + \node at (1.5,0.5) [text=red] {$\times$}; + \node at (1.5,0) [text=red] {$\times$}; + \node at (0.5,0) [text=red] {$\times$}; + + \node at (4,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (4,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (4,2) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (4,3) [highlight,label=left:{$\frac{0}{2}$}] {}; + + \node at (3.5,0) [text=red] {$\times$}; + \node at (3.5,0.5) [text=red] {$\times$}; + \node at (3.5,1.5) [text=red] {$\times$}; + \node at (3.5,3) [text=red] {$\times$}; + \node at (2.5,0) [text=red] {$\times$}; + + \node at (5,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (5,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (5,2) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (5,3) [highlight,label=left:{$\frac{2}{0}$}] {}; + + \node at (4.5,0) [text=red] {$\times$}; + \node at (4.5,0.5) [text=red] {$\times$}; + \node at (4.5,2.5) [text=red] {$\times$}; + \node at (4.5,2) [text=red] {$\times$}; + \node at (3.5,1) [text=red] {$\times$}; + + \node at (6,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (6,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (6,2) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (6,3) [highlight,label=left:{$\frac{2}{0}$}] {}; + + \node at (5.5,0) [text=red] {$\times$}; + \node at (5.5,0.5) [text=red] {$\times$}; + \node at (5.5,2.5) [text=red] {$\times$}; + \node at (5.5,2) [text=red] {$\times$}; + \node at (4.5,1) [text=red] {$\times$}; + + \node at (7,0) [highlight,label=left:{$\frac{1}{1}$}] {$\frac54$}; + \node at (7,1) [highlight,label=left:{$\frac{1}{1}$}] {$\frac54$}; + \node at (7,2) [highlight,label=left:{$\frac{2}{0}$}] {$\frac61$}; + \node at (7,3) [highlight,label=left:{$\frac{0}{2}$}] {$\frac43$}; + + \node at (6.5,0) [text=red] {$\times$}; + \node at (6.5,0.5) [text=red] {$\times$}; + \node at (6.5,1.5) [text=red] {$\times$}; + \node at (6.5,2) [text=red] {$\times$}; + \node at (5.5,1) [text=red] {$\times$}; + \node at (5.5,1.5) [text=red] {$\times$}; + \node at (4.5,1.5) [text=red] {$\times$}; + \node at (2.5,2.5) [text=red] {$\times$}; + + % Inputs and Outputs + \node at (-0.5,4) [left, align=right] {Входная\\пара}; + + \trellisIn{0}{11} + \trellisIn{1}{00} + \trellisIn{2}{00} + \trellisIn{3}{01} + \trellisIn{4}{10} + \trellisIn{5}{10} + \trellisIn{6}{01} + \end{tikzpicture} + + \caption{Сегмент решетки декодера от $t=0$, до $t=7$.} +\end{figure} + +\begin{figure} + \begin{tikzpicture}[x=1.36cm, y=-1cm] + + \node at (-0.5,0) [left] {$s_1=00$}; + \node at (-0.5,1) [left] {$s_2=10$}; + \node at (-0.5,2) [left] {$s_3=01$}; + \node at (-0.5,3) [left] {$s_4=11$}; + + % Nodes + \foreach \x in {0,...,8} { + \node at (\x,-.7) {$\x$}; + \foreach \y in {0,...,3} { + \node (s\x\y) at (\x,\y) [circle,fill=black,scale=0.7] {}; + } + } + + % Edges + \trellisEdges{0}{0} + \trellisEdges{1}{0} + \trellisEdges{1}{1} + \foreach \x in {2,...,7} { + \foreach \y in {0,...,3} { + \trellisEdges{\x}{\y} + } + } + + + \draw[activeedge] (s00) -- (s11); + \draw[activeedge] (s11) -- (s22); + \draw[activeedge] (s22) -- (s31); + + \draw[activeedge] (s31) -- (s43); + + \draw[activeedge] (s43) -- (s53); + + \draw[activeedge] (s53) -- (s63); + + \draw[activeedge] (s63) -- (s72); + \draw[activeedge] (s63) -- (s73); + + \draw[activeedge] (s72) -- (s80); + \draw[activeedge] (s72) -- (s81); + \draw[activeedge] (s73) -- (s82); + \draw[activeedge] (s73) -- (s83); + + \node at (0,0) [highlight] {}; + \node at (1,0) [highlight,label=left:{$2$}] {}; + \node at (1,1) [highlight,label=left:{$0$}] {}; + + \node at (2,0) [highlight,label=left:{$0$}] {}; + \node at (2,1) [highlight,label=left:{$2$}] {}; + \node at (2,2) [highlight,label=left:{$1$}] {}; + \node at (2,3) [highlight,label=left:{$1$}] {}; + + \node at (3,0) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (3,1) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (3,2) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (3,3) [highlight,label=left:{$\frac{1}{1}$}] {}; + + \node at (2.5,1) [text=red] {$\times$}; + \node at (2.5,0.5) [text=red] {$\times$}; + \node at (2.5,1.5) [text=red] {$\times$}; + \node at (2.5,2) [text=red] {$\times$}; + \node at (1.5,0.5) [text=red] {$\times$}; + \node at (1.5,0) [text=red] {$\times$}; + \node at (0.5,0) [text=red] {$\times$}; + + \node at (4,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (4,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (4,2) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (4,3) [highlight,label=left:{$\frac{0}{2}$}] {}; + + \node at (3.5,0) [text=red] {$\times$}; + \node at (3.5,0.5) [text=red] {$\times$}; + \node at (3.5,1.5) [text=red] {$\times$}; + \node at (3.5,3) [text=red] {$\times$}; + \node at (2.5,0) [text=red] {$\times$}; + + \node at (5,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (5,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (5,2) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (5,3) [highlight,label=left:{$\frac{2}{0}$}] {}; + + \node at (4.5,0) [text=red] {$\times$}; + \node at (4.5,0.5) [text=red] {$\times$}; + \node at (4.5,2.5) [text=red] {$\times$}; + \node at (4.5,2) [text=red] {$\times$}; + \node at (3.5,1) [text=red] {$\times$}; + + \node at (6,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (6,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (6,2) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (6,3) [highlight,label=left:{$\frac{2}{0}$}] {}; + + \node at (5.5,0) [text=red] {$\times$}; + \node at (5.5,0.5) [text=red] {$\times$}; + \node at (5.5,2.5) [text=red] {$\times$}; + \node at (5.5,2) [text=red] {$\times$}; + \node at (4.5,1) [text=red] {$\times$}; + + \node at (7,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (7,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (7,2) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (7,3) [highlight,label=left:{$\frac{0}{2}$}] {}; + + \node at (6.5,0) [text=red] {$\times$}; + \node at (6.5,0.5) [text=red] {$\times$}; + \node at (6.5,1.5) [text=red] {$\times$}; + \node at (6.5,2) [text=red] {$\times$}; + \node at (5.5,1) [text=red] {$\times$}; + \node at (5.5,1.5) [text=red] {$\times$}; + \node at (4.5,1.5) [text=red] {$\times$}; + \node at (2.5,2.5) [text=red] {$\times$}; + + \node at (8,0) [highlight,label=left:{$\frac{2}{0}$}] {$\frac61$}; + \node at (8,1) [highlight,label=left:{$\frac{0}{2}$}] {$\frac43$}; + \node at (8,2) [highlight,label=left:{$\frac{1}{1}$}] {$\frac54$}; + \node at (8,3) [highlight,label=left:{$\frac{1}{1}$}] {$\frac54$}; + + \node at (7.5,0) [text=red] {$\times$}; + \node at (7.5,0.5) [text=red] {$\times$}; + \node at (7.5,1.5) [text=red] {$\times$}; + \node at (7.5,2) [text=red] {$\times$}; + \node at (6.5,1) [text=red] {$\times$}; + \node at (3.5,2.5) [text=red] {$\times$}; + \node at (1.5,2) [text=red] {$\times$}; + + % Inputs and Outputs + \node at (-0.5,4) [left, align=right] {Входная\\пара}; + + \trellisIn{0}{11} + \trellisIn{1}{00} + \trellisIn{2}{00} + \trellisIn{3}{01} + \trellisIn{4}{10} + \trellisIn{5}{10} + \trellisIn{6}{01} + \trellisIn{7}{11} + \end{tikzpicture} + + \caption{Сегмент решетки декодера от $t=0$, до $t=8$.} +\end{figure} + + +\begin{figure} + \begin{tikzpicture}[x=1.2cm, y=-1cm] + + \node at (-0.5,0) [left] {$s_1=00$}; + \node at (-0.5,1) [left] {$s_2=10$}; + \node at (-0.5,2) [left] {$s_3=01$}; + \node at (-0.5,3) [left] {$s_4=11$}; + + % Nodes + \foreach \x in {0,...,9} { + \node at (\x,-.7) {$\x$}; + \foreach \y in {0,...,3} { + \node (s\x\y) at (\x,\y) [circle,fill=black,scale=0.7] {}; + } + } + + % Edges + \trellisEdges{0}{0} + \trellisEdges{1}{0} + \trellisEdges{1}{1} + \foreach \x in {2,...,8} { + \foreach \y in {0,...,3} { + \trellisEdges{\x}{\y} + } + } + + + \draw[activeedge] (s00) -- (s11); + \draw[activeedge] (s11) -- (s22); + \draw[activeedge] (s22) -- (s31); + + \draw[activeedge] (s31) -- (s43); + + \draw[activeedge] (s43) -- (s53); + + \draw[activeedge] (s53) -- (s63); + + \draw[activeedge] (s63) -- (s72); + + \draw[activeedge] (s72) -- (s80); + \draw[activeedge] (s72) -- (s81); + + \draw[activeedge] (s80) -- (s90); + \draw[activeedge] (s80) -- (s91); + \draw[activeedge] (s81) -- (s93); + \draw[activeedge] (s81) -- (s92); + + \node at (0,0) [highlight] {}; + \node at (1,0) [highlight,label=left:{$2$}] {}; + \node at (1,1) [highlight,label=left:{$0$}] {}; + + \node at (2,0) [highlight,label=left:{$0$}] {}; + \node at (2,1) [highlight,label=left:{$2$}] {}; + \node at (2,2) [highlight,label=left:{$1$}] {}; + \node at (2,3) [highlight,label=left:{$1$}] {}; + + \node at (3,0) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (3,1) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (3,2) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (3,3) [highlight,label=left:{$\frac{1}{1}$}] {}; + + \node at (2.5,1) [text=red] {$\times$}; + \node at (2.5,0.5) [text=red] {$\times$}; + \node at (2.5,1.5) [text=red] {$\times$}; + \node at (2.5,2) [text=red] {$\times$}; + \node at (1.5,0.5) [text=red] {$\times$}; + \node at (1.5,0) [text=red] {$\times$}; + \node at (0.5,0) [text=red] {$\times$}; + + \node at (4,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (4,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (4,2) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (4,3) [highlight,label=left:{$\frac{0}{2}$}] {}; + + \node at (3.5,0) [text=red] {$\times$}; + \node at (3.5,0.5) [text=red] {$\times$}; + \node at (3.5,1.5) [text=red] {$\times$}; + \node at (3.5,3) [text=red] {$\times$}; + \node at (2.5,0) [text=red] {$\times$}; + + \node at (5,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (5,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (5,2) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (5,3) [highlight,label=left:{$\frac{2}{0}$}] {}; + + \node at (4.5,0) [text=red] {$\times$}; + \node at (4.5,0.5) [text=red] {$\times$}; + \node at (4.5,2.5) [text=red] {$\times$}; + \node at (4.5,2) [text=red] {$\times$}; + \node at (3.5,1) [text=red] {$\times$}; + + \node at (6,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (6,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (6,2) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (6,3) [highlight,label=left:{$\frac{2}{0}$}] {}; + + \node at (5.5,0) [text=red] {$\times$}; + \node at (5.5,0.5) [text=red] {$\times$}; + \node at (5.5,2.5) [text=red] {$\times$}; + \node at (5.5,2) [text=red] {$\times$}; + \node at (4.5,1) [text=red] {$\times$}; + + \node at (7,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (7,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (7,2) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (7,3) [highlight,label=left:{$\frac{0}{2}$}] {}; + + \node at (6.5,0) [text=red] {$\times$}; + \node at (6.5,0.5) [text=red] {$\times$}; + \node at (6.5,1.5) [text=red] {$\times$}; + \node at (6.5,2) [text=red] {$\times$}; + \node at (5.5,1) [text=red] {$\times$}; + \node at (5.5,1.5) [text=red] {$\times$}; + \node at (4.5,1.5) [text=red] {$\times$}; + \node at (2.5,2.5) [text=red] {$\times$}; + + \node at (8,0) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (8,1) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (8,2) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (8,3) [highlight,label=left:{$\frac{1}{1}$}] {}; + + \node at (7.5,0) [text=red] {$\times$}; + \node at (7.5,0.5) [text=red] {$\times$}; + \node at (7.5,1.5) [text=red] {$\times$}; + \node at (7.5,2) [text=red] {$\times$}; + \node at (6.5,1) [text=red] {$\times$}; + \node at (3.5,2.5) [text=red] {$\times$}; + \node at (1.5,2) [text=red] {$\times$}; + + \node at (9,0) [highlight,label=left:{$\frac{2}{0}$}] {$\frac34$}; + \node at (9,1) [highlight,label=left:{$\frac{0}{2}$}] {$\frac16$}; + \node at (9,2) [highlight,label=left:{$\frac{1}{1}$}] {$\frac45$}; + \node at (9,3) [highlight,label=left:{$\frac{1}{1}$}] {$\frac45$}; + + \node at (8.5,1) [text=red] {$\times$}; + \node at (8.5,1.5) [text=red] {$\times$}; + \node at (8.5,2.5) [text=red] {$\times$}; + \node at (8.5,3) [text=red] {$\times$}; + \node at (7.5,2.5) [text=red] {$\times$}; + \node at (7.5,3) [text=red] {$\times$}; + \node at (6.5,3) [text=red] {$\times$}; + + % Inputs and Outputs + \node at (-0.5,4) [left, align=right] {Входная\\пара}; + + \trellisIn{0}{11} + \trellisIn{1}{00} + \trellisIn{2}{00} + \trellisIn{3}{01} + \trellisIn{4}{10} + \trellisIn{5}{10} + \trellisIn{6}{01} + \trellisIn{7}{11} + \trellisIn{8}{11} + \end{tikzpicture} + + \caption{Сегмент решетки декодера от $t=0$, до $t=9$.} +\end{figure} + +\begin{landscape} + \begin{figure} + \begin{tikzpicture}[x=1.4cm, y=-1cm] + + \node at (-0.5,0) [left] {$s_1=00$}; + \node at (-0.5,1) [left] {$s_2=10$}; + \node at (-0.5,2) [left] {$s_3=01$}; + \node at (-0.5,3) [left] {$s_4=11$}; + + % Nodes + \foreach \x in {0,...,12} { + \node at (\x,-.7) {$\x$}; + \foreach \y in {0,...,3} { + \node (s\x\y) at (\x,\y) [circle,fill=black,scale=0.7] {}; + } + } + + % Edges + \trellisEdges{0}{0} + \trellisEdges{1}{0} + \trellisEdges{1}{1} + \foreach \x in {2,...,11} { + \foreach \y in {0,...,3} { + \trellisEdges{\x}{\y} + } + } + + + \draw[activeedge] (s00) -- (s11); + \draw[activeedge] (s11) -- (s22); + \draw[activeedge] (s22) -- (s31); + + \draw[activeedge] (s31) -- (s43); + + \draw[activeedge] (s43) -- (s53); + + \draw[activeedge] (s53) -- (s63); + + \draw[activeedge] (s63) -- (s72); + + \draw[activeedge] (s72) -- (s80); + + \draw[activeedge] (s80) -- (s91); + + \draw[activeedge] (s91) -- (10,2); + \draw[activeedge] (s91) -- (10,3); + + \draw[activeedge] (10,2) -- (11,0); + \draw[activeedge] (10,3) -- (11,2); + \draw[activeedge] (10,3) -- (11,3); + + \draw[activeedge] (11,0) -- (12,0); + \draw[activeedge] (11,2) -- (12,1); + \draw[activeedge] (11,3) -- (12,2); + \draw[activeedge] (11,3) -- (12,3); + + \node at (0,0) [highlight] {}; + \node at (1,0) [highlight,label=left:{$2$}] {}; + \node at (1,1) [highlight,label=left:{$0$}] {}; + + \node at (2,0) [highlight,label=left:{$0$}] {}; + \node at (2,1) [highlight,label=left:{$2$}] {}; + \node at (2,2) [highlight,label=left:{$1$}] {}; + \node at (2,3) [highlight,label=left:{$1$}] {}; + + \node at (3,0) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (3,1) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (3,2) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (3,3) [highlight,label=left:{$\frac{1}{1}$}] {}; + + \node at (2.5,1) [text=red] {$\times$}; + \node at (2.5,0.5) [text=red] {$\times$}; + \node at (2.5,1.5) [text=red] {$\times$}; + \node at (2.5,2) [text=red] {$\times$}; + \node at (1.5,0.5) [text=red] {$\times$}; + \node at (1.5,0) [text=red] {$\times$}; + \node at (0.5,0) [text=red] {$\times$}; + + \node at (4,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (4,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (4,2) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (4,3) [highlight,label=left:{$\frac{0}{2}$}] {}; + + \node at (3.5,0) [text=red] {$\times$}; + \node at (3.5,0.5) [text=red] {$\times$}; + \node at (3.5,1.5) [text=red] {$\times$}; + \node at (3.5,3) [text=red] {$\times$}; + \node at (2.5,0) [text=red] {$\times$}; + + \node at (5,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (5,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (5,2) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (5,3) [highlight,label=left:{$\frac{2}{0}$}] {}; + + \node at (4.5,0) [text=red] {$\times$}; + \node at (4.5,0.5) [text=red] {$\times$}; + \node at (4.5,2.5) [text=red] {$\times$}; + \node at (4.5,2) [text=red] {$\times$}; + \node at (3.5,1) [text=red] {$\times$}; + + \node at (6,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (6,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (6,2) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (6,3) [highlight,label=left:{$\frac{2}{0}$}] {}; + + \node at (5.5,0) [text=red] {$\times$}; + \node at (5.5,0.5) [text=red] {$\times$}; + \node at (5.5,2.5) [text=red] {$\times$}; + \node at (5.5,2) [text=red] {$\times$}; + \node at (4.5,1) [text=red] {$\times$}; + + \node at (7,0) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (7,1) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (7,2) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (7,3) [highlight,label=left:{$\frac{0}{2}$}] {}; + + \node at (6.5,0) [text=red] {$\times$}; + \node at (6.5,0.5) [text=red] {$\times$}; + \node at (6.5,1.5) [text=red] {$\times$}; + \node at (6.5,2) [text=red] {$\times$}; + \node at (5.5,1) [text=red] {$\times$}; + \node at (5.5,1.5) [text=red] {$\times$}; + \node at (4.5,1.5) [text=red] {$\times$}; + \node at (2.5,2.5) [text=red] {$\times$}; + + \node at (8,0) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (8,1) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (8,2) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (8,3) [highlight,label=left:{$\frac{1}{1}$}] {}; + + \node at (7.5,0) [text=red] {$\times$}; + \node at (7.5,0.5) [text=red] {$\times$}; + \node at (7.5,1.5) [text=red] {$\times$}; + \node at (7.5,2) [text=red] {$\times$}; + \node at (6.5,1) [text=red] {$\times$}; + \node at (3.5,2.5) [text=red] {$\times$}; + \node at (1.5,2) [text=red] {$\times$}; + + \node at (9,0) [highlight,label=left:{$\frac{2}{0}$}] {}; + \node at (9,1) [highlight,label=left:{$\frac{0}{2}$}] {}; + \node at (9,2) [highlight,label=left:{$\frac{1}{1}$}] {}; + \node at (9,3) [highlight,label=left:{$\frac{1}{1}$}] {}; + + \node at (8.5,1) [text=red] {$\times$}; + \node at (8.5,1.5) [text=red] {$\times$}; + \node at (8.5,2.5) [text=red] {$\times$}; + \node at (8.5,3) [text=red] {$\times$}; + \node at (7.5,2.5) [text=red] {$\times$}; + \node at (7.5,3) [text=red] {$\times$}; + \node at (6.5,3) [text=red] {$\times$}; + + \node at (10, 0) [highlight,label=left:{$\frac{1}{1}$}] {$\frac45$}; + \node at (10, 1) [highlight,label=left:{$\frac{1}{1}$}] {$\frac45$}; + \node at (10, 2) [highlight,label=left:{$\frac{2}{0}$}] {$\frac34$}; + \node at (10, 3) [highlight,label=left:{$\frac{0}{2}$}] {$\frac16$}; + + \node at (9.5,1) [text=red] {$\times$}; + \node at (9.5,1.5) [text=red] {$\times$}; + \node at (9.5,2.5) [text=red] {$\times$}; + \node at (9.5,3) [text=red] {$\times$}; + + \node at (11, 0) [highlight,label=left:{$\frac{2}{0}$}] {$\frac63$}; + \node at (11, 1) [highlight,label=left:{$\frac{0}{2}$}] {$\frac45$}; + \node at (11, 2) [highlight,label=left:{$\frac{1}{1}$}] {$\frac52$}; + \node at (11, 3) [highlight,label=left:{$\frac{1}{1}$}] {$\frac52$}; + + \node at (10.5,0) [text=red] {$\times$}; + \node at (10.5,1.5) [text=red] {$\times$}; + \node at (10.5,2) [text=red] {$\times$}; + + \node at (12, 0) [highlight,label=left:{$\frac{0}{2}$}] {$\frac34$}; + \node at (12, 1) [highlight,label=left:{$\frac{2}{0}$}] {$\frac52$}; + \node at (12, 2) [highlight,label=left:{$\frac{1}{1}$}] {$\frac53$}; + \node at (12, 3) [highlight,label=left:{$\frac{1}{1}$}] {$\frac53$}; + + \node at (11.5,1) [text=red] {$\times$}; + \node at (11.5,0.5) [text=red] {$\times$}; + \node at (11.5,1.5) [text=red] {$\times$}; + \node at (11.5,2) [text=red] {$\times$}; + \node at (10.5,0.5) [text=red] {$\times$}; + \node at (9.5,0) [text=red] {$\times$}; + \node at (9.5,0.5) [text=red] {$\times$}; + \node at (8.5,0) [text=red] {$\times$}; + \node at (8.5,2) [text=red] {$\times$}; + \node at (2.5,3) [text=red] {$\times$}; + + % Inputs and Outputs + \node at (-0.5,4) [left, align=right] {Входная\\пара}; + + \trellisIn{0}{11} + \trellisIn{1}{00} + \trellisIn{2}{00} + \trellisIn{3}{01} + \trellisIn{4}{10} + \trellisIn{5}{10} + \trellisIn{6}{01} + \trellisIn{7}{11} + \trellisIn{8}{11} + \trellisIn{9}{10} + \trellisIn{10}{11} + \trellisIn{11}{00} + \end{tikzpicture} + + \caption{Полная решетка декодера.} + \end{figure} +\end{landscape} diff --git a/term_paper.pdf b/term_paper.pdf index af0bc37..a603c9c 100644 Binary files a/term_paper.pdf and b/term_paper.pdf differ diff --git a/term_paper.tex b/term_paper.tex index 4b46396..e5ffc32 100644 --- a/term_paper.tex +++ b/term_paper.tex @@ -13,9 +13,11 @@ \usetikzlibrary{shapes.misc} \usepackage{pdflscape} \usepackage{float} +\usepackage{pgfplots} \DeclareSymbolFont{T2Aletters}{T2A}{cmr}{m}{it} \graphicspath{ {./images/} } +\pgfplotsset{width=10cm,compat=1.9} % Установки для отрисовки решеток кодера \tikzstyle{lightedge}=[dashed] @@ -56,16 +58,115 @@ \author{Анатолий Копыл} -\title{Курсовая работа} +\title{Расчёт основных характеристик цифровой системы связи с использованием квадратурной модуляции} \begin{document} +% НАЧАЛО ТИТУЛЬНОГО ЛИСТА +\makeatletter +\begin{titlepage} + \begin{center} + \hfill \break + \footnotesize{ФЕДЕРАЛЬНОЕ ГОСУДАРСТВЕННОЕ БЮДЖЕТНОЕ ОБРАЗОВАТЕЛЬНОЕ УЧРЕЖДЕНИЕ}\\ + \footnotesize{ВЫСШЕГО ПРОФЕССИОНАЛЬНОГО ОБРАЗОВАНИЯ}\\ + \small{\textbf{«Санкт-Петербургский государственный университет телекоммуникаций им. проф. М. А. Бонч-Бруевича»}}\\ + \hfill \break + \normalsize{Факультет инфокоммуникационных сетей и систем}\\ + \hfill \break + \normalsize{Кафедра теоретических основ связи и радиотехники}\\ + \hfill\break + \hfill \break + \hfill \break + \hfill \break + \large{ \@title }\\ + \hfill \break + \hfill \break + \normalsize{Учебная дисциплина <<Теория электрической связи>>}\\ + \hfill \break + \hfill \break + \hfill \break + \normalsize{Курсовая работа}\\ + \hfill \break + \hfill \break + \end{center} + + \hfill \break + \hfill \break + + \normalsize{ + \hfill\begin{minipage}{\dimexpr\textwidth-6cm} + Студент группы ИКТО-91 Копыл А. В.\\ + зачетная книжка № 1905141\\\\ + Руководитель \underline{\hspace{4cm}} + \end{minipage} + }\\ + \vfill + \begin{center} Санкт-Петербург 2021 \end{center} + \thispagestyle{empty} % выключаем отображение номера для этой страницы +\end{titlepage} +\makeatother +% КОНЕЦ ТИТУЛЬНОГО ЛИСТА + +\newpage + +Цель курсовой работы -- изучить и разработать систему цифровой связи, +оптимальную в отношении флуктуационной помехи и исключающую появления +межсимвольной помехи. + +\section{Структурная схема системы\\цифровой связи} + +Система связи предназначена для передачи аналоговых сообщений +по цифровому каналу связи. +\begin{figure}[H] + \includegraphics[scale=0.5]{struct_scheme} + \caption{Структурная схема цифровой системы связи} + \label{fig:struct_scheme} +\end{figure} + +В систему входят следующие функциональные узлы с последующими назначениями: +\begin{enumerate} + \item Источник сообщений -- создает реализации $a(t)$ случайного + процесса $A(t)$. + \item Аналого-цифровой преобразователь -- преобразует аналоговый + сигнал от источника сообщения в последовательность + двоичных отсчетов $b(t)$. + \item Кодер -- включает в цифровой поток от АЦП дополнительные + символы, предназначенные для повышения помехоустойчивости системы + связи; + \item Формирователь модулирующих символов -- служит для получения + модулирующих сигналов $I(t)$ и $Q(t)$, соответствующих заданному + виду модуляции; + \item Сглаживающие формирующие фильтры (СФФ1, СФФ2); + \item Перемножители -- для получения БМ сигналов: синфазного + $I(t)\cos{\omega_Ct}$ и квадратурного $Q(t)\sin{\omega_Ct}$. + \item Фазовращатель -- для получения второго несущего колебания, + ортогонального по отношению к первому; + \item Генератор гармонических колебаний -- для получения несущего + колебания; + \item Инвертор; + \item Сумматор -- для объединения синфазного и квадратурного + сигналов в единый сигнал с квадратурной модуляцией + $S_{КАМ}(t) = I(t)\cos{\omega_Ct} + Q(t)\sin{\omega_Ct}$; + \item Непрерывный канал -- среда распространения сигнала + $S_{КАМ}(t)$; + \item Демодулятор -- для анализа приходящего сигнала, + искаженного помехами, и принятии решения о переданном сообщении; + \item Преобразователь параллельного кода в последовательный код -- + для преобразования сигнала с выхода демодулятора в + последовательный формат кодовых комбинаций; + \item Декодер -- для исправления части ошибок, возникших при приёме + сообщения $\hat{b}(t)$ вследствие влияния помех; + \item Цифро-аналоговый преобразователь -- для восстановления + аналоговой формы сигнала $\hat{a}(t)$ из его цифрового представления; + \item Получатель сообщений. +\end{enumerate} + \section{Исходные данные} -\[ m=41 \] +$m=41$ \begin{center} \begin{tabular}{ | p{5cm} | p{5cm} | p{5cm} | } \hline - Предельные уровни аналогового сигнала \(a_{min}\), \(a_{max}\) (В) & \(a_{max}=25,6\) В;\newline\(a_{min}=-25,6\) В & Внести свои данные \\ + Предельные уровни аналогового сигнала \(a_{мин}\), \(a_{макс}\) (В) & \(a_{макс}=25,6\) В;\newline\(a_{мин}=-25,6\) В & Внести свои данные \\ \hline Верхняя частота спектра аналогового сигнала \(f_В\) & \(f_В =(1+m\cdot 10^{-2})\cdot 10^4\) & \(f_В =14100\) \\ \hline @@ -73,20 +174,207 @@ \hline Спектральная плотность мощности флуктуационной помехи & 41 & \(N_0=2,3\cdot 10^{-7}\, В^2/Гц\)\\ \hline - q - номер тактового интервала ошибки & \(q=m\mod{3}+1\) & \(q=3\)\\ + q -- номер тактового интервала ошибки & \(q=m\mod{3}+1\) & \(q=3\)\\ \hline Вид модуляции & КАМ-16 & \\ \hline \end{tabular} \end{center} -\section{Аналого-цифровой преобразователь} +\section{Расчет составляющих системы цифровой связи} + +\subsection{Источник сообщений} +Источник сообщения (ИС) вырабатывает реализации $a(t)$ стационарного +случайного процесса $A(t)$, типа квазибелого шума с параметрами +$a_{мин}$, $a_{макс}$ и $f_В$. Мгновенные значения сообщения +равновероятны в интервале от значения $a_{мин}$ и до значения +$a_{макс}$. + +Требуется: +\begin{enumerate} + \item Написать аналитические выражения для плотности вероятности + $w(а)$ мгновенных значений сообщения, функции распределения $F(a)$ и + построить их графики (рис. \ref{fig:prob_plots}). + + \[ w(a)=\frac{1}{a_{макс}-a_{мин}}=\frac1\Delta=\frac{1}{25,6+25,6}=0,02 \] + \[ F(a)=\int^a_{-\infty}w(a)da= + \int^a_{a_{мин}}\frac{1}{\Delta}da= + \begin{cases} + 1, & a > a_{макс}\\ + \frac{a-a_{мин}}{\Delta}, & a_{мин} \leq a \leq a_{макс}\\ + 0, & a < a_{мин} + \end{cases}\] + где $\Delta = a_{макс}-a_{мин}=51,2\, В$. + + % Графики + \begin{figure}[H] + \centering + \begin{tikzpicture} + \pgfmathsetmacro{\amin}{-25.6} + \pgfmathsetmacro{\amax}{25.6} + \begin{axis}[ + width=6cm,height=4cm, + axis lines = left, + xlabel = $a$, + ylabel = {$F(a)$}, + xmin=-40, xmax=40, + ymin=0, ymax=1.25, + ] + \addplot [ + domain=-40:\amin, + color=red, + ] + {0}; + \addplot [ + domain=\amin:\amax, + samples=2, + color=red, + ] + {(x-\amin) / 51.2}; + \addplot [ + domain=\amax:40, + color=red, + ] + {1}; + \end{axis} + \end{tikzpicture}% + \begin{tikzpicture} + \pgfmathsetmacro{\amin}{-25.6} + \pgfmathsetmacro{\amax}{25.6} + \begin{axis}[ + width=6cm,height=4cm, + axis lines = left, + xlabel = $a$, + ylabel = {$w(a)$}, + xmin=-40, xmax=40, + ymin=0, ymax=0.03, + ] + \addplot [ + domain=-40:\amin, + color=blue, + ] + {0}; + \addplot [ + domain=\amin:\amax, + samples=2, + color=blue, + ] + {0.02}; + \addplot [ + domain=\amax:40, + color=blue, + ] + {0}; + \draw [dashed] (axis cs:\amin,0) -- (axis cs:\amin,0.02); + \draw [dashed] (axis cs:\amax,0) -- (axis cs:\amax,0.02); + \end{axis} + \end{tikzpicture} + \caption{Графики функции распределения и плотности вероятности} + \label{fig:prob_plots} + \end{figure} + \item Рассчитать математическое ожидание $\overline{A(t)}$ и + дисперсию $D\{A(t)\}$ сообщения $A(t)$. + \[ \overline{A(t)}=\int^\infty_{-\infty}a\cdot w(a)da= + \int^{a_{макс}}_{a_{мин}}a \frac{1}{a_{макс}-a_{мин}} da= + \frac{a^2}{2\Delta} \Biggr|^{a_{макс}}_{a_{мин}}\! = + \frac{a_{макс}^2-a_{мин}^2}{2\Delta}=0 \] + + \begin{align*}\begin{split} + D\{A(t)\}&=\int^\infty_{-\infty}(a-\overline{A(t)})^2 w(a)da= + \int^{a_{макс}}_{a_{мин}}a^2w(a)da\\ + &=\frac{a^3}{3\Delta}\Biggr|^{a_{макс}}_{a_{мин}}\! + =\frac{a_\text{min}^2+a_\text{max}a_\text{min}+a_\text{max}^2}{3} + =218,5 + \end{split}\end{align*} + \item Написать аналитическое выражение для спектральной плотности + мощности $G_A(f)$ сообщения $A(t)$ и построить график + (рис. \ref{fig:spectr_plot}). + \[ G_A(f)=\frac{D\{A(t)\}}{2f_В}=\frac{218,5}{2\cdot1,41\cdot 10^4} + =7,7 \,мВ^2/Гц \] + \[ G_A(f)=\begin{cases} + 7,7 \,мВ^2/Гц, & |f| \leq f_B\\ + 0, & |f| > f_B + \end{cases} \] + \begin{figure}[H] + \centering + \begin{tikzpicture} + \pgfmathsetmacro{\fv}{14100} + \pgfmathsetmacro{\Gaf}{0.0077} + \begin{axis}[ + width=6cm,height=4cm, + axis lines = left, + ylabel = {$G_A(f)$}, + xmin=-\fv*1.5, xmax=\fv*1.5, + ymin=0, ymax=\Gaf*1.5, + ] + \addplot [ + domain=-\fv*1.5:-\fv, + color=blue, + ] + {0}; + \addplot [ + domain=-\fv:\fv, + samples=2, + color=blue, + ] + {\Gaf}; + \addplot [ + domain=\fv:\fv*1.5, + color=blue, + ] + {0}; + \draw [dashed] (axis cs:-\fv,0) -- (axis cs:-\fv,\Gaf); + \draw [dashed] (axis cs:\fv,0) -- (axis cs:\fv,\Gaf); + \end{axis} + \end{tikzpicture} + \caption{График спектральной плотности мощности.} + \label{fig:spectr_plot} + \end{figure} + \item Найти аналитическое выражение для корреляционной функции + $B_A(\tau)$ сообщения $A(t)$ и построить график + (рис. \ref{fig:coorel_plot}). + По форме графика $B_A(\tau)$ определить, + является ли сообщение $A(t)$ эргодическим случайным процессом + или не является таковым. + + \begin{align*}\begin{split} + B_A(\tau)&=\int^\infty_{-\infty}\frac{G_A(f)}{2}e^{j2\pi f\tau}df + =\int^{f_B}_{-f_B}\frac{G_A}{2}\cos{2\pi f\tau}df\\ + &=\frac{G_A}2 \frac{\sin{2\pi f \tau}}{2\pi \tau}\Biggr|^{f_B}_{-f_B} + =G_A\frac{\sin{2\pi f_B \tau}}{2\pi\tau} + \end{split}\end{align*} + \begin{figure}[H] + \centering + \begin{tikzpicture} + \pgfmathsetmacro{\PI}{3.14159} + \pgfmathsetmacro{\fv}{14100} + \pgfmathsetmacro{\Ga}{0.0077} + \begin{axis}[ + width=10cm,height=6cm, + axis lines = left, + ylabel = {$B_A(\tau)$}, + xlabel = {$\tau$}, + ] + \addplot [ + color=blue, + samples=100, + domain=-0.01:0.01, + ] + {\Ga*(sin(2*\PI*\fv*x))/(2*\PI*x)}; + \end{axis} + \end{tikzpicture} + \caption{График корреляционной функции $B_A(\tau)$.} + \label{fig:coorel_plot} + \end{figure} +\end{enumerate} + +\subsection{Аналого-цифровой преобразователь} \[ \Delta t \leq \frac{1}{2f_B}=\frac1 {2\cdot 14100} = 3,546\cdot 10^{-5}\, с \] \[ f_d=\frac{1}{\Delta t}\geq 2f_B=\frac{1}{3,546\cdot 10^{-5}}=28200 \] \[ 377_{10}=101111001_2 \] \[ k=9;\, L=2^9 = 512 \] -\section{Кодер} +\subsection{Кодер} \begin{center} \includegraphics[scale=0.8]{coder} @@ -99,7 +387,7 @@ \end{tabular} \end{center} -\subsection{Решетка кодера} +\subsubsection{Решетка кодера} \input{coder} @@ -107,13 +395,16 @@ \[T_В=\frac{\Delta t}{2k}=\frac{3,546\cdot 10^{-5}}{2\cdot 9}= 1,97\cdot 10^{-6}\,с\] -\section{Декодер} +\subsection{Декодер} По каналу передавался код \(\overline{u}=11 10 00 01 10 10 01 11 11\). Ошибка произошла на тактовом интервале \(q=3\). Таким образом, на вход декодера поступает последовательность -\(\overline{Z}=11 \dot{0}0 00 01 10 10 01 11 11\). Точкой обозначен ошибочно принятый символ. +\(\overline{Z}=11 \overset{\times}{0} 0 00 01 10 10 01 11 11\). Крестиком обозначен ошибочно принятый символ. -\subsection{Диаграмма декодера} +\subsubsection{Диаграмма декодера} \input{decoder} +Наложив полученный путь на решетку кодера, узнаем декодированное слово. +$\overline{m}_{получ}=101111001$ + \end{document}