I am very new at tikz or any type of latex graphics. I need to generate a latex graphics for this diagram. I have tried to modify an example in: http://texample.net/tikz/examples/observer-estimator/ But I can't obtain the diagram that I need. Can anyone help me?
% Observer/Estimator
% Author: Dominik Haumann
\documentclass[landscape,a5paper,11pt]{article}
\usepackage[utf8x]{inputenc} % utf8 encoding
\usepackage[T1]{fontenc} % use T1 fonts
\usepackage{amsmath} % nice math symbols
\usepackage{bm} % bold math
\usepackage{color} % change text color
\usepackage{tikz}
%%%<
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
%%%>
\begin{comment}
:Title: Observer/Estimator
:Slug: observer-estimator
:Author: Dominik Haumann
An example of an observer with a feedback loop. By using the matrix
tikzlibrary it is shown how to easily place and link the nodes appropriately
in order to create very complex block diagrams. Additionally, this example
shows how to use line decorations as well as how to use an offset for arrow
placement.
I have modify the example by Dominik Haumann. Rubert
\end{comment}
\usetikzlibrary{decorations.pathmorphing} % for snake lines
\usetikzlibrary{matrix} % for block alignment
\usetikzlibrary{arrows} % for arrow heads
\usetikzlibrary{calc} % for manimulation of coordinates
\usetikzlibrary{positioning}
% TikZ styles for drawing
\tikzstyle{block} = [draw,rectangle,thick,minimum height=2em,minimum width=2em]
\tikzstyle{sum} = [draw,circle,inner sep=0mm,minimum size=2mm]
\tikzstyle{connector} = [->,thick]
\tikzstyle{line} = [thick]
\tikzstyle{branch} = [circle,inner sep=0pt,minimum size=1mm,fill=black,draw=black]
\tikzstyle{guide} = []
\tikzstyle{snakeline} = [connector, decorate, decoration={pre length=0.2cm,
post length=0.2cm, snake, amplitude=.4mm,
segment length=2mm},thick, magenta, ->]
\renewcommand{\vec}[1]{\ensuremath{\boldsymbol{#1}}} % bold vectors
\def \myneq {\skew{-2}\not =} % \neq alone skews the dash
\begin{document}
\begin{tikzpicture}[scale=1, auto, >=stealth']
\small
% node placement with matrix library: 5x4 array
\matrix[ampersand replacement=\&, row sep=1cm, column sep=0.4cm] {
%
\node[block] (F1) {$\gg d$}; \&
\node[branch] (u1) {}; \&
\&
\node[block] (f1) {$(x_{n-r_1}+x_{n-s_1})\mod m$}; \& \\
\&
\&
\&
\node[block] (L1) {$(y_{n-r_2}+y_{n-s_2})\mod m$};\&
\node [sum] (e1) {}; \\
\&
\&
\node[sum] (v1) {}; \&
\node[block] (o1) {$(z_{n-r_3}+z_{n-s_3})\mod m$};
\&
\\
\node[guide] (i1) {}; \& \& \& \& \\
};
% now link the nodes
\draw [line] (F1) -- (f1);
\draw [connector] (f1) -| node[near end] {$\vec{y}_i$} (e1);
\draw [connector] (e1) -- (L1);
\draw [connector] (L1) -| (v1);
\draw [connector] (v1) -- node {} (o1);
\draw [connector] (u1) |- (v1);
\draw [connector] (o1) -| node[pos=0.96] {$-$} node [near end, swap]
{$\widetilde{\vec{y}}_i$} (e1);
% draw the snake lines with offset (using the calc library)
\end{tikzpicture}
\newpage
%This is what I've tried to do... :-(
\tikzset{packet/.style={rectangle, draw, very thick}}
\tikzset{xor/.style={circle, draw, very thick}}
\tikzset{pto/.style={}}
\begin{tikzpicture}
\node[packet] (p1) at (0,1.5) {$\gg d1$};
\node[xor] (p2) [right=6mm of p1] {};
\node[branch] (s) [below=-.7mm of p2 ] {};
\draw [->] (p1) -- (p2);
\node[branch] (c1) [below left=7.5mm of p1] {};
\node[packet] (p3) [below right=5mm of p2] {$(x_{n-r_1}+x_{n-s_1})\mod m$};
\draw [line] (c1) -- (p3);
\draw [->] (c1) |-(p1);
\node[pto] (co) [right=5mm of p1] {$+$};
\node[packet] (p4) at (0,-1.5) {$\gg d$};
\node[xor] (p5) [right=5mm of p4] {$+$};
\draw [->] (p4) -- (p5);
%\node[packet] (p6) at (5,-1.5) {$(y_{n-r_2}+y_{n-s_2})\mod m$};
\end{tikzpicture}
\end{document}