To address the measurement accuracy degradation caused by the humidity hysteresis loop of polymer capacitive humidity sensors
a T-S fuzzy model-based hysteresis compensation algorithm is proposed.T-S fuzzy models are established for the moisture absorption and desorption processes separately
and the parameters are identified via fuzzy C-means clustering and the least squares method.The input space is divided into three regions (low
medium and high humidity) for local linear approximation.The analytical expression of the inverse model is derived based on the established models
and a compensation algorithm is designed which includes process state judgment
inverse model selection
applicability calculation and weighted averaging.Experimental results show that after compensation
the hysteresis error is reduced from 1.5% to within 0.18%(with a reduction of 88%)
and the error at each humidity point is less than 0.2%RH.The algorithm shows good repeatability (standard deviation <0.03%RH)
and the response time remains almost unchanged (5.6s→5.7s).The single calculation time on STM32 is only 0.3ms with low resource consumption.This algorithm features low computation cost and good real-time performance
making it suitable for embedded implementation.It offers an effective software compensation scheme for high-precision measurement of polymer humidity sensors.