*2.1. Preliminaries and Problem Formulation*

Photosynthesis is a photon-driven process. Thus, photosynthetic light levels are measured as the photosynthetic photon flux density (PPFD) with units of µmol m−<sup>2</sup> s −1 . The PPFD is the light-photon numbers in the photosynthetically active wavelength range (400–700 nm) per square meter per second. The daily light integral (DLI) in mol m−<sup>2</sup> d −1 is the integral of the PPFDs over 24 h. To ensure sufficient growth for plants in greenhouses, it is recommended that they receive a minimum amount of DLI during the photoperiod, which is the time period each day (up to 24 h) during which plants receive light [23]. To formulate the optimization problem, the relation between two important parameters in plant photosynthesis was considered. These parameters are the PPFD and electron transport rate (ETR), which is the number of electrons transported through photosystem II per square meter of leaf area per second (with units of µmol m−<sup>2</sup> s −1 ). The daily photochemical integral (DPI) in mol m−<sup>2</sup> d −1 is the integral of the ETRs over 24 h. Furthermore, the ETR and PPFD generally have an exponential rise to a maximum relation. The authors in [23] derived a relationship between the ETR and PPFD as:

$$ETR = a \left(1 - e^{-k \times PPFD} \right)\_{\prime \prime}$$

where *a* is the asymptote of the ETR and *k* is the initial slope of the ETR divided by *a*. For "Green Towers" lettuce, which was used in this study, *a* = 121 µmol m−<sup>2</sup> s −1 , and *k* = 0.00277 [23].

For many greenhouse crops, to guarantee high-quality production and adequate growth, a minimum DLI is suggested. In some cases, a specific photoperiod must also be achieved. However, the DPI and plant growth depend on the combination of the DLI and photoperiod; longer photoperiods with the same DLI result in a higher DPI and more biomass [27,28]. Therefore, the DPI is a better predictor of plant growth and better suited for lighting optimization algorithms than the DLI. "Green Towers" lettuce requires a DPI of 3 mol m−<sup>2</sup> d −1 , corresponding approximately to a DLI of 17 mol m−<sup>2</sup> d −1 under ambient sunlight conditions [23]. The optimization problem was formulated to minimize the total amount of supplemental lighting cost to reach a specified DPI within a specified photoperiod.

The theory behind the experiments considered in this study is based on the constrained nonlinear optimization problem presented in [25], which is as follows:

$$\begin{aligned} \min\_{\overline{\mathbf{x}}} f(\overline{\mathbf{x}}) &= \sum\_{t=1}^{T} \frac{\mathbf{C}\_{t}}{k} \left[ \ln(\frac{a}{a - \overline{\mathbf{x}}\_{t} - \overline{\mathbf{s}}\_{t}}) - s\_{t} \right] \\ \text{subject to: } & \sum\_{t=1}^{T} (\overline{\mathbf{x}}\_{t} + \overline{\mathbf{s}}\_{t}) \ge \frac{\overline{D}}{m} \\ \overline{\mathbf{x}}\_{t} &\ge 0 \; ; \; t = 1, 2, \cdots, T \\ \overline{\mathbf{x}}\_{t} &\le \overline{\mathbf{U}}\_{LED} \; ; \; t = 1, 2, \cdots, T \end{aligned} \tag{1}$$

where *x<sup>t</sup>* is the ETR resulting from supplemental light provided by the LEDs at time step *t*, *s<sup>t</sup>* is the ETR resulting from sunlight, *s<sup>t</sup>* is the PPFD received from the Sun, *ULED* is the maximum ETR that can be achieved with LEDs, *C<sup>t</sup>* is the electricity price in cents/kWh, *D* is the minimum DPI needed for the plant during the entire photoperiod, m is the length of each time step in seconds, and *T* is the number of time steps. The first constraint in (1) guarantees supplying sufficient light to the plants to reach the recommended DPI, and the other constraints define the ETR bounds according to the PPFD of LEDs.

A photoperiod of 16 h is common for greenhouse lettuce production and used to illustrate the performance of the control strategy. The optimization problem was solved at each time step (with the length of m seconds) during the allowed photoperiod for each day, and supplemental light was provided up to the optimal PPFD calculated for that time step. The process was repeated every m seconds time step, for a total number of *T* = 16 × 3600/m when a 16 h photoperiod was used. The Markov-based predictive values are substituted in (1), instead of the actual future sunlight intensities (which are not obtainable in real time). For a detailed description on sunlight prediction using Markov chains, we refer to our previous work [25]. Consequently, (1) can be demonstrated as:

$$\begin{aligned} \text{minimize } & \sum\_{t=i}^{T} \frac{\mathbb{C}\_{t}}{k} \left[ \ln(\frac{a}{a - \overline{\mathbf{x}}\_{t} - \overline{\mathbf{s}}\_{t}}) - s\_{t} \right] \\ \text{subject to: } & \sum\_{t=i}^{T} (\overline{\mathbf{x}}\_{t} + \overline{\mathbf{s}}\_{t}) \ge \overline{\overline{D}} - \sum\_{t=1}^{i-1} (\overline{\mathbf{x}}\_{t} + \overline{\mathbf{s}}\_{t}), \\ & \overline{\mathbf{x}}\_{t} \ge 0; \qquad t = i\_{\prime} i + 1\_{\prime} \cdot \cdots \cdot T, \\ & \overline{\mathbf{x}}\_{t} \le \overline{\mathbf{U}}\_{\text{LED}}; \qquad t = i\_{\prime} i + 1\_{\prime} \cdot \cdots \cdot T. \end{aligned} \tag{2}$$

The optimization problem (2) was solved once before sunrise and once after sunset. Throughout the day, (2) was solved repeatedly at each time step. The interested reader is referred to [25] for more details on how to calculate the optimal lighting strategy.
