Original link
System modeling
- Mathematical models
- Assume
- Linearization of
- System Transfer function
- Determining constants
The design of the closed-loop attitude controller of the four-rotor system requires knowledge of the system. A four rotor dynamic model is deduced here. The derivation of the model is based on Alexander Lebedev's master thesis "Design and Implementation of a 6DOF Control System for a autonomous quadrocopter".
Mathematical models
First, the configuration of the four rotors needs to be determined. Most commercial versions of the four rotors fly in X-configuration mode. This requires a more complex control model than +-configuration, an angle change that relies on the torque of four motors.
However, this also has a benefit that the rotation can be controlled by four motors at the same time, which can take advantage of the square effect of the moment. Therefore, the system is configured with X.
Subscript B denotes the coordinate system of the object itself.
The rotation of a rigid body can be described by Euler equations.
The Euler equation in matrix form can be deduced and the problem of angular acceleration can be solved.
Define T as the thrust of the motor, define H as the torque of the motor, and the torque tau generated by each motor can be calculated as follows:
The torque of each motor and the corresponding thrust are proportional to the square of the motor's angular velocity.
This form can be put into the Euler equation of the deduced form
The deduced form describes the dynamic behavior of the object coordinate system, and the motion relationship between the object coordinate and the world coordinates can be proved. Therefore, three angles can be drawn, pitch and yaw, which can be calculated by the following equations.
Assume
The "micro-wave theory" assumes that the four-rotor movement contains a slight change in the state of a stable flight. In this hypothesis, the following two points are omitted:
Angular acceleration, which is affected by angular velocity from other axes, is considered to be negligible.
The first derivative of the angle of the flight direction is equal to the angular velocity of the object.
This simplification has the following equation
Linearization of
The mathematical model that is pushed out includes the nonlinear difference equation. As a rule, the controller is designed only as a linear system, so the equation must be linearized.
Consider the thrust of a shaft and a slight change
Assuming that the thrust produced by the hinge is equal to the gravity of the four rotors
Using the Taylor expansion, you can make the mathematical model linearized.
The linear differential equation of the system is deduced.
System Transfer function
Replacing the speed of the upper motor with the PWM signal
The constant and rotational speed of the composite equation are
The final form of the system transfer function can be obtained by Laplace transformation of the linear differential equation. As for aircraft yaw yaw, we only care about the output of yaw rate, and the corresponding transfer function can be calculated.
Determining constant velocity-thrust
The linear relationship between the angular velocity and the thrust of the motor can be determined experimentally.
The plane's rack is placed on a plank, allowing some tilting movements. A propeller is strapped to an arm, and a relative arm is placed on a precise measuring device. Measured by gravity equals the thrust of the motor, the speed of the motor can be obtained by means of a sound measuring instrument.
The proportional constant under 50% pulse-width shock is determined as follows:
Speed-Torque
By measuring the total energy input of the system (the product of the battery voltage and current) and the rotational speed, the torque of the shaft can be calculated.
Proportional coefficients can be obtained by changing the PWM value and multiple measurements.
Speed-PWM
In addition, the linear proportional relationship between the PWM value (0~100%) and the actual angular velocity of the shaft can also be calculated, in the case of 50%-pulse width:
Inertia
To determine the moment of inertia of the four rotor, we made a simple CAD model based on the weight and shape of each individual part. With CAD software, the moment of inertia can be determined.
2 system Modeling