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, useassign_winding(winding_type="PWM Voltage", ...). This excitation is available only for the transient solution type. Whenconnection_type="YConnection", the windings must first be connected in a Y (star) configuration with thesetup_y_connectionmethod.- Parameters:
- assignment
list Names of the windings to apply the excitation to. At least three windings of the
"PWM Voltage"type must be given.- dc_bus_voltage
floatorstr,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_frequency
floatorstr,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_frequency
floatorstr,optional Carrier signal frequency used to generate the PWM switching signal. If a float is given, the unit is hertz. The default is
"10000Hz".- phase
floatorstr,optional Phase delay angle of the reference signal. If a float is given, the unit is degrees. The default is
"0deg".- modulation_index
float,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 whenreference_phase_voltageisNone. The default is1.0.- reference_phase_voltage
float,str,orNone,optional Reference phase voltage. When given, AEDT computes the modulation index as
reference_phase_voltage / (dc_bus_voltage / 2). IfNone,modulation_indexis used instead. If a float is given, the unit is volts. The default is"50V".- min_time_step
floatorstr,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_step
float,str,orNone,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 isNone.- connection_type
str,optional Winding connection type. Options are
"YConnection"and"DeltaConnection". For"YConnection", callsetup_y_connectionon the same windings first. The default is"YConnection".- preview_end_time
floatorstr,optional End time of the dataset preview. If a float is given, the unit is seconds. The default is
"0.01s".
- assignment
- Returns:
- bool
Truewhen 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()