The projects consists of the initialize parametr .m file and the star shape octocopter model .slx file. The properties of the octocopter are as follows.
- NED frame is used in model.
- Rotors are facing upward direction.
- The body frame coordinates are shown in below figure.
- The first rotor in the direction of XB and it is clockwise direction (CW). The rest repeats the pattern counter clockwise (CCW) and CW respectively.
- Octocopter model consists of;
- Reference signal generator
- PID cascade controller for rate, attitude, and altitude control of Octocopter
- Control allocation matrix calculation
- Motor force and torque calculation
- Nonlinear octocopter flight dynamics [1]
To run the model you simply follow the below steps.
- Run exampleCase.m file to initialize the parameters. (You can change the parameters to simulate different octocopter models)
- The model is directly opened and run.
With the octocopter model, you can adjust;
- Initial condition of states
- PID controller gain parameter
- Reference signal parameters
- Simulation parameters
- Error signal generator in case of analyzing rotor failure. [2]
- Drone animation is also added to visualize to behavior of octocopter.[3] Note that the frame direction in inertial frame is different from the direction in animation frame.The red propeller shows positive x-direction in octocopter frame and the blue propeller shows the positive y-direction in octocopter frame.
[1] Oscarson,O. (2015). Design, modeling and control of an octocopter. Kth royal institute of technology sci school of engineering sciences.STOCKHOLM, SWEDEN 2015
[2] Walter, Ariel & Mckay, Michael & Niemiec, Robert & Gandhi, Feny. (2018). Trim Analysis of a Classical Octocopter After Single-Rotor Failure. 10.2514/6.2018-5035.
[3] jitendra singh (2022). Quadcopter model: Matlab Code for Animation (https://www.mathworks.com/matlabcentral/fileexchange/97192-quadcopter-model-matlab-code-for-animation), MATLAB Central File Exchange. Retrieved May 25, 2022.
I hope that this will be beneficial for your usage. For any bug or question please feel free to ask. You can find me on