## 7 Further Discussion  
Based on the goals of engineering applications, potential challenges or issues in HITL simulations need to be further discussed. * Due to the limited memory of the PLC, many complex intelligent control algorithms cannot be directly run, which can lead to hardware memory overflow errors or a loss of control effectiveness due to long software scanning cycles. And, the iterative algorithm in this article is one of such complex algorithms, so we adopted a refined HITL technique [30]. The main program of the iterative algorithm will still run in the MATLAB environment, while only the algorithms related to the PD controller will be run in PLC hardware. On the one hand, this solves the problem of hardware memory overflow errors and avoids the disadvantage of long software scanning cycles. On the other hand, due to the built-in PD control unit and complex hardware interface communication functions of the PLC, it enhances the real-time adaptability of the PLC hardware. As iterative algorithms themselves are complex algorithms, other similar complex intelligent control algorithms can also apply this refined HITL technology to  
Figure 11: Illustrations: (**a**) results of the controlled displacements by solving LMIs; (**b**) control input signals (\(u_{1}\) and \(u_{2}\)); (**c**) changes in the control input signals with the selected process parameters of \(\alpha=200\), \(u_{\max}=0.001\), and \(\varpi=0.001\). achieve optimized control functions. Of course, for various conventional optimization algorithms and technologies, such as optimal trajectory control technology [38], the entire intelligent control algorithm can be directly implemented in the PLC through programming, fully reflecting the real-time adaptability of PLC hardware. * There are still many constraints or limitations that algorithms face in the process of transitioning from simulation to hardware. In addition to the constraints of the hardware memory overflow errors and long software scanning cycles mentioned above, the difficulty of programming and implementing the entire intelligent control algorithm in the PLC is also significant. There are various programming methods, and some simple algorithms can be programmed directly, according to the ladder diagram programming principles of the PLC. For some algorithms with high programming difficulties, indirect programming and the conversion to ladder diagrams can also be used to create them. For example, algorithms can be implemented under the SIMULINK architecture, and then algorithm programs based on the SIMULINK architecture can be converted into PLC controller programs to achieve online communication with the simulation environment and algorithm execution. The specific steps are as follows: first, Simulink (r) PLC CoderTM tool (MathWorks, Natick, MA, USA) compiles the MATLAB code embedded in SIMULINK (embedded in S-function form) as a whole and directly compiles it into a hardware-independent IEC 61131 [39] structured text (ST). Secondly, the code generated in an ST format has the clarity and efficiency of a professional handwritten code. On this basis, make appropriate modifications and modify it to the \"New ST\" text suitable for the operation of the S7-300 PLC-CPU314. Finally, compile and deploy the new ST text directly on the S7-300 PLC-CPU314, which can also be converted into a ladder program before application, or modified further to be applied to the S7-200 PLC. * The iterative algorithm can adapt to different wind conditions under dynamic changes in wind power and is fully applicable to turbine-controlled objects with repetitive motion, because it does not rely on the precise mathematical model of the system and can handle nonlinear, strongly coupled, dynamic, aeroelastic systems with high uncertainty [38]. For the current system, only an uncertain disturbance term needs to be added to Formula (11) to verify the robustness of the iterative algorithm. In addition, as mentioned earlier, common yaw mechanisms are divided into the sliding bearing type and rolling bearing type.