# Optimal Scheduling of Hydro-PV-Wind Hybrid System Considering CHP and BESS Coordination
## 3 Solution Methodology
### Piecewise Linearization of the Objective Function  
Piecewise linearization is widely used in the nonlinear curve of the power unit for the convenience to solve and accelerate its convergence, as shown in Figure 2.  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Procedure—LHSSR Method** \\ \hline
**Scene construction** \\
**Step 1** & Assume \(x_{up}\in[x_{ud},x_{uu}]\), the probability distribution function of \(x_{up}\) is \(f_{up}(x_{up})\) \\
**Step 2** & Divide the scope \([f_{up}(x_{ud}),f_{up}(x_{uu})]\) into \(N\) equal probability interval \\
**Step 3** & Randomly select \(q_{i}\) in all probability subinterval \([(i-1)/N,i/N]\) \\
**Step 4** & Denote \(q_{i}=(i-1+r)/N\) and \(y_{iup}=q_{i}\cdot(f_{up}(x_{uu})-f_{up}(x_{ud}))+f_{up}(x_{ud})\) \\
**Step 5** & Obtain sample by inverse transformation: \(x_{iup}=f_{up}^{-1}(y_{iup})\) \\
**Scene reduction** \\
**Step 6** & Initialization \(p_{i}=\frac{1}{N}\) \\
**Step 7** & Calculate distance as to any two scenarios \(d_{k}(X_{i},X_{j})=\sqrt{\sum\limits_{w=1}^{2}\left(x_{iup}-x_{jup}\right)^ {2}}\) \\
**Step 8** & Search the nearest scene of \(X_{i}\) expressed as \(\min\left\{d_{k}(X_{i},X_{j}),i\
eq j\right\}\) \\
**Step 9** & Calculate the product \(P_{KDIi}=\min\left\{d_{k}(X_{i},X_{j}),i\
eq j\right\}\times p_{i}\) \\
**Step 10** & Search for the smallest \(P_{KD}\) expressed as \(P_{KD_{i}}=\min\left\{P_{KDIi}|1\leq i\leq N\right\}\) \\
**Step 11** & Update scenarios probability \(p_{j}=p_{j}+p_{i}\) and reduce scene \(X_{i}\) from the scene set \\
**Step 12** & Update the scene number \(N=N-n_{i}\) and return Step 7. \\ \hline \hline \end{tabular}
\end{table}
Table 1: The procedure of Latin hypercube sampling and scene reduction (LHSSR) method.  
Figure 2: Piecewise linearization of cost curve.  
The process of piecewise linearization of the cost curve can be expressed as the following formulas:  
\[c_{i}^{p}(t)=A_{i}u_{i}^{t}+\sum_{l=1}^{L_{i}}F_{l,i}\delta_{l}(i,t) \tag{34}\]  
\[p_{i}(t)=\sum_{l=1}^{L_{i}}\delta_{l}(i,t)+\underline{p_{i}}u_{i}^{t} \tag{35}\]  
\[\delta_{1}(i,t)\leq T_{1,i}-\underline{p_{i}} \tag{36}\]  
\[\delta_{l}(i,t)\leq T_{l,i}-T_{l-1,i} \tag{37}\]  
\[\delta_{L_{i}}(i,t)\leq\overline{p_{i}}-T_{L_{i}-1},i \tag{38}\]  
\[\delta_{l}(i,t)\geq 0 \tag{39}\]  
where \(F_{l,i}\) is the increased cost of the \(i\)-th generator at the \(l\) section of the piecewise linearization curve, \(\delta_{l}(i,t)\) is the output of the \(i\)-th generator at the \(l\) section in moment \(t\), and \(L_{i}\) is the number of the piecewise section.  
In the objective function, only the cost of CHP is nonlinear. Based on the piecewise linearization method above, the nonlinear constraint (Equation (13)) can be converted into Equation (40) as follows:  
\[P_{CHP}^{g,t,s}=P_{CHP}^{g,\min}u_{CHP}^{g,t}+\sum_{k=1}^{NK}P_{CHP}^{g,t,s,k} \tag{40a}\]  
\[F_{CHP}^{g,t,s}=F_{CHP}^{g,\min}u_{CHP}^{g,t}+\sum_{k=1}^{NK}P_{CHP}^{g,t,s,k}C _{CHP}^{g,k} \tag{40b}\]  
Therefore, the objective function and constraints are linearized, and the problem can be converted into an MIP problem, solved using commercial solver CPLEX 12.4 (IBM, Armonk, NY, USA).