\section{Results and Discussion}\label{sec:result}
The results of the simulation, which is carried out for 24 hrs, can be seen in Fig. \ref{fig:ctrl_perf}. 
The simulation starts with the initial state vector
\begin{equation*}
\mathbf{x}(t_0) = 
\begin{bmatrix} 38 & 0.0013 & 0.0058 & 0.0 & 0.0 & 0.0 & 0.240
\end{bmatrix}^\top,
\end{equation*}
with $t_0$ being midnight. The starting weight of the plant, corresponding to lettuce size ready for harvest, and a high initial temperature are considered for maximum operation load on the actuators. 

\begin{figure*}[!h]
	
	
	
	
	
	\centering
	
	\includegraphics[trim=20 273 10 273,clip,scale=0.9]{./gfx/MPC_plot_small}
	\caption{Simulation results: The model was simulated with the implemented MPC for a duration of 24 hrs. The state trajectories, references, disturbances and the corresponding inputs are visualized. Chattering of certain actuators \eg the ventilator, are non-crucial for the production unit used in this work (switching frequency $< 0.0333$ Hz).}
	\label{fig:ctrl_perf}
	
\end{figure*}

At first, one can observe constraint satisfaction for all states and inputs according to the specification in the control optimization.
The light intensity follows the given reference sinusoid pattern reaching the peak amplitude at noon \ie at 12 hr, for all LED channels (see Fig.~\ref{fig:ctrl_perf}(a)).

Simultaneously, temperature inside the chamber reaches its reference in 0.3 hrs and is able to maintain its reference trajectory for the entire time (see Fig.~\ref{fig:ctrl_perf}(b)).
Jitters in the control signal for the TEC can be noticed at the beginning, around 5-10 hr, and 15-20 hr.
These jitters are controller's response to temperature fluctuation due to the activation of the ventilator (see Fig.~\ref{fig:ctrl_perf}(c)). 
It was also observed from simulations with higher $T_\mathrm{out}$ temperatures such that the difference $T_\mathrm{out}-T^\mathrm{ref} > 10~^\circ$C, temperature tracking was not achievable.

This can be explained by the limitation in heat transfer capacity (cooling) of the actuator(as mentioned previously in Section \ref{sec:modeling}).  

CO$_2$ concentration in the chamber increases at the beginning and at the end of the simulation due to respiration. Since it is not possible to reduce this concentration through ventilation at the mentioned times, the controller increases the light intensity activating photosynthesis and thus CO$_2$ consumption. At other times, the CO$_2$ concentration is tracked by frequent switching of the ventilator, providing CO$_2$ from the outside (see Fig.~\ref{fig:ctrl_perf}(c)). In the range 0.025-0.2 hr, ventilator is activated to accelerate cooling and thus reach the reference temperature value. It can be noticed that once the light intensity elevates, the CO$_2$ consumption due to the plant photosynthesis is at maximum requiring constant CO$_2$ flow.
The slew rate used for the ventilator is acceptable for the production unit used in this work. However, for systems with limitation in switching rate, the control problem needs to be modified such that high frequency switching is penalized.


Water levels in the tanks are maintained such that the state constrains (tank capacities) posed on these water levels are not violated. 
The biomass growth shown in Fig.~\ref{fig:ctrl_perf}(d) appears to be highest between 7-17 hr when the conditions for growth (temperature and CO$_2$ concentration) are optimal. Beyond these time points, biomass production rate is minimal. 


These simulations depicts certain capability of the tracking control, that could satisfy all state and input constraints according to the specification within the control optimization \eqref{eq:MPC}, while also pointing out particular challenges.
{"config": "arxiv", "file": "2006.07081/results_discussion.tex"}