フィルターのクリア

I am curious about the example openExampl​e('px4/Pla​ntAttitude​Controller​Hexacopter​Example')

55 ビュー (過去 30 日間)
abcchoco
abcchoco 2024 年 7 月 5 日
回答済み: Aravind 2024 年 8 月 22 日 9:06
I understand that I used the drone dynamic model to represent the plant model, but I would be very grateful if you could tell me how you used the dynamic equation I saw to create it. I also added the modeling I created. I would appreciate it if you could tell me the difference between it and the example.

回答 (1 件)

Aravind
Aravind 2024 年 8 月 22 日 9:06
Hi,
From the Simulink model you provided, it appears that you've utilized Newton’s Laws of motion and Euler’s Laws of rotation to develop a dynamic model of a quadrotor. The example "px4/PlantAttitudeControllerHexacopterExample(https://www.mathworks.com/help/releases/R2023b/supportpkg/px4/ref/plant-attitude-px4-hexacopter.html) simulates a hexacopter's dynamic model using a PX4 flight controller. While the foundational principles are similar, there are notable differences between your implementation and the example.
Firstly, your model uses the angular velocities of the motors as inputs, whereas the example employs PWM as an input, with pulse widths ranging from 1000 µs to 2000 µs. This is because, the PX4 flight controller takes the setpoint inputs from directly from the RC, which outputs PWM signals only. See https://docs.px4.io/main/en/concept/architecture.html#flight-stack for more information regarding this.
Secondly, the dynamic model in your Simulink file is based on Euler angles, which have the critical flaw of gimbal lock. For more information see, https://en.wikipedia.org/wiki/Gimbal_lock. The example uses the "6DOF (Quaternion)" block from the Aerospace toolbox. This block takes the forces and moments acting on the body as inputs and solves the linear and rotational equations of motion using quaternions instead of Euler angles. Quaternions do not suffer from gimbal lock and are therefore widely used for representing rotation. More information on the 6DOF (Quaternion) block is available here: https://www.mathworks.com/help/releases/R2023b/aeroblks/6dofquaternion.html.
The subsystem preceding the 6DOF (Quaternion) block, whose images you shared, is used to calculate the forces and moments acting on the hexacopter. This subsystem considers air density, simulates propeller rotation, and calculates the forces and moments generated by each propeller and their effects on the hexacopter. It also accounts for forces like air drag, making the simulation more realistic.
Lastly, the example simulates an onboard IMU with noise using the "Three-axis Inertial Measurement Unit" block from the Aerospace toolbox, rather than using velocity and acceleration values directly from the dynamic model as you have done. More information regarding the "Three-axis Inertial Measurement Unit" block can be found at https://www.mathworks.com/help/releases/R2023b/aeroblks/threeaxisinertialmeasurementunit.html.
These are some of the significant differences between your implementation and the example. Hope this helps!

カテゴリ

Help Center および File ExchangeUAV についてさらに検索

タグ

製品


リリース

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by