Phobia Motor Controller


PMC is an open project that aims to build the quality permanent magnet
synchronous machine (PMSM) controller for use in a variety of scopes like RC or
electric transport.
Brief description
PMC is ready to use in most intended applications. You can flash any supported
third-party hardware to work with PMC or use our original hardware.
Read further in doc/GettingStarted.
There are a few videos about PMC on youtube.
Software features
- Sensorless vector control of PMSM by measurement of currents and voltages.
- Robust ORTEGA observer with gain scheduling against speed.
- Accurate KALMAN observer having convergence at HF injection.
- Flux weakening and MTPA control.
- Three and two phases machine connection.
- Hardware abstraction layer (HAL) over STM32F4 and STM32F7.
- Various controller hardware are supported (including VESC clones).
- Command Line Interface (CLI) with autocompletion and history.
- Graphical User Interface (PGUI) based on
Nuklear and
SDL2.
- Non time-critical tasks are managed by
FreeRTOS.
- USB protocol stack from
CherryUSB.
-
Least Squares estimate library
LSE.
-
Phase current sampling scheme includes two or three sensors configuration
with inline or low-side placement.
- Self-adjustment of all onboard measurements (current and voltage) along
symmetrical channels.
-
Dead-Time Compensation (DCU) based on currents polatity.
-
Advanced SVPWM scheme provides:
- Reduced switching losses and fully utilised DC link voltage.
- Reduced voltage distortion for precise control.
- Voltage hopping to get accurate ADC measurements with inline current sensors.
- Prevent bootstrap circuit undervoltage condition.
-
Terminal voltage measurements (TVM):
- Back EMF voltage tracking to catch an already running machine.
- Self-test of the power stages integrity and machine wiring.
- Self-test of bootstrap retention time.
-
Automated machine parameters identification:
- Stator DC resistance (Rs).
- Stator AC impedance in DQ frame (Ld, Lq, Rz).
- Rotor flux linkage constant (lambda).
- Mechanical moment of inertia (Ja).
-
Automated configuration of external measurements:
- Discrete Hall sensors installation angles recognition.
- EABI resolution and direction adjustment.
- Analog Hall sensors signal distortion adjustment.
-
Operation at low or zero speed:
- Forced control that applies a current vector without feedback to
force rotor hold or spinup.
- Freewheeling.
- High Frequency Injection (HFI) based on magnetic saliency.
- Discrete Hall sensors.
- AB quadrature incremental encoder (EABI).
- Absolute encoder on SPI interface (AS5047).
- Analog Hall sensors and resolver decoder (EXPERIMENTAL).
-
Nested control loops:
- Detached voltage monitoring.
- Current control PI regulator with feedforward compensation.
- Speed control PID regulator with load torque compensation.
- Location control with constant acceleration regulator.
-
Adjustable constraints:
- Phase current (forward and reverse, on HFI current, weakening current).
- Overtemperature protection (derate phase current or halt).
- Machine voltage applied from VSI.
- DC link current consumption and regeneration.
- DC link overvoltage and undervoltage.
- Maximal speed and acceleration (forward and reverse).
- Absolute location limits in servo operation.
-
Input control interfaces:
- Analog input knob and brake signal.
- RC servo pulse width modulation.
- CAN bus flexible configurable data transfers.
- STEP/DIR (or CW/CCW) interface (EXPERIMENTAL).
- Manual control through CLI or PGUI.
- Custom embedded application can implement any control strategy.
-
Advanced CAN networking:
- Up to 30 nodes in peer network.
- Network survey on request (no heartbeat messages).
- Automated node address assignment.
- IO forwarding to log in to the remote node CLI.
- Flexible configurable data transfers.
-
Available information:
- Machine state (angle, speed, torque, current, etc.)
- DC link voltage and current consumption.
- Information from temperature sensors.
- Total distance traveled.
- Battery energy (Wh) and charge (Ah) consumed.
- Fuel gauge percentage.
Hardware specification (REV5
)
TODO
- Investigate iron saturation effect on sensorless operation.
- Make a detailed documentation.
- Improve PGUI software.
- Add pulse output signal.
- Make a drawing of the heatsink case for
REV5
.
- Design the new hardware for 120v battery voltage.