0
0
Power Electronicsknowledge~30 mins

Total Harmonic Distortion (THD) in Power Electronics - Mini Project: Build & Apply

Choose your learning style9 modes available
Understanding Total Harmonic Distortion (THD)
📖 Scenario: You are working with an electrical power system that supplies alternating current (AC) to a home. The quality of this power is important because distortions can damage appliances or reduce efficiency.Total Harmonic Distortion (THD) is a measure used to understand how much the electrical signal deviates from a perfect sine wave due to harmonics.
🎯 Goal: Build a simple step-by-step understanding of how to calculate Total Harmonic Distortion (THD) using given harmonic amplitudes.You will create a data set of harmonic amplitudes, set a reference for the fundamental frequency, calculate the THD, and finalize the result for interpretation.
📋 What You'll Learn
Create a dictionary with harmonic amplitudes including the fundamental and harmonics
Define a variable for the fundamental frequency amplitude
Calculate the THD using the harmonic amplitudes and fundamental amplitude
Complete the calculation by expressing THD as a percentage
💡 Why This Matters
🌍 Real World
THD is used by electrical engineers to assess power quality and ensure electrical devices operate safely and efficiently.
💼 Career
Understanding THD is important for roles in power systems engineering, electrical maintenance, and quality control in manufacturing of electrical equipment.
Progress0 / 4 steps
1
Create harmonic amplitudes data
Create a dictionary called harmonics with these exact entries: 1: 100 (fundamental), 3: 5, 5: 3, 7: 2 representing the amplitudes of the fundamental and harmonic frequencies.
Power Electronics
Need a hint?

Use a dictionary with keys as harmonic numbers and values as their amplitudes.

2
Set the fundamental amplitude variable
Create a variable called fundamental_amplitude and set it to the amplitude of the fundamental frequency from the harmonics dictionary using the key 1.
Power Electronics
Need a hint?

Access the dictionary value for key 1 and assign it to fundamental_amplitude.

3
Calculate the Total Harmonic Distortion (THD)
Calculate the THD by first summing the squares of all harmonic amplitudes except the fundamental. Use a variable called sum_squares for this sum. Then calculate thd_ratio as the square root of sum_squares divided by fundamental_amplitude. Use a for loop with variables harmonic and amplitude to iterate over harmonics.items().
Power Electronics
Need a hint?

Remember to exclude the fundamental (key 1) when summing squares.

4
Express THD as a percentage
Create a variable called thd_percent and set it to thd_ratio multiplied by 100 to express the Total Harmonic Distortion as a percentage.
Power Electronics
Need a hint?

Multiply the ratio by 100 to convert it to a percentage.