The development and research of autonomous flight systems has increased recently, and unmanned aerial vehicles (UAVs) are more widely used in military fields, such as intelligence, surveillance, and reconnaissance missions, and civilian fields, such as aerial surveillance and aerial surveillance photography. The incentive for research in this area is the need to replace human intervention in high-risk jobs and missions.


Today, a variety of aircraft are used for UAVs, including fixed-wing aircraft, airships, and helicopters. Nonetheless, the platform that has received the most attention in research projects is the multi-rotor helicopter, especially the quadcopter. Because these aircraft have many advantages over others. The quadrocopter has a simple structure, high flight capability, and excellent maneuverability. B. Vertical take-off and hovering.

The quadcopter has four rotors, each with independent speed, allowing a balanced rotor speed variation to produce thrust and acceleration in the desired direction. The Quadcopter is a 6 Degrees of Freedom (DoF) system. That is, you can move along the three spatial axes X, Y, and Z, and rotate the aircraft's body axes, which represent roll (φ) and pitch (θ). and yaw (ψ) angle


MODELLING
PID controller design requires prior modeling of the system in order to know its behavior. A quadcopter has four propellers at the ends of a cruciform structure. To maintain the overall torque balance of the, her one pair of rotors rotates clockwise and the remaining pair counterclockwise. The speed of each rotor is independently controlled to produce the thrust and torque that move the aircraft. There are "×" and "+" modes depending on the direction of movement.


Modes "+" y "x" of the quadcopter and
Quadcopter movements a) Thrust, b) Roll, c) Pitch, and d) Yaw.

The rotors action defines the motion of a drone, it affects the motion of drone in different directions i.e. vertical, horizontal and lateral. It is as shown in the figure above.


PID CONTROLLER DESIGN

For PID controller design, parallel architecture has been used


A block has been added to the diagram that corresponds to a scaling factor that compensates for the aerodynamic parameters of the quadcopter , thus facilitating the PID design. This block scales the control signals to values ​​compatible with existing hardware. Finally, output has a signal saturation block. The roll, pitch, yaw, and altitude controllers share a similar architecture to the, with minimal yaw and altitude changes in particular.

The yaw control reads commands received from the RC transmitter as angular rates to improve system motion and avoid yaw motion sensitivity. Therefore, the input of the
controller has an integrator that converts angular velocity to angular setpoint. In addition, discontinuities in the system at 360° and -360° should be taken into account in the yaw control and corrected to avoid erroneous operation of the system. For the altitude control, the architecture is almost the same, except that there is a PID at the output and a summing device used to compensate the gravity value.


IMPLEMENTATION

Roll, pitch, and yaw measurements are made using a low-cost Attitude and Heading
Reference System (AHRS) integrated with accelerometers, gyroscopes and magnetometers, along with a built-in advanced Kalman filter for angle estimation. It is done using the AHRS used is CHR-UM6, which delivers angle information over a serial interface using specific data packets that are easy to decode frame.

Data transfer between the quadcopter and land station (PC) is done via a wireless
connection using an XBee communication module. These modules communicate with each other using the ZigBee protocol (IEEE 802.15.4) on the free 2.4 GHz frequency. The interface between the XBee module and other devices is serial, making it easy to integrate into any system. The microcontroller program consists of three blocks, a main block and two interrupt blocks, which are triggered by the AHRS and the ground station (PC) serial reception. During the AHRS serial interrupt the packet is read and the Euler angles, acceleration and angular velocity data are stored in the main program for further processing and filtering. With a serial interrupt triggered by the PC, the configuration and calibration data are read out and processed later. The main block of the program also consists of several algorithm blocks:


After the system is started, the microcontroller waits to receive data from AHRS or PC. AHRS is set to transmit angular data at a fixed frequency of 50 Hz, so when receiving data, loops are controlled. control is executed at the same time. frequency to synchronize the operation. The control loop first processes the data received from the AHRS, then the altitude is measured and the input from the RC receiver is read. Next, all signals are filtered to remove the noise generated mainly by aircraft vibration. After filtering the signal, the PID outputs are calculated and finally, the data transmission process. whether is done. The PID controller and filtering algorithms are implemented using differential equations. In each control loop, the filters and the PID controller are calculated and then variables are updated.

The serial link between the PC and the quadcopter is a HMI as shown below:

Thus, by looking at the results it is found that 
The PID controller is capable of stabilizing a complex system such as a quadcopter; however, the effects of intense and prolonged external disturbances influence the behavior of the regulator. 
The actual benefits of a PID controller differ from the original design benefits because the
mathematical model does not accurately calculate all effects acting on the quadcopter such as system vibrations or oscillations. Despite the nature of the system, which has the actual behavior of being a double integrator, it has steady state error, so the integral gain of the four controllers must be increased to to achieve the response. response is improved. The gain gained was significantly reduced due to the slight
oscillation of the aircraft as its effect produced an unstable control signal, which also produced an unstable behavior in the system.

The ground system has a graphical interface that is useful for monitoring the
controller and controller operations during flight and for adjusting gain or controller settings as needed.

To improve system performance, in future work, implementations of
nonlinear
 controls can be made based on a non-simplified model, allowing a wider range over roll angle and angle.

Comments