0
0
Power Electronicsknowledge~10 mins

Sinusoidal PWM (SPWM) technique in Power Electronics - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define the carrier wave frequency in SPWM.

Power Electronics
carrier_frequency = [1]  # Frequency of the triangular carrier wave
Drag options to blanks, or click blank then click option'
A1000
B50
C5000
D60
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing the output frequency instead of the carrier frequency.
2fill in blank
medium

Complete the code to calculate the modulation index in SPWM.

Power Electronics
modulation_index = [1] / carrier_amplitude  # Ratio of reference to carrier amplitude
Drag options to blanks, or click blank then click option'
Acarrier_amplitude
Breference_amplitude
Coutput_voltage
Dfrequency_ratio
Attempts:
3 left
💡 Hint
Common Mistakes
Using carrier amplitude as numerator instead of denominator.
3fill in blank
hard

Fix the error in the code that generates the SPWM signal.

Power Electronics
spwm_signal = 1 if reference_signal > [1] else 0
Drag options to blanks, or click blank then click option'
Acarrier_signal
Boutput_voltage
Cmodulation_index
Dreference_signal
Attempts:
3 left
💡 Hint
Common Mistakes
Comparing reference_signal to itself instead of carrier_signal.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps angles to SPWM values.

Power Electronics
spwm_map = {angle: 1 if [1] > [2] else 0 for angle in range(0, 360)}
Drag options to blanks, or click blank then click option'
Amath.sin(math.radians(angle))
Bmath.cos(math.radians(angle))
Ccarrier_wave_value
Dmodulation_index
Attempts:
3 left
💡 Hint
Common Mistakes
Using cosine instead of sine for the reference signal.
5fill in blank
hard

Fill all three blanks to generate SPWM pulses with modulation index control.

Power Electronics
spwm_output = {angle: 1 if ([1] * [2]) > [3] else 0 for angle in range(0, 360)}
Drag options to blanks, or click blank then click option'
Amath.sin(math.radians(angle))
Bmodulation_index
Ccarrier_wave_value
Dmath.cos(math.radians(angle))
Attempts:
3 left
💡 Hint
Common Mistakes
Using cosine instead of sine.
Not multiplying by modulation index.