PT - JOURNAL ARTICLE AU - Wang, Chunling TI - Research on Floating Point Accumulation Based on Improved Kahan Algorithm DP - 2023 Sep 5 TA - Manufacturing Technology Journal PG - 551--556 VI - 23 IP - 4 AID - 10.21062/mft.2023.065 IS - 12132489 AB - In the actual factory production, there are often cases of liquid flow accumulation, and most of the controllers used in the project are PLC. Usually, the flow meter is used to measure the instantaneous flow, and then the analog (4-20mA) signal is transmitted to the PLC, and the PLC accumulates the cumulative flow within a certain period of time according to the instantaneous flow transmitted by the flow meter. Due to the floating point type of PLC, the direct accumulation will not reach the accuracy standard, and the cumulative error will occur. In order to eliminate the cumulative error, this paper proposes an improved algorithm based on Kahan 's algorithm. The improved algorithm greatly reduces the error of the cumulative flow than the original Kahan algorithm. The reduction of error is of great significance to the data analysis and production calculation of liquid or solid flow in the field of process industry control.