Simulink 3D Animation |
Drone Path |
Simulink Diagram |
Equations of the Motion |
Linearization |
- The drone which has 2 DoF, is controlled by creating a tracking system, regulator, and observer algorithms. If this drone trajectory is accepted in the xy plane, there are some blocks on its path and it needs to move to +y and -y directions while moving in +x direction. The mass center of the drone is described as a C point and the CD link is rigidly connected to the mass center. This link has the length as h. 𝐹𝐷𝑥 and 𝐹𝐷𝑦 are external disturbances. The moment of inertia around the mass center is I. X and Y representation of the position of the drone. External forces are given from the end point of the rigid link CD. (Fig. 2)
- Equations of motion of the drone are given in Figure 4.
- For linearization, state and input vectors are given in Figure 5.
- Regulator design is made by Linear Quadratic Regulator (LQR) Algorithm.
- Observer design can be seen in .m file.
- I used Simulink 3D Animation Toolbox for the visualization of the system.
* MATLAB 2023a
* Simulink
* Matlab Symbolic Calculation
* Simulink 3D Animation
- Download DroneControlm.m and DroneControlSimulink.slx files.
- Put these files into your MATLAB folder which is located in Documents.
- Open the .m file and Simulink model. Then evaluate the first section of .m file.
- Play all sections of the .m file until the last part because the last part is creating plots for comparing the linear and nonlinear systems in trajectory.
- Play the Simulink model and open the 3D Animation block to watch the animation.
- Run the last section of the .m file the see plots.
Please share your comments and ideas about the project with me. Thank you for your time.