The wind resistance of some roadways are not accurate or even impossible to be measured in the process of measuring the resistance of mine ventilation system,which is caused by underground condition. Therefore,the calcula- tion of resistance algorithm based on the airflow of node pressure is studied. It is proposed that using two sets of air vol- ume data and part of node pressure data to inverse the resistance. According to the ill-posed characteristics of the algo- rithm,it is concluded that the sparsity of resistance inversion equation coefficient matrix and ventilation system topolog- ical structure are the two major reasons for the ill-condition of the algorithm. Based on this,the improved algorithm of airflow calculating resistance based on diagonal subnetwork and optimal layout algorithm of wind pressure sensors with algorithm steps and program chart are proposed,which solve the ill-posed problem and achieve the optimal scheme with the least amount and rational layout of wind pressure sensors. The above algorithm is applied to a ventilation network with 23 branches and 16 nodes,the schemes with all combination of wind pressure sensors layout are checked,65. 2% of which are ill-posed. Based on the algorithm proposed in this paper,the division scheme of the angular network subnet and the optimal arrangement scheme of the wind pressure sensor of 9 nodes are presented. The results show that the algo- rithm accurately calculates the wind resistance based on the optimal arrangement of the wind pressure sensor,and the er- ror is controlled within 10-4 . Combined with the mine monitoring system,the algorithm can further realize the collection, verification,calculation,storage and feedback of the basic parameters (air volume,air pressure and wind resistance) of the ventilation system in real time,which is the basic research of mine intelligent ventilation.