setup_pwm_excitation#

Maxwell2d.setup_pwm_excitation(assignment: list[str], dc_bus_voltage: float | str = '100V', output_voltage_frequency: float | str = '100Hz', switching_frequency: float | str = '10000Hz', phase: float | str = '0deg', modulation_index: float = 1.0, reference_phase_voltage: float | str | None = '50V', min_time_step: float | str = '1us', max_time_step: float | str | None = None, connection_type: str = 'YConnection', preview_end_time: float | str = '0.01s') → bool#

Set up a space vector pulse width modulation (SVPWM) voltage excitation on windings.

The generated waveform represents the phase-neutral voltage of a three-phase inverter. This method is valid for both Maxwell 2D and Maxwell 3D transient designs.

Method valid from AEDT 2025.2.

Note

To set up an SVPWM winding excitation, the windings must already exist and their winding type must be set to "PWM Voltage". For example, use assign_winding(winding_type="PWM Voltage", ...). This excitation is available only for the transient solution type. When connection_type="YConnection", the windings must first be connected in a Y (star) configuration with the setup_y_connection method.

Parameters:
assignmentlist

Names of the windings to apply the excitation to. At least three windings of the "PWM Voltage" type must be given.

dc_bus_voltagefloat or str, optional

Voltage available at the main DC bus as input to the inverter. If a float is given, the unit is volts. The default is "100V".

output_voltage_frequencyfloat or str, optional

Fundamental frequency of the reference signal and of the PWM output voltage. It must be consistent with the motor speed. If a float is given, the unit is hertz. The default is "100Hz".

switching_frequencyfloat or str, optional

Carrier signal frequency used to generate the PWM switching signal. If a float is given, the unit is hertz. The default is "10000Hz".

phasefloat or str, optional

Phase delay angle of the reference signal. If a float is given, the unit is degrees. The default is "0deg".

modulation_indexfloat, optional

Ratio between the reference signal and the carrier signal. Valid range is 0 < modulation_index <= 1.1547. Variables are not supported. This value is used only when reference_phase_voltage is None. The default is 1.0.

reference_phase_voltagefloat, str, or None, optional

Reference phase voltage. When given, AEDT computes the modulation index as reference_phase_voltage / (dc_bus_voltage / 2). If None, modulation_index is used instead. If a float is given, the unit is volts. The default is "50V".

min_time_stepfloat or str, optional

Rate at which the carrier and reference signals are compared to generate the switching signals. The recommended value is 1/(100 * switching_frequency) or smaller. If a float is given, the unit is seconds. The default is "1us".

max_time_stepfloat, str, or None, optional

Largest time step used to generate the switching signal. If None, no maximum time step is used. If a float is given, the unit is seconds. The default is None.

connection_typestr, optional

Winding connection type. Options are "YConnection" and "DeltaConnection". For "YConnection", call setup_y_connection on the same windings first. The default is "YConnection".

preview_end_timefloat or str, optional

End time of the dataset preview. If a float is given, the unit is seconds. The default is "0.01s".

Returns:
bool

True when successful.

References

>>> oModule.SetupPWMExcitation

Examples

Create three copper coils in a Maxwell 2D transient design, assign a "PWM Voltage" winding to each phase, connect the phases in a Y configuration, and set up the SVPWM excitation.

>>> from ansys.aedt.core import Maxwell2d
>>> m2d = Maxwell2d(solution_type="TransientXY")
>>> phases = ["PhaseA", "PhaseB", "PhaseC"]
>>> for i, phase in enumerate(phases):
...     coil = m2d.modeler.create_rectangle(
...         origin=[i * 20, 0, 0], sizes=[10, 5], material="copper", name=f"Coil_{phase}"
...     )
...     m2d.assign_winding(
...         assignment=coil.name, winding_type="PWM Voltage", is_solid=False, resistance=0.1, name=phase
...     )
>>> m2d.setup_y_connection(phases)
>>> m2d["BusDC"] = "400V"
>>> m2d.setup_pwm_excitation(
...     assignment=phases,
...     dc_bus_voltage="BusDC",
...     output_voltage_frequency="50Hz",
...     switching_frequency="10kHz",
...     phase="30deg",
...     reference_phase_voltage="100V",
...     min_time_step="1us",
...     max_time_step="10us",
...     connection_type="YConnection",
... )
>>> m2d.desktop_class.close_desktop()