Question

I need a MATLAB code that sets different firing angles for the positive and negative cycles...

I need a MATLAB code that sets different firing angles for the positive and negative cycles of a sine wave. Furthermore, the positive and negative cycles may be clipped with different values. Also, is there a way to determine the total harmonic distortion of such signals through MATLAB?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

close all,
clear all,
clc,

Fs=1000;
Freq = 10;
t=0:(1/Fs):1;

ClipingVoltage=0.83;
FiringAngle= [];
x=[];
Ig= 0.5;
Signal=[];
ClippedSignal=[];
FlagAngle=1;
for n=1:length(t)
x(n) = sin(2*pi*Freq*t(n));
Signal(n) = x(n);
FiringAngle(n) = (2*pi*t(n)*Freq);
if(x(n) >= Ig && FlagAngle==1), Angle=(FiringAngle(n)*180)/pi; FlagAngle=0; end
ClippedSignal(n)=x(n);
if(x(n) < Ig), Signal(n)=0; FiringAngle(n)=0; end
if(x(n) >= ClipingVoltage), ClippedSignal(n) = ClipingVoltage; end
if(x(n) <= -ClipingVoltage), ClippedSignal(n) = -ClipingVoltage; end
end
subplot(3,1,1); plot(x); grid on, title('Input Sine Wave -> Gate Voltage/Current');
subplot(3,1,2); plot(Signal); grid on, ylim([-1,1]);
title(strcat('Firing Angle at Vg (= ',num2str(Ig),' ) = ',num2str(Angle),' degree'));
%hold on,
subplot(3,1,3); plot(ClippedSignal); grid on, title(strcat('Clipped Signal at Cliping Voltage = ',num2str(ClipingVoltage)));

Input Sine Wave -> Gate Voltage/Current 0.5 800 200 600 1000 1200 Firing Angle at Vg (05) 32.4 degree 0.5 1200 600 800 1000 C

Add a comment
Know the answer?
Add Answer to:
I need a MATLAB code that sets different firing angles for the positive and negative cycles...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT