motulator_multiphase.model#
Continuous-time models for multi-three-phase machine drives.
Peak-valued complex space vectors are used. The voltages and currents of the three-phase sets are space vectors in the sets’ own coordinates. The mechanical system models, the machine parameter classes, the modulators, and the simulation class of motulator are re-exported for convenience.
Classes#
Lossless multi-three-phase converter with constant DC-bus voltage. |
|
Continuous-time model of a multi-three-phase machine drive. |
|
Multi-three-phase machine model. |
Module Contents#
- class motulator_multiphase.model.MultiThreePhaseConverter(u_dc, n_sets=2, modulator=None, sign=np.sign)[source]#
Bases:
motulator.common.model.Converter,motulator.common.model.ControlledConverterLossless multi-three-phase converter with constant DC-bus voltage.
The converter consists of n_sets three-phase converters sharing the DC bus. The switching states, voltages, and currents of each set are space vectors in the set’s own coordinates. The duty ratios and the gate states of the legs are ordered set by set, [a1, b1, c1, a2, …]. The modulator of motulator converts the duty ratios into the gate states, including the computational delay and the dead time. As in the three-phase converter, the switches are ideal except for the dead time: when a leg is blanked, its state is (1 - sign(i))/2. Gate blocking is not supported.
- Parameters:
u_dc (float) – DC-bus voltage (V).
n_sets (int, optional) – Number of three-phase sets, defaults to 2.
modulator (TwoLevelModulator, optional) – Modulator of the legs, e.g., ZOH or CarrierComparison of motulator. Defaults to ZOH(), i.e., the switching-cycle averaged model without the dead time and with the computational delay of one sampling period.
sign (Callable[[np.ndarray], np.ndarray], optional) – Function of the phase currents (A) determining the leg states during blanking, defaults to np.sign.
- create_time_series(t)[source]#
Create time series.
- Parameters:
t (numpy.ndarray)
- Return type:
MultiThreePhaseConverterTimeSeries
- extend_history(n, u_c_ab)[source]#
Extend the history, the switching states held constant over n points.
- Parameters:
n (int)
u_c_ab (collections.abc.Sequence[Any] | None)
- Return type:
None
- modulate(T_s, command)[source]#
Convert the duty ratios to the gate states and their durations.
- Parameters:
T_s (float) – Sampling period (s).
command (Any) – Duty ratios of the legs, shape (3*n_sets,).
- Returns:
t_steps (ndarray, shape (N,)) – Durations of the intervals (s), summing to T_s.
gates (ndarray, shape (N, 2, 3*n_sets)) – Gate signals of the upper switches and blanking signals in each interval.
- Return type:
tuple[numpy.ndarray, numpy.ndarray]
- class motulator_multiphase.model.MultiThreePhaseDrive(machine, mechanics, converter, sensors=None)[source]#
Bases:
motulator.common.model.Model[MultiThreePhaseConverter]Continuous-time model of a multi-three-phase machine drive.
- Parameters:
machine (MultiThreePhaseMachine) – Machine model.
mechanics (MechanicalSystem | TwoMassMechanicalSystem | ExternalRotorSpeed) – Mechanical system model.
converter (MultiThreePhaseConverter) – Converter model.
sensors (DriveSensors, optional) – Sensors, see DriveSensors, defaults to ideal phase-current and DC-bus voltage sensors. Sensored control also needs the speed and position sensors. The current sensors measure the phase currents of all the sets, shape (3, n_sets), and cannot have a bandwidth.
- class motulator_multiphase.model.MultiThreePhaseMachine(par, L_ls, n_sets=2, theta_sets=None)[source]#
Bases:
motulator.common.model.SubsystemMulti-three-phase machine model.
The machine has n_sets three-phase winding sets. The model is based on the decoupled multi-stator (DMS) transformation, which maps the sets to the common mode (CM) and the differential modes (DMs) [1], see
dms_matrix(). The CM is equivalent to a three-phase machine whose sets are connected in parallel. It is modeled by the three-phase machine model cm (SynchronousMachine or InductionMachine) with the parameters given byto_parallel(). Each DM is a resistive-inductive circuit, consisting of the stator resistance and the leakage inductance L_ls of a set, which is not coupled to the other sets. The DMs produce no torque, and they are modeled in stationary coordinates. The states are those of the CM machine, followed by the DM flux linkages.- Parameters:
par (MachinePars) – Parameters of one three-phase set, when all sets carry equal currents.
L_ls (float) – Leakage inductance (H) of a set, which is not coupled to the other sets.
n_sets (int, optional) – Number of three-phase sets, defaults to 2.
theta_sets (Sequence[float], optional) – Angles (rad) of the phases a of the sets, defaults to the asymmetrical arrangement, see
default_set_angles().
Notes
The resistance of the DMs is the stator resistance par.R_s of a set, which is the same in the Γ and inverse-Γ models of the induction machine.
References
- compute_currents(i_s_ab, psi_dm_ab)[source]#
Compute the currents of the sets.
- Parameters:
i_s_ab (complex | ndarray, shape (N,)) – Current (A) of the parallel-connected machine, i.e., n_sets times the CM.
psi_dm_ab (ndarray, shape (n_sets - 1,) or (n_sets - 1, N)) – DM flux linkages (Vs).
- Returns:
Currents (A) of the sets in their own coordinates.
- Return type:
ndarray, shape (n_sets,) or (n_sets, N)
- create_time_series(t)[source]#
Create time series.
- Parameters:
t (numpy.ndarray)
- Return type:
MultiThreePhaseMachineTimeSeries
- extend_state_history(sol_y, index)[source]#
Extend the state history, the CM states in the CM machine.
- init_state_history()[source]#
Initialize the state history, the CM states in the CM machine.
- Return type:
None