In the cement grinding system, the quantity of raw material in the ball mill has an important effect on the cement production. Based on the quantity, the working conditions of the ball mill are divided into three states, the full state, the normal state, the empty state. Normally, it's hard to predict the working station of the ball mill and the precision is low. This paper, least square method and its improved algorithm is used as a new method to judge the working condition of ball mill. A parameter a is added to the finite impulse response model. Through the value of the ball mill working condition can be judged so the operator can change the parameters of the equipment in time and an on-line software is programmed by VC++. As a result, both the quality of the cement and the stability of the equipment are improved.