Betaflight 3.2 Dynamic Filtering Explained

With upcoming Betaflight 3.2, we will be given a new, outstanding, new feature: dynamic filtering. An belive me, it was worth waiting for Betaflight 3.2 only to get it. I do not care much about other changes that happened with version 3.2 but dynamic filtering it the thing! In this post I will explain, in simple words, what is dynamic filtering and how to enable it.

The problem of noise

Gyro has a nasty tendency to pick up a lot of noise. Vibrations. After all, there are a lot of things that can vibrate (motors, propellers) and resonate (frame). Without a good way to filter all that noise out, our racers would not fly as good as they fly now. And you would be replacing motors and ESCs even more often. I you want to know more about gyro noise sources and filtering, please watch my Gyroscope and filtering series on YouTube.

Continue reading “Betaflight 3.2 Dynamic Filtering Explained” »

Read More

Understanding Dterm: how Dterm really works

I will be very honest: until very recently I did not really understood how PID controller’s Dterm really works. Yes, something with dampening, something with “looking into future”, bla bla bla. But the reason for not understanding was because I was overthinking it. There is no “magic” only simple mathematics and few basic concepts which I will now explain.

Setpoint

Setpoint is the value which we request from our system. In case of multirotors, PID setpoint will be a rotation speed around axis given in degrees per second [dps]. Setpoint 0 means we do not want to rotate (keep current attitude) and setpoint 200 means we want to rotate at 200dps

Measurement

Measurement the value that represents actual state of the system measured by some kind of sensor. In our case, it will be the gyroscope and rotation-around-axis speed measured in degrees per second

Error

Error the difference between Setpoint and Measurement computed as Error = SetpointMeasurement. In our case, when Error is above 0, that means drone is rotating too slow and should speed up. If Error is below 0, drone is rotating too fast and should slow down

Understanding Dterm - setpoint measurement and error Continue reading “Understanding Dterm: how Dterm really works” »

Read More

Fixed Wing 101 – Lift, Angle Of Attack and Stall

With this short article I would like to initiate new series: Fixed Wing 101 where I will describe some basic concepts connected with fixed wing airplanes that should help beginners to enter the hobby. Today: why airplanes fly and why, from time to time, they fall down from the sky…

Lift

Airplanes fly thanks to the lift. It is a force generated by wings (by the way, propeller thrust and wing lift are the same force. After all, propeller is a rotating wing) thanks to pressure difference. When air pressure below the wing is higher than above it, lift appears. To archive level flight, lift has to be big enough to counteract mass and gravity.

The most important condition for a wing to generate lift is: wing has to move though the air (or air has to move around the wing). If there is no movement, there is no lift.

When there is air movement, there are two factors responsible for lift:

Bernoulli’s principle

Bernoulli’s principle states:

when gas or liquid is moving faster, it has lower pressure.

Simple. To obtain lower pressure above the wing, we have to make air move faster over there. This is why wing has a shape (airfoil) it has: top side (above chord) of a wing is longer than the lower side. Wing splits air into 2 stream. Upper one has longer way to travel than lower one, so it has to move faster. If it moves faster, it has lower pressure. If it has lower pressure, lift appears.

Continue reading “Fixed Wing 101 – Lift, Angle Of Attack and Stall” »

Read More

PID looptime: why it is not only about frequency

Last 18 months was an extremely good period of time for all mini-quad enthusiasts. Progress, hardware and software both, was just incredible. Who could have guessed that in less than 2 years mini-quads will evolve into main group of drones with such excellent flight characteristics. Just take a look at looptime. When I entered the hobby, standard looptime was 3500us (285Hz). Then, someone noticed that mini-quads fly much better when looptime is lowered and it started. Right now, standard looptime is 2000us (500Hz), while Betaflight starts with 1000us (1kHz) or even 500us (2kHz) in case of faster flight controllers.

Just by looking at numbers one might come to a conclusion, that looptime should be kept as low as possible and higher control loop frequency is better. Hey, 2kHz should be twice as good as 1kHz, right? One might even thing that it’s really about frequency. Well, this is both false and true: sometimes it is not about frequency, sometimes it is about frequency after all.

Continue reading “PID looptime: why it is not only about frequency” »

Read More

Which sensors drones use to fly?

Modern drones utilize many different sensors to archive flight. Some of them are required to fly, some are only optional and they can only improve flight performance. This entry will be a summary of those sensors, with short description and information how UAV utilizes data from them.

Gyroscope

Gyroscope, or shorter gyro, is the only sensor that drone really needs for stable flight. It feeds flight controller with extremely important information: how fast aircraft is rotating around its own axises: roll, pitch and yaw. Inner loop of PID controller utilizes his information to stabilize the craft.

When pilot is not applying any deflection to roll, pitch and yaw control sticks (they are in neutral positions), drone should not rotate. It should keep current attitude, do not wobble, do not have rotation drift. If it starts to rotate, this information is taken from gyros and counteraction is applied to stop unintended rotation and event to rotate back to desired attitude.

Continue reading “Which sensors drones use to fly?” »

Read More