Home > mini projects > PULSE WIDTH MODULATION AND DEMODULATION

PULSE WIDTH MODULATION AND DEMODULATION

ABSTRACT

This document gives an overview of how pulse width modulation and demodulation can be performed using bipolar junction transistors and operational amplifiers. The simulation for the same was carried out using ngspice. The results obtained have been presented at the end of this document.

INTRODUCTION

Pulse Width Modulation is a modulation process or technique used in most communication systems for encoding the amplitude of a signal right into a pulse width or duration of another signal (carrier signal) for transmission. It is actually used for controlling the amplitude of digital signals in order to control devices and applications requiring power or electricity.

Modulation can be performed using the following figure. The operational amplifier is used as a comparator with the input signal i(t) given to its non-inverting terminal and the triangular signal r(t) given to its inverting terminal.

When the input signal is higher than the triangular signal, we get logic level „1‟.

When input signal is lower than the triangular signal, we get logic level „0‟.

Increase in duty cycle increases the power delivered. This leads to better efficiency of the signal.

Figure 1: Circuit for Modulation


Thus, pulses are formed with the frequencies of both, the input signal and the modulated signal, being the same. The on-off behavior of the signal A simple emitter follower Q1 serves as the PWM's output stage. This transistor is driven into one of two states: fully ON or fully OFF. And therein lies the virtue of the PWM. In either of these states, the

transistor power is low. The power of Q1 can be calculate by

PQ1 = VCE x ILOAD

Q1

Q1 power

state

Full ON

PQ1 = VCE (LO) x

ILOAD (HI) = LO Power

Full OFF

PQ1 = VCE (HI) x

ILOAD (LO) = LO Power

On comparing the power dissipation with linear output stage, we observe that the equation PQ2 = VCE x ILOAD gives us a value that is more than PQ1.

Demodulation can be performed by implementing the circuit shown in Figure 2. PWM can be demodulated by converting it to PAM and sending it through low pass filter. Input PWM is applied to a ramp generator and a synchronous pulse generator. The synchronous pulse generator will generate a pulse waveform such that the pulse will end at the beginning of each PWM pulse and the ramp generator will produce a ramp signal whose amplitude is proportional to the width of the PWM signal. On adding these two, we clip the waveform at a particular level, thus giving the PAM signal. This is then passed through the low pass filter to obtain the original input signal.

Figure 2: Circuit for Demodulation

NGSPICE CODES

Subcircuit of op-amp

*op amp*

.subckt subopamp 1 2 6

r1 1 2 1meg

r2 3 4 1k

c1 4 0 1.5u

e1 3 0 2 1 100k

e2 5 0 4 0 1

r3 5 6 100

.ends opamp

Subcircuit of PWM

.subckt subpwm 1 2 3

Rsin 1 0 1K

Rtri 2 0 1MEG

Bpwm 3 0 V = PWL( V(1,2), -10m,0, -1m,0, 1m,5, 10m,5 )

Rpwm 3 0 1MEG

.ends subpwm

Modulation

*PWM*

VIN 1 0 sin(5V 4V 500HZ)

RIN 1 0 1K

VTRI 2 0 pulse(0V 10V 0 49US 49US 1US 100US)

RTRI 2 0 1MEG

ECOMP 3 0 table {V(1,2)} = (-1MV,0V) (1MV,10V)

RCOMP 3 0 1MEG

.model bjt npn

VCC 10 0 DC 10V

Q1 10 3 11 bjt

RL1 11 0 20

.model bjt npn

Q2 10 1 12 bjt

RL2 12 0 20

.control

tran 5US 2000US

run

set color0=white

set color1=black

plot V(1) V(2)

plot V(3)

.endc

.end

Figure 3: Input to Modulator

Figure 4: Modulated Output

Demodulation

pwm demodulation

.include subpwm.cir

x1 1 2 3 subpwm

Vsin 1 0 SIN(0.5 1 200K)

Vtri 2 0 PWL(0 0 2us 1.3 2.1us 1.3 2.2us 0) r=0

r1 3 4 560

.model bjt npn

q1 5 4 0 bjt

q2 8 7 0 bjt

r2 6 5 1k

r3 5 7 100

r4 6 8 10k

r5 8 9 2.7k

r6 9 10 10k

c2 9 0 .1u

c3 10 0 .22u

.include subopamp.cir

x2 11 10 11 subopamp

v2 6 0 dc 12v

r7 0 13 1k

r8 13 14 3k

x3 13 11 14 subopamp

v3 14 15 dc 27

d1 16 15

r9 16 17 1k

v4 17 0 dc 1.4

.tran .1m 100m

.control

run

display

set xbrushwidth=2

plot v(16)

.endc

.end

Figure 5: Demodulated output

ADVANTAGES OF PWM

1. Synchronisation between the transmitter and receiver is not required

2. Less noise interference

3. High Efficiency

4. Low power consumption

5. Less complex circuitry

6. Cost effective

DISADVANTAGES OF PWM

1. Variable power due to the varying width of pulse.

2. Bandwidth requirement is large.

APPLICATIONS

1. In telecommunication systems

2. In power delivering systems to control the amount of power delivered to the load without incurring losses.

3. In robotics to control the speed of robots

4. In audio signals and amplification purposes