0% found this document useful (0 votes)
104 views27 pages

Flight Controller

The document discusses the key components and mechanisms that enable drone flight. It describes how drones use lithium-ion batteries to power motors and propellers that generate lift. A flight controller receives input from sensors to calculate motor adjustments and maintain stability or execute commands from a remote control or autonomous flight system. Sensors provide data on acceleration, rotation, orientation and other metrics to aid navigation. Communication systems relay commands and data between drones and controllers. The document then explains how the basic flight controls of roll, pitch, yaw and throttle are implemented to maneuver drones.

Uploaded by

prishu kotiyal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views27 pages

Flight Controller

The document discusses the key components and mechanisms that enable drone flight. It describes how drones use lithium-ion batteries to power motors and propellers that generate lift. A flight controller receives input from sensors to calculate motor adjustments and maintain stability or execute commands from a remote control or autonomous flight system. Sensors provide data on acceleration, rotation, orientation and other metrics to aid navigation. Communication systems relay commands and data between drones and controllers. The document then explains how the basic flight controls of roll, pitch, yaw and throttle are implemented to maneuver drones.

Uploaded by

prishu kotiyal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

FLIGHT

CONTROLLER

BY PRIYANSHU KOTIYAL
BIBLIOGRAPHY
I have used several resources like different websites, AI models, Certain pdfs and
many more websites.
Different websites include:-
www.mouser.com
www.researchgate.com
www.robolink.com
www.wikipedia.com
www.electronicswing.com
www.towardsdatascience.com
www.kalmanfilter.net
www.renesas.com
www.gunjanpatel.wordpress.com

And AI models include


ChatGPT
What is the mechanism of drones? How drones
work, basic movements like roll pitch yaw throttle.

The mechanism of drones, breaking down their key components and how they work
together to achieve flight are:-

1. Power Source: The heart of any drone is its power source. Most commonly,
drones utilize rechargeable lithium-ion batteries, similar to those found in laptops and
smartphones. These batteries provide the electricity needed to run the motors and
other onboard electronics. The flight time of a drone is directly related to the capacity
of its battery, with larger batteries enabling longer flights.

2. Motors and Propellers: The thrust that propels the drone upwards comes from
its motors and propellers. Most drones are multi-rotors, meaning they have several
small motors mounted on arms extending from the central body. Each motor is
attached to a propeller, which spins rapidly to generate lift. The number and
configuration of propellers vary depending on the size and type of drone. For
example, smaller hobbyist drones typically have four propellers arranged in a
quadcopter configuration, while larger commercial drones might have six or eight
propellers in a hexacopter or octocopter configuration.

3. Flight Controller: The brain of the drone is its flight controller, a small computer
responsible for maintaining stability and controlling the drone's movement. The flight
controller receives input from various sensors, such as accelerometers, gyroscopes,
and magnetometers, which provide information about the drone's position,
orientation, and movement. Based on this data, the flight controller calculates the
necessary adjustments to the motor speeds and propeller angles to keep the drone
stable and maneuver it as desired.

4. Remote Control or Autonomous Flight: Drones can be controlled in two primary


ways: remote control and autonomous flight. In remote control, the pilot uses a
handheld transmitter to send signals to the drone's receiver. The receiver then
communicates with the flight controller, translating the pilot's commands into
adjustments to the drone's movement. In autonomous flight, the drone relies on pre-
programmed flight plans or onboard software to navigate and perform tasks without
human intervention.

5. Sensors: A variety of sensors play crucial roles in the operation of a drone.


Accelerometers and gyroscopes provide information about the drone's acceleration
and rotational movement, helping the flight controller maintain stability.
Magnetometers provide information about the Earth's magnetic field, assisting with
navigation and orientation. Additionally, some drones might be equipped with
cameras, LiDAR sensors, or other advanced sensors for specific tasks like aerial
photography, mapping, or obstacle avoidance.
6. Communication System: For remotely controlled drones, a communication
system is essential for relaying commands from the pilot to the drone and receiving
telemetry data back. This can be achieved through radio waves, Wi-Fi, or other
wireless technologies.

ROLL

Roll, in the world of drones, refers to the tilting of the drone from side to side along its
longitudinal axis. Imagine the drone standing upright like a person; rolling is like
leaning to the left or right. This movement is distinct from pitch (tilting forward or
backward) and yaw (spinning left or right).

Here's an image to illustrate roll:

Roll serves several essential functions for drones:

• Changing direction: By rolling, a drone can turn left or right without


significantly losing altitude or changing its forward speed. This comes in
handy for navigating around obstacles, adjusting flight path, or simply making
minor course corrections.
• Performing maneuvers: Some advanced drone maneuvers, like barrel rolls or
flips, involve controlled and rapid rolling movements.
• Balancing and stabilization: The flight controller utilizes roll adjustments to
maintain the drone's level orientation and compensate for external
disturbances like wind.

The way a drone rolls depends on its specific design and control system. Most
commonly, roll is controlled by adjusting the speeds of individual propellers. For
example, to roll left, the propellers on the right side might be sped up while the
propellers on the left side are slowed down. This creates a difference in lift forces on
each side, causing the drone to tilt in the desired direction.

PITCH
"Pitch" refers to the rotation of a drone around its lateral axis (side-to-side). It's one
of the three primary rotational movements that control a drone's orientation in space,
along with yaw and roll.

Here's a breakdown of how pitch works in drones:

• Control: Pitch is typically controlled by adjusting the speed of the front and
rear motors.
• Forward Tilt: Increasing the speed of the rear motors relative to the front
motors causes the drone to pitch forward, tilting its nose downwards.
• Backward Tilt: Conversely, increasing the speed of the front motors relative to
the rear motors causes the drone to pitch backward, tilting its nose upwards.
• Level Flight: Equal thrust from all motors maintains a level pitch, keeping the
drone flying horizontally.

Functions of Pitch Control:

• Ascent and Descent: Pitch is essential for controlling a drone's altitude. Tilting
the nose upwards initiates a climb, while tilting it downwards initiates a
descent.
• Forward and Backward Movement: Pitch also plays a role in forward and
backward movement, as it affects the drone's angle of attack relative to the
airflow.
• FPV Camera Control: In drones with first-person-view (FPV) cameras, pitch
control allows you to adjust the camera's angle, directing its view up or down.
• Acrobatic Maneuvers: Experienced drone pilots use pitch control to perform
various acrobatic maneuvers, such as flips, rolls, and dives.

YAW
Yaw refers to the rotation of the drone around its vertical axis. Imagine
the drone standing upright, like a person. Yawing is the movement where
the drone spins left or right, like it's twisting its body. It's different from
pitch (tilting forward or backward) and roll (tilting sideways).

Yaw is a crucial movement for drones, allowing them to:

• Change direction: By yawing, a drone can quickly turn left or right without
losing altitude or changing its forward speed. This is essential for
maneuvering around obstacles, following a curved path, or simply changing
its heading.
• Stay stable: Drones use yaw to maintain their balance and
orientation. Gyroscopes and other sensors detect any unwanted yaw
movements, and the flight controller automatically adjusts the motor speeds to
compensate.
• Perform certain maneuvers: Some advanced drone maneuvers, like spins and
barrel rolls, involve rapid yaw movements.

Here are some additional things to keep in mind about yaw:

• The yaw rate, or how quickly the drone spins, can be controlled by the
pilot. Most drone controllers have a dedicated yaw control stick or button.
• Yaw can be combined with other movements, such as pitch and roll, to create
complex maneuvers.
• Yawing can be affected by wind and other environmental factors. Pilots need
to be aware of these factors and adjust their controls accordingly.

Throttle
Throttle, in the context of drones, refers to the control of the overall power output of
the drone's motors. It essentially governs the drone's altitude and vertical movement.

Here's how throttle works:

• Increasing throttle: More power is sent to the motors, causing the propellers to
spin faster. This generates an increased downward thrust, lifting the drone
and making it ascend.
• Decreasing throttle: Less power is sent to the motors, slowing down the
propellers. The downward thrust also reduces, causing the drone to descend.
• Maintaining throttle: A constant level of power is sent to the motors, allowing
the drone to hover at a specific altitude.

Throttle is one of the most fundamental controls for flying a drone. Pilots constantly
adjust the throttle throughout the flight to maneuver the drone up, down, and
maintain its desired altitude. Here are some key points to remember about throttle:

• Smoothness is key: Jerky throttle movements can make the drone unstable
and difficult to control.
• Throttle sensitivity: Different drones have different throttle
sensitivities, meaning how much the drone ascends or descends with each
small adjustment.
• Throttle management: Efficient throttle control is crucial for maximizing flight
time and preventing battery drain.
• Safety considerations: Be cautious with aggressive throttle
movements, especially near the ground or obstacles, to avoid crashes.
What is a flight controller? Why it is needed in
drones?

The flight controller is the brain or central nervous system of the drone. It's a small
computer board packed with sensors, software, and communication interfaces that
manage and control every aspect of the drone's flight. Here's why it's absolutely
essential:
Importance of the Flight Controller:

• Maintains Stability: Drones are inherently unstable due to their multi-rotor


design. The flight controller constantly analyzes data from sensors like
gyroscopes and accelerometers to detect even the slightest tilt or change in
movement. Based on this data, it sends adjustments to the motor speeds and
propeller angles, keeping the drone balanced and level
• Controls Movement: The pilot's commands from the remote controller or pre-
programmed flight instructions are interpreted by the flight controller. It
calculates the necessary adjustments to motor speeds and propeller
directions to make the drone move in the desired direction, allowing for
precise control and maneuvers.
• Safety Features: The flight controller also incorporates safety features like
automatic return-to-home, low-battery warnings, and even obstacle avoidance
functions. These features can prevent crashes and ensure a safe
flight, especially for beginners.
• Data Acquisition and Logging: Many flight controllers can record flight data
like altitude, speed, and location. This information can be valuable for
analyzing flight performance, planning future missions, and even for
recreational purposes like recording flight paths for aerial photography.
Gyroscope mpu6050.

The MPU6050 is a popular and versatile inertial measurement unit (IMU), meaning it
combines two sensor types: a 3-axis gyroscope and a 3-axis accelerometer. These
sensors work together to provide valuable information about the motion and
orientation of the device they're mounted on.

Gyroscope:

• Function: Detects rotational velocity or the rate of change of angular


position along the X, Y, and Z axes. Imagine holding a spinning merry-go-
round; the gyroscope would sense how fast it's spinning and in which direction
(clockwise or counter-clockwise) for each axis.
• Output: Returns raw data in degrees per second (°/s) for each axis. This data
can be processed and interpreted to determine the angular velocity of the
device and its changes over time.

Accelerometer:

• Function: Measures linear acceleration in g-forces (multiples of Earth's


gravity) along the X, Y, and Z axes. Think of it like a tiny scale that senses
how much force is acting on the device in different directions.
• Output: Returns raw data in g-forces for each axis. This data can be used to
understand the device's movement, tilt, and acceleration (including gravity).
Combined Benefits:

By combining the gyroscope's rotational data with the accelerometer's linear data,
the MPU6050 provides a comprehensive understanding of the device's motion and
orientation in 6 degrees of freedom (6 DoF). This makes it incredibly valuable for
various applications, including:

• Drone flight control: Drones use the MPU6050 to maintain stability, balance,
and precise control during flight.
• Virtual reality (VR) headsets: The MPU6050 tracks head movements for
immersive VR experiences.
• Robot navigation: Robots rely on the MPU6050 for precise movement and
obstacle avoidance.
• Gaming controllers: Motion-controlled games utilize the MPU6050 for gesture
recognition and control.
• Wearable devices: Fitness trackers and smartwatches can use the MPU6050
to track steps, activity levels, and orientation.
BLDC motors vs BDC motors, why BLDC is
used in case of drones?

BDC (Brushed DC) Motors:

• Construction: BDC motors use brushes and a commutator to switch the


current in the rotor, creating the magnetic field that drives the motor.
• Operation: Brushes physically touch the commutator, causing friction and
wear. This limits the motor's efficiency, lifespan, and operating speed.
• Spark generation: The friction between brushes and commutator creates
sparks, which can interfere with electronics and pose a fire risk.
• Maintenance: Brushes need regular replacement due to wear.

BLDC (Brushless DC) Motors:

• Construction: BLDC motors use electronic commutation instead of brushes


and a commutator. This means the current in the rotor is switched
electronically, based on the position of the rotor magnets.
• Operation: No physical contact between brushes and commutator means less
friction, higher efficiency, longer lifespan, and higher operating speeds.
• Spark-free: Electronic commutation eliminates sparks, making BLDC motors
safer and more reliable.
• Maintenance-free: No brushes to replace, resulting in lower maintenance
costs.

Brushless Dc motor(BLDC)

Why BLDC motors are ideal for drones:

• Higher efficiency: BLDC motors convert more electrical energy into


mechanical energy, resulting in longer flight times for drones.
• Longer lifespan: With no brushes to wear out, BLDC motors last significantly
longer than BDC motors, reducing maintenance costs.
• Higher operating speeds: BLDC motors can spin much faster than BDC
motors, providing drones with more agility and maneuverability.
• Spark-free operation: Sparklessness eliminates the risk of fire or interference
with electronics, crucial for safe drone operation.
• Lighter weight: BLDC motors are generally lighter than BDC motors, further
contributing to improved flight performance.
PID CONTROL ALGORITHM

PID (Proportional-Integral-Derivative) control is a widely used algorithm in control


systems to regulate a process variable by adjusting an output. It's like a skilled
autopilot, constantly correcting course to keep a system on track.

Here's how it works:

1. Monitors Error: The PID controller continuously measures the difference


between the desired setpoint (target value) and the actual measured value
(current state). This difference is called the error.

2. Calculates Corrections: It computes three correction terms based on the error:

o Proportional (P): Reacts to the current error, quickly adjusting the


output in proportion to the error's magnitude.
o Integral (I): Eliminates steady-state error by considering the
accumulated error over time, making adjustments to bring the system
precisely to the setpoint.
o Derivative (D): Anticipates future errors by reacting to the rate of
change of the error, dampening oscillations and improving stability.

3. Combines Corrections: The PID controller sums these three terms to create a
total output correction signal.

4. Applies Correction: This correction signal is then sent to the system's actuator
(e.g., a motor, valve, or heater) to adjust its behavior and bring the process
variable closer to the desired setpoint.

Tuning the Algorithm:

• The magic lies in tuning the three PID constants (Kp, Ki, Kd) to achieve
optimal control for a specific system.
• These constants determine how strongly the controller reacts to each term,
influencing its responsiveness, stability, and accuracy.

Common Applications:

PID controllers are incredibly versatile and found in countless applications, including:

• Drone flight control: Stabilizing altitude, attitude, and position.


• Temperature control: Maintaining consistent temperatures in
ovens, refrigerators, and industrial processes.
• Motor speed control: Ensuring precise motor speeds in
robots, machinery, and vehicles.
• Pressure regulation: Controlling fluid or gas pressure in systems like pumps
and compressors.
• Chemical processes: Regulating chemical reactions and mixing in industrial
processes.
• Robotics: Controlling movement and precision in robotic arms and
manipulators.
• Automotive systems: Anti-lock braking systems (ABS), cruise control, and
engine control.
Propellers pitch, anticlockwise vs clockwise

Propeller pitch and rotation direction (clockwise vs. counterclockwise) play crucial
roles in generating thrust and controlling the drone's movement. Here is how they
work:
Propeller Pitch:

• Imagine the propeller as a screw. Pitch refers to the angle of the blades
relative to the plane of rotation. A higher pitch angle means the blades are
"screwing" more air, creating more forward thrust. Conversely, a lower pitch
angle creates less thrust but allows for higher rotational speeds.

Clockwise vs. Counterclockwise Rotation:

• Drones typically have two sets of propellers, rotating in opposite


directions. This creates a balanced torque and prevents the drone from
spinning uncontrollably. The specific rotations used vary depending on the
drone's design and desired flight characteristics.
• Common configurations:
o Quadcopters: Typically use two clockwise (CW) and two
counterclockwise (CCW) propellers arranged in an "X" pattern. This
configuration generates lift, forward thrust, and allows for yaw control
(spinning left/right).
o Hexacopters: May use combinations of CW and CCW rotations
depending on the specific design, often offering increased stability and
redundancy.

How They Work Together:

• Adjusting the pitch angle of the propellers affects the amount of thrust
generated. Increasing the pitch on all rotors provides more lift for takeoff and
climbing. Decreasing the pitch can offer smoother control and longer flight
times.
• Combining pitch adjustments with different rotation directions allows for fine-
tuning the drone's movement. For example, tilting the CW rotors more while
slightly reducing pitch on the CCW rotors can initiate a turn to the right.
How to assemble/ make pixhawk drone? Learn
about telemetry escs, gcs
"Pixhawk drone" refers to any drone built using the Pixhawk flight controller. These
drones come in various configurations, sizes, and capabilities, depending on the
specific components chosen and how they're assembled.

Here's a breakdown of the process and some key terms to know:

1. Planning and Choosing Components:

• Frame: Choose a frame compatible with the desired drone size and payload
capacity. Popular options include quadcopters, hexacopters, and octocopters.
• Motors and ESCs: Select brushless DC motors and Electronic Speed
Controllers (ESCs) matched to the frame size and weight, ensuring the ESCs
handle the motor's current draw.
• Propellers: Propeller size and pitch should be compatible with the motors and
desired flight characteristics.
• Pixhawk Flight Controller: Choose the appropriate Pixhawk model based on
features and sensors needed.
• Power Supply: Select a lipo battery with sufficient voltage and amperage to
power the drone efficiently.
• Radio and Receiver: Choose a compatible radio system for controlling the
drone from a handheld transmitter.
• Telemetry Module: Enables real-time data exchange between the drone and
the Ground Control Station (GCS).

2. Assembly and Wiring:

• Mount the Pixhawk flight controller securely on the frame.


• Connect the ESCs to the Pixhawk and motors following the specific wiring
diagram.
• Install the propellers on the motors with the correct direction and orientation.
• Connect the power supply, radio receiver, and telemetry module to the
Pixhawk.
• Double-check all connections for accuracy and ensure tight fits.

3. Software Setup and Calibration:

• Flash the Pixhawk flight controller with the latest firmware.


• Configure the drone using the Ground Control Station (GCS) software like
Mission Planner or QGroundControl.
• Calibrate the ESCs, sensors, and compass using the GCS software.
• Perform test flights in a safe and controlled environment, fine-tuning settings
and ensuring stability.

Key Terms:

• Telemetry: Allows for real-time data transfer between the drone and the GCS,
including flight parameters, battery voltage, GPS location, and more. This aids
in monitoring and controlling the drone effectively.
• ESCs (Electronic Speed Controllers): These regulate the power to the
brushless DC motors, enabling precise control over their speed and direction.
• GCS (Ground Control Station): Software running on a computer or tablet
used to configure, monitor, and control the drone.
PWM vs PPM Signals: Controlling Your Drone's
Movements

Both PWM (Pulse Width Modulation) and PPM (Pulse Position Modulation) are
signaling techniques used to control the motion of drone motors and other devices.

PWM:

• Function: PWM transmits information by varying the width of rectangular


pulses, usually within a fixed frequency. A wider pulse signifies a higher
control signal, leading to increased motor speed and thrust.
• Implementation: Each motor typically has its own dedicated channel with its
own PWM signal. This allows for precise control of individual motors and
smooth maneuvers.
• Complexity: Requires multiple wires for each motor, increasing wiring
complexity and weight for multi-motor drones.
• Susceptibility to noise: PWM signals are more prone to
interference, potentially affecting drone stability and control.

PPM:

• Function: PPM combines several PWM signals into a single pulse train. Each
channel is represented by the position of its corresponding pulse within the
train. The delay between pulse starts determines the control signal for each
motor.
• Implementation: Requires only one wire for all motors, making it ideal for
lightweight drones and simplifying wiring.
• Limited channels: The number of channels supported by PPM is generally
lower than with PWM, restricting the variety of control options available.
• Jitter sensitivity: PPM signals are more sensitive to timing variations
(jitter), which can affect motor response and drone stability.

Choosing the Right Signal:

The optimal choice between PWM and PPM depends on your specific needs and
priorities:

• Precise control and multiple motors: Use PWM for drones requiring fine-tuned
control of individual motors, like racing drones or those with complex
maneuvers.
• Lightweight and simple setup: Choose PPM for smaller drones where weight
and wiring complexity are crucial, or for applications where simpler control
suffices.

Additional factors:

• Compatibility: Ensure your flight controller and other electronics support the
chosen signal type.
• Performance requirements: Consider the level of responsiveness and
precision needed for your specific drone project.
Complementary filters
Complementary filters are clever signal processing techniques that blend data from
multiple, often noisy sensors to produce a more accurate and reliable estimate of a
physical quantity. They're particularly valuable in applications where sensors have
complementary strengths and weaknesses, such as in inertial measurement units
(IMUs) commonly used in drones and other devices.

Key Concepts:

• Merging Sensor Data: Complementary filters combine measurements from


two or more sensors that measure the same quantity but have different
characteristics, such as accuracy over time or sensitivity to noise.
• Complementary Strengths: They exploit the fact that different sensors can
excel in different domains. For example, accelerometers are good at detecting
rapid changes, while gyroscopes are better at maintaining long-term
accuracy.
• Simple Implementation: They're relatively straightforward to implement, often
requiring only basic mathematical operations. This makes them
computationally efficient and suitable for real-time applications.

Common Use Cases:

• IMUs: Accelerometers and gyroscopes are often combined using


complementary filters to provide accurate orientation and motion tracking for
devices like drones, robots, and smartphones.
• GPS and IMU Fusion: GPS provides absolute position information but can be
noisy and slow to update. IMUs offer high-rate motion data but can drift over
time. Complementary filters integrate them to create more robust and
accurate position estimates.
• Attitude Estimation: Complementary filters are frequently used to estimate the
attitude (orientation) of vehicles and devices, combining data from
gyroscopes, accelerometers, and magnetometers.

Basic Example (Accelerometer and Gyroscope):


1. Accelerometer measures tilt: It provides a noisy but accurate estimate of the
device's tilt relative to gravity.
2. Gyroscope measures rotation rate: It offers a less noisy but less accurate
measurement of how fast the device is rotating.
3. Filtering and Fusion: The complementary filter applies low-pass filtering to the
accelerometer data to reduce noise and high-pass filtering to the gyroscope
data to remove long-term drift. It then combines the filtered data to produce a
more accurate and stable estimate of tilt.

Benefits:

• Improved Accuracy: Complementary filters generally produce more accurate


estimates than those obtained from individual sensors.
• Reduced Noise: They help mitigate sensor noise, leading to smoother and
more reliable data.
• Computational Efficiency: Their simple implementation makes them suitable
for real-time applications with limited processing power.

Here are the key algorithms and formulas for complementary filters:

1. Simple Complementary Filter Algorithm:

• Equation:
angle_estimate = alpha * (angle_gyro + angle_gyro_prev) + (1 - alpha) *
angle_accel

• Variables:
o angle_estimate: The filtered angle estimate
o angle_gyro: The current gyroscope angle measurement
o angle_gyro_prev: The previous gyroscope angle measurement
o angle_accel: The accelerometer angle measurement
o alpha: The filter gain (between 0 and 1, typically around 0.95)

2. Discrete-Time Complementary Filter:

• Equations:
angle_gyro_filtered = angle_gyro + gyro_bias
angle_estimate = angle_gyro_filtered * dt + angle_accel_filtered
gyro_bias += (angle_accel_filtered - angle_estimate) / tau

• Additional Variables:
o dt: The time step between measurements
o tau: The filter time constant (controls how quickly the filter adapts)

3. Tuning Parameters:

• Alpha (Filter Gain):


o Determines the relative emphasis placed on the gyroscope and
accelerometer data.
o Higher alpha values favor gyroscope data for fast changes but can lead
to drift over time.
o Lower alpha values emphasize accelerometer data for long-term
stability but may be more sensitive to noise.
• Tau (Filter Time Constant):
o Adjusts the rate at which the filter adapts to changes in the
accelerometer data.
o Smaller tau values allow for faster adaptation but can increase
sensitivity to noise.
o Larger tau values provide smoother results but may introduce lag in
response to rapid changes.

4. Implementation Considerations:

• Sampling Rate: Ensure consistency in sampling rates for all sensor data.
• Initialization: Provide initial estimates for angle and gyro bias.
• Bias Correction: Implement mechanisms to address gyroscope bias drift over
time.
• Noise Reduction: Consider additional techniques like low-pass filtering for
accelerometer data if needed.
Kalmann Filters
The Kalman filter is an algorithm that estimates the state of a system from measured
data. It was primarily developed by the Hungarian engineer Rudolf Kalman, for whom the
filter is named. The filter’s algorithm is a two-step process: the first step predicts the
state of the system, and the second step uses noisy measurements to refine the
estimate of system state.

The Essence of the Algorithm:


Here's the gist of how the Kalman filter works:
1. Prediction: Based on our previous understanding of the system (state
estimate and uncertainty), we predict what the state will be at the next step.
2. Measurement: We gather data from sensors, but it's inevitably tainted with
noise.
3. Update: We combine the prediction and the noisy measurement using a
clever weighting scheme that accounts for their respective uncertainties. This
results in a more accurate and refined estimate of the state.

The future target position can be easily calculated using Newton's motion
equations:
Key Components:
• State vector: Represents the dynamic variables we want to estimate, like a
drone's position, velocity, and attitude.
• System model: Describes the evolution of the state over time, governed by
physical laws or mathematical equations.
• Measurement model: Relates the state to the sensor readings we observe.
• State estimate and covariance matrix: Capture our current understanding of
the state and its associated uncertainty.
• Kalman gain: A matrix that determines how much weight to give to the
prediction and the measurement update, based on their uncertainties.

Advantages of the Kalman Filter:


• Optimal for linear systems: It provides the minimum-variance estimate of the
state for linear systems with Gaussian noise.
• Handles uncertainty gracefully: Leverages the state covariance matrix to
quantify and propagate uncertainty throughout the estimation process.
• Adapts to changing conditions: Continuously updates its state estimates and
uncertainties based on incoming data, making it robust to variations and
noise.

Applications:
The Kalman filter finds applications in a wide range of fields, including:
• Navigation and guidance: Drones, robots, spacecraft, and autonomous
vehicles rely on it for precise positioning and control.
• Signal processing: Filtering noisy data from sensors in various fields like
communication, robotics, and medical imaging.
• Target tracking: Predicting the movement of objects like vehicles, aircraft, and
celestial bodies.

Learning Resources:
If you're interested in delving deeper into the Kalman filter, here are some helpful
resources:
• Wikipedia: https://en.wikipedia.org/wiki/Kalman_filter
• Kalman Filter Tutorial: https://www.kalmanfilter.net/
• Understanding Kalman Filters Tutorial:
https://www.mathworks.com/discovery/kalman-filter.html
Extended Kalman Filters (EKFs)

Extended Kalman Filters (EKFs): When Linearity Just Won't Cut It


While the Kalman filter excels in linear systems, the world often ventures into non-
linear territory. Enter the Extended Kalman Filter (EKF), a valiant extension that
tackles non-linear systems by employing a clever approximation technique.
Key Idea:
• Linearization at Every Step: The EKF approximates non-linear functions using
their local linearizations (first-order Taylor series expansions) around the
current state estimate. This allows the Kalman filter's core equations to be
applied within each time step, even for non-linear systems.
Steps Involved:
1. Prediction:
o Predict the state using the non-linear system model (but linearize it for
calculations).
o Predict the covariance matrix using the linearized model.
2. Measurement:
o Gather sensor data (still noisy).
3. Update:
o Linearize the measurement model around the predicted state.
o Calculate the Kalman gain using the linearized measurement model.
o Update the state estimate and covariance matrix using the Kalman
gain and linearized model.
Advantages:
• Handles Non-Linear Systems: Extends the Kalman filter's applicability to a
wider range of real-world systems that exhibit non-linear behavior.
• Relatively Simple Implementation: Conceptually straightforward, often
requiring only basic linear algebra and calculus.
Challenges and Limitations:
• Approximation Errors: Linearization can introduce errors, especially for highly
non-linear systems or large uncertainties.
• Computational Expense: Linearization and Jacobian matrix calculations can
increase computational cost compared to the standard Kalman filter.
• Sensitivity to Model Errors: Performance heavily relies on the accuracy of the
system and measurement models.
Applications:
• Robotics: Localization and navigation of robots in complex environments.
• GPS Tracking: Improving GPS accuracy in challenging conditions.
• Sensor Fusion: Fusing data from multiple sensors with non-linear
relationships.
• Target Tracking: Tracking objects with non-linear motion patterns.
• Aerospace: Attitude estimation and control of spacecraft.
When to Use EKF:
• When dealing with non-linear systems.
• When the model's non-linearities are well-defined and differentiable.
• When computational resources allow for the additional calculations.
Consider Alternatives:
• For highly non-linear systems or computationally constrained scenarios,
consider alternative non-linear filtering techniques like Unscented Kalman
Filters (UKFs) or Particle Filters.

To know more about EFK visit the link:-


https://homes.cs.washington.edu/~todorov/courses/cseP590/readings/tutorialEKF.pdf

You might also like