In the following diagram, some distances are set manually testing different values, but they do not have exact dimensions.
\documentclass[12pt]{article}
\usepackage{tikz}
\usepackage[active,tightpage]{preview}
\usetikzlibrary{shapes,arrows.meta,calc,fit,backgrounds,shapes.multipart,positioning,decorations.pathreplacing}
\tikzset{box/.style={draw, rectangle, rounded corners, thick, node
distance=7em,
text width=6em, text centered, minimum height=3.5em}}
%\tikzset{line/.style={draw, thick, -{Latex[length=2mm,width=1mm]}}}
\tikzset{every node/.style={font=\footnotesize}}
\PreviewEnvironment{tikzpicture}
%=======================================
% Adjust the boarder of the flowchart
%=======================================
\setlength\PreviewBorder{4pt}%
\begin{document}
%************************************************************
%************************************************************
% Define block styles
%************************************************************
%************************************************************
\tikzset{
block/.style={rectangle split, draw, rectangle split parts=2,text width=14em, text centered, rounded corners, minimum height=4em},
brwblock/.style={rectangle, draw, fill=brown!20, text width=13em, text centered, rounded corners, minimum height=3em, minimum width=30em},
whtblock/.style={rectangle, draw, fill=white!20, text width=14em, text centered, minimum height=4em},
vertblock/.style={rectangle, draw, fill=cyan!20, text width=17em, text centered, minimum width=2em, minimum height=2em},
line/.style={draw, {latex[length=5mm,width=5mm]}-{latex[length=5mm,width=5mm]}},
cloud/.style={draw, ellipse,fill=white!20, node distance=3cm, minimum height=4em},
container1/.style={draw, rectangle,inner sep=0.4cm,fill=blue!8,minimum height=4cm,rounded corners},
container2/.style={draw, rectangle,inner sep=0.28cm,fill=green!10,minimum height=4em,rounded corners}}
%************************************************************
%************************************************************
\begin{tikzpicture}[node distance = 1.25cm, auto,every text node part/.style={align=center}]
%
%===============================================
% Reader
%===============================================
\node [whtblock,font=\fontsize{12}{0}\selectfont,fill=magenta!15] (LBT) {LBT \\[0.5em]Reader Anti-Collision Protocol};
\node [whtblock, below=of LBT, node distance=2.5cm,font=\fontsize{12}{0}\selectfont,fill=green!15] (FSA) {FSA \\[0.5em]Anti-Collision Protocol};
\node [whtblock, below=of FSA, node distance=2.5cm,font=\fontsize{12}{0}\selectfont,fill=yellow!20] (PHY) {PHY Layer};
\node [whtblock, below=of PHY, node distance=2.5cm,font=\fontsize{12}{0}\selectfont] (AT) {Active Transceiver};
%*****************
% TAG
%***************
\node [whtblock, right=of AT, node distance=13cm,font=\fontsize{12}{0}\selectfont,shift={(2.8cm,0)}] (PTtag) {Passive Transceiver};
\node [whtblock, above=of PTtag, node distance=13cm,font=\fontsize{12}{0}\selectfont,fill=yellow!20] (PHYtag) {PHY Layer};
\node [whtblock, above=of PHYtag, node distance=13cm,font=\fontsize{12}{0}\selectfont,fill=green!15] (FSAtag) {FSA \\[0.5em]Anti-Collision Protocol};
\node [vertblock, right=of PHYtag, node distance=13cm,font=\fontsize{12}{0}\selectfont,shift={(0cm,3.7cm)},fill=pink!30,rotate=-90] (EHtag) {Energy Harvester};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CONTAINERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{scope}[on background layer]
\coordinate (aux1) at ([yshift=3mm]LBT.north);
\node [container1,fit=(aux1) (FSA)(PHY)(AT)] (Reader) {};
\node at (Reader.north) [fill=white,draw,font=\fontsize{12}{0}\selectfont] {\textbf{Reader}};
%-----------------------------------------------------------
\coordinate (aux2) at ([yshift=3mm]FSAtag.north);
\node [container1,fit=(aux2) (PHYtag)(FSAtag)(PTtag)(EHtag)] (TAG) {};
\node at (TAG.north) [fill=white,draw,font=\fontsize{12}{0}\selectfont] {\textbf{Tag}};
\end{scope}
\node[brwblock,shift={(0,8.0cm)},minimum width=18.75cm,font=\fontsize{12}{0}\selectfont] at ($(Reader.west)!.5!(TAG.east)$) {\textbf{Scenario Setup}};
%************************************************************
%************************************************************
% Draw edges
%************************************************************
%************************************************************
\draw [Latex-Latex,darkgray, thick] (LBT.south) -- (FSA.north);
\draw [Latex-Latex,darkgray, thick] (FSA.south) -- (PHY.north);
\draw [Latex-Latex,darkgray, thick] (PHY.south) -- (AT.north);
\draw [Latex-Latex,darkgray, thick] (FSAtag.south) -- (PHYtag.north);
\draw [Latex-Latex,darkgray, thick] (PTtag.north) -- (PHYtag.south);
\draw [-Latex,darkgray,very thin, opacity=0] ([yshift=11pt]AT.east) -- node [above,font=\fontsize{12}{0}\selectfont,yshift=10pt, black,opacity=1] {Power-Up \\[0.3em] Link} ([yshift=11pt]PTtag.west);
\draw [-Latex,darkgray,very thin, opacity=0] ([yshift=-11pt]PTtag.west) -- node [below,font=\fontsize{12}{0}\selectfont,yshift=-5pt,black,opacity=1] {Backscattered \\[0.4em] Link} ([yshift=-11pt]AT.east);
\draw [Latex-,darkgray, thick] ([yshift= -10pt]PTtag.east) -- ([yshift=-94pt]EHtag.south);
\draw [-Latex,darkgray, thick] ([yshift= +10pt]PTtag.east) -- ([yshift=-74pt]EHtag.south);
\draw [Latex-,darkgray, thick] ([yshift= 0pt]PHYtag.east) -- ([yshift=-1pt]EHtag.south);
\draw [Latex-,darkgray, thick] ([yshift= 0pt]PHYtag.east) -- ([yshift=-1pt]EHtag.south);
\draw [Latex-,darkgray, thick] ([yshift= 0pt]FSAtag.east) -- ([yshift=82pt]EHtag.south);
\begin{scope}
\clip ([yshift=22pt]AT.east) --([yshift=18pt]PTtag.west)--([yshift=5pt]PTtag.west) --([yshift=0pt]AT.east);
\draw[red,thick] foreach \X in {1,...,15} {([yshift=11pt,xshift=-0.5mm]AT.east) ellipse(\X*3.65mm and {(3.65+\X)*1mm})};
\end{scope}
\begin{scope}
\clip ([yshift=-18pt]PTtag.west) --([yshift=-15pt]AT.east) --([yshift=-7pt]AT.east)-- ([yshift=-4pt]PTtag.west);
\draw[red,thick] foreach \X in {1,...,15} {([yshift=-11pt,xshift=-0.25mm]PTtag.west) ellipse(\X*3.25mm and {(3.25+\X)*1mm})};
\end{scope}
\end{tikzpicture}
\end{document}
Specifically, the rectangle
"Scenario Setup" does not match the exact width of the Reader and Tag container boxes. I have been testing values of minimum width=
until one that visually matches but it not exact. A similar problem has the vertical box "Energy Harvester", which I have been testing different vertical widths to match the distance between the top of the "FSA" box to the bottom of the "Passive Transceiver" box, but it is not exact.
I have done other manual settings like the arrow lines that go from/to the vertical box "Energy Harvester" to the other three horizontal boxes, FSA, PHY and Passive Transceiver. In those lines, the start and end positions have been y-shifted to look horizontal lines, but they are not perfectly horizontals.
I would like to ask how to set exact dimensions of Scenario Setup and Energy Harvester boxes, and how to set the shifted lines to be horizontals.
Regards