# An Energy-Efficient Integration of a Digital Modulator and a Class-D Amplifier
## 5 Experimental Setup and Results  
### Simulation  
The PSK modulator using the PWM and a band-pass filter, as shown in the lower part of Figure 4, has been simulated with the help of Matlab. The coder simply converts bits into a symmetrical normalized voltage signal (\(\pm 1\) V). The output band-pass filter is tuned to the carrier frequency of the PW-modulator. Figure 7 shows the input signal, the carrier, and the modulated PSK signal at the filter output. Figure 8 shows the power spectrum at the input of the band-pass filter. For the simulations, the following numbers have been used: (\(\pm 1.5\) V) sawtooth carrier signal, \(f_{c}=19.8\) kHz; bit duration time, \(T_{s}=0.5\) ms. The length of the simulation was 1000 bits, randomly generated. Only five bits are shown below, for the sake of clarity, but the whole simulation provided correct results.  
Figure 5: Architecture of coder and PW-modulator blocks [16].  
Figure 6: Integrated PSK modulator/amplifier (functional diagram).  
Figure 7: Input signal, carrier, and modulated PSK signal at the filter output of Figure 4.  
Figure 8 shows the normalized spectrum of the modulated signal at the output of the band-pass filter of the lower part of Figure 4. A MATLAB built-in PSK demodulator (\"pmdemod\") has been used to verify that the modulation process was correct. Figure 9 shows the same five bits shown in Figures 7 and 8 after using \"pmdemod\".  
To be doubly sure of the validity of the concept, the circuit in the lower part of Figure 4 has been designed and simulated also with the help of SIMULINK, as shown in Figure 10. A binary input signal with the bit duration time \(T_{s}=0.5\) ms is applied to the input of the unipolar-to-bipolar block that converts it into a symmetrical normalized voltage signal (\(\pm 1\) V). This signal is compared to the sawtooth carrier frequency \(f_{c}=19.8\) kHz to obtain a PW-modulated signal. The signal is then converted into bipolar and a gain of 30 is provided to represent the amplification through the power stage as per the functionality of the class-D amplifier. The band-pass filter tuned to the carrier frequency of the PW-modulator output blocks undesired frequency components and provides a PSK-modulated output. A scope and spectrum analyzer are used to measure the output in time and frequency domains.  
Figure 8: Normalized spectrum of the modulated signal at the filter output of Figure 4.  
Figure 9: Demodulated signal, to verify the whole process.  
Figure 11 shows the results obtained from the Simulink model in the time domain using the scope. In this figure, the binary input signal has been shown with a red color in the top part of the figure. In the same figure, the sawtooth waveform that acts as a carrier signal has been shown with a green color. The middle part of the figure is the PW-modulated signal that has been converted to a bipolar signal and is shown in blue at channel 2 of the scope. Finally, the amplified and filtered PSK-modulated output received from the band-pass filter has been shown with a purple color in the bottom part of the figure.  
Figure 12 shows the overall power spectrum of the proposed model. As is evident, the fundamental frequency component of the system will have maximum amplitude; it can be observed that at 19.8 kHz, the third and fifth harmonics are visible at around 59 and 99 kHz, respectively. A band-pass filter tuned at the carrier frequency has been used to eliminate unwanted frequency components and to obtain a binary phase-shift keying (BPSK)-modulated output.  
Figure 11: Simulation results of proposed model.  
Figure 10: Proposed Simulink model.