[Objective] As automated drilling technologies become more prevalent, the demand for data communication while drilling has significantly risen, leading to increased requirements for downhole data communication systems. Currently, pressure wave data communication, which utilizes mud as the transmission medium, is the leading technology in these systems. The core component of these systems is the mud pressure wave generator (MPWG), which produces pressure wave signals with specific phases by adjusting the flow area of the mud through the operation of a rotary valve. Therefore, phase modulation of pressure wave signals and the control method of the rotary valve are critical technologies for the MPWG. Unlike conventional phase modulation methods, the phase of the pressure wave signal cannot change abruptly. Additionally, the drilling mud scours the rotary valve, introducing torque disturbances that make it challenging for the valve to accurately reach the desired position, ultimately reducing the quality of the pressure wave signal. [Methods] To tackle the issues of phase modulation of pressure wave signals and rotary valve position control, this paper proposes a lower sideband constant envelope smooth phase modulation method for pressure signals. Under the condition of maintaining a constant pressure wave amplitude, we introduce a parameter called the adjustable symbol transition time ratio (ASTTR) to achieve smooth phase modulation, along with a lower-sideband modulation method designed to reduce power consumption. Following this, a rotary valve position control system for the MPWG is designed. The speed and position controllers are designed using the active disturbance rejection control algorithm to ensure accurate tracking of the rotary valve position setpoint, even in the presence of external disturbance torques. Finally, a testing device is developed that integrates torque loading, parameter tuning, and data management functions to validate the proposed methods. This device allows for teaching experiments and testing of the MPWG to be conducted without the need for hydraulic circulation. [Results] Two experiments were conducted using the testing device. In Experiment 1, the valve control performance was evaluated under constant and fluctuating torque disturbances. The transmitted symbols of the MPWG are {0, 1, 0, 0, 1, 1}, the symbol period is 0.333 s, and the carrier frequency is 18π rad/s. When the ASTTR is set to 1, the position control errors under constant and fluctuating torque disturbances are 0.039 rad and 0.040 rad, respectively. When the ASTTR is set to 0.5, the position control errors are 0.059 rad and 0.058 rad under constant and fluctuating torque disturbances, respectively. The test results indicated that smooth phase modulation was successfully achieved. Moreover, a larger ASTTR, which facilitates smoother changes in the position setpoint, corresponds to smaller position tracking errors. Additionally, the tracking errors for the same position setpoint under different torque disturbances are similar, indicating that the control system performs effectively in the presence of torque disturbances. In Experiment 2, the power consumption of conventional double-sideband modulation is compared to that of the proposed lower-sideband modulation. The average power consumption for double-sideband modulation was 35.2 W, whereas the average power consumption for the proposed method is 32.6 W, demonstrating a 7.4% reduction in power consumption. [Conclusions] The experimental results demonstrate that the proposed method effectively achieves smooth phase modulation of pressure wave signals and disturbance rejection control of the rotary valve. Furthermore, the proposed method and experimental device exhibit multidisciplinary integration characteristics, enhancing students' ability to address real-world complex engineering problems. [ABSTRACT FROM AUTHOR]