PID library and tunning

Hello again.

I made some big steps in my development of my quadrotor. But for a few weeks i tried to simulate my model in simulink without succes. Because is the end of the year and i need to finish my project , i would like if it is possible to get some help implementing the pid on my model. I dont know how to make something like a PID ,,fusion" . I tried different methods but it didnt work. I am using FreeRTOS and i made a task exactly for PID. But i had no succes in implementing it. I am waiting for answer as soon as possible. Thanks alot guys.

So my question is for nothing ,no one will help me ..I thought this is the purpose of a forum. I wouldn`t mind someone give me only an ideea or a place to find something useful in order to implement this thing.

This part of the forum is a place to ask for advice about how to tackle problems. If you want somebody to actually work with/for you to help you implement your solution, the Gigs & Collaborations section is the place to ask. Note that most people would expect to be paid for working for you, and you will also find that people are reluctant to help you outsource a project that is for academic credit.

In case it's any help, my advice would be to validate your sensor inputs before you try to get the control algorithm working. Once you know you have good position, velocity and acceleration data for each degree of freedom I would concentrate on rotation around one axis and tune that. What you're trying to do (write your own autopilot) is an extremely challenging project and IMO it is no discredit to you that you run out of time, as long as you can show that you have been making good progress against a sensible development plan. If you are able to complete the development for the control around one axis, you could demonstrate that working using a model that was supported so that it was only free to rotate around that axis - for example, by mounting it on a pair of pivot points. In practice you would need to have something like that anyway to tune your controller for that axis.

Although I haven't written an autopilot myself I remember reading that the successful implementations usually didn't use Kalman filters to combine the sensor data because they were too computationally expensive. Especially given the overhead of running a RTOS, it's quite possible that your closed loop feedback frequency will be too low, making it hard to achieve stable control. In that case, limiting the implementation to only support one axis would give your a factor of three performance improvement.