Hardware

Actuation and Motor Control

The actuation subsystem of the Vayu flight control system is responsible for translating control outputs into physical forces and torques that drive the vehicle. This is achieved through electronic speed controllers (ESCs) and motors, which are controlled via high-resolution PWM signals generated by the microcontroller.

PWM-Based Actuation

The microcontroller generates pulse-width modulation (PWM) signals using its internal timer peripherals. These signals are routed to ESCs, which regulate the speed of the motors based on the duty cycle of the PWM input.

In the current implementation, conventional PWM (CPWM) is used with an update frequency of approximately 400Hz400\,\text{Hz}, which is compatible with standard ESCs. This frequency provides a balance between control responsiveness and signal stability.

Timer 1, an advanced-control timer, is used for driving the primary four motors. Its enhanced capabilities, such as higher resolution and synchronized channel outputs, make it well-suited for precise multi-channel motor control.

Figure 4.4 demonstrates the forward control path from the processing unit to the physical actuators.

Actuation signal flow illustrating the transition from software control logic to physical motor thrust via hardware timers and speed controllers.

The use of hardware timers ensures precise timing and high-resolution signal generation, which is critical for stable and responsive motor control. Consistent PWM update rates are maintained to ensure smooth motor response and avoid control oscillations.

Motor Configuration and Mixing

In multi-rotor systems, control inputs such as roll, pitch, yaw, and thrust must be mapped to individual motor commands. This process, known as motor mixing, ensures that the combined effect of all motors produces the desired forces and torques.

The Vayu system supports standard multi-rotor configurations such as X4. A mixing matrix is used to distribute control signals to individual motors, taking into account their relative positions and rotation directions.

Timing and Control Requirements

Actuation is tightly coupled with the control loop and must satisfy strict timing requirements. The PWM signals are updated at a fixed rate synchronized with the control loop to ensure deterministic behavior.

Low-latency updates are essential to maintain stability, especially in the inner rate control loop, which operates at high frequencies. The use of dedicated hardware timers allows concurrent generation of multiple PWM signals without burdening the CPU.

The synchronization between control loop execution and PWM update ensures that actuator commands are applied consistently, minimizing phase delay in the control system and improving closed-loop stability.

Design Considerations

The actuation system is designed to ensure reliability, timing precision, and scalability. Care is taken to maintain signal integrity between the microcontroller and ESCs, and to minimize timing jitter, which can adversely affect control stability.

The use of an advanced timer (TIM1) for primary motor outputs ensures precise and synchronized signal generation, which is critical for balanced thrust and stable flight.

The modular design allows for extension to different configurations, including additional motors or alternative actuator types such as servos.

Future enhancements include support for digital ESC communication protocols such as DShot. Unlike traditional PWM, DShot provides a digital interface with higher update rates, improved noise immunity, and built-in error detection, making it suitable for high-performance flight control applications.