Purpose: Analyse permanent-magnet brushed DC motors with a lumped-parameter model.
What it does: From geometry and material data it estimates the air-gap flux, armature resistance, motor constant K (= K_t = K_e), rotor inertia, the steady-state speed–torque line, losses and an efficiency map.
Why It Matters
An engineer needs to estimate torque, speed, and efficiency for a DC motor before prototyping.
Quick Start
Inputs:GeometricParams (stator, magnet, air gap, rotor and armature-winding dimensions), MaterialProperties (copper, steel, magnet, densities, iron-loss coefficients), OperatingConditions (terminal voltage, brush drop and brush resistance).
The magnetic circuit treats steel as linear (constant permeability) and omits the armature teeth.
armature_inductance and viscous_damping in LumpedParams are placeholder values, not calculated from the design.
Armature reaction, leakage flux and brush loss are not modelled.
How It Fits Into the Motor Design Workflow
Upstream (depends on): nothing else in the library yet — the module is self-contained.
Downstream (used by): design decisions
DC Motor (Permanent Magnet Brushed)
A lumped-parameter model for brushed PMDC machines covering magnetic circuit analysis, armature resistance, motor constants, rotor inertia, steady-state torque-speed characteristics, and efficiency mapping.
Magnets sit on the stator bore, so rotor_outer_diameter should equal stator_inner_diameter - 2*magnet_thickness - 2*air_gap_length.
# Example motor used in the examples below.# Illustrative dimensions and material values only — not a real or validated motor.mu_0 =4e-7* np.pigeom = GeometricParams( stator_outer_diameter=80e-3, stator_inner_diameter=60e-3, rotor_outer_diameter=49e-3, rotor_inner_diameter=10e-3, # 60 - 2*5 - 2*0.5 = 49 mm stack_length=40e-3, air_gap_length=0.5e-3, num_poles=4, num_armature_slots=18, slot_opening_width=2e-3, magnet_arc_angle_deg=60, magnet_thickness=5e-3, turns_per_coil=20, armature_wire_cross_section_m2=0.5e-6, is_lap_winding=True,)mat = MaterialProperties( copper_resistivity=1.72e-8, steel_permeability=2000* mu_0, magnet_remanent_flux_density=0.4, magnet_recoil_permeability=1.05* mu_0, steel_density=7650, copper_density=8900, shaft_density=7850, hysteresis_coeff=100.0, steinmetz_exponent=2.0, eddy_current_coeff=0.3e6, lamination_thickness=0.5e-3,)op = OperatingConditions(terminal_voltage=24.0, brush_contact_drop_v=1.0, brush_resistance_total=0.05)assert np.isclose(geom.rotor_outer_diameter, geom.stator_inner_diameter -2* geom.magnet_thickness -2* geom.air_gap_length)
Carter’s Coefficient
Armature slotting increases the effective air gap: flux fringes round the slot openings, so the gap is crossed over a smaller area than the full slot pitch.
where \(\tau_s\) is the slot pitch and \(w_{so}\) the slot opening. Since \(\gamma g < w_{so}\), the denominator stays positive whenever \(w_{so} < \tau_s\).
# Examples# R ∝ 1/a²: a 4-pole lap winding (a = 4) has 1/4 the resistance of the same wire as a wave winding (a = 2)R_lap = calculate_armature_resistance(geom, mat)R_wave = calculate_armature_resistance(replace(geom, is_lap_winding=False), mat)assert np.isclose(R_lap / R_wave, (2/4) **2)# on 2 poles lap and wave both have a = 2g2 = replace(geom, num_poles=2)assert np.isclose(calculate_armature_resistance(g2, mat), calculate_armature_resistance(replace(g2, is_lap_winding=False), mat))
# Examples# K = Z P Φ / (2π a): Z = 2*20*18 = 720 conductors, P = 4, a = 4 -> K = 720 Φ / (2π)assert np.isclose(calculate_motor_constants(geom, 1e-3), 720*1e-3/ (2* np.pi))# a wave winding (a = 2) on 4 poles doubles K for the same conductorsassert np.isclose(calculate_motor_constants(replace(geom, is_lap_winding=False), 1e-3),2* calculate_motor_constants(geom, 1e-3))
# Test Carter coefficient: k_c >= 1 and it grows with the slot openingk_small = calculate_carter_coefficient(1e-3, 0.5e-3, 5e-3)k_large = calculate_carter_coefficient(1e-3, 2.0e-3, 5e-3)assert1< k_small < k_largefor bad in [(0, 1e-3, 5e-3), (1e-3, 1e-3, 0), (1e-3, 5e-3, 5e-3), (1e-3, -1e-3, 5e-3)]:try: calculate_carter_coefficient(*bad)exceptValueError:passelse:raiseAssertionError(f"no ValueError for {bad}")print(f"✓ Carter coefficient: {k_small:.4f} < {k_large:.4f}")# Test brush resistance lowers stall torque, but not no-load speedss0 = calculate_steady_state_performance(params, replace(op, brush_resistance_total=0.0))ss1 = calculate_steady_state_performance(params, replace(op, brush_resistance_total=0.5))assert ss1["stall_torque"] < ss0["stall_torque"]assert np.isclose(ss1["no_load_speed_rpm"], ss0["no_load_speed_rpm"])print("✓ Brush resistance in series with the armature")
✓ Carter coefficient: 1.0092 < 1.1290
✓ Brush resistance in series with the armature
References
Carter, F.W. (1901). Air-gap induction. Electrical World and Engineer, 38, 884–888.
Pyrhönen, J., Jokinen, T., Hrabovcová, V. (2008). Design of Rotating Electrical Machines. Wiley — Carter’s coefficient (γ form).
Chapman, S.J. (2005). Electric Machinery Fundamentals. McGraw-Hill — DC machine EMF and torque, K = ZPΦ/(2πa).
Fitzgerald, A.E., Kingsley, C., Umans, S.D. (2003). Electric Machinery. McGraw-Hill.