## 3 Methodology to Develop and Execute a Redispatch Model in Real-Time Operation
### Mathematical Methodology to Implement the Modeling of a Redispatch
#### 3.2.7. Mathematical Formulation Defining Maximum Dispatch Power for System Security
Finally, stage six is the demand segment which includes the time constraints due to the participation factors at each bus and the total demand curve evolution, as shown in Figure 6.  
However, the modeling for this proposed redispatch model is run with PLEXOS software (version 9.000 R8, Energy Exemplar, North Adelaide, Australia, 2022) and the validation of results is tested in a real power system with high penetration of renewable energies, variability of fossil fuels, and climatic consequences due to water deficit. This simulation tool uses an external optimizer to solve the mathematical optimization problem. The optimizer has a general purpose that employs the mixed integer programming method (Branch and Bound). Figure 5: The importance of integrating the maximum dispatch power due to the undesired action of frequency droop ramps. Modeling and Validation of Redispatch through Simulation of Realistic Scenarios of Technical-Economic Impact on Conventional and Renewable Generation  
The redispatch model can capture in real time the deviations in generation, demand, and faults in the network that are not included in the unit commitment models. This redispatch model is designed to be tested in any real system or test system and check its validity with the theoretical method and its mathematical formulation. However, it is important to present scientific advances with real electrical power systems to increase the expectations of application in the industry. Structure and Design of a Multimodal Electric System That Adapts to the Modeling of a Segmented Redispatch in Generation, Transmission and Demand  
The electrical network designed for the redispatch modeling includes the most relevant facilities of the National Electric System [35]. Mainly, the number and use of generators, transmission lines, and critical bars of the system are highlighted to strategically guarantee the n-1 security criteria. In this electrical scheme, the generation, transmission, and demand segments are grouped and distributed by electrical zones, as shown in Figure 7.  
The transmission segment is responsible for the exchange of power flow between generation and demand, preserving the n-1 security criterion. The transmission system is a set of elements such as busbars, transformers, voltage levels, and transmission lines. Each of these transmission system elements is characterized by dynamic flexibility in their maximum/minimum power flow capacities and impedance levels. Table 1 indicates the number of transmission system elements that are integrated into the redispatch model and the impedance modeling flexibility for each component. Solar, wind, geothermal, cogeneration, coal, gas, diesel, reservoir hydro, and run-of-river hydro power plants are used for redispatch modeling with the ability to relax technical constraints, such as maximum power (P\({}_{\text{MAX}}\)), minimum power (P\({}_{\text{MIN}}\)), start time (T\({}_{\text{START}}\)), minimum operation time (T\({}_{\text{ON}}\)), and minimum shutdown time (T\({}_{\text{DOWN}}\)), and economic constraints, such as starting cost (C\({}_{\text{START}}\)), holding cost (C\({}_{\text{DOWN}}\)), non-fuel variable cost (CVNC), fuel price (P\({}_{\text{FUEL}}\)), heat rate (CEN), fuel variable cost (CVC), and generation variable cost (CV), as shown in Table 2.  
Figure 6: Tuning of redispatch parameters in PLEXOS. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Voltage (kV)** & **Bus** & **Line** & **Transformer** & **Simulation Z [pu]** \\ \hline
500 & 10 & 21 & - & Yes \\
345 & 1 & - & - & No \\
220 & 48 & 96 & - & Yes \\
154 & 3 & 4 & - & Yes \\
110 & 6 & 11 & - & Yes \\
500/220 & - & - & 22 & Yes \\
345/220 & - & - & 1 & Yes \\
220/154 & - & - & 2 & Yes \\
220/110 & - & - & 4 & Yes \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Elements of transmission system for the redispatch model.