Finding the Right "Brain" and Software for Civilian Drone. Part 2
Tags: embedded, drones, zynq
Published: 2024-03-19 13:51:51

_This is a continuation. The first part is [here](https://dev.to/rbalashevich/finding-the-right-brain-and-software-for-civilian-drone-2on4)._

There was a US-based company called Aerotenna about ten years ago that made FPGA-based drone controller platforms. They moved onto specializing in sensors specifically. 

[The OcPoC-Zynq by Aerotenna](https://aerotenna.readme.io/docs/unboxing) was conceived as a compelling flight controller for those seeking to push the boundaries of drone technology. 

It's compatibility with the open-source PX4 project could provide a robust foundation of reliability. 

Unfortunately, the complexity of the implementation (as it turned out, excessive) did not allow all this to come true.

##Technical Specifications and Unique Features

###Hybrid Architecture
The heart of the OcPoC-Zynq is a Zynq System-on-Chip (SoC), combining an ARM processor with a programmable Field-Programmable Gate Array (FPGA). 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ewv2rxrjhhyb9c7mhlkj.png)
<small>_The similar Z-turn Board V2 schematic diagram. Pic source: Xilinx_</small>

This grants immense flexibility for hardware acceleration and customization.
###Processing Power
The chosen Zynq SoC typically features a dual-core ARM Cortex-A9 processor and a sizeable FPGA fabric, ensuring both baseline flight control capabilities and room for advanced functionality.
###Enhanced I/O
The OcPoC-Zynq boasts numerous configurable input/output pins, supporting a multitude of sensor configurations, communication protocols, and potential payloads.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/psb21shnbhjul36uj4ss.png)
###Sensor Redundancy
To maximize reliability, the OcPoC-Zynq declared of support triple redundancy on important sensors like the GPS, IMU, and magnetometer.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p5lr8cok7ocjo7qbs7ek.png)
<small>_The OcPoC-Zynq is a FPGA+ARM SoC based flight control platform mounted on a drone._</small>

##A developer-oriented solution 

Just replacing an embedded MCU with an FPGA would be a step backward. However, FPGA's are far better suited to perform functions such as high bandwidth digital signal processing. However, these specifications create a platform where possibilities extend beyond traditional flight controllers. 

>The FPGA emerges as a space for hardware-level innovation. Instead of relying solely on the main processor, computationally demanding elements of the PX4 system, such as ones described below, could be offloaded to the FPGA. This distribution of tasks promised smoother flight performance and potential for more sophisticated features.

The FPGA's adaptability allows the OcPoC-Zynq [to embrace custom sensors and specialized peripherals](https://aerotenna.readme.io/docs/ocpoctm-zynq-mini), propelling it beyond the limitations of standardized drone builds. This makes it particularly appealing within a research context, where the integration of experimental sensors or novel technologies is key.

Perhaps most exciting is the potential the OcPoC-Zynq could have for advanced autonomous flight. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wojq8r7fh81kv92zwqyw.png)
<small>_Architecture model for a reconfigurable autopilot board. Source: [Queensland University of Technology](https://www.mdpi.com/1424-8220/21/4/1115)_</small>

The FPGA's processing power offers the opportunity to run AI algorithms directly on the drone. This localizes decision-making processes, potentially leading to real-time obstacle avoidance, sophisticated vision-based navigation, and previously unimaginable flight behaviors.

The OcPoC flight controller isn't just specialized hardware; it runs a full-fledged operating system (i.e Ubuntu `armhf`) on its Zynq-7010 ARM processor. This allows it to use standard Linux-based flight control software.

You still can [clone the repository](https://github.com/Aerotenna/OcPoC_Mini_Zynq_Files) and customize your kernel to your specific project using Xilinx's `linux-xlnx`.

##Some functions where the FPGA could be used in a drone

###Sensors
High accuracy Kalman Filter/Inertial Measurement Unit (EKF/IMU). This would take input from [a 6DOF sensor](https://www.ndigital.com/6dof-explained/) and provide tracking in flight.

###Cameras
Video processing from multiple cameras. A single DSP is adequate for one camera input. But, multiple cameras would require an FPGA due to the high bandwidth requirement. So, you could do [some stereo-vision](https://github.com/Aerotenna/OcPoC_Mini_Zynq_Files/blob/3f03e50e0933fdf9934c262014f87c6c7c17a8e5/Kernel_Config/ocpoc_defconfig#L2239) and [🗎 object recognition](https://www.irjet.net/archives/V7/i1/IRJET-V7I189.pdf) using the FPGA.

##The further fate of the solution
It's important to note that unlocking the full potential of the OcPoC-Zynq requires a degree of development expertise. Customizing the FPGA involves  hardware design skills, and careful integration with PX4 software might be necessary to fully realize the benefits of hardware acceleration. 

Nonetheless, the Aerotenna OcPoC-Zynq served as an interesting exceptional platform for researchers and innovators eager to shape the future of drone technology within the dynamic PX4 landscape.

Unfortunately, there is no news today about the development of this project. The project has been discontinued and is no longer commercially available.

PX4 v1.11 is the last release that has experimental support for this platform.

So there are certainly use cases for FPGA on flight controllers, and the author reviewed one of them here. 

Performing checksums on the sensors data interface, digital filters and cameras signal processing - these are small tasks that could be outsourced to the FPGA, since they are expensive on the CPU.

Yet, flying _is still a relatively slow process_ with little data, so regular ARM CPUs can keep up. Compared to high speed video processing.

Also, development for an FPGA is more expensive. The parts are pricey, high pin count thus the boards are expensive (> 2 layers) and the design software is expensive. Overall, development costs more time, and time is money.

##Conclusion
Moreover, most modern ARM MCUs offer an attractively good balance of performance and affordability. They are readily available, well-supported, and cost less than FPGA-based solutions.

In addition, over the decade, a large number of dedicated video transmission and processing modules have appeared on the market, taking on these tasks entirely.

Thus, we can say that highly integrated ARM MCU solutions have gained the upper hand today, at least in the civil mass drone segment.