Description
The Motor Base component is an abstract base class for DC motor models. It provides the common electrical modeling framework, including armature resistance, armature inductance, and back-EMF calculations, while allowing subclasses to define how motor speed is determined. This enables different motor control strategies to share the same underlying electrical model.
Subclasses include Motor Mechanical Controlled and Motor Electrical Controlled, which determine speed from external mechanical inputs or electrical control signals, respectively.
Example Use Cases
- Foundation for Motor Variants: Provides a common electrical model that specialized motor components inherit and extend.
- Power Network Integration: Models the motor’s electrical characteristics for integration with spacecraft power bus simulations.
Module Implementation
Electrical Circuit Model
The motor is modeled as a series circuit consisting of:
- Armature Resistance (): The DC resistance of the motor windings. Defaults to 0.9 .
- Armature Inductance (): The inductance of the motor windings, modeled using a companion circuit approach for numerical stability. Defaults to 1 mH.
- Back-EMF Voltage Source (): A voltage that opposes current flow and is proportional to motor speed.
Inductor Companion Model
The armature inductance is modeled using a backward Euler discretization, which converts the inductor into an equivalent resistance and history voltage source:
where is the simulation time step and is the armature current from the previous time step. This approach ensures numerical stability for stiff electrical systems.
Back-EMF Calculation
The back-EMF voltage is computed as:
where is the back-EMF constant (V/(rad/s)) and is the motor speed provided by the subclass.
Electromagnetic Torque
The electromagnetic torque produced by the motor is proportional to the armature current:
where is the torque constant (Nm/A). For an ideal DC motor, .
Shaft Torque
The shaft torque available after accounting for viscous friction losses is:
where is the viscous friction coefficient (Nm/(rad/s)).
Assumptions/Limitations
- This is an abstract class and cannot be instantiated directly; use a subclass such as Motor Mechanical Controlled or Motor Electrical Controlled.
- The inductor companion model requires a non-zero time step; a minimum time step is enforced internally.
- Friction is modeled as a simple viscous term; Coulomb or static friction effects are not included.