Split View: Pixhawk & eVTOL 비행제어 완전 정복: PX4, 칼만 필터, PWM 신호, 센서 퓨전부터 ROS2 통합까지
Pixhawk & eVTOL 비행제어 완전 정복: PX4, 칼만 필터, PWM 신호, 센서 퓨전부터 ROS2 통합까지
- 1. 개요
- 2. Pixhawk — 오픈소스 비행 제어기의 표준
- 3. 비행 제어 시스템 아키텍처
- 4. PWM 신호와 ESC 프로토콜
- 5. 칼만 필터 — 비행 제어 핵심 알고리즘
- 6. eVTOL (Electric Vertical Takeoff and Landing)
- 7. PX4 오토파일럿
- 8. ArduPilot
- 9. ROS2 통합
- 10. SITL/HITL 시뮬레이션
- 11. 학습 로드맵
- 12. References
1. 개요
드론과 eVTOL(전기 수직 이착륙기)은 더 이상 실험적 기술이 아니다. 2026년 Joby Aviation과 Archer Aviation은 상업 운항을 시작하고, 도심 항공 모빌리티(UAM)는 현실이 되고 있다. 이 모든 기술의 중심에는 비행 제어 시스템이 있다.
이 포스트는 비행 제어의 핵심 요소를 총정리한다.
┌────────────────────────────────────────────────────────────┐
│ 비행 제어 시스템 전체 구조 │
│ │
│ 센서 계층 추정 계층 제어 계층 출력 계층 │
│ ┌─────────┐ ┌──────────┐ ┌──────────┐ ┌────────┐ │
│ │IMU(6축) │ │ 칼만 필터 │ │ PID 제어 │ │ PWM/ │ │
│ │GPS │──→│ (EKF2/3) │──→│ 위치→속도 │──→│ DShot │ │
│ │기압계 │ │ 센서 퓨전 │ │ →자세→각속도│ │ ESC │ │
│ │지자기 │ │ │ │ →믹서 │ │ 모터 │ │
│ └─────────┘ └──────────┘ └──────────┘ └────────┘ │
│ │
│ 통신: MAVLink ←→ QGroundControl / ROS2 / 컴패니언 컴퓨터 │
└────────────────────────────────────────────────────────────┘
2. Pixhawk — 오픈소스 비행 제어기의 표준
2.1 Pixhawk란
Pixhawk는 특정 제품이 아닌 오픈 하드웨어 표준이다. Dronecode Foundation(Linux Foundation 산하)이 관리하며, 전 세계 100만 대 이상의 Pixhawk 기반 장치가 운용 중이다.
2.2 FMU 버전 히스토리
| 버전 | 프로세서 | 주요 특징 |
|---|---|---|
| FMUv2 | STM32F427 (Cortex-M4, 168MHz) | 최초 상용 Pixhawk |
| FMUv3 | STM32F427 | Flash 2MB로 확대 |
| FMUv5 | STM32F7 | CAN 버스 추가, 확장성 강화 |
| FMUv5X | STM32F7 | 모듈러 설계, 삼중 중복성 도입 |
| FMUv6X | STM32H753 (Cortex-M7, 480MHz) | 이더넷, 삼중 IMU, 분리 센서 도메인 |
| FMUv6C | STM32H743 (Cortex-M7, 480MHz) | 비용 최적화, 이중 중복 IMU |
2.3 Pixhawk 6X (FMUv6X) 상세 사양
프로세서:
- FMU: STM32H753 (Cortex-M7, 480MHz, 2MB Flash, 1MB RAM)
- IO: STM32F103 (Cortex-M3, 72MHz, 64KB SRAM)
탑재 센서 (삼중 중복):
| 센서 유형 | 모델 | 수량 | 비고 |
|---|---|---|---|
| IMU (가속도계/자이로) | ICM-45686 | 3개 | BalancedGyro 기술, 각각 별도 버스·전원 |
| 기압계 | ICP20100, BMP388 | 2개 | 이중 중복 |
| 지자기 센서 | BMM150 | 1개 | - |
주요 인터페이스:
- 16+ PWM 서보 출력 (IO 8개 + FMU 8개)
- 이더넷 PHY — 미션 컴퓨터와 고속 통신
- 4× UART, 3× SPI, 2× CAN, 2× I2C
- USB-C, RC 입력 (SBUS/CPPM/DSM)
모듈러 설계: IMU Board + FMU Board + Base Board가 100핀/50핀 Pixhawk Autopilot Bus 커넥터로 분리
2.4 Pixhawk 6C (FMUv6C)
| 항목 | 사양 |
|---|---|
| 프로세서 | STM32H743 (Cortex-M7, 480MHz) |
| IMU | ICM-42688-P + BMI055 (이중 중복) |
| 기압계 | MS5611 |
| 지자기 | IST8310 |
| 크기 | 84.8 × 44 × 12.4 mm |
| 무게 | 59.3g (알루미늄) / 34.6g (플라스틱) |
| 작동 온도 | -25 ~ 85°C |
2.5 지원 오토파일럿 펌웨어
| 펌웨어 | 라이선스 | 특징 |
|---|---|---|
| PX4 Autopilot | BSD | Dronecode 공식, 마이크로커널 아키텍처, 정밀 제어 |
| ArduPilot | GPL | 커뮤니티 기반, 폭넓은 기체 지원, 실전 검증 최고 |
2.6 생태계
제조사: Holybro, CUAV, ARK Electronics, ModalAI, NXP, mRo, Auterion 도구: QGroundControl(GCS), MAVLink, MAVSDK, MAVROS, ROS2 통합
3. 비행 제어 시스템 아키텍처
3.1 캐스케이드 제어 구조
PX4 멀티콥터 제어기는 캐스케이드 위치-속도-자세-각속도 루프를 사용한다.
[위치 SP] →[위치 P]→ [속도 PID] → [자세 P] → [각속도 K-PID] → [믹서] → [모터]
외부 루프 중간 루프 자세 루프 내부 루프
~50Hz ~50Hz ~250Hz ~1000Hz
| 계층 | 제어기 | 입력 | 출력 | 갱신률 |
|---|---|---|---|---|
| Position (외부) | P 제어기 | 위치 오차 | 속도 설정값 | ~50Hz |
| Velocity (중간) | PID 제어기 | 속도 오차 | 가속도 설정값 | ~50Hz |
| Attitude (자세) | P 제어기 (쿼터니언) | 자세 오차 | 각속도 설정값 | ~250Hz |
| Rate (내부) | K-PID 제어기 | 각속도 오차 | 토크/추력 명령 | ~1000Hz |
3.2 PID 제어기
연속 시간 PID:
이산 시간 PID (비행 제어기 구현):
| 파라미터 | 역할 | 올리면 | 내리면 |
|---|---|---|---|
| (비례) | 오차에 비례한 즉각 반응 | 응답 빨라짐, 진동 증가 | 느려짐, 안정적 |
| (적분) | 정상상태 오차 제거 | 오차 0 수렴, 오버슈트 위험 | 잔류 오차 존재 |
| (미분) | 오차 변화율에 반응 (댐핑) | 오버슈트 감소, 노이즈 민감 | 진동 증가 |
3.3 위치/속도 제어기
위치 제어기 (P):
- PX4 파라미터:
MPC_XY_P,MPC_Z_P - 속도 포화:
MPC_XY_VEL_MAX
속도 제어기 (PID): 속도 오차 → 가속도 설정값, Anti-reset windup 적용
3.4 자세/각속도 제어기
자세 제어기 (P, 쿼터니언 기반):
각속도 제어기 (K-PID): 미분 경로에 저역통과 필터 적용하여 노이즈 저감
자이로 데이터 처리 파이프라인:
- 캘리브레이션 보정 → 2. 바이어스 제거 → 3. 노치 필터 → 4. 저역통과 필터
3.5 믹서 (Control Allocation)
각속도 제어기 출력을 개별 모터 명령으로 변환한다.
쿼드콥터 X 구성 예시:
여기서 =총 추력, =롤 토크, =피치 토크, =요 토크
4. PWM 신호와 ESC 프로토콜
4.1 PWM (Pulse Width Modulation) 원리
PWM은 디지털 신호의 듀티 사이클을 변조하여 아날로그 값을 전달하는 기법이다.
┌────┐ ┌────────┐
│ │ │ │
─────┘ └──────────────┘ └──────────
|<-->| |<------>|
1000μs 2000μs
(0% 스로틀) (100% 스로틀)
|<-------------------->|
20ms (50Hz 주기)
| 파라미터 | 값 |
|---|---|
| 펄스 폭 범위 | 1000μs (최소) ~ 2000μs (최대) |
| 중립점 | 1500μs |
| 표준 주기 | 20ms (50Hz) |
| 해상도 | 1000 스텝 |
| 신호 지연 | ~2ms |
4.2 ESC 프로토콜 비교
| 프로토콜 | 유형 | 펄스폭 | 최대 갱신률 | 해상도 | 오류 검출 |
|---|---|---|---|---|---|
| Standard PWM | 아날로그 | 1000-2000μs | 500Hz | 1000 | 없음 |
| OneShot125 | 아날로그 | 125-250μs | 4kHz | 1000 | 없음 |
| OneShot42 | 아날로그 | 42-84μs | ~12kHz | 1000 | 없음 |
| Multishot | 아날로그 | 5-25μs | ~32kHz | 1000 | 없음 |
| DShot150 | 디지털 | - | 150 kbps | 2048 | CRC 4비트 |
| DShot300 | 디지털 | - | 300 kbps | 2048 | CRC 4비트 |
| DShot600 | 디지털 | - | 600 kbps | 2048 | CRC 4비트 |
| DShot1200 | 디지털 | - | 1200 kbps | 2048 | CRC 4비트 |
4.3 DShot 프로토콜 상세
DShot은 2025년 현재 사실상의 표준 ESC 프로토콜이다.
프레임 구조 (16비트):
[11비트 스로틀 (0-2047)] [1비트 텔레메트리 요청] [4비트 CRC]
- 스로틀 값 1-47: 특수 명령 예약 (비프음, 모터 방향 반전, ESC 설정)
- 비트 인코딩: HIGH/LOW 비율로 0/1 구분 (1=75% HIGH, 0=37.5% HIGH)
양방향 DShot (Bidirectional DShot):
- ESC가 eRPM 텔레메트리를 FC에 회신
- 실시간 RPM 데이터로 동적 노치 필터 적용 → 진동 제거 성능 대폭 향상
- 제공 데이터: RPM, 전압, 전류, 온도
4.4 PWM vs DShot 핵심 차이
| 특성 | PWM (아날로그) | DShot (디지털) |
|---|---|---|
| 신호 방식 | 펄스 폭으로 값 인코딩 | 0/1 비트 스트림 |
| 캘리브레이션 | 필요 (ESC마다 다름) | 불필요 |
| 노이즈 내성 | 낮음 | 높음 (CRC 오류 검출) |
| 해상도 | 1000 스텝 | 2048 스텝 |
| 양방향 통신 | 불가 | 가능 (텔레메트리) |
| 특수 명령 | 불가 | 가능 |
5. 칼만 필터 — 비행 제어 핵심 알고리즘
5.1 칼만 필터 기본 원리
칼만 필터는 노이즈가 포함된 다중 센서 측정값으로부터 시스템의 상태를 최적으로 추정하는 재귀적 알고리즘이다.
┌──────────────────────────────────────────────────────┐
│ 칼만 필터 사이클 │
│ │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ 1단계: 예측 │ │ 2단계: 갱신 │ │
│ │ (Prediction) │────►│ (Update) │ │
│ │ │ │ │ │
│ │ x̂ = F·x + B·u │ │ K = P·Hᵀ·S⁻¹ │ │
│ │ P = F·P·Fᵀ + Q │ │ x̂ = x̂ + K·(z-Hx̂)│ │
│ │ │ │ P = (I-KH)·P │ │
│ │ 모션 모델로 예측 │ │ 측정값으로 보정 │ │
│ └──────────────────┘ └────────┬─────────┘ │
│ ▲ │ │
│ └────────────────────────┘ │
│ 반복 │
└──────────────────────────────────────────────────────┘
1단계: 예측 (Time Update)
| 기호 | 의미 |
|---|---|
| 상태 추정 벡터 | |
| 상태 전이 행렬 | |
| 제어 입력 행렬 | |
| 제어 입력 (예: 자이로 각속도) | |
| 오차 공분산 행렬 | |
| 프로세스 노이즈 공분산 |
2단계: 갱신 (Measurement Update)
| 기호 | 의미 |
|---|---|
| 칼만 이득 — 예측값과 측정값의 가중치 결정 | |
| 관측 행렬 | |
| 실제 측정값 | |
| 측정 노이즈 공분산 |
칼만 이득의 직관:
- : 측정값을 더 신뢰 (측정 노이즈 작음)
- : 예측값을 더 신뢰 (모델 정확함)
5.2 확장 칼만 필터 (EKF)
드론의 역학은 비선형이므로 표준 칼만 필터를 직접 적용할 수 없다. EKF는 비선형 함수를 1차 테일러 급수 전개로 선형화한다.
비선형 시스템:
EKF 예측:
EKF 갱신:
5.3 오류 상태 칼만 필터 (ESKF)
PX4의 EKF2는 Error-State Kalman Filter를 구현한다. 쿼터니언 회전의 불확실성 추정에 핵심적이다.
핵심 아이디어:
- 쿼터니언을 직접 추정하지 않고, 오류 회전 벡터를 추정
- SO(3)의 접선 공간에서 3D 벡터로 회전 불확실성 표현
- Nominal State(관성 항법 방정식)와 Error State(칼만 필터)를 분리
5.4 PX4 EKF2 (ECL EKF) — 24개 상태 벡터
| 인덱스 | 상태 | 설명 |
|---|---|---|
| 0-3 | 쿼터니언 (q0~q3) | NED → Body 프레임 회전 |
| 4-6 | 속도 (Vn, Ve, Vd) | NED 프레임 [m/s] |
| 7-9 | 위치 (Pn, Pe, Pd) | NED 프레임 [m] |
| 10-12 | 자이로 바이어스 | IMU 자이로 [rad/s] |
| 13-15 | 가속도계 바이어스 | IMU 가속도계 [m/s²] |
| 16-18 | 지구 자기장 | NED 프레임 [Gauss] |
| 19-21 | 바디 자기장 바이어스 | Body 프레임 |
| 22-23 | 풍속 (Wn, We) | 북풍/동풍 [m/s] |
센서 퓨전 아키텍처:
- 지연된 퓨전: 센서별 시간 지연 수용을 위해 FIFO 버퍼에 저장, 동일 시점 데이터 퓨전
- IMU 데이터: 상태 예측에만 사용, 관측값으로 사용하지 않음
- 다중 EKF 인스턴스: 결함 감지 강화 (MAX(IMU수,1) × MAX(자력계수,1), 최대 16개)
- 다중 가설 필터: 가우시안 합 필터로 요(Yaw) 추정, GPS 속도만으로도 가능
5.5 ArduPilot EKF2 vs EKF3
| 특성 | EKF2 | EKF3 (현재 기본) |
|---|---|---|
| 센서 어피니티 | 미지원 | 지원 — 비주 센서 동적 전환 |
| 추가 센서 | 기본만 | 비콘, 휠 인코더, 시각 오도메트리 |
| 레인 전환 | 제한적 | 동적 레인 전환 |
| 폴백 | EKF2 → DCM | EKF3 → DCM |
| 파라미터 | EK2_* | EK3_* |
5.6 보상 필터 vs 칼만 필터
여기서 (보통 0.96~0.98)
| 특성 | 보상 필터 | 칼만 필터 |
|---|---|---|
| 복잡도 | 낮음 | 높음 |
| 계산 부하 | 경량 (임베디드) | 무거움 (FPU 필요) |
| 원리 | HPF(자이로) + LPF(가속도계) | 최적 가중 평균 (공분산) |
| 바이어스 | 있을 수 있음 | 바이어스 프리 |
| 다중 센서 | 2개 적합 | 다중 센서 최적 |
| 결함 내성 | 없음 | 혁신 일관성 검사 |
6. eVTOL (Electric Vertical Takeoff and Landing)
6.1 eVTOL이란
전기 추진 시스템으로 수직 이착륙하고 수평 비행하는 항공기다. 도심 항공 모빌리티(UAM)의 핵심으로, "날으는 택시" 시대를 열고 있다.
6.2 시장 현황
- 시장 규모: 2025년 ~42억 달러 → 2033년 ~80억 달러 (CAGR 37%)
- 2026년 상업 운항 시작 예정: Joby Aviation, Archer Aviation
| 기업 | 기체 | 최대속도 | 항속거리 | 승객 | 점유율 |
|---|---|---|---|---|---|
| Joby Aviation | S4 | 322 km/h | 241 km | 4+1 | 22% |
| Archer Aviation | Midnight | 241 km/h | 32-80 km | 4+1 | 18% |
| Lilium | Lilium Jet | 300 km/h | 250 km | 6 | 5-8% |
| EHang | EH216-S | 130 km/h | 35 km | 2 | - |
| Volocopter | VoloCity | 110 km/h | 35 km | 2 | - |
6.3 기체 구성 유형
멀티로터 (Multirotor)
① ②
\ /
┌────┐
│ │
└────┘
/ \
③ ④
- 4~8개 로터가 양력+추력 모두 제공
- 장점: 단순, 안정 호버링
- 단점: 에너지 효율 최악 (순항 시 비효율)
- 대표: EHang EH216-S, Volocopter VoloCity
리프트+크루즈 (Lift + Cruise)
수직 로터 수직 로터 후방 프로펠러
↓ ↓ ↓
┌──┐ ┌──┐ ═══════ ▶───
└──┘ └──┘ 날개
- 수직 이륙용 로터 + 수평 비행용 프로펠러 분리
- 장점: 각 비행 단계 최적화
- 단점: 수직 로터가 순항 시 사하중
- 대표: Archer Midnight, Vertical Aerospace VX4
틸트로터 (Tiltrotor)
호버링: → 순항:
↑ ↑ → →
│ │ ╱ ╲
┌──┐ ┌──────┐
└──┘ └──────┘
- 로터가 수직/수평 방향으로 틸트
- 장점: 단일 추진 시스템으로 효율적
- 단점: 틸트 메커니즘 복잡성
- 대표: Joby S4 (6개 틸트), Bell Nexus
틸트윙 (Tiltwing)
- 날개 자체가 로터와 함께 틸트
- 고속·장거리 능력
- 대표: Lilium Jet (36개 전기 엔진 날개 내장)
6.4 인증 체계
FAA (미국):
- eVTOL을 "Powered-Lift" 카테고리로 재분류
- AC 21.17-4 (2025.07): 최대 12,500 lbs, 6석 이하, 배터리 전기 추진
- Joby: Stage 4 인증 70% 완료 (2025 Q3)
- Archer: 55마일 최장 유인 비행 달성 (2025.08)
EASA (유럽):
- SC-VTOL (Special Condition - VTOL) 발행
- FAA와 표준 조화(harmonization) 추진
6.5 배터리 기술
| 항목 | 현재 | 필요 |
|---|---|---|
| 리튬이온 에너지 밀도 | ~250 Wh/kg | - |
| 300km 항속 | - | 300-600 Wh/kg |
| 600km 항속 | - | 600+ Wh/kg |
| 경제적 장거리 | - | 800+ Wh/kg |
고체 전해질 배터리 돌파:
- EHang + Inx: 480 Wh/kg 달성
- 세계 최초 eVTOL 고체 전해질 배터리 비행 시험 성공 (48분 10초)
- 장점: 높은 에너지 밀도, 열 안정성, 인화성 감소
7. PX4 오토파일럿
7.1 아키텍처
PX4는 마이크로커널 철학을 따르며, 모듈 간 통신에 uORB (Micro Object Request Broker) 발행-구독 버스를 사용한다.
┌──────────────────────────────────────────────────┐
│ PX4 Flight Stack │
│ │
│ 센서 드라이버 ──┐ │
│ EKF2 추정기 ──┼──→ [uORB 버스] ──→ MAVLink │
│ 제어 모듈 ──┤ ──→ 믹서/액추에이터 │
│ 비행 모드 ──┘ ──→ 로거 │
└──────────────────────────────────────────────────┘
7.2 비행 모드
수동 모드:
| 모드 | 설명 |
|---|---|
| Stabilized | 스틱이 기체 각도 제어, 놓으면 수평 복귀 |
| Acro | 곡예 비행, 스틱이 각속도 제어 |
보조 모드:
| 모드 | 설명 | 센서 요구 |
|---|---|---|
| Altitude | 고도 유지, 수평 수동 | 기압계 |
| Position | 3D 위치 유지 — 가장 안전 | GPS + 기압계 |
자율 모드:
| 모드 | 설명 |
|---|---|
| Hold | 현재 위치 호버링 |
| Return | 안전 고도 상승 → 홈 귀환 → 착륙 |
| Mission | 웨이포인트 자율 비행 |
| Offboard | 외부(컴패니언) 설정값 추종 |
7.3 MAVLink 프로토콜
드론-지상국/컴패니언 간 경량 메시징 프로토콜.
MAVLink v2 메시지 구조:
[STX][LEN][INC][CMP][SEQ][SYS_ID][COMP_ID][MSG_ID(3B)][PAYLOAD][CRC][SIGNATURE]
- Heartbeat: 1Hz 주기, 기체 유형·비행 모드·시스템 상태 포함
- QGroundControl: MAVLink 기반 오픈소스 지상 제어 스테이션
8. ArduPilot
8.1 PX4 vs ArduPilot
| 항목 | ArduPilot | PX4 |
|---|---|---|
| 라이선스 | GPL (공개 의무) | BSD (공개 불필요) |
| 코드 규모 | 700,000+ 줄 | 상대적으로 작음 |
| 아키텍처 | 모놀리식 경향 | 마이크로커널 (uORB) |
| 커뮤니티 | 매우 크고 활발 | 기업(Auterion) 주도 |
| 실전 검증 | 최고 수준 | 정밀 제어 특화 |
| 기본 EKF | EKF3 | ECL EKF2 |
| GCS | Mission Planner, QGC | QGroundControl |
8.2 지원 기체
| 기체 | ArduPilot | PX4 |
|---|---|---|
| Copter (멀티로터) | ArduCopter | 지원 |
| Plane (고정익) | ArduPlane | 지원 |
| Rover (지상) | ArduRover | 지원 |
| Sub (수중) | ArduSub | 제한적 |
| VTOL | QuadPlane | 지원 (강점) |
| Helicopter | 전통 헬리 지원 | 제한적 |
| Blimp/Boat | 지원 | 미지원 |
9. ROS2 통합
9.1 두 가지 통합 방식
┌──────────────────┐ ┌──────────────────┐
│ 컴패니언 컴퓨터 │ │ Pixhawk (PX4) │
│ │ │ │
│ [ROS2 노드] │ │ [PX4 Autopilot] │
│ │ │ │ │ │
│ [uXRCE-DDS │◄───►│ [uXRCE-DDS │ ← 방식 1 (권장)
│ Agent] │UART │ Client] │
│ 또는 │ │ │
│ [MAVROS] │◄───►│ [MAVLink] │ ← 방식 2 (레거시)
└──────────────────┘ └──────────────────┘
방식 1: uXRCE-DDS (권장)
- PX4 내장 DDS 클라이언트 → ROS2 DDS에 직접 참여
- uORB 토픽이 ROS2 토픽으로 직접 매핑
- MAVLink를 거치지 않아 낮은 지연, 높은 대역폭
방식 2: MAVROS (레거시)
- MAVLink → ROS2 토픽/서비스 브릿지
- ArduPilot과 호환
9.2 오프보드 제어 예시
import rclpy
from rclpy.node import Node
from px4_msgs.msg import (
OffboardControlMode,
TrajectorySetpoint,
VehicleCommand
)
class OffboardControl(Node):
def __init__(self):
super().__init__('offboard_control')
self.offboard_pub = self.create_publisher(
OffboardControlMode, '/fmu/in/offboard_control_mode', 10)
self.trajectory_pub = self.create_publisher(
TrajectorySetpoint, '/fmu/in/trajectory_setpoint', 10)
self.command_pub = self.create_publisher(
VehicleCommand, '/fmu/in/vehicle_command', 10)
def arm(self):
msg = VehicleCommand()
msg.command = VehicleCommand.VEHICLE_CMD_COMPONENT_ARM_DISARM
msg.param1 = 1.0 # Arm
self.command_pub.publish(msg)
def set_position(self, x, y, z):
msg = TrajectorySetpoint()
msg.position = [x, y, z] # NED 좌표
self.trajectory_pub.publish(msg)
10. SITL/HITL 시뮬레이션
10.1 SITL (Software-In-The-Loop)
실제 하드웨어 없이 개발 PC에서 비행 펌웨어를 실행하며 시뮬레이션한다.
# PX4 SITL + Gazebo
cd PX4-Autopilot
make px4_sitl gz_x500
# Micro XRCE-DDS Agent (별도 터미널)
MicroXRCEAgent udp4 -p 8888
# ArduPilot SITL + Gazebo
sim_vehicle.py -v ArduCopter -f gazebo-iris --console --map
- 실제 펌웨어와 동일한 코드 실행 (시뮬레이션 드라이버만 다름)
- 위험 없이 알고리즘 검증, 빠른 반복 개발
10.2 HITL (Hardware-In-The-Loop)
실제 Pixhawk 하드웨어에서 정상 펌웨어를 실행하며, 시뮬레이터가 센서 데이터를 제공한다.
- 실제 하드웨어 타이밍·성능 검증
- 하드웨어 호환성 문제 사전 발견
- 실비행 전 최종 검증 단계
10.3 Gazebo 통합
Gazebo Harmonic (현재 권장):
- 물리 엔진, 센서 시뮬레이션, 카메라/LiDAR 렌더링
- PX4와 MAVLink 또는 직접 플러그인 통신
- ROS2 Humble 연동
11. 학습 로드맵
11.1 기초 (1-2개월)
| 순서 | 주제 | 자료 |
|---|---|---|
| 1 | PID 제어 이론 | Duckietown - Intro to Drones |
| 2 | PX4 SITL 환경 설정 | PX4 Simulation |
| 3 | QGroundControl 기본 | QGC User Guide |
| 4 | 칼만 필터 기초 | kalmanfilter.net |
11.2 중급 (2-4개월)
| 순서 | 주제 | 자료 |
|---|---|---|
| 5 | PX4 개발 | PX4 Dev Guide |
| 6 | EKF2 센서 퓨전 | PX4 EKF Tuning |
| 7 | ROS2 + PX4 통합 | PX4 ROS2 Guide |
| 8 | ESC 프로토콜 (DShot) | Oscar Liang - DShot |
11.3 고급 (4-6개월)
| 순서 | 주제 | 자료 |
|---|---|---|
| 9 | 자율 비행 (Offboard) | px4-offboard |
| 10 | ArduPilot 개발 | ArduPilot Dev Guide |
| 11 | eVTOL 제어 알고리즘 | 논문 및 실습 |
| 12 | 실기체 조립·튜닝 | Pixhawk 6X + 프레임 조립 |
12. References
공식 문서
- PX4 User Guide
- PX4 Dev Guide
- ArduPilot Copter Docs
- MAVLink Guide
- QGroundControl User Guide
- Pixhawk Open Standards
하드웨어
제어 및 추정
ESC 프로토콜
eVTOL
- eVTOL Guide - Dewesoft
- eVTOL Market Analysis - MotorWatt
- FAA eVTOL Certification
- EHang Solid-State Battery Flight
ROS2 통합
GitHub 저장소
Pixhawk & eVTOL Flight Control Mastery: From PX4, Kalman Filters, PWM Signals, and Sensor Fusion to ROS2 Integration
- 1. Overview
- 2. Pixhawk — The Standard in Open-Source Flight Controllers
- 3. Flight Control System Architecture
- 4. PWM Signals and ESC Protocols
- 5. Kalman Filter — The Core Algorithm of Flight Control
- 6. eVTOL (Electric Vertical Takeoff and Landing)
- 7. PX4 Autopilot
- 8. ArduPilot
- 9. ROS2 Integration
- 10. SITL/HITL Simulation
- 11. Learning Roadmap
- 12. References
- Quiz
1. Overview
Drones and eVTOLs (electric Vertical Takeoff and Landing aircraft) are no longer experimental technology. In 2026, Joby Aviation and Archer Aviation are launching commercial operations, and Urban Air Mobility (UAM) is becoming a reality. At the heart of all this technology lies the flight control system.
This post provides a comprehensive summary of the core elements of flight control.
┌────────────────────────────────────────────────────────────┐
│ Flight Control System Architecture │
│ │
│ Sensor Layer Estimation Layer Control Layer Output │
│ ┌─────────┐ ┌──────────┐ ┌──────────┐ ┌────────┐│
│ │IMU(6DoF)│ │ Kalman │ │PID Control│ │ PWM/ ││
│ │GPS │──→│ Filter │──→│ Pos→Vel │──→│ DShot ││
│ │Baro │ │(EKF2/3) │ │ →Att→Rate │ │ ESC ││
│ │Mag │ │Sen. Fusion│ │ →Mixer │ │ Motors ││
│ └─────────┘ └──────────┘ └──────────┘ └────────┘│
│ │
│ Comms: MAVLink ←→ QGroundControl / ROS2 / Companion PC │
└────────────────────────────────────────────────────────────┘
2. Pixhawk — The Standard in Open-Source Flight Controllers
2.1 What Is Pixhawk?
Pixhawk is not a specific product but an open hardware standard. It is maintained by the Dronecode Foundation (under the Linux Foundation), and over one million Pixhawk-based devices are in operation worldwide.
2.2 FMU Version History
| Version | Processor | Key Features |
|---|---|---|
| FMUv2 | STM32F427 (Cortex-M4, 168MHz) | First commercial Pixhawk |
| FMUv3 | STM32F427 | Flash expanded to 2MB |
| FMUv5 | STM32F7 | CAN bus added, improved expandability |
| FMUv5X | STM32F7 | Modular design, triple redundancy introduced |
| FMUv6X | STM32H753 (Cortex-M7, 480MHz) | Ethernet, triple IMU, separated sensor domains |
| FMUv6C | STM32H743 (Cortex-M7, 480MHz) | Cost-optimized, dual redundant IMU |
2.3 Pixhawk 6X (FMUv6X) Detailed Specifications
Processors:
- FMU: STM32H753 (Cortex-M7, 480MHz, 2MB Flash, 1MB RAM)
- IO: STM32F103 (Cortex-M3, 72MHz, 64KB SRAM)
Onboard Sensors (Triple Redundant):
| Sensor Type | Model | Count | Notes |
|---|---|---|---|
| IMU (Accel/Gyro) | ICM-45686 | 3 | BalancedGyro technology, separate bus & power |
| Barometer | ICP20100, BMP388 | 2 | Dual redundant |
| Magnetometer | BMM150 | 1 | - |
Key Interfaces:
- 16+ PWM servo outputs (8 IO + 8 FMU)
- Ethernet PHY — high-speed communication with mission computers
- 4x UART, 3x SPI, 2x CAN, 2x I2C
- USB-C, RC input (SBUS/CPPM/DSM)
Modular Design: IMU Board + FMU Board + Base Board separated via 100-pin/50-pin Pixhawk Autopilot Bus connectors
2.4 Pixhawk 6C (FMUv6C)
| Item | Specification |
|---|---|
| Processor | STM32H743 (Cortex-M7, 480MHz) |
| IMU | ICM-42688-P + BMI055 (dual redundant) |
| Barometer | MS5611 |
| Magnetometer | IST8310 |
| Dimensions | 84.8 x 44 x 12.4 mm |
| Weight | 59.3g (aluminum) / 34.6g (plastic) |
| Operating Temp | -25 to 85 deg C |
2.5 Supported Autopilot Firmware
| Firmware | License | Features |
|---|---|---|
| PX4 Autopilot | BSD | Dronecode official, microkernel architecture, precise control |
| ArduPilot | GPL | Community-driven, broad vehicle support, field-proven |
2.6 Ecosystem
Manufacturers: Holybro, CUAV, ARK Electronics, ModalAI, NXP, mRo, Auterion Tools: QGroundControl (GCS), MAVLink, MAVSDK, MAVROS, ROS2 integration
3. Flight Control System Architecture
3.1 Cascaded Control Structure
The PX4 multicopter controller uses a cascaded position-velocity-attitude-rate loop.
[Pos SP] → [Pos P] → [Vel PID] → [Att P] → [Rate K-PID] → [Mixer] → [Motors]
Outer loop Mid loop Att loop Inner loop
~50Hz ~50Hz ~250Hz ~1000Hz
| Layer | Controller | Input | Output | Update Rate |
|---|---|---|---|---|
| Position (outer) | P controller | Position error | Velocity setpoint | ~50Hz |
| Velocity (mid) | PID controller | Velocity error | Acceleration setpoint | ~50Hz |
| Attitude | P controller (quaternion) | Attitude error | Rate setpoint | ~250Hz |
| Rate (inner) | K-PID controller | Rate error | Torque/thrust cmd | ~1000Hz |
3.2 PID Controller
Continuous-Time PID:
Discrete-Time PID (flight controller implementation):
| Parameter | Role | Increasing | Decreasing |
|---|---|---|---|
| (Proportional) | Immediate response to error | Faster response, more oscillation | Slower, more stable |
| (Integral) | Eliminates steady-state error | Converges to zero error, overshoot risk | Residual error remains |
| (Derivative) | Responds to rate of change (damping) | Reduces overshoot, noise-sensitive | Increased oscillation |
3.3 Position/Velocity Controller
Position Controller (P):
- PX4 parameters:
MPC_XY_P,MPC_Z_P - Velocity saturation:
MPC_XY_VEL_MAX
Velocity Controller (PID): Velocity error to acceleration setpoint, with anti-reset windup applied
3.4 Attitude/Rate Controller
Attitude Controller (P, quaternion-based):
Rate Controller (K-PID): Low-pass filter applied to the derivative path for noise reduction
Gyroscope Data Processing Pipeline:
- Calibration correction -> 2. Bias removal -> 3. Notch filter -> 4. Low-pass filter
3.5 Mixer (Control Allocation)
Converts rate controller outputs into individual motor commands.
Quadcopter X-configuration example:
Where = total thrust, = roll torque, = pitch torque, = yaw torque
4. PWM Signals and ESC Protocols
4.1 PWM (Pulse Width Modulation) Fundamentals
PWM is a technique that conveys analog values by modulating the duty cycle of a digital signal.
┌────┐ ┌────────┐
│ │ │ │
─────┘ └──────────────┘ └──────────
|<-->| |<------>|
1000us 2000us
(0% throttle) (100% throttle)
|<-------------------->|
20ms (50Hz period)
| Parameter | Value |
|---|---|
| Pulse width range | 1000us (min) to 2000us (max) |
| Neutral point | 1500us |
| Standard period | 20ms (50Hz) |
| Resolution | 1000 steps |
| Signal latency | ~2ms |
4.2 ESC Protocol Comparison
| Protocol | Type | Pulse Width | Max Update Rate | Resolution | Error Detection |
|---|---|---|---|---|---|
| Standard PWM | Analog | 1000-2000us | 500Hz | 1000 | None |
| OneShot125 | Analog | 125-250us | 4kHz | 1000 | None |
| OneShot42 | Analog | 42-84us | ~12kHz | 1000 | None |
| Multishot | Analog | 5-25us | ~32kHz | 1000 | None |
| DShot150 | Digital | - | 150 kbps | 2048 | CRC 4-bit |
| DShot300 | Digital | - | 300 kbps | 2048 | CRC 4-bit |
| DShot600 | Digital | - | 600 kbps | 2048 | CRC 4-bit |
| DShot1200 | Digital | - | 1200 kbps | 2048 | CRC 4-bit |
4.3 DShot Protocol in Detail
DShot is the de facto standard ESC protocol as of 2025.
Frame Structure (16 bits):
[11-bit throttle (0-2047)] [1-bit telemetry request] [4-bit CRC]
- Throttle values 1-47: Reserved for special commands (beep, motor direction reversal, ESC settings)
- Bit encoding: 0/1 distinguished by HIGH/LOW ratio (1 = 75% HIGH, 0 = 37.5% HIGH)
Bidirectional DShot:
- ESC sends eRPM telemetry back to the FC
- Real-time RPM data enables dynamic notch filtering, dramatically improving vibration suppression
- Data provided: RPM, voltage, current, temperature
4.4 PWM vs DShot — Key Differences
| Characteristic | PWM (Analog) | DShot (Digital) |
|---|---|---|
| Signal method | Value encoded via pulse width | 0/1 bit stream |
| Calibration | Required (varies per ESC) | Not required |
| Noise immunity | Low | High (CRC error detection) |
| Resolution | 1000 steps | 2048 steps |
| Bidirectional | Not possible | Possible (telemetry) |
| Special commands | Not possible | Possible |
5. Kalman Filter — The Core Algorithm of Flight Control
5.1 Kalman Filter Fundamentals
The Kalman filter is a recursive algorithm that optimally estimates system state from noisy multi-sensor measurements.
┌──────────────────────────────────────────────────────┐
│ Kalman Filter Cycle │
│ │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Step 1: Predict │ │ Step 2: Update │ │
│ │ (Time Update) │────►│ (Meas. Update) │ │
│ │ │ │ │ │
│ │ x̂ = F·x + B·u │ │ K = P·Hᵀ·S⁻¹ │ │
│ │ P = F·P·Fᵀ + Q │ │ x̂ = x̂ + K·(z-Hx̂)│ │
│ │ │ │ P = (I-KH)·P │ │
│ │ Predict via │ │ Correct with │ │
│ │ motion model │ │ measurements │ │
│ └──────────────────┘ └────────┬─────────┘ │
│ ▲ │ │
│ └────────────────────────┘ │
│ Repeat │
└──────────────────────────────────────────────────────┘
Step 1: Prediction (Time Update)
| Symbol | Meaning |
|---|---|
| State estimate vector | |
| State transition matrix | |
| Control input matrix | |
| Control input (e.g., gyro angular rate) | |
| Error covariance matrix | |
| Process noise covariance |
Step 2: Update (Measurement Update)
| Symbol | Meaning |
|---|---|
| Kalman gain — determines weighting between prediction and measurement | |
| Observation matrix | |
| Actual measurement | |
| Measurement noise covariance |
Intuition Behind the Kalman Gain:
- : Trust the measurement more (low measurement noise)
- : Trust the prediction more (accurate model)
5.2 Extended Kalman Filter (EKF)
Since drone dynamics are nonlinear, the standard Kalman filter cannot be applied directly. The EKF linearizes nonlinear functions using a first-order Taylor series expansion.
Nonlinear System:
EKF Prediction:
EKF Update:
5.3 Error-State Kalman Filter (ESKF)
PX4's EKF2 implements the Error-State Kalman Filter. It is essential for estimating uncertainty in quaternion rotations.
Key Idea:
- Instead of directly estimating the quaternion, estimate the error rotation vector
- Represent rotational uncertainty as a 3D vector in the tangent space of SO(3)
- Separate the Nominal State (inertial navigation equations) from the Error State (Kalman filter)
5.4 PX4 EKF2 (ECL EKF) — 24-State Vector
| Index | State | Description |
|---|---|---|
| 0-3 | Quaternion (q0-q3) | NED to Body frame rotation |
| 4-6 | Velocity (Vn, Ve, Vd) | NED frame [m/s] |
| 7-9 | Position (Pn, Pe, Pd) | NED frame [m] |
| 10-12 | Gyro bias | IMU gyroscope [rad/s] |
| 13-15 | Accelerometer bias | IMU accelerometer [m/s^2] |
| 16-18 | Earth magnetic field | NED frame [Gauss] |
| 19-21 | Body magnetic field bias | Body frame |
| 22-23 | Wind velocity (Wn, We) | North/East wind [m/s] |
Sensor Fusion Architecture:
- Delayed fusion: Sensor data stored in a FIFO buffer to accommodate per-sensor time delays, fusing data at matching timestamps
- IMU data: Used only for state prediction, never as an observation
- Multiple EKF instances: Enhanced fault detection (MAX(IMU count, 1) x MAX(magnetometer count, 1), up to 16 instances)
- Multi-hypothesis filter: Gaussian sum filter for yaw estimation, capable of using GPS velocity alone
5.5 ArduPilot EKF2 vs EKF3
| Feature | EKF2 | EKF3 (current default) |
|---|---|---|
| Sensor affinity | Not supported | Supported — dynamic non-primary sensor switching |
| Additional sensors | Basic only | Beacons, wheel encoders, visual odometry |
| Lane switching | Limited | Dynamic lane switching |
| Fallback | EKF2 to DCM | EKF3 to DCM |
| Parameters | EK2_* | EK3_* |
5.6 Complementary Filter vs Kalman Filter
Where (typically 0.96-0.98)
| Feature | Complementary Filter | Kalman Filter |
|---|---|---|
| Complexity | Low | High |
| Compute load | Lightweight (embedded) | Heavy (FPU required) |
| Principle | HPF(gyro) + LPF(accelerometer) | Optimal weighted average (covariance) |
| Bias | May be present | Bias-free |
| Multi-sensor | Suited for 2 sensors | Optimal for multiple sensors |
| Fault tolerance | None | Innovation consistency check |
6. eVTOL (Electric Vertical Takeoff and Landing)
6.1 What Is eVTOL?
An eVTOL is an aircraft that takes off and lands vertically using an electric propulsion system and flies horizontally. As a core element of Urban Air Mobility (UAM), it is ushering in the era of "flying taxis."
6.2 Market Overview
- Market size: ~$4.2B in 2025 to ~$8.0B by 2033 (CAGR 37%)
- Commercial operations expected to begin in 2026: Joby Aviation, Archer Aviation
| Company | Aircraft | Max Speed | Range | Passengers | Market Share |
|---|---|---|---|---|---|
| Joby Aviation | S4 | 322 km/h | 241 km | 4+1 | 22% |
| Archer Aviation | Midnight | 241 km/h | 32-80 km | 4+1 | 18% |
| Lilium | Lilium Jet | 300 km/h | 250 km | 6 | 5-8% |
| EHang | EH216-S | 130 km/h | 35 km | 2 | - |
| Volocopter | VoloCity | 110 km/h | 35 km | 2 | - |
6.3 Airframe Configuration Types
Multirotor
① ②
\ /
┌────┐
│ │
└────┘
/ \
③ ④
- 4-8 rotors provide both lift and thrust
- Pros: Simple, stable hovering
- Cons: Worst energy efficiency (inefficient during cruise)
- Examples: EHang EH216-S, Volocopter VoloCity
Lift + Cruise
Vertical rotor Vertical rotor Rear propeller
↓ ↓ ↓
┌──┐ ┌──┐ ═══════ ▶───
└──┘ └──┘ Wing
- Separate rotors for vertical takeoff and propellers for horizontal flight
- Pros: Each flight phase is optimized
- Cons: Vertical rotors are dead weight during cruise
- Examples: Archer Midnight, Vertical Aerospace VX4
Tiltrotor
Hover: → Cruise:
↑ ↑ → →
│ │ ╱ ╲
┌──┐ ┌──────┐
└──┘ └──────┘
- Rotors tilt between vertical and horizontal orientations
- Pros: Efficient with a single propulsion system
- Cons: Mechanical complexity of tilt mechanism
- Examples: Joby S4 (6 tilting rotors), Bell Nexus
Tiltwing
- The wing itself tilts along with the rotors
- High-speed, long-range capability
- Examples: Lilium Jet (36 electric engines embedded in wings)
6.4 Certification Framework
FAA (United States):
- eVTOL reclassified under the "Powered-Lift" category
- AC 21.17-4 (2025.07): Max 12,500 lbs, 6 seats or fewer, battery-electric propulsion
- Joby: Stage 4 certification 70% complete (2025 Q3)
- Archer: Achieved longest piloted flight of 55 miles (2025.08)
EASA (Europe):
- Issued SC-VTOL (Special Condition - VTOL)
- Pursuing standards harmonization with FAA
6.5 Battery Technology
| Item | Current | Required |
|---|---|---|
| Li-ion energy density | ~250 Wh/kg | - |
| 300km range | - | 300-600 Wh/kg |
| 600km range | - | 600+ Wh/kg |
| Economical long-range | - | 800+ Wh/kg |
Solid-State Battery Breakthrough:
- EHang + Inx: Achieved 480 Wh/kg
- World's first eVTOL solid-state battery flight test successful (48 min 10 sec)
- Advantages: Higher energy density, thermal stability, reduced flammability
7. PX4 Autopilot
7.1 Architecture
PX4 follows a microkernel philosophy, using the uORB (Micro Object Request Broker) publish-subscribe bus for inter-module communication.
┌──────────────────────────────────────────────────┐
│ PX4 Flight Stack │
│ │
│ Sensor Drivers ──┐ │
│ EKF2 Estimator ──┼──→ [uORB Bus] ──→ MAVLink │
│ Control Modules──┤ ──→ Mixer/Actuators│
│ Flight Modes ──┘ ──→ Logger │
└──────────────────────────────────────────────────┘
7.2 Flight Modes
Manual Modes:
| Mode | Description |
|---|---|
| Stabilized | Stick controls vehicle angle, levels on release |
| Acro | Aerobatic flight, stick controls angular rate |
Assisted Modes:
| Mode | Description | Sensor Required |
|---|---|---|
| Altitude | Holds altitude, manual horizontal | Barometer |
| Position | Holds 3D position — safest | GPS + Barometer |
Autonomous Modes:
| Mode | Description |
|---|---|
| Hold | Hovers at current position |
| Return | Climbs to safe altitude, returns home, lands |
| Mission | Autonomous waypoint flight |
| Offboard | Follows setpoints from companion PC |
7.3 MAVLink Protocol
A lightweight messaging protocol for communication between drones and ground stations or companion computers.
MAVLink v2 Message Structure:
[STX][LEN][INC][CMP][SEQ][SYS_ID][COMP_ID][MSG_ID(3B)][PAYLOAD][CRC][SIGNATURE]
- Heartbeat: Sent at 1Hz, includes vehicle type, flight mode, and system status
- QGroundControl: Open-source ground control station based on MAVLink
8. ArduPilot
8.1 PX4 vs ArduPilot
| Item | ArduPilot | PX4 |
|---|---|---|
| License | GPL (disclosure required) | BSD (no disclosure required) |
| Code size | 700,000+ lines | Relatively smaller |
| Architecture | Monolithic tendency | Microkernel (uORB) |
| Community | Very large and active | Corporate-led (Auterion) |
| Field-proven | Top tier | Specialized in precise control |
| Default EKF | EKF3 | ECL EKF2 |
| GCS | Mission Planner, QGC | QGroundControl |
8.2 Supported Vehicles
| Vehicle | ArduPilot | PX4 |
|---|---|---|
| Copter (multirotor) | ArduCopter | Supported |
| Plane (fixed-wing) | ArduPlane | Supported |
| Rover (ground) | ArduRover | Supported |
| Sub (underwater) | ArduSub | Limited |
| VTOL | QuadPlane | Supported (strength) |
| Helicopter | Traditional heli support | Limited |
| Blimp/Boat | Supported | Not supported |
9. ROS2 Integration
9.1 Two Integration Approaches
┌──────────────────┐ ┌──────────────────┐
│ Companion Computer│ │ Pixhawk (PX4) │
│ │ │ │
│ [ROS2 Nodes] │ │ [PX4 Autopilot] │
│ │ │ │ │ │
│ [uXRCE-DDS │◄───►│ [uXRCE-DDS │ ← Approach 1 (Recommended)
│ Agent] │UART │ Client] │
│ or │ │ │
│ [MAVROS] │◄───►│ [MAVLink] │ ← Approach 2 (Legacy)
└──────────────────┘ └──────────────────┘
Approach 1: uXRCE-DDS (Recommended)
- PX4's built-in DDS client participates directly in the ROS2 DDS network
- uORB topics map directly to ROS2 topics
- Bypasses MAVLink for lower latency and higher bandwidth
Approach 2: MAVROS (Legacy)
- MAVLink to ROS2 topic/service bridge
- Compatible with ArduPilot
9.2 Offboard Control Example
import rclpy
from rclpy.node import Node
from px4_msgs.msg import (
OffboardControlMode,
TrajectorySetpoint,
VehicleCommand
)
class OffboardControl(Node):
def __init__(self):
super().__init__('offboard_control')
self.offboard_pub = self.create_publisher(
OffboardControlMode, '/fmu/in/offboard_control_mode', 10)
self.trajectory_pub = self.create_publisher(
TrajectorySetpoint, '/fmu/in/trajectory_setpoint', 10)
self.command_pub = self.create_publisher(
VehicleCommand, '/fmu/in/vehicle_command', 10)
def arm(self):
msg = VehicleCommand()
msg.command = VehicleCommand.VEHICLE_CMD_COMPONENT_ARM_DISARM
msg.param1 = 1.0 # Arm
self.command_pub.publish(msg)
def set_position(self, x, y, z):
msg = TrajectorySetpoint()
msg.position = [x, y, z] # NED coordinates
self.trajectory_pub.publish(msg)
10. SITL/HITL Simulation
10.1 SITL (Software-In-The-Loop)
Runs the flight firmware on a development PC without any physical hardware.
# PX4 SITL + Gazebo
cd PX4-Autopilot
make px4_sitl gz_x500
# Micro XRCE-DDS Agent (separate terminal)
MicroXRCEAgent udp4 -p 8888
# ArduPilot SITL + Gazebo
sim_vehicle.py -v ArduCopter -f gazebo-iris --console --map
- Runs the exact same code as real firmware (only simulation drivers differ)
- Risk-free algorithm validation and rapid iterative development
10.2 HITL (Hardware-In-The-Loop)
Runs standard firmware on actual Pixhawk hardware, with the simulator providing sensor data.
- Validates real hardware timing and performance
- Catches hardware compatibility issues early
- Final verification step before real flight
10.3 Gazebo Integration
Gazebo Harmonic (currently recommended):
- Physics engine, sensor simulation, camera/LiDAR rendering
- Communicates with PX4 via MAVLink or direct plugin interface
- Integration with ROS2 Humble
11. Learning Roadmap
11.1 Beginner (1-2 Months)
| Order | Topic | Resource |
|---|---|---|
| 1 | PID control theory | Duckietown - Intro to Drones |
| 2 | PX4 SITL environment | PX4 Simulation |
| 3 | QGroundControl basics | QGC User Guide |
| 4 | Kalman filter basics | kalmanfilter.net |
11.2 Intermediate (2-4 Months)
| Order | Topic | Resource |
|---|---|---|
| 5 | PX4 development | PX4 Dev Guide |
| 6 | EKF2 sensor fusion | PX4 EKF Tuning |
| 7 | ROS2 + PX4 integration | PX4 ROS2 Guide |
| 8 | ESC protocols (DShot) | Oscar Liang - DShot |
11.3 Advanced (4-6 Months)
| Order | Topic | Resource |
|---|---|---|
| 9 | Autonomous flight (Offboard) | px4-offboard |
| 10 | ArduPilot development | ArduPilot Dev Guide |
| 11 | eVTOL control algorithms | Papers and hands-on practice |
| 12 | Real vehicle build and tuning | Pixhawk 6X + frame assembly |
12. References
Official Documentation
- PX4 User Guide
- PX4 Dev Guide
- ArduPilot Copter Docs
- MAVLink Guide
- QGroundControl User Guide
- Pixhawk Open Standards
Hardware
Control and Estimation
ESC Protocols
eVTOL
- eVTOL Guide - Dewesoft
- eVTOL Market Analysis - MotorWatt
- FAA eVTOL Certification
- EHang Solid-State Battery Flight
ROS2 Integration
GitHub Repositories
Quiz
Q1: What is the main topic covered in "Pixhawk & eVTOL Flight Control Mastery: From PX4, Kalman
Filters, PWM Signals, and Sensor Fusion to ROS2 Integration"?
A comprehensive guide to Pixhawk flight controllers and eVTOL technology. Covers Pixhawk 6X/6C hardware, PX4/ArduPilot autopilots, cascaded PID control, PWM/DShot ESC protocols, Extended Kalman Filter (EKF) sensor fusion, the eVTOL market, airframe configurations, certification,...
Q2: What is Pixhawk — The Standard in Open-Source Flight Controllers?
2.1 What Is Pixhawk? Pixhawk is not a specific product but an open hardware standard. It is
maintained by the Dronecode Foundation (under the Linux Foundation), and over one million
Pixhawk-based devices are in operation worldwide.
Q3: Describe the Flight Control System Architecture.
3.1 Cascaded Control Structure The PX4 multicopter controller uses a cascaded
position-velocity-attitude-rate loop.
Q4: What are the key aspects of Kalman Filter — The Core Algorithm of Flight Control?
5.1 Kalman Filter Fundamentals The Kalman filter is a recursive algorithm that optimally estimates system state from noisy multi-sensor measurements.
Q5: How does eVTOL (Electric Vertical Takeoff and Landing) work?
6.1 What Is eVTOL? An eVTOL is an aircraft that takes off and lands vertically using an electric
propulsion system and flies horizontally.