| This article introduces the research background and significance of thermal optimization software,combined with the current goals of ultra-clean emissions,green environmental protection,and flexible scheduling in the thermal power industry,as well as the high coal price and the mixed combustion of multiple coals,which leads to the use of traditional DCS and Unable to complete the task smoothly.The significance of the design and development of the integrated thermal engineering platform is to use high openness,high reliability,and high performance to combine advanced control algorithms with on-site DCS to achieve the goals of high-efficiency control,energy saving,emission reduction,and environmental protection of thermal power processes.In view of the current difficulties faced by thermal power plants,this paper designs and develops the calculation server software for the integrated platform of thermal engineering.The main tasks are as follows:(1)According to the on-site environment,the platform hardware and communication framework are set.The platform uses OPC technology and TDI protocol for data interaction with on-site DCS and other optimized software to complete the integration of on-site software level.Set the platform as an engineer station and a computing server according to requirements to realize the physical separation of interface display and real-time computing.The computing server adopts a multi-process concurrency model to serve each functional group,and divides it into computing process management programs and computing processes,and completes inter-process communication through command lines,shared memory,and message responses.The calculation process is developed in a multi-threaded mode,which provides services such as calculation,broadcasting,and online command issuance for the function group.The calculation server and the engineer station use the TCP/IP protocol cluster to complete real-time communication.(2)In response to the functional requirements of the computing server,openness and reliability are developed.Users can embed the advanced control algorithm in the platform by encapsulating the dynamic link shared library in accordance with the specified interface standards to realize the openness of the algorithm;other optimization modules on the site can access the platform through the dynamic link library to share data in real time and realize the openness of data.Use serial communication to communicate in real-time between the main and standby computing servers,complete the main and standby switching in the case of a failure or crash of the main computing server,and improve the reliability of computing services;set a heartbeat signal in the communication loop of the thermal engineering automatic integration platform to complete the pairing Real-time detection of communication failures to strengthen communication reliability.Use the DMC algorithm to perform functional tests on the platform.(3)In order to improve the computing capacity and performance of the computing server,it is optimized.According to the working principle of the compiler,use inline or lambda expressions for some functional functions.Use the exception control flow mechanism to automatically handle runtime errors.Eliminate unnecessary procedure calls and memory references in the computing process,reducing runtime overhead and memory usage.Combining the hardware characteristics of modern processor multifunction units,multi-stage pipelines,speculative execution,out-of-order execution,and branch prediction technical characteristics,the use of conditional transfer instead of conditional transfer reduces unpredictable branches in the process and reduces the cost of branch prediction errors.In the process of optimizing the iterative calculation,the use of loop unrolling optimization,multi-accumulative variables,exerts the instruction-level parallel capability of modern processors,reduces the execution time of iterative calculations,and improves the calculation capacity and performance of computing servers. |