SINGLE PULSE- WIDTH MODULATION

To generate single pulse by varying modulating index (ma) and to find the THD and FFT analysis.



Software Used: MATLAB R2018a

Theory: In single pulse modulation technique, there is one pulse per half-cycle and the width of the pulse is varied to control the Amplitude. In this the given modulating signal is compared with a square wave to generate output pulse. Here ma is modulating index which is varied from 0 to 1.

MATLAB Code:

clc; %clear the command window

clear all; %clear the workspace

close all; %close all previous figure window

f=50; %Frequency

w=2*pi*f;

t=0:0.00001 :1/f; %range of time period

ma=0.001:0.01:1; %range of modulation index

for i=1:max(size(ma))

ref=square(w*t); %Reference Square Wave

car=(((asin(sin((w*2)*t+(pi/2))))*(2/pi))+1).*ref; %Carrier wave

 

S1=ma(i)*ref; %Different Modulation index multiplied with square wave

plot(S1)

hold all

Vo(i,:)=(S1>=0 & S1>=car )-(S1<=0 & S1<=car); % Output wave of Single PWM

 

N=max(size(Vo(i,:)));

y(i,:)=(2/N)*abs(fft(Vo(i,:),N)); %FFT analysis

B1(i,:)=sum(y(i,:).^2); % To find THD

B2(i,:)=sqrt(B1(i,1)-y(i,2).^2);

B3(i,:)=B2(i,1)/y(i,2);

end

figure() % To plot separate figures

plot(Vo(25,:)) %Single PWM wave for 25th Row 

figure()

plot(ma,y(:,2:2:8))

set(gca,'Xdir', 'reverse') %Reverse the x axis

figure()

bar(ma,B3(:,1)) %bar grpagh

axis([0 .1 0 12]) %x axis from 0 to 0.1 and y axis from 0 to 12

 

Waveforms:


Fig1.1: Comparison of Reference with Carrier wave


Fig1.2: Different ma and Reference signal


Fig1.3: Single PWM for ma=0.25



Fig1.4: Harmonics Profile of Single Pulse -Width Modulation



Fig1.5: FFT Analysis

 

Result: By the above experiment we can say that if ma is varied from 0 to 1 and output of single pulse generation is shown in fig 1.3 for ma = 0.25 THD and FFT analysis is also done for the same ma.

Post a Comment

Please do not enter any spam links in the comments...

Previous Post Next Post