Stabilizer explanation

Firmware/software/electronics/mechanics
Post Reply
RyanMco
Expert
Posts: 156
Joined: Tue Apr 09, 2019 6:15 am

Stabilizer explanation

Post by RyanMco » Thu Jan 16, 2020 7:09 pm

Hi guys!
May please someone explain to me in detail why I need stabilizer.c in my firmware and what its purpose? how it's built? what're the major functions that I need from stabilizer and what are their role? primarily Im asking because Im going to make my own stabilizer which I want to make it like bit craze stabilizer analogy ..
I will make sure to upload my stabilizer.c here in the forum once I finish it.

I need please a thoughtfully explanation about functions there and what are the purpose of stabilizer in general?! thanks alot!
here's the code of bitcraze stabilizer.c:
https://github.com/bitcraze/crazyflie-f ... abilizer.c



RyanMco
Expert
Posts: 156
Joined: Tue Apr 09, 2019 6:15 am

Re: Stabilizer explanation

Post by RyanMco » Thu Jan 16, 2020 7:11 pm

Also how it's related to my drone, what this file is going to affect my drone on what?!

RyanMco
Expert
Posts: 156
Joined: Tue Apr 09, 2019 6:15 am

Re: Stabilizer explanation

Post by RyanMco » Sat Jan 18, 2020 1:02 pm

any HELP please? thanks

kimberly
Bitcraze
Posts: 255
Joined: Fri Jul 06, 2018 11:13 am

Re: Stabilizer explanation

Post by kimberly » Mon Jan 20, 2020 9:48 am

The stabilizer part is the hart and soul of the crazyflie, as explained before to you in viewtopic.php?f=6&t=3851&hilit=stabilizer#p17732. Stabilizer.c contains two important parts which it can not live without:
  • State estimation: Without this, the Crazyflie will not be able to estimate it's roll pitch and yaw, or any of the positioning. Without an state estimation, the CF can not control those variables. It is like dropping in a rain forest without an map or GPS. We have 2 different state estimator, where each of them is useful in different situations.
  • Controller: The controller controls the variables like the state estimate. Without the controller, the crazyflie can not stabilize itself in flight. There are 3 different types of controllers, useful for different applications
You should not remove or replace stabilizer.c. If you really need to change it due to an assignment or project, you will need to look how the different state estimators (Kalman/complementary) and controllers (PID/Mellinger/INDI) are implemented, and add a new one exactly the same way as the others have been.

Post Reply