Friday, April 4, 2025

Teknofest Fighter UAV Competition

I am helping an undergraduate team with their Teknofest Fighter UAV Competition. The most difficult technical challenge is autonomously detecting and following other fixed-wing UAVs in the air. Teams must use a single stationary camera—no gimbals are allowed [Specification 6.1].

My first piece of advice to the team was to set realistic expectations and define intermediate success metrics, so that regardless of the final outcome, they can feel good about their progress. Last year's winning team was established in 2017 and reused a UAV they had been improving since 2020, which shows that having a realistic chance of winning requires several years of preparation.

The domains in which you need to be knowledgeable include:

  1. Image processing, object tracking
  2. Airplane aerodynamics
  3. Mechanics
  4. Guidance and navigation for autonomous take-off, flight, waypoint navigation, target tracking, landing
  5. Embedded software development for UAV avionics, real-time operating systems
  6. Ground station software development
  7. Telecommunications for telemetry and commands from ground station
  8. System identification
  9. Manufacturing and system integration
  10. Use of simulation tools (e.g., ArduPilot SITL, Gazebo, QGroundControl)
  11. Public relations and marketing to acquire necessary resources (~$5,000)
  12. Ground testing of individual components and the integrated system
  13. Manual flight of the UAV for system identification maneuvers
  14. Autonomous UAV flight testing

Mastering all of these domains is beyond the capability of any undergraduate team. Fortunately, systems like Pixhawk Cube Orange and PX4 Autopilot handle autonomous flight, NVIDIA Jetson series can handle object detection, and ready-made airframes like the X-UAV Talon reduce the production burden. This allows the team to focus on UAV-ground communications, tracking the target UAV in the video feed and generating appropriate guidance commands for their own UAV to follow it.

Since the Critical Design Report must not exceed 25 pages [see Critical Design Report Template, p.8], it is more of a system overview than a design report.

In light of all the above, here are my suggested success metrics:

  1. Pass the Technical Qualification Form
  2. Learn how to use ArduPilot SITL with Gazebo
  3. Pass the Critical Design Report
  4. Obtain monetary/component sponsorship
  5. Ground test all components
  6. Submit System Identification and Flight Evidence Video
  7. Qualify as a finalist
  8. Participate in the competition and complete at least one mission
  9. Win a prize in the competition
  10. Win first place
This year, I would be satisfied if the team reaches step 4 and pleasantly surprised if they make it to step 7. In any case, they should understand that it will likely take at least another year to be in a position to win any prizes.

Bonus: Python code for generating guidance commands from object tracking.

Sunday, March 23, 2025

Memory and Storage Latency

Below you can see memory and storage latencies and their corresponding analogies. For example, a cache miss that triggers a memory access from RAM, is about 100 times slower than the L1 cache. A skilled engineer can make an app run at supersonic speed instead of at a snail's pace — often the difference between a popular app and a dead one.

Component

Latency

Order

Metaphorical Speed

CPU Register

~0.5 ns

1

🚀 3,600 km/h Supersonic jet

L1 Cache

~1 ns

1

✈️ 1,800 km/h Commercial jet

L2/L3 Cache

~ 5 ns

10

🚅 360 km/h High speed train

RAM (DRAM)

~100 ns

100

🛵 18 km/h Scooter

Flash (NOR)

~10 µs

10⁴

🐢 0.18 km/h Tortoise

NVMe SSD

~50 µs

10⁵

🐌 0.036 km/h Snail

Wednesday, March 19, 2025

Minor, double major or projects

Engineering students often ask, 'Would doing a minor or double major benefit my career?' My answer is that pursuing a minor or double major is a demanding process. Instead, by working on projects related to your field of study, you can achieve much greater benefits with less effort.