trying to draw a block schematic for a digital predistortion system in TikZ, but I got some difficulties specifying the end coordinates for a path between two blocks.
The following code is what I got so far
Code: Select all
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,arrows,shapes}
\usepackage{amsmath}
\begin{document}
\tikzstyle{block} = [draw,minimum width=2em,minimum height=2em,line width=0.5pt]
\tikzstyle{LOblock} = [draw,minimum size=1em, line width=0.5pt]
\tikzstyle{LargeBlock} = [draw,minimum size=6em,line width=1pt]
\tikzstyle{SmallBlock} = [draw,minimum size=5em,line width=0.5pt]
\tikzstyle{recBlock} = [draw,minimum height=1em,minimum width=6em,line width=0.5pt,rotate=90]
\tikzstyle{PAblock}=[draw,isosceles triangle,minimum width=3em,minimum height=2em,line width=0.5pt]
\tikzstyle{AttBlock}=[draw,minimum width=4em,minimum height=1em,line width=0.5pt]
% diameter of semicircle used to indicate that two lines are not connected
\def\radius{.7mm}
\tikzstyle{branch}=[fill,shape=circle,minimum size=3pt,inner sep=0pt]
\begin{tikzpicture}[>=latex']
\node at (-0.5,-1) (input1) {$I[n]$};
\node at (-0.5,-2) (input2) {$Q[n]$};
\node at (11.5,-1.5) (output) {$y(t)$};
\node[LargeBlock] at (2,-1.5) (dpdR) {};
\node[SmallBlock] at (2,-1.5) (dpd) {DPD};
\node[block] at (5,-1) (dac1) {DAC};
\node[block] at (5,-2) (dac2) {DAC};
\node[block] at (5,-4) (adc1) {ADC};
\node[block] at (5,-5) (adc2) {ADC};
\node[recBlock] at (7,-1.5) (iqmod) {I-Q mod.};
\node[recBlock] at (7,-4.5) (iqdemod) {I-Q demod.};
\node[LOblock] at (8.5,-3) (lo) {LO at $f_c$};
\node[PAblock] at (9,-1.5) (pa) {};
\node[AttBlock] at (9,-4.5) (att) {Attenuator};
\draw[->] (input1) -- (dpdR.west |- input1);
\draw[->] (input2) -- (dpdR.west |- input2);
\draw[->] (dpdR.25) -- node[above]{$I_\text{PD}[n]$} (dac1);
\draw[->] (dpdR.-25) -- node[above]{$Q_\text{PD}[n]$} (dac2);
\draw[->] (dac1) -- (iqmod.north |- dac1);
\draw[->] (dac2) -- (iqmod.north |- dac2);
\draw[->] (iqmod) -- node[above]{$x(t)$} (pa);
\draw[->] (iqdemod.north |- adc1) -- (adc1);
\draw[->] (iqdemod.north |- adc2) -- (adc2);
\draw[->] (adc1.west) -| node[above]{$I_o[n]$} (dpdR.south east);
\draw[->] (adc2.west) -| node[above]{$Q_o[n]$} (dpdR.south west);
\draw[->] (att) -- (iqdemod.south);
\draw[->] (lo) -| (iqmod.west);
\draw[->] (lo) -| (iqdemod.east);
\draw[->] (pa) -- (output);
\draw[->] (10.5,-1.5) |- (att.east);
\path (pa.north)+(0.1,0.5) node (palabel) {Power Amplifier};
\end{tikzpicture}
\end{document}
Best regards.
drgz