| The rotary steering system is one of the urgent tools for developing unconventional oil and gas resources in China.It is known as the "crown jewel" of petroleum drilling technology.With the continuous expansion of its core controller’s functions,the demand for functional testing of the controller has also been increasing.However,traditional physical testing methods have the following problems in the process of functional testing of the controller:(1)the measurement of the real-time drilling attitude sensor is easily affected by electromagnetic interference,and the attitude parameter setting of the sensor is mostly manually operated,which is not convenient for multi-attitude orientation measurement verification;(2)it is difficult to set up the mud downlink communication testing environment;(3)the manual testing process is cumbersome and inefficient.Therefore,this project proposes the application of a hardware-in-the-loop automation testing system for the controller of the rotary steering tool to solve the above problems.Through theoretical research,modeling and simulation,and software design,this project constructed a Hardware in the loop(HIL)automated testing system for the main controller’s functional requirements.First,a Simulink model was built to control the downhole orientation sensor and mud downlink communication algorithm.The model was compiled and run on a real-time target machine to simulate the seven-axis orientation signal and mud downlink communication signal output from the physical prototype of the downhole orientation sensor and validate the accuracy of the output signal.Second,the system’s upper computer software was constructed to monitor the model’s running state,change the model’s parameters,and simultaneously display the relevant tool parameters of the main controller in real-time.Finally,by configuring the io driver interface between the system modules and connecting an industrial permanent magnet synchronous motor for the rotary guidance tool,the system was built and tested.The results showed that the system automatically test the main controller according to the written test cases and complete the verification requirements for orientation measurement solution,mud downlink communication,and motor control function.The wellbore deviation angle error between the set wellbore angle and the main controller’s calculated wellbore angle was not more than 0.2°,and the azimuth and tool face angle errors were not more than 1°.The sensorss temperature and speed measurement errors were not more than 2℃ and 1.5 RPM,respectively.The downlink communication signals sent according to the testing requirements could match the main controller,and the parameters’ errors met the system performance indicators."This project has completed the design of an automated testing system for the main controller of the rotary steering tool.The system can flexibly modify test cases according to the functional testing requirements of the main controller to simulate the full-orientation output of the seven-axis signal of the in-bit attitude sensor and send downhole commands of the mud pulse telemetry.This hardware-in-the-loop automated testing system applied to the functional testing of the main controller of the rotary steering tool is an innovative application scenario that can provide reference for the subsequent development and testing of the main controller functions. |