I am trying to create the attached diagram. But I can't seem to figure out how to create it. My code is shown below. Could someone please help me? Thanks for your help
\begin{tikzpicture}
\node [draw=black!50,
minimum width=2cm,
minimum height=1.2cm,
fill=gray!5
] (controller) {Extremum Seeking Controller};
\node [draw=black!50,
minimum width=5cm,
minimum height=3cm,
above=1.5cm of controller, fill=gray!5
] (plant) {Plant};
% \draw[-stealth] (plant.east) -| (controller.east)
\draw[] (plant.east) -- ++ (1.5,0)
node[](output){}node[midway,above]{};
\draw[-stealth] (output.east) |- (controller.east);
\draw[] (controller.west) --++ (-1.5,0)
node[](fromESCline){};
\draw[-stealth] (fromESCline.west) |- (plant.west) ;
\end{tikzpicture}


\draw[-stealth] (plant.east) -- ++ (1.5,0) node[align=center]{Plant \\Output} |- (controller); \draw[-stealth] (controller.west) --++ (-1.5,0) |- node[near end, align=center]{Manipulated\\Variables} (plant);– Qrrbrbirlbel Dec 15 '22 at 08:04