Vayu

Execution Model

The execution model of Vayu is based on a task-oriented design built on top of VAIOS, where each subsystem operates as an independent task scheduled according to priority and timing requirements. This approach enables concurrent execution of sensing, estimation, control, and auxiliary functions while maintaining deterministic behavior required for real-time control.

Each functional component of the system is implemented as a separate task. High-frequency and time-critical operations, such as control loops and sensor acquisition, are assigned higher priorities to ensure minimal latency and consistent execution. Lower-priority tasks handle communication, telemetry, logging, and background operations, allowing the system to remain responsive without impacting control performance.

Periodic execution is achieved using delay-based scheduling. Tasks use fixed-duration delays to maintain consistent execution rates, effectively creating software-timed loops. Due to the preemptive priority-based scheduler in VAIOS, tasks with higher priority resume execution immediately upon wake-up, minimizing jitter and ensuring that critical loops meet their timing constraints.

The control system is structured as multiple loops operating at different frequencies. The rate control loop runs at a high frequency (approximately 1 kHz) to handle rapid stabilization, while the attitude control loop operates at a lower frequency (approximately 250 Hz). This multi-rate design balances responsiveness with computational efficiency. Sensor acquisition tasks and communication handlers operate at frequencies appropriate to their respective roles.

Sensor data acquisition follows a hybrid model. High-frequency IMU data is driven by a DMA-based continuous acquisition loop, where each completed transfer triggers the next read, ensuring uninterrupted data flow. Other sensors and inputs are handled through periodic task execution. This combination allows efficient use of hardware capabilities while maintaining a consistent software interface.

Inter-task communication is achieved using shared buffers and synchronization primitives provided by VAIOS. Data flows between tasks through structured buffers, enabling decoupling between producers and consumers. This ensures that delays or variations in one subsystem do not directly stall others, improving overall system robustness.

The system initialization sequence creates all required tasks and starts the scheduler, after which execution is entirely managed by the RTOS. Persistent tasks, such as control and communication modules, run continuously, while transient tasks, such as boot-time checks or calibration routines, execute once and terminate.