To generate Output pulses by varying modulating index (ma) and to find the THD and FFT analysis.
Software Used:
MATLAB R2018a
Theory:
As its name suggests, pulse width modulation is used for the speed
control that works by driving the motor with a series of
“ON-OFF” pulses and varying the duty cycle, the fraction of time
that the output voltage is “ON” compared to when it is “OFF”, of
the pulses while keeping the frequency constant. In this, it is done
by considering the reference pulse as our Stepped wave with 4 step pulse.
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.000001 :1/f; %range of time period
tri=asin(sin(w*t));
ref1=square(w*t); %Reference Square Wave
car=(((asin(sin((w*2)*t+(pi/2))))*(2/pi))+1).*ref1; %Carrier
wave
car1=(((asin(sin((5*w*2)*t+(pi/2))))*(2/pi))+1).*ref1; %Carrier
wave
car2=asin(sin(10*w*t+(pi/2)))*(1.333);
% car=(((2*asin(sin((w*2)*t+(pi/2)))))).*ref1;
sq=(ref1>=0 & car>=0 & ref1<=car)-(ref1<=0
& car<=0 & ref1>=car)
sq1=sq+ref1
out=(sq1>=0 & sq1>=car)-(sq1<=0 & sq1<=car);
ref2=1.6*ref1;
out1=(ref2>=car)-(ref2<=car);
%plot(out1)
o1=out+out1;
% plot(t,o1)
ref3=0.78*ref1;
out2=(ref3>=car)-(ref3<=car);
%plot(out2)
o2=out+out1+out2;
% plot(t,o2)
ref4=0.39*ref1;
out3=(ref4>=0 & ref4>=car)-(ref4<=0 &
ref4<=car);
% plot(out3)
o3=out+out1+out2+out3;
o4=(1/4)*(o3)
ma=0.01:0.01:1
for(i=1:max(size(ma)))
sq2=ma(i)*o4;
plot(t,sq2);
hold all
C(i,:)=(o4>=0 &
sq2>=car2)-(o4<=0 & sq2<=car2);
plot(t,C)
N=max(size(C(i,:)));
y(i,:)=(2/N)*abs(fft(C(i,:),N));%FFT
analysis formula
C1(i,:)=sum(y(i,:).^2); %Sum of
the harmonic components in the output signal
C2(i,:)=sqrt(C1(i,:)-y(i,2).^2);
%Square root of (sum of hormonic components-First hormonic
component)
C3(i,:)=C2(i,:)/y(i,2); % Finding
Total hormonic distortion(THD)
end
figure()
plot(t,C(50,:))%Plot of Output signal with modulation
index=0.5
figure() %To plot separate
figure
bar(ma,C3(:,1))
axis([0 .1 -1 11])
figure()
plot(ma,y(:,2:2:8)); % Plot of Modulation index vs THD
set(gca,'Xdir','reverse');
Waveforms:
Fig
4.1: Comparison of Reference with Carrier wave
Fig
4.2: Different ma and the Reference signal
Fig
4.3: Output Pulse Single PWM for ma=0.50
Fig
4.4: Harmonics Profile of Single Pulse -Width Modulation
Fig
4.5: FFT Analysis
Observation:
1. There
is a difference in the THD and ma plot of Stepped and Staircase waveform so we
can say both are not the same also the staircase has 3 levels whereas in my stepped
wave it has 4 level reference signals.
2. As
the modulation index increases, the THD of the Output Pulse decreases but at a
slower pace. As it is in starting at 2 and reach to approximately 1.7 whereas
in the case of the staircase it was coming 8 and reaches 2. So, we can say stepped
is better than the stair-case as it has less value of THD at the start.
Result: In the above experiment we can say that ma is varied from 0 to 1 and output pulse
generation is shown in fig 4.3 for ma = 0.50. THD and FFT analysis is also done
for the same ma.
Post a Comment
Please do not enter any spam links in the comments...