# Rotation Speed Control of the Rotary Valve in MWD Tools Based on Speed Feedforward Compensation

Authors: Lingtan Zhang; Yue Shen; Long Wang; Jia Jia; Lingzhi Wei
Journal: Mathematical Problems in Engineering
 (2021)

---

## Abstract

The rotary valve speed control, seriously affected by the nonlinear characteristic of rotary valve load torque, affects the generation of drilling fluid pressure phase shift keying (PSK) signal and its quality. The calculation model feedforward of the load torque acts on the speed control system and enables the motor voltage to change according to the law of calculation model, and the linearization correction of the speed system is performed. Additionally, the flow measurement is introduced into the calculation model of the load torque to track the load torque change with the flow, suppressing the influence of large changes in flow rate on open-loop control of rotary valve speed. The closed-loop proportional-integral-derivative (PID) control is formed by negative feedback of speed, and the PID parameter value rule is established based on the rapid decay control of transient component in the rotary valve speed step response, which speeds up the tracking of the rotary valve speed following the control voltage pulse and reduces the distortion of the drilling fluid pressure PSK signal, increasing the frequency of the drilling fluid pressure carrier and improving the transmission rate of downhole information. Simulink simulation indicates that the closed-loop PID control of rotary valve speed can track the change of control voltage pulse quickly and strongly suppress the interference influences from flow measurement error and load torque calculation model deviation.


---

## Body

## 1. Nonlinear Correction of Rotary Valve Load Torque by Feedforward Compensation

### 1.1. The Load Torque of Rotary Valve

The rotary valve, installed in the drill collar above drill bit, is composed of stator and rotor, in which there exist the same numbers of holes and blades [12, 13]. When the rotor rotates relative to the stator, the hole in the rotor is relative to the stator hole. During the movement, a valve hole with a variable flow area is formed, and the upper part of the valve hole produces a change in the pressure of the drilling fluid, which is transmitted to the wellhead in a fluctuating manner, and the voltage pulse formed by the MWD data quickly changes the speed of the rotary valve to modulate the pressure of the drilling fluid which can realize the upload of underground information. The rotary valve rotor is driven by a motor through a reducer [12, 13]. The load torque of the rotor shows a serious nonlinear change with the rotation angle, and the calculation model is(1)MLθ=b+ρQ2a0+a1θ+a2θ2+⋯+amθm,where Q is drilling fluid flow, ρ is drilling fluid density, b is constant term, ai represents polynomial coefficients, m is the number of polynomial terms, and θ is rotation angle.According to the equationnt=1/2π⋅dθ/dt, we assume that the steady speed is ns, so there exists θ=2πnst. Therefore, equation (1) can be transformed to be(2)MLt=b+ρQ2a0+a12πnst+a22πnst2+a32πnst3+⋯+am2πnstm.


### 1.2. Analysis of Load Torque Effect on Rotary Valve Speed

Because the rotary valve rotor is the load of the reducer, when the speed control signal is a step function, there must be a certain time delay in the rotary valve speed following the control signal due to the mechanical inertia of the motor system. The speed can be indicated asnt=ns1−e−t/τr when time constant is τr. According to the equation nt=1/2π⋅dθ/dt, we have θ=∫0t2πntdt=2πnst−τr1−e−t/τr. Therefore, the load torque of the rotary valve transmitted to the reducer is(3)Mrt=e+ρQ2d0+d12πnst−τr1−e−t/τr+d22πns2t−τr1−e−t/τr2+dm2πnsmt−τr1−e−t/τrm.That is, the load torque of the reducer has the same functional structure as the load torque of the rotary valve.According to torque balance equation of electrical motor [13–16], the mathematical model of the speed control of rotary valve can be written as(4)dntdt+Ke2nt4π2rmJ=12πKeU2πrmJkn−MrtJkn2,where U is control voltage of electrical motor, Ke is electrical motor constant, rm is electrical motor internal resistance, J is moment of inertia, and kn is reduction ratio of reducer.In equation (3), KeU/2πrmJkn, control term of electrical motor voltage, and Mrθ/Jkn2, effect term of rotary valve load torque, form control term of rotation angle of rotary valve. It will present nonlinear change because rotary valve load torque Mrθ is nonlinear function if constant voltage control is used in electrical motor control; then rotation angle control system of rotary valve becomes nonlinear.Since the load torque of the reducerMrt is a nonlinear function, the rotating valve speed control system is a nonlinear system accordingly. If the electrical motor is controlled by constant voltage, the speed control of the rotary valve will be tremendously affected by the nonlinearity of the load torque, causing the valve rotor to fail to rotate normally or severely stall.


### 1.3. Open-Loop Speed Control of Rotary Valve Based on Nonlinear Compensation

In order to realize servo control of rotary valve speed, the linearized correction of rotary valve load torque effect using nonlinear compensation will be carried out, aiming to obtain constant control term of rotary valve speed at the right side of equation (4).In equation (4), a new variable V, used as given angular acceleration, is introduced and defined as V=KeU/2πrmJkn−Mrθ/Jkn2. Then, the linear equation of rotational speed becomes [13](5)dntdt+c2nt=V2π.Here,V=c3U−c1Mrt, c1=1/Jkn2, c2=Ke2/4π2raJ, and c3=Ke/2πraJkn.If rotary valve load torqueMrθ approximately corresponds to calculation model of load torque MLθ, in other words, Mf=e and bm=dm, the electrical motor voltage can be derived by replacing Mrt in given angular acceleration V with MLt.(6)U=1c3V+c1c3MLt.Equation (6) illustrates that equation (4) becomes a linear equation when electrical motor voltage varies according to the law MLt.From the Laplace transforms of equations (5) and (6), the control equations of rotation speed and electrical motor voltage can be derived as(7)ns=c3Us−c1Mrs2πs+c2,Us=Vsc3+c1c3MLs.Equation (7) shows that the open-loop control system of rotary valve can be linearized by introducing motor voltage feedforward compensation in electrical motor driving system, and the Laplace transform of rotation speed is derived from it as follows:(8)ns=Vs2πs+c2+c1MLs−Mrs2πs+c2=G1sVs+Rs,where G1s=1/2πs+c2 is open-loop transfer function and Rs=c1MLs−Mrs is interference term of speed control from the difference between load torque in calculation model and that in practice. According to equation (7), the block diagram of open-loop speed control system of rotary valve is sketched in Figure 1.Figure 1
Structure of open-loop control system of rotary valve.Because of the quadratic relation between load torque of rotary valve and drilling fluid flow, rotary valve speed is highly sensitive to flow change. Therefore, the real-time adjustment of motor control voltage by introducing measured flow to calculation model of load torque is used to compensate the speed change caused by influence of flow on practical load torque.Rotary valve and downhole turbine generator under it, tools of measurement while drilling, are installed in the same drill collar. When drilling fluid from rotary valve flows into turbine generator, the rotation speed of turbine generator exhibits an approximate linear dependence on drilling fluid flow [17, 18]. Accordingly, the drilling fluid flow can be derived from voltage frequency of turbine generator.


### 1.4. Analysis of Interference Term in Rotation Speed Control

Due to mechanical inertia, the time delay of rotary valve speed in following the step control signal is unavoidable; thus the interference arising from speed time constant is generally regarded as the inherent one. What is more, the speed control system is also affected by interferences from error of drilling fluid flow measurement and that of load torque calculation model. Consequently, the interference termRs of speed control mainly includes interference R1s arising from speed time constant, combined interference R2s caused by flow measurement error, and combined interference R3s caused by deviation of load torque calculation model.


#### 1.4.1. Interference Caused by Speed Time Constant

Based on the differential characteristic of Laplace transform, the Laplace transform of load torque calculation model is presented byMLs=Lb+ρQ2a0+a12πnst+a22πnst2+a32πnst3+⋯+am2πnstm=b/s+ρQ2a0/s+ρQ2a12πns/s2+a22πns2/s3+a32πns3/s4+⋯+am2πnsm/sm+1 The Laplace transform of practical load torque of rotary valve is written asMrs=Le+ρQ2d0+d12πnst−τr1−e−t/τr+d22πns2t−τr1−e−t/τr2+⋯+dm2πnsmt−τr1−e−t/τrm=e/s+ρQ2d0/s+LρQ2d12πnst−τr1−e−t/τr+d22πns2t−τr1−e−t/τr2+⋯+dm2πnsmt−τr1−e−t/τrmConsidering b=e and am=dm, the interference caused by speed time constant can be given by(9)R1s=c1MLs−Mrs=ρQ2c1a22πns2s3+a32πns3s4+⋯+am2πnsmsm+1−ρQ2c1L−a12πnsτr1−e−t/τr+a22πns2t−τr1−e−t/τr2+⋯+am2πnsmt−τr1−e−t/τrm.


#### 1.4.2. Combined Interference Caused by Speed Time Constant and Fluid Measurement Error

When flow measurement error exists in equationMLt=b+ρQ2a0+a12πnst+a22πnst2+a32πnst3+⋯+am2πnstm, in other words, introducing difference value ΔQ in term MLt, the relative flow measurement error ΔQ/Q will lead to the change of load torque calculation model MLt in form as ΔMLt=2ρQ2ΔQ/Qa0+a12πnst+a22πnst2+a32πnst3+⋯+am2πnstm. Hence, the combined interference caused by speed time constant and flow measurement error is written as(10)R2s=R1s+c1ΔMLs=ρQ2c1a22πns2s3+a32πns3s4+⋯+am2πnsmsm+1+2ρQ2c1ΔQQa0s+a12πnss2+a22πns2s3+a32πns3s4+⋯+am2πnsmsm+1−ρQ2c1L−a12πnsτr1−e−t/τr+a22πns2t−τr1−e−t/τr2+⋯+am2πnsmt−τr1−e−t/τrm.


#### 1.4.3. Combined Interference Caused by Speed Time Constant and Load Torque Calculation Model Error

The difference between load torque calculation model and practical load torque, presented as the difference termsΔb and Δai which are obtained by the term b and the polynomial coefficient ai in equation (2) from corresponding terms in expression of practical load torque, causes the change of MLt as follows when it exists.ΔMLt=Δb+ρQ2Δa0+Δa12πnst+Δa22πnst2+Δa32πnst3+⋯+Δam2πnstm. Then, the combined interference caused by speed time constant and error of load torque calculation model is given by(11)R3s=R1s+c1ΔMLs=ρQ2c1a22πns2s3+a32πns3s4+⋯+am2πnsmsm+1+Δbc1s+ρQ2c1Δa0s+Δa12πnss2+Δa22πns2s3+Δa32πns3s4+⋯+Δam2πnsmsm+1−ρQ2c1L−a12πnsτr1−e−t/τr+a22πns2t−τr1−e−t/τr2+⋯+am2πnsmt−τr1−e−t/τrm.When there exists speed time constant error, flow measurement error, and error of load torque calculation model, the termsΔQ≠0, Δb≠0, and Δai≠0 emerge. As a result, there will be MLs≠Mrs. The term Rs=c1MLs−Mrs will affect the open-loop control of rotation speed.


## 1.1. The Load Torque of Rotary Valve

The rotary valve, installed in the drill collar above drill bit, is composed of stator and rotor, in which there exist the same numbers of holes and blades [12, 13]. When the rotor rotates relative to the stator, the hole in the rotor is relative to the stator hole. During the movement, a valve hole with a variable flow area is formed, and the upper part of the valve hole produces a change in the pressure of the drilling fluid, which is transmitted to the wellhead in a fluctuating manner, and the voltage pulse formed by the MWD data quickly changes the speed of the rotary valve to modulate the pressure of the drilling fluid which can realize the upload of underground information. The rotary valve rotor is driven by a motor through a reducer [12, 13]. The load torque of the rotor shows a serious nonlinear change with the rotation angle, and the calculation model is(1)MLθ=b+ρQ2a0+a1θ+a2θ2+⋯+amθm,where Q is drilling fluid flow, ρ is drilling fluid density, b is constant term, ai represents polynomial coefficients, m is the number of polynomial terms, and θ is rotation angle.According to the equationnt=1/2π⋅dθ/dt, we assume that the steady speed is ns, so there exists θ=2πnst. Therefore, equation (1) can be transformed to be(2)MLt=b+ρQ2a0+a12πnst+a22πnst2+a32πnst3+⋯+am2πnstm.


## 1.2. Analysis of Load Torque Effect on Rotary Valve Speed

Because the rotary valve rotor is the load of the reducer, when the speed control signal is a step function, there must be a certain time delay in the rotary valve speed following the control signal due to the mechanical inertia of the motor system. The speed can be indicated asnt=ns1−e−t/τr when time constant is τr. According to the equation nt=1/2π⋅dθ/dt, we have θ=∫0t2πntdt=2πnst−τr1−e−t/τr. Therefore, the load torque of the rotary valve transmitted to the reducer is(3)Mrt=e+ρQ2d0+d12πnst−τr1−e−t/τr+d22πns2t−τr1−e−t/τr2+dm2πnsmt−τr1−e−t/τrm.That is, the load torque of the reducer has the same functional structure as the load torque of the rotary valve.According to torque balance equation of electrical motor [13–16], the mathematical model of the speed control of rotary valve can be written as(4)dntdt+Ke2nt4π2rmJ=12πKeU2πrmJkn−MrtJkn2,where U is control voltage of electrical motor, Ke is electrical motor constant, rm is electrical motor internal resistance, J is moment of inertia, and kn is reduction ratio of reducer.In equation (3), KeU/2πrmJkn, control term of electrical motor voltage, and Mrθ/Jkn2, effect term of rotary valve load torque, form control term of rotation angle of rotary valve. It will present nonlinear change because rotary valve load torque Mrθ is nonlinear function if constant voltage control is used in electrical motor control; then rotation angle control system of rotary valve becomes nonlinear.Since the load torque of the reducerMrt is a nonlinear function, the rotating valve speed control system is a nonlinear system accordingly. If the electrical motor is controlled by constant voltage, the speed control of the rotary valve will be tremendously affected by the nonlinearity of the load torque, causing the valve rotor to fail to rotate normally or severely stall.


## 1.3. Open-Loop Speed Control of Rotary Valve Based on Nonlinear Compensation

In order to realize servo control of rotary valve speed, the linearized correction of rotary valve load torque effect using nonlinear compensation will be carried out, aiming to obtain constant control term of rotary valve speed at the right side of equation (4).In equation (4), a new variable V, used as given angular acceleration, is introduced and defined as V=KeU/2πrmJkn−Mrθ/Jkn2. Then, the linear equation of rotational speed becomes [13](5)dntdt+c2nt=V2π.Here,V=c3U−c1Mrt, c1=1/Jkn2, c2=Ke2/4π2raJ, and c3=Ke/2πraJkn.If rotary valve load torqueMrθ approximately corresponds to calculation model of load torque MLθ, in other words, Mf=e and bm=dm, the electrical motor voltage can be derived by replacing Mrt in given angular acceleration V with MLt.(6)U=1c3V+c1c3MLt.Equation (6) illustrates that equation (4) becomes a linear equation when electrical motor voltage varies according to the law MLt.From the Laplace transforms of equations (5) and (6), the control equations of rotation speed and electrical motor voltage can be derived as(7)ns=c3Us−c1Mrs2πs+c2,Us=Vsc3+c1c3MLs.Equation (7) shows that the open-loop control system of rotary valve can be linearized by introducing motor voltage feedforward compensation in electrical motor driving system, and the Laplace transform of rotation speed is derived from it as follows:(8)ns=Vs2πs+c2+c1MLs−Mrs2πs+c2=G1sVs+Rs,where G1s=1/2πs+c2 is open-loop transfer function and Rs=c1MLs−Mrs is interference term of speed control from the difference between load torque in calculation model and that in practice. According to equation (7), the block diagram of open-loop speed control system of rotary valve is sketched in Figure 1.Figure 1
Structure of open-loop control system of rotary valve.Because of the quadratic relation between load torque of rotary valve and drilling fluid flow, rotary valve speed is highly sensitive to flow change. Therefore, the real-time adjustment of motor control voltage by introducing measured flow to calculation model of load torque is used to compensate the speed change caused by influence of flow on practical load torque.Rotary valve and downhole turbine generator under it, tools of measurement while drilling, are installed in the same drill collar. When drilling fluid from rotary valve flows into turbine generator, the rotation speed of turbine generator exhibits an approximate linear dependence on drilling fluid flow [17, 18]. Accordingly, the drilling fluid flow can be derived from voltage frequency of turbine generator.


## 1.4. Analysis of Interference Term in Rotation Speed Control

Due to mechanical inertia, the time delay of rotary valve speed in following the step control signal is unavoidable; thus the interference arising from speed time constant is generally regarded as the inherent one. What is more, the speed control system is also affected by interferences from error of drilling fluid flow measurement and that of load torque calculation model. Consequently, the interference termRs of speed control mainly includes interference R1s arising from speed time constant, combined interference R2s caused by flow measurement error, and combined interference R3s caused by deviation of load torque calculation model.


### 1.4.1. Interference Caused by Speed Time Constant

Based on the differential characteristic of Laplace transform, the Laplace transform of load torque calculation model is presented byMLs=Lb+ρQ2a0+a12πnst+a22πnst2+a32πnst3+⋯+am2πnstm=b/s+ρQ2a0/s+ρQ2a12πns/s2+a22πns2/s3+a32πns3/s4+⋯+am2πnsm/sm+1 The Laplace transform of practical load torque of rotary valve is written asMrs=Le+ρQ2d0+d12πnst−τr1−e−t/τr+d22πns2t−τr1−e−t/τr2+⋯+dm2πnsmt−τr1−e−t/τrm=e/s+ρQ2d0/s+LρQ2d12πnst−τr1−e−t/τr+d22πns2t−τr1−e−t/τr2+⋯+dm2πnsmt−τr1−e−t/τrmConsidering b=e and am=dm, the interference caused by speed time constant can be given by(9)R1s=c1MLs−Mrs=ρQ2c1a22πns2s3+a32πns3s4+⋯+am2πnsmsm+1−ρQ2c1L−a12πnsτr1−e−t/τr+a22πns2t−τr1−e−t/τr2+⋯+am2πnsmt−τr1−e−t/τrm.


### 1.4.2. Combined Interference Caused by Speed Time Constant and Fluid Measurement Error

When flow measurement error exists in equationMLt=b+ρQ2a0+a12πnst+a22πnst2+a32πnst3+⋯+am2πnstm, in other words, introducing difference value ΔQ in term MLt, the relative flow measurement error ΔQ/Q will lead to the change of load torque calculation model MLt in form as ΔMLt=2ρQ2ΔQ/Qa0+a12πnst+a22πnst2+a32πnst3+⋯+am2πnstm. Hence, the combined interference caused by speed time constant and flow measurement error is written as(10)R2s=R1s+c1ΔMLs=ρQ2c1a22πns2s3+a32πns3s4+⋯+am2πnsmsm+1+2ρQ2c1ΔQQa0s+a12πnss2+a22πns2s3+a32πns3s4+⋯+am2πnsmsm+1−ρQ2c1L−a12πnsτr1−e−t/τr+a22πns2t−τr1−e−t/τr2+⋯+am2πnsmt−τr1−e−t/τrm.


### 1.4.3. Combined Interference Caused by Speed Time Constant and Load Torque Calculation Model Error

The difference between load torque calculation model and practical load torque, presented as the difference termsΔb and Δai which are obtained by the term b and the polynomial coefficient ai in equation (2) from corresponding terms in expression of practical load torque, causes the change of MLt as follows when it exists.ΔMLt=Δb+ρQ2Δa0+Δa12πnst+Δa22πnst2+Δa32πnst3+⋯+Δam2πnstm. Then, the combined interference caused by speed time constant and error of load torque calculation model is given by(11)R3s=R1s+c1ΔMLs=ρQ2c1a22πns2s3+a32πns3s4+⋯+am2πnsmsm+1+Δbc1s+ρQ2c1Δa0s+Δa12πnss2+Δa22πns2s3+Δa32πns3s4+⋯+Δam2πnsmsm+1−ρQ2c1L−a12πnsτr1−e−t/τr+a22πns2t−τr1−e−t/τr2+⋯+am2πnsmt−τr1−e−t/τrm.When there exists speed time constant error, flow measurement error, and error of load torque calculation model, the termsΔQ≠0, Δb≠0, and Δai≠0 emerge. As a result, there will be MLs≠Mrs. The term Rs=c1MLs−Mrs will affect the open-loop control of rotation speed.


## 1.4.1. Interference Caused by Speed Time Constant

Based on the differential characteristic of Laplace transform, the Laplace transform of load torque calculation model is presented byMLs=Lb+ρQ2a0+a12πnst+a22πnst2+a32πnst3+⋯+am2πnstm=b/s+ρQ2a0/s+ρQ2a12πns/s2+a22πns2/s3+a32πns3/s4+⋯+am2πnsm/sm+1 The Laplace transform of practical load torque of rotary valve is written asMrs=Le+ρQ2d0+d12πnst−τr1−e−t/τr+d22πns2t−τr1−e−t/τr2+⋯+dm2πnsmt−τr1−e−t/τrm=e/s+ρQ2d0/s+LρQ2d12πnst−τr1−e−t/τr+d22πns2t−τr1−e−t/τr2+⋯+dm2πnsmt−τr1−e−t/τrmConsidering b=e and am=dm, the interference caused by speed time constant can be given by(9)R1s=c1MLs−Mrs=ρQ2c1a22πns2s3+a32πns3s4+⋯+am2πnsmsm+1−ρQ2c1L−a12πnsτr1−e−t/τr+a22πns2t−τr1−e−t/τr2+⋯+am2πnsmt−τr1−e−t/τrm.


## 1.4.2. Combined Interference Caused by Speed Time Constant and Fluid Measurement Error

When flow measurement error exists in equationMLt=b+ρQ2a0+a12πnst+a22πnst2+a32πnst3+⋯+am2πnstm, in other words, introducing difference value ΔQ in term MLt, the relative flow measurement error ΔQ/Q will lead to the change of load torque calculation model MLt in form as ΔMLt=2ρQ2ΔQ/Qa0+a12πnst+a22πnst2+a32πnst3+⋯+am2πnstm. Hence, the combined interference caused by speed time constant and flow measurement error is written as(10)R2s=R1s+c1ΔMLs=ρQ2c1a22πns2s3+a32πns3s4+⋯+am2πnsmsm+1+2ρQ2c1ΔQQa0s+a12πnss2+a22πns2s3+a32πns3s4+⋯+am2πnsmsm+1−ρQ2c1L−a12πnsτr1−e−t/τr+a22πns2t−τr1−e−t/τr2+⋯+am2πnsmt−τr1−e−t/τrm.


## 1.4.3. Combined Interference Caused by Speed Time Constant and Load Torque Calculation Model Error

The difference between load torque calculation model and practical load torque, presented as the difference termsΔb and Δai which are obtained by the term b and the polynomial coefficient ai in equation (2) from corresponding terms in expression of practical load torque, causes the change of MLt as follows when it exists.ΔMLt=Δb+ρQ2Δa0+Δa12πnst+Δa22πnst2+Δa32πnst3+⋯+Δam2πnstm. Then, the combined interference caused by speed time constant and error of load torque calculation model is given by(11)R3s=R1s+c1ΔMLs=ρQ2c1a22πns2s3+a32πns3s4+⋯+am2πnsmsm+1+Δbc1s+ρQ2c1Δa0s+Δa12πnss2+Δa22πns2s3+Δa32πns3s4+⋯+Δam2πnsmsm+1−ρQ2c1L−a12πnsτr1−e−t/τr+a22πns2t−τr1−e−t/τr2+⋯+am2πnsmt−τr1−e−t/τrm.When there exists speed time constant error, flow measurement error, and error of load torque calculation model, the termsΔQ≠0, Δb≠0, and Δai≠0 emerge. As a result, there will be MLs≠Mrs. The term Rs=c1MLs−Mrs will affect the open-loop control of rotation speed.


## 2. Closed-Loop PID Control of Rotary Valve Speed

### 2.1. Control Model

To make sure the rotary valve speed can track the change of phase-modulated pulse and suppress the interference strongly, the closed-loop PID control system, generated by rotation speed feedback of linearized open-loop speed control system, is introduced, and PID controller is added in forward channel ofVs serially to realize the real-time adjustment and to enable the rotary valve speed reach the set value quickly and suppress the interference [19, 20], as the block diagram shows in Figure 2 [13].Figure 2
The structure of closed-loop PID control system of rotary valve.Based on Figure2, the control equation can be given by(12)n^s=Es+ns,Es=VsGPIDs,ns=G1sVs+Rs,where n^s is the Laplace transform of speed control signal, GPIDs=Kp+Ki/s+Kds is the transfer function of PID controller, Kp is the proportional control factor, Ki is the integral control factor, and Kd is the derivative control factor [21].By rearrangement of equation (12), the Laplace transform of rotary valve speed can be obtained as follows:(13)ns=Gsn^s+RsGPIDs,where Gs=G1sGPIDs/1+G1sGPIDs is the transfer function of closed-loop control system of speed.Then, by residue calculation or inverse Laplace transform, the time response of rotary valve speed is given by(14)nt=12πj∫σ−jωσ+jωGsn^s+RsGPIDsestds.


### 2.2. Value Determination Rule of PID Parameters

The PID parameters of closed-loop control,Ki, Kp, and Kd, have great influence on control effect and are generally determined by experience and test blindly [22]. The prime goal of rotary valve speed control is the quick following of control voltage pulse in conditions of large flow. To realize this, through speed response analysis of rotary valve when acted by step signal and without considering the interference caused by flow measurement error and load torque calculation model deviation, the PID parameter values determination rule based on transient component attenuating control is created.According to equation (13), the rotation speed control signal is step signal and satisfies n^t=kUt, where Ut=0t<01t≥0 is unit step function and k is amplitude of step signal. When only the interference R1s caused by rotation speed time constant exists, the Laplace transform of rotary valve speed is(15)ns=Gsn^s+R1sGPIDs=Kds2+Kps+KiKd+2πs−s1s−s2ks+sR1sKds2+Kps+Ki=kKd+2π⋅Kds2+Kps+Kis−s1s−s2s+1Kd+2π⋅sR1ss−s1s−s2=n1s+n2s,where s1=−Kp+2πc2−Kp+2πc22−4KiKd+2π/2Kd+2πs2=−Kp+2πc2+Kp+2πc22−4KiKd+2π/2Kd+2π, n1s=k/Kd+2π⋅Kds2+Kps+Ki/s−s1s−s2s is rotation speed without interference, and n2s=k/Kd+2π⋅sR1s/s−s1s−s2 is rotation speed change component caused by interference R1s.The rotation speed in time domain form can be obtained by calculating the inverse Laplace transform of equation (15) with residues method as follows:(16)nt=L−1kKd+2π⋅Kds2+Kps+Kis−s1s−s2s+L−11Kd+2π⋅sR1ss−s1s−s2=n1t+n2t,where n1t=n^Kds12+Kps1+Ki/s1e−t/τ1−Kds22+Kps2+Ki/s2e−t/τ1/Kp+2πc22−4Ki2π+Kd+kn2t=L−11/Kd+2π⋅sR1s/s−s1s−s2, s1=−1/τ1, s2=−1/τ2, and τ1=2Kd+2π/Kp+2πc2−Kp+2πc22−4KiKd+2πτ2=2Kd+2π/Kp+2πc2+Kp+2πc22−4KiKd+2π is time constant of transient component.It can be seen thatn1t is comprised of steady component k and transient component n^Kds12+Kps1+Ki/s1e−t/τ1−Kds22+Kps2+Ki/s2e−t/τ1/Kp+2πc22−4Ki2π+Kd and n2t is comprised of transient components formed by e−t/τ1, e−t/τ2, e−t/τr, and e−2t/τr. According to further mathematical analysis, when τ1 approximately equals τ2 as small as possible, n2t tends to be zero as soon as possible and the transient component of n1t does the same at the same time. Therefore, the rotation speed reaches the steady speed ns=k.We suppose thatτ1−τ2/τ1=Δ≪1; then there is τ2=τ11−Δ. To make τ1=2Kd+2π/Kp+2πc2−Kp+2πc22−4KiKd+2π as small as possible, the condition Kp+2πc2≫Kp+2πc22−4KiKd+2π is needed. By further mathematical calculation and established constraints, the value determination rule of Ki, Kp, and Kd is presented by τ1 and Δ as follows:(17)Ki≥2π1−Δτ12,Kp=Kiτ12−Δ1−Δ−2πc2,Kd=Kp+2πc2τ1−Kiτ12−2π.Ifc2 is known, the consuming time of rotation speed becomes steady and can be extremely reduced by determining PID parameter values with predetermined values of τ1 and Δ.


## 2.1. Control Model

To make sure the rotary valve speed can track the change of phase-modulated pulse and suppress the interference strongly, the closed-loop PID control system, generated by rotation speed feedback of linearized open-loop speed control system, is introduced, and PID controller is added in forward channel ofVs serially to realize the real-time adjustment and to enable the rotary valve speed reach the set value quickly and suppress the interference [19, 20], as the block diagram shows in Figure 2 [13].Figure 2
The structure of closed-loop PID control system of rotary valve.Based on Figure2, the control equation can be given by(12)n^s=Es+ns,Es=VsGPIDs,ns=G1sVs+Rs,where n^s is the Laplace transform of speed control signal, GPIDs=Kp+Ki/s+Kds is the transfer function of PID controller, Kp is the proportional control factor, Ki is the integral control factor, and Kd is the derivative control factor [21].By rearrangement of equation (12), the Laplace transform of rotary valve speed can be obtained as follows:(13)ns=Gsn^s+RsGPIDs,where Gs=G1sGPIDs/1+G1sGPIDs is the transfer function of closed-loop control system of speed.Then, by residue calculation or inverse Laplace transform, the time response of rotary valve speed is given by(14)nt=12πj∫σ−jωσ+jωGsn^s+RsGPIDsestds.


## 2.2. Value Determination Rule of PID Parameters

The PID parameters of closed-loop control,Ki, Kp, and Kd, have great influence on control effect and are generally determined by experience and test blindly [22]. The prime goal of rotary valve speed control is the quick following of control voltage pulse in conditions of large flow. To realize this, through speed response analysis of rotary valve when acted by step signal and without considering the interference caused by flow measurement error and load torque calculation model deviation, the PID parameter values determination rule based on transient component attenuating control is created.According to equation (13), the rotation speed control signal is step signal and satisfies n^t=kUt, where Ut=0t<01t≥0 is unit step function and k is amplitude of step signal. When only the interference R1s caused by rotation speed time constant exists, the Laplace transform of rotary valve speed is(15)ns=Gsn^s+R1sGPIDs=Kds2+Kps+KiKd+2πs−s1s−s2ks+sR1sKds2+Kps+Ki=kKd+2π⋅Kds2+Kps+Kis−s1s−s2s+1Kd+2π⋅sR1ss−s1s−s2=n1s+n2s,where s1=−Kp+2πc2−Kp+2πc22−4KiKd+2π/2Kd+2πs2=−Kp+2πc2+Kp+2πc22−4KiKd+2π/2Kd+2π, n1s=k/Kd+2π⋅Kds2+Kps+Ki/s−s1s−s2s is rotation speed without interference, and n2s=k/Kd+2π⋅sR1s/s−s1s−s2 is rotation speed change component caused by interference R1s.The rotation speed in time domain form can be obtained by calculating the inverse Laplace transform of equation (15) with residues method as follows:(16)nt=L−1kKd+2π⋅Kds2+Kps+Kis−s1s−s2s+L−11Kd+2π⋅sR1ss−s1s−s2=n1t+n2t,where n1t=n^Kds12+Kps1+Ki/s1e−t/τ1−Kds22+Kps2+Ki/s2e−t/τ1/Kp+2πc22−4Ki2π+Kd+kn2t=L−11/Kd+2π⋅sR1s/s−s1s−s2, s1=−1/τ1, s2=−1/τ2, and τ1=2Kd+2π/Kp+2πc2−Kp+2πc22−4KiKd+2πτ2=2Kd+2π/Kp+2πc2+Kp+2πc22−4KiKd+2π is time constant of transient component.It can be seen thatn1t is comprised of steady component k and transient component n^Kds12+Kps1+Ki/s1e−t/τ1−Kds22+Kps2+Ki/s2e−t/τ1/Kp+2πc22−4Ki2π+Kd and n2t is comprised of transient components formed by e−t/τ1, e−t/τ2, e−t/τr, and e−2t/τr. According to further mathematical analysis, when τ1 approximately equals τ2 as small as possible, n2t tends to be zero as soon as possible and the transient component of n1t does the same at the same time. Therefore, the rotation speed reaches the steady speed ns=k.We suppose thatτ1−τ2/τ1=Δ≪1; then there is τ2=τ11−Δ. To make τ1=2Kd+2π/Kp+2πc2−Kp+2πc22−4KiKd+2π as small as possible, the condition Kp+2πc2≫Kp+2πc22−4KiKd+2π is needed. By further mathematical calculation and established constraints, the value determination rule of Ki, Kp, and Kd is presented by τ1 and Δ as follows:(17)Ki≥2π1−Δτ12,Kp=Kiτ12−Δ1−Δ−2πc2,Kd=Kp+2πc2τ1−Kiτ12−2π.Ifc2 is known, the consuming time of rotation speed becomes steady and can be extremely reduced by determining PID parameter values with predetermined values of τ1 and Δ.


## 3. Calculation and Simulation Analysis

In theoretical calculation, the rotation speed response can be obtained by residue method based on equation (13), and PID parameter values are determined by rules in equation (17). The closed-loop PID control simulation of rotary valve speed is carried out by the Simulink module in MATLAB. Calculation and simulation parameter values are listed below: τ1=1ms, Δ=0.01, proportional factor Kp=16928, integral factor Ki=107, derivative factor Kd=3.82, speed time constant τr=1ms, motor constant Ke=0.83V⋅s, internal resistance of motor rm=0.36Ω, moment of inertia J=0.96×10−4kg⋅m2, reduction ratio of reducer kn=10, drilling fluid flow Q=20L/s, and drilling fluid density ρ=1100Kg/m3. Values from calculation are c1=104, c2=505s−1, and c3=382. The rotation speed control function is step signal n^=5Utr⋅s−1, which produces drilling fluid carrier wave with frequency of 20 Hz and period of 50 ms.


### 3.1. The Variation Law of Load Torque of Rotary Valve

According to equation (2), under the influence of the drilling fluid flow and its density, a plot of the load torque versus the time at Q = 20 L/s is shown in Figure 3. It can be seen that the load torque curve shows a serious nonlinear change. Since the load torque is related to the square of the drilling fluid flow rate, whose change will cause a large fluctuation of the load torque, if the nonlinear correction of the speed system and the closed-loop control of the speed are not performed, the disturbances such as the nonlinearity of the rotary valve load torque, the flow measurement error, and the deviation of model calculation will have a very serious impact on the speed control of the rotary valve.Figure 3
Load torque of rotary valve as function of time.


### 3.2. Response Analysis on Speed Track of Step Input

When only influence of rotation speed time constant exists, the step response of rotary valve speed reflects the track characteristic of speed and to what extent it can be controlled, and thenRs in equation (13) equals R1s. The theoretical calculation and simulation curves under step signal input are shown in Figure 4, from which it can be seen that theoretical calculation of step response is approximately consistent with its Simulink simulation and the correctness of theoretical analysis and mathematical modeling of rotary valve speed control are illustrated. Moreover, from simulation results, the rise time of rotation speed tracking step signal is less than 1 ms and the overshoot of speed is less than 1% of steady speed value. It is illustrated that the rotary valve speed can steadily track the change of step signal and gets stable fast when affected by inherent interference and the determination rule of PID parameter values is reasonable. The rise time of rotation speed from the above simulation is less than 2% of carrier wave period. In such a case, the distortion factor of differential phase shift keying (DPSK) pressure is 1.1% and that of the quadrature phase shift keying (QPSK) pressure is 8.6%, having little influence on signal quality, as theoretical calculation shows.Figure 4
The step response of rotary valve speed.


### 3.3. Simulation Analysis on Influence of Interference on Rotation Speed

The simulation curve of rotary valve speed affected by flow measurement error is shown in Figure5, from which it can be seen that flow measurement error has little influence on steady speed. When the relative error of flow measurement is 50%, the relative steady speed change is only 6% and it will be much smaller because the error is usually less than 10%. Therefore, the closed-loop control system of speed can suppress the interference effectively. The interference R3s will be introduced if the error between load torque of calculation model and load torque in practice appears; Figure 6 is the simulation curve of the step input response of the rotary valve speed when the load torque calculation model of the rotary valve has deviations Δb and Δai. It is illustrated in Figure 6 that the obvious deviation of load torque calculation model has little influence on speed control and the closed-loop control system of rotation speed has a certain fault-tolerant ability in load torque calculation model of rotary valve.Figure 5
Influence of drilling fluid flow error on speed control of rotary valve.Figure 6
Influence of load torque calculation model deviation on speed control of rotary valve.Through theoretical calculation, the rise time of rotation speed value will be 3.2% of carrier wave period if signal distortion of drilling fluid QPSK is 10%. The above control performance (the rise time of speed is 1 ms) can modulate pressure carrier wave with frequency of 40 Hz in QPSK mode for high transmission efficiency and to implement data transmission rate of 20 bps.


## 3.1. The Variation Law of Load Torque of Rotary Valve

According to equation (2), under the influence of the drilling fluid flow and its density, a plot of the load torque versus the time at Q = 20 L/s is shown in Figure 3. It can be seen that the load torque curve shows a serious nonlinear change. Since the load torque is related to the square of the drilling fluid flow rate, whose change will cause a large fluctuation of the load torque, if the nonlinear correction of the speed system and the closed-loop control of the speed are not performed, the disturbances such as the nonlinearity of the rotary valve load torque, the flow measurement error, and the deviation of model calculation will have a very serious impact on the speed control of the rotary valve.Figure 3
Load torque of rotary valve as function of time.


## 3.2. Response Analysis on Speed Track of Step Input

When only influence of rotation speed time constant exists, the step response of rotary valve speed reflects the track characteristic of speed and to what extent it can be controlled, and thenRs in equation (13) equals R1s. The theoretical calculation and simulation curves under step signal input are shown in Figure 4, from which it can be seen that theoretical calculation of step response is approximately consistent with its Simulink simulation and the correctness of theoretical analysis and mathematical modeling of rotary valve speed control are illustrated. Moreover, from simulation results, the rise time of rotation speed tracking step signal is less than 1 ms and the overshoot of speed is less than 1% of steady speed value. It is illustrated that the rotary valve speed can steadily track the change of step signal and gets stable fast when affected by inherent interference and the determination rule of PID parameter values is reasonable. The rise time of rotation speed from the above simulation is less than 2% of carrier wave period. In such a case, the distortion factor of differential phase shift keying (DPSK) pressure is 1.1% and that of the quadrature phase shift keying (QPSK) pressure is 8.6%, having little influence on signal quality, as theoretical calculation shows.Figure 4
The step response of rotary valve speed.


## 3.3. Simulation Analysis on Influence of Interference on Rotation Speed

The simulation curve of rotary valve speed affected by flow measurement error is shown in Figure5, from which it can be seen that flow measurement error has little influence on steady speed. When the relative error of flow measurement is 50%, the relative steady speed change is only 6% and it will be much smaller because the error is usually less than 10%. Therefore, the closed-loop control system of speed can suppress the interference effectively. The interference R3s will be introduced if the error between load torque of calculation model and load torque in practice appears; Figure 6 is the simulation curve of the step input response of the rotary valve speed when the load torque calculation model of the rotary valve has deviations Δb and Δai. It is illustrated in Figure 6 that the obvious deviation of load torque calculation model has little influence on speed control and the closed-loop control system of rotation speed has a certain fault-tolerant ability in load torque calculation model of rotary valve.Figure 5
Influence of drilling fluid flow error on speed control of rotary valve.Figure 6
Influence of load torque calculation model deviation on speed control of rotary valve.Through theoretical calculation, the rise time of rotation speed value will be 3.2% of carrier wave period if signal distortion of drilling fluid QPSK is 10%. The above control performance (the rise time of speed is 1 ms) can modulate pressure carrier wave with frequency of 40 Hz in QPSK mode for high transmission efficiency and to implement data transmission rate of 20 bps.


## 4. Conclusions

The nonlinear characteristics of the load torque of the rotary valve seriously affect the speed control of the rotary valve. The feedforward of the calculation model of the rotary valve load torque acts on the speed system, so that the motor voltage changes according to the law of the load torque calculation model, which can realize the linearization of the speed system to make the motor speed easy to control.Considering the serious impact of flow changes on load torque, the flow measurement value is introduced into the rotary valve load torque calculation model, and the flow measurement value is used to track the change of the load torque of the rotary valve with the flow rate, so as to suppress the influence of the large change in the flow rate on the open-loop control of the rotary valve speed.The closed-loop PID control of the rotary valve speed has a strong inhibitory effect on the influence of the flow measurement deviation and the deviation of the rotary valve load torque calculation model. In addition, based on the rapid decay control of the rotary valve speed step response transient component, the PID parameter value rule is established, which is beneficial to speed up the tracking speed of the rotary valve speed following the control voltage pulse and to reduce the distortion of the drilling fluid pressure PSK signal. Therefore, both the frequency of drilling fluid pressure carrier and the transmission rate of downhole information are improved.



---

*Source: 5565672-2021-04-07.xml*