TRAPEZOIDAL PULSE- WIDTH MODULATION
To generate Output pulses by varying modulating index (ma) and to find the THD and FFT analysis.
Software Used:
MATLAB R2018a
Theory:
Trapezoidal wave is suitable for the modulating signal of the
microcomputer-based pulse-width modulation (PWM) inverter for the use of motor
drives because the switching patterns can be generated by means of on-line
computation. The waveform is changed from a rectangular to a triangular wave.
We can get the output pulse by using a single pulse width and multiple pulses
width modulation and can vary the amplitude with the help of modulation index
of the reference pulse which is Trapezoidal in this case.
TRAPEZOIDAL
SINGLE PULSE- WIDTH MODULATION
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
ref=square(w*t); %Reference Square Wave
tri=asin(sin(w*t)); %Triangle wave
car=(((asin(sin((w*2)*t+(pi/2))))*(2/pi))+1).*ref; %Carrier
wave
sq1=(ref>=0 & tri>=0 & ref>=tri )-(ref<=0
& tri<=0 & ref<=tri); %Square Wave logic for trapezoidal
wave
sq2=(ref>=0 & tri>=0 & ref<=tri )-(ref<=0
& tri<=0 & ref>=tri); %Square Wave logic for trapezoidal
wave
trap1=sq1.*tri;
new=trap1.*ref;
trap2=new+sq2; % trapezoidal wave reference wave
ma=0.01:0.01:1; %range of ma
for i=1:max(size(ma))
trap3=ma(i).*trap2;
Vo(i,:)=((trap3>=0)&(car>=0)&(trap3>=car))-((0>=trap3)&(0>=car)&(car>=trap3));
%output
pulse
plot(t,trap3)
hold on
subplot(2,1,1)
plot(t,car)
hold on
plot(t,trap2)
subplot(2,1,2)
plot(t,Vo(i,:))
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()
plot(Vo(40,:))%Plot of Output signal with modulation index=0.4
figure() %To plot
separate figure
bar(ma,B3(:,1))
axis([0 .1 -1 11])
figure()
plot(ma,y(:,2:2:8)); % Plot of Modulation index vs THD
set(gca,'Xdir','reverse');
Waveforms:
Fig3.1.1:
Comparison of Trapezoidal Reference with
Carrier wave
Fig3.1.2:
Different ma and Trapezoidal Reference signal
Fig3.1.3:
Trapezoidal Single PWM for ma=0.40
Fig3.1.4:
Harmonics Profile of Trapezoidal Single Pulse -Width Modulation
Fig3.1.5:
FFT Analysis
TRAPEZOIDAL
MULTIPLE PULSE- WIDTH MODULATION
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
ref=square(w*t); %Reference Square Wave
tri=asin(sin(w*t)); %Triangle wave
car=(((asin(sin((w*5*2)*t+(pi/2))))*(2/pi))+1).*ref; %Carrier
wave
sq1=(ref>=0 & tri>=0 & ref>=tri )-(ref<=0
& tri<=0 & ref<=tri); %Square Wave logic for trapezoidal
wave
sq2=(ref>=0 & tri>=0 & ref<=tri )-(ref<=0
& tri<=0 & ref>=tri); %Square Wave logic for trapezoidal
wave
trap1=sq1.*tri;
new=trap1.*ref;
trap2=new+sq2; % trapezoidal wave reference wave
ma=0.01:0.01:1; %range of ma
for i=1:max(size(ma))
trap3=ma(i).*trap2;
Vo(i,:)=((trap3>=0)&(car>=0)&(trap3>=car))-((0>=trap3)&(0>=car)&(car>=trap3));
%output
pulse
plot(t,trap3)
hold on
subplot(2,1,1)
plot(t,car)
hold on
plot(t,trap2)
subplot(2,1,2)
plot(t,Vo(i,:))
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()
plot(t,Vo(40,:)) % Plot of Output signal with modulation index=0.40
figure() %To plot separate
figure
bar(ma,B3(:,1))
axis([0 .1 -1 11])
figure()
plot(ma,y(:,2:2:8)); % Plot of Modulation index vrs THD
set(gca,'Xdir','reverse');
Waveforms:
Fig3.2.1:
Comparison of Trapezoidal Reference with Carrier wave
Fig3.2.2:
Different ma and Trapezoidal Reference signal
Fig3.2.3:
Trapezoidal Multiple PWM for ma=0.40
Fig3.2.4:
Harmonics Profile of Trapezoidal Multiple Pulse -Width Modulation
Fig3.2.5: FFT
Analysis
Observations:
1. As
the modulation index increases, the Total Harmonic Distortion decreases at a
faster rate in case of Trapezoidal Single PWM.
2. In
the Harmonics Profile of Trapezoidal Multiple Pulse -Width Modulation, the
fundamental has a major component and rest are almost close to zero only
whereas for Single Pulse-Width Modulation it has all fundamental, 3rd,
5th and 7th all components with considerable values.
Result:
By the above experiment we can say that if ma is
varied from 0 to 1 and output of Trapezoidal single pulse generation and
Multiple pulse generation is shown in fig 3.1.3 and fig 3.2.3 for ma = 0.40 THD
and FFT analysis is also done for the same ma.
Post a Comment
Please do not enter any spam links in the comments...