Question


otal Harmonic Distortion Ham THD =-ar. 尔. ん 35

Considering the cuts in the sin signal.

Plz help me to make a matlap code to find the

(Total Harmonic Distortion )

I have named “alpha” between them so i can cod any similar signal.

the matlap cod should plot the distortion found.

and calculate it Plz ❤️.

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

Below is the matlab code to compute the total harmonic distortion in a given signal. The below example uses a consine signal at 10 Hz fundamental freq and adds up two thermal harmonic distortions at 20 and 30 Hz with ampl. = 0.5.

Pl. replace your signal to get the THD of your signal.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

close all,
clear all,
clc,

Fs = 1000;
FundamentalFreq = 10;
Amp = 1;

t=0:(1/Fs):1;

%Pure Cosine Signal at Fundamental Freq = 10 Hz.
Signal = Amp*cos(2*pi*FundamentalFreq*t);
subplot(2,1,1); plot(Signal); title('Original Cosine Signal at Fundamental Freq = 10 Hz');

%Add Harmonics at 20 and 30 Hz with Amp = 0.5;
Signal = Amp*cos(2*pi*FundamentalFreq*t)+0.5*cos(2*pi*20*t)+0.5*cos(2*pi*30*t);
subplot(2,1,2); plot(Signal); title('Original Signal with THD at 20 Hz and 30 Hz');

r = THD(Signal)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Original Cosine Signal at Fundamental Freq 10 Hz 0.5 800 1200 200 400 600 1000 Original Signal with THD at 20 Hz and 30 Hz 1.

Add a comment
Know the answer?
Add Answer to:
Considering the cuts in the sin signal. Plz help me to make a matlap code to find the (Total Harmonic Distortion ) I have named “alpha” between them so i can cod any similar signal. the matlap cod...
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