Berkeley Humanoid Lite Docs
  • Home
  • Releases
  • Getting Started with Hardware
    • Materials and Parts (BOM)
    • Preparing the Tools
    • 3D Printing Instructions
    • Building the Actuator
    • Flashing the Motor Controllers
    • Building the Robot
  • Getting Started with Software
    • Software Development Environment Overview
    • Training Environment
    • Sim2sim Validation
    • The On-board Computer
    • Motion Capture System
  • lerobot Integration
  • In-depth Contents
    • Field Oriented Control (FOC) Operation
    • Motor Controller Firmware Execution Timing Information
    • Motor Characterization
    • Actuator Characterization
    • CAN Communication
    • Joint ID Mapping
    • Exporting Robot Description Files from Onshape
    • Domain Randomizations for Training Locomotion
  • Contribute
Powered by GitBook
On this page
  • Current Control
  • Encoder reading
  • Clarke transform
  • Park transform
  • V_D V_Q target calculation
  • Overmodulation
  • Inverse park transformation
  • SVPWM
  1. In-depth Contents

Motor Controller Firmware Execution Timing Information

PreviousField Oriented Control (FOC) OperationNextMotor Characterization

Last updated 1 month ago

The high dynamic nature of the motor drive circuit imposes a strict requirement on the realtimeness of the firmware. We must ensure that we can run everything within a single FOC commutation loop.

We performed several measurements on the Recoil firmware code running on the motor controller to profile the execution time.

The timing information is measured with a Siglent SDS 1202X-E oscilloscope via a GPIO header on the motor controller board.

The system clock is configured as 160 MHz. The compiler optimization is set to -O2.

Current Control

Entire loop

Encoder reading

The delta time between issuing HAL_I2C_Master_Receive_IT and receiving the interrupt is 78 us.

Hence, the maximum frequency it can run at is 12 kHz.

Clarke transform

Park transform

V_D V_Q target calculation

Overmodulation

Inverse park transformation

SVPWM