Nowadays, horizontal well technology is being applied more and more to the development of oilfield production capacity. Horizontal well logging tractor is the delivery tool of logging tool in horizontal well logging technology. It connects logging cable head and carrying logging tool, using a tractor can be solved when the deviation is greater than 60˚, the instrument can not rely on gravity to the target zone of the state.
Brushless DC motor (BLDCM) has the advantages of simple structure, good speed regulation performance, high efficiency and strong adaptability to the environment. It has become the best choice of horizontal well tractor. Currently the world’s mainstream BLDCM control can be divided into two types: with the position sensor control and sensorless control. Motor with position sensor when the motor is produced, it is necessary to install a position sensor to detect the current position of the rotor. In the horizontal well logging work, because the working environment temperature is too high, the position sensor work is unstable will produce the wrong commutation signal to cause the electrical machinery to stall or even stall, thus has the serious consequence. The position sensorless control can overcome the problems of the position sensor under practical operating conditions. So the choice of horizontal well traction without position sensor brushless DC motor  .
This paper is based on the brushless DC motor working in the absence of Hall sensor state, through the back EMF detection to achieve commutation. In the detection of back EMF, a set of phase compensation algorithm is proposed by improving the software algorithm to overcome the phase shift caused by the hardware comparator to detect the zero crossing.
In order to overcome the problem that the motor control system can not observe the parameters of the tractor during the logging process, a motor speed monitoring system based on the C# host computer is designed to enable the researchers to control and monitor the condition of the tractor in real time on the ground.
2. Back EMF BLDCM Control Principle
Current brushless DC motor based on the back EMF non-position control algorithm are: using the imaginary center node on the hardware to compare with the phase voltage; the use of such as ST7 and other special brushless DC motor controller directly to the three-phase voltage through the current limiting resistor to the back EMF detection module corresponding to the IO; and using a controller like the dsPIC, DSP2000 series, the zero-crossing of the back EMF is detected by the DSC operation  .
Microchip’s dsPIC series chip is a DSP-specific motor control chip, able to withstand high-temperature environment. Through the DSC operation method to detect the zero-crossing point of the back EMF, greatly simplifying the system hardware circuit, reducing costs  . To a large extent to overcome the external environment with the impact of the control system to improve the robustness. Therefore, this study uses a control system platform based on dsPIC chip to control the motor and detect the zero-crossing of the back EMF.
Figure 1 shows the back EMF of the motor is a trapezoidal wave and the current is a square wave. In order for the brushless DC motor to output the maxi-
Figure 1. The relationship between back EMF, current waveform and power device conduction under ideal signal.
mum torque, the phase current of each phase must be in phase with the opposite potential. So a commutation of an electrical cycle 6 times, every 60˚ electrical angle commutation. Brushless DC motor to open the zero-phase winding phase lead phase commutation signal phase 30˚. As the motor back EMF can not be measured directly, must be calculated by phase voltage equivalent  .
Figure 2 shows the main circuit diagram of BLDC motor. Assume that the three-phase brushless DC motor symmetry, ignore the cogging effect and magnetic saturation, the equivalent circuit by the winding can be the following equation:
where: is the voltage of the phase to ground voltage. represents the phase current, represents the phase resistance, and represents the
Figure 2. The Main Circuit Diagram of BLDC Motor.
armature winding center node voltage. As the two-phase conduction at any time, a phase cut-off (no current flow).
If the non-conducting phase is the phase, due to:
In order to obtain the zero-crossing of the back electromotive force, we can indirectly compare the relationship between the non-conducting phase voltage and the center node voltage, so as to obtain the commutation signal indirectly. Since the motor center node is not drawn out, it is necessary to establish the relationship between Vn and the three phase voltages.
The formula (1), the formula (2) and the formula (3) are added, can get formula (4):
Due to conducting two-phase current equal to the opposite direction, the other a phase current is 0, so we can get the center point voltage as:
3. Hardware Design of Control System
The system hardware mainly includes the core hardware high performance digital signal controller and the motor drive main circuit, MAX232 communication interface circuit, the back EMF detection circuit and so on four parts. The block diagram of the whole control system is shown in Figure 3.
Figure 3 shows the lock diagram of the motor control system The system controller uses Microchip’s dsPIC33FJ32MC204 chip, it is an industrial application of high-performance digital signal controller. Compared with other programs, the use of dsPIC33FJ32MC204 control system design not only to achieve
Figure 3. Block diagram of the motor control system.
Figure 4. Drive circuit.
high control accuracy, and a high degree of integration of the control system peripherals. This greatly simplifies the control circuit design, improve the system compatibility and stability, with low cost, low power consumption, high processing speed and many other features.
3.1. Motor Drive Main Circuit Design
The main circuit of the system selected a full-bridge MOSFET driver circuit design, Figure 4 shows the drive circuit. MOSFET is a voltage-controlled device whose input impedance is high and the required static power is very small. In the conduction and shutdown process, especially at high frequencies, the drive circuit must be able to its parasitic capacitance charge and discharge quickly, so its drive signal in the rising and falling edge of the more demanding requirements. And in order to ensure effective opening of the MOSFET, the drive voltage is required to be higher than the turn-on voltage.
Taking into account the above requirements, the control system driver circuit using 5 kHz PWM drive signal generated by the microcontroller. The controller generates the PWM signal through the latch 74HC573 after isolation from the IR driver chip IR2181 to drive the MOSFET gate. The chip is compatible with 3.3 V and 5 V inputs, the maximum drive current can reach 1.4 A. In order to prevent the IR2181 from causing the MOSFET gate voltage to oscillate, a 27 Ω resistor is connected in series between the driver chip and the gate.
3.2. Back EMF Detection Circuit
Figure 5 shows the back EMF detection circuit, the circuit is actually a pure resistor divider network in parallel with a 0.1 uF capacitor. The pure resistor divider network ensures that the sampled voltage input to the AD port of the controller meets the required range and the capacitor acts as a filter. Terminal voltage is processed directly connected to the microcontroller ADC detection module channel, after conversion to get the voltage signal.
4. The Software Realization of Control System
4.1. The Main Flow Chart of the Control System
The software control of the system mainly consists of the main function module program and the interrupt service function program.
Figure 6 shows the main flow chart of the system, divided into motor start- stop part and motor commutation part. Start-stop part of the motor to complete the initialization of the system function modules, find the initial position of the rotor, the manual commutation, control motor start and stop. Commutation of the motor part by ADC interrupt service routine to complete the three-phase back EMF signal acquisition and in accordance with the formula (5) to calculate
Figure 5. Back EMF detection circuit.
Figure 6. The main flow diagram.
the center point of the motor voltage and compared with each phase voltage. And then by the PWM interrupt service function using the multi-function detection of EMF zero crossing. If it is true, calculate the counter electromotive force generated by the phase shift angle and commutation delay time required for electrical angle, start the timer commutation  .
4.2. Dynamic Phase Compensation
From the commutation theory, the back EMF zero-crossing detection method is to detect the back EMF zero-crossing delay 30 degrees, as the next group of winding commutation point. Reasonable control of the inverter trigger sequence, the phase current and the back EMF phase, in the flat part of the back- EMF waveform turns on the winding, to achieve the motor “best commutation logic”  . When the motor to achieve the “best commutation logic”, can make the motor windings maximum utilization, so that the motor has a larger torque and smaller torque ripple, the best motor at this time to achieve the motor Best Run.
Because the system uses the PWM pulse width modulation, so the detection of the terminal voltage of a large number of chopping components, will interfere with the back EMF waveform, the zero crossing is not clear, so usually need to add a filter in the back EMF detection circuit capacitance.
However, the introduction of non-linear elements will inevitably produce phase shift, in order to achieve the brushless DC motor “optimal commutation logic” must be in the software phase shift generated by the dynamic phase compensation  .
When the electromotive force detection circuit components are selected, as the motor speed changes, the frequency of the back EMF changes, so the phase shift angle of the zero-crossing point of the EMF is also changing.
Figure 7 shows the zero-crossing of the back EMF after the filter circuit produces a phase shift angle of .
In order to make the motor is still in the best commutation state, you need to software on the motor speed with the dynamic phase compensation. The compensation angle is the phase shift angle after filtering. Therefore, the motor commutates after delaying after the zero-crossing of the EMF.
Figure 8 is the motor commutation program flow chart, the motor is the best commutation time in the back EMF zero-crossing point and then delay the electrical angle of 30 degrees. In this paper, the timer to calculate the commutation of the motor twice the time interval to get the current motor speed.
Table 1 demonstrates the relationship between the phase compensation angle and the rotation speed range. In the commutation program, according to the calculated motor speed, see Table 1 can be obtained at the speed of the need to compensate for the angle, and then through the timer to calculate 30-degree delay time and phase compensation angle required time. The subtraction of the two is the delay time after the zero-crossing of the back-EMF to the commutation of the motor, so as to obtain the accurate commutation time.
5. PC Measurement and Control System Design
PC measurement and control system using the Microsoft C# programming language, combined with Visual Studio 2010 form interface design tools to achieve the host computer software design.
Figure 7. Back electromotive force phase shift diagram.
Figure 8. Commutation program flow chart.
Table 1. Phase Compensation Table.
The host computer design software has four parts: serial parameter selection, motor control, PI control and motor parameters curve display. The choice of serial parameters is to set the baud rate, port name, data bits and parity bits of the current serial port. The motor control module controls the start and stop of the motor via the Button control, gives the motor speed via the track Bar control, and displays the current given speed and the current actual speed measured by the microcontroller via the text Box control. PI control module is mainly to show the background calculated steady-state error, through the steady-state error to adjust the integral constant. The motor parameters display module mainly uses the 2D image processing function (GDI) provided in the.NET Framework 4.0 to display the intuitive waveform of the parameters of the current motor. The motor parameter display module mainly displays the real-time speed of the motor, the bus current and the duty cycle.
Monitoring software in the physical layer of the system is a duplex communication interface MAX232 serial communication protocol.
Monitoring software interface shown in Figure 9.
6. Test Results and Analysis
Figure 9. The monitoring software interface.
Figure 10. The structure of the motor.
Figure 11. Rotor and stator structure.
Figure 12. The phase compensation waveform at 5000 rpm.
Figure 13. The phase compensation waveform at 8000 rpm.
Through the experiment, the counter electromotive force waveform and the commutation waveform of the motor under the condition of low speed and high speed are measured and compared and analyzed. As a result of the software algorithm in the effective phase compensation, so by increasing the experiment to increase the motor speed, the motor did not have a greater impact, to normal operation. Figure 12 & Figure 13 shows the waveforms of the motor at 5000 rpm and 8000 rpm, respectively.
Figure 14. Real-time display of monitoring system.
From the two figures can be seen, the back-EMF waveform for the normal step wave, there is no phase lag phenomenon.
Figure 14 shows the actual operating parameters of the current motor monitored by the host computer monitoring system. The experimental results show that the host computer monitoring system can respond to the real-time parameters of the motor during the operation of the motor.
This paper introduces the working principle of BLDC without Hall mode, and the software and hardware design of the control system. The phase compensation algorithm of high speed is solved by a set of phase compensation algorithm. At the same time taking into account the industrial field of brushless DC parameters difficult to master, based on C# development software designed a set of PC software to facilitate real-time observation of the motor in the work of the parameters. The experimental results show that the designed controller motor is stable and can meet the requirements of the industrial speed of the motor.
The subject of the research association of the work of Hubei college laboratory in 2016, project number HBSY2016-25; the research project of colleges and universities’ provincial teaching in Hubei in 2016, project number 2016-257.
 Iizuka, K., Uzuhashi, H., Kano, M., et al. (1985) Microcomputer Control for Sensorless Brushless Motor. IEEE Transactions on Industry Applications, IA-21, 595-601.
 Damodharan, P. and Vasudevan, K. (2010) Sensorless Brushless DC Motor Drive Based on the Zero-Crossing Detection of Back Electromotive Force (EMF) from the Line Voltage Difference. IEEE Transactions on Energy Conversion, 25, 661-668.
 Lee, D.-M. and Lee, W.-C. (2008) Analysis of Relationship between Abnormal Current and Position Detection Error in Sensorless Controller for Interior Permanent-Magnet Brushless DC Motors. IEEE Transactions on Magnetics.
 Lin, M.Y., Li, Q. and Gu, W.G. (2005) Effect of Rotor Position Erroron Commutation in Sensorless BLDC Motor Drives. Proceedings of the Eighth International Conference on Electrical Machines and Systems.