Design and experimental research of a quadrocopter flying robot

The drone is an unmanned aerial vehicle. Currently, many commercially available remote controlled flying toys are used to be called drones. This is an erroneous nomenclature, because the drone must have an autonomus flight function implemented. Due to it's simple mechanical construction, the most popular drones are in the form of a multirotor, in which arrangement the engines are placed in one plane. One of the most important advantages of this type of robots is the ability to maintain a certain position in space. Today, this allowed for e.g. taking photos from the air or inspecting hard-to-reach places. For use for environmental protection purposes, drone equipped with appropriate sensors and instrumentation may be used to monitor air pollution. The mechanical part of a quadrocopter flying robot was based on a TAROT frame with a 450mm engines spacing. The frame has been expanded with a dedicated set of legs to raise the clearance up to 150mm. Four dedicated EMAX MT2213 electric motors were installed on the frame, which are the main drive. They are characterized by the propeller hub-free-mounting, which minimizes possible imbalances. A single engine cooperating with a dedicated 10-inch propeller and a 4.5-inch pitch generates a maximum thrust of a 0.85kg. In the case of this system, it sums to a total of 3.4 kg. The weight of the ready to flight robot is 1.35 kg. To power the robot, a lithium-polymer battery with a capacity of 2.2 Ah is used, providing flight time of about 8 minutes. The basic work mode of the robot is a manual one, which means a self leveling mode with manual control. In addition to this mode, an autonomous navigation mode using GPS coordinates has been implemented. This navigation mode was also been tested during field tests. The operation of this navigation mode is very similar to the position maintaining mode, but operates on a larger scale. The robot in this mode is vectorically controlled, performing forwards/backwards and sideways movements to the set location.


Introduction
Currently, new articles on topics related to drones are constantly appearing in domestic and foreign literature. These studies cover various aspects. The descriptions of drone control units are a constantly emerging topic. The proposed controllers differ both in the complexity of the electronic part and the algorithms used. The simplest hobbyists E3S Web of Conferences 46, 00012 (2018) https://doi.org/10.1051/e3sconf/20184600012 3 rd International Conference on Energy and Environmental Protection controllers use the popular Arduino platform [1]. Furthermore, even research is conducted on the minimum requirements for the processing power of the control unit microcontroller [2]. More complex control units utilizes e.g. ARM microcontrollers [3] or the Raspberry Pi platform [4].
In the case of a multirotor flying robot, the mechanical construction of the frame has no less importance, as the optimal durability and appropriate materials translate into the overall performance of the drone. Optimization works in this direction are also carried out [5]. Other drone components, such as motors [6] are also optimized.
In addition to the publications related to the mechanical and electronic parts, they are also publications covering the mathematical description of the multi-rotor [7]. These issues relate to, for example, the mathematical description of the dynamics of unmanned aircraft [8] or the use of mathematical models for control purposes [9].
In addition to primary military usage, drones have found wide application in many industries. Using drones, it is possible to inspect elements of a building that are hard to reach, such as a roof without having to mount scaffoldings. Drones are also great for inspecting dangerous areas, for example buildings in danger of collapsing or electrical power lines [10]. After equipping the drone with appropriate sensors and instrumentation, it is also possible to conduct environmental pollution tests [11].
The drone can also be used for transport purposes. The drone can transport parcels, medical supplies or samples of biological materials to the laboratory [12]. In this last case, the authors present how to mix the content of samples during transport, using appropriate maneuvers.
With the damming the risks associated with the use of drones by persons without specialized knowledge related to the airspace, the need arose to develop effective methods for detecting and protecting against drones. The analysis of detection methods of unmanned aerial vehicles is presented in [13]. Such systems operate on the principle of image and sound detection generated by the drone during operation. Other solutions are based on the principle of detecting WiFi network or control equipment signals. In [14], a fast video system utilizing a rotating camera for tracking a drone was presented.
The purpose of this work is to design, build and carry out field verification tests of a quadrocopter flying robot. Information recorded during flights can be used in environmental management systems [15,16] and contribute to its sustainable developmentDepletion of energy from conventional sources and a continuous increase in energy consumption necessitates the search for new energy sources, preferably from renewable ones [1,5]. One of such sources is biomass [3].

Design of the mechanical part of the system
A popular TAROT FY-450 frame with engine spacing of 450mm was used to build the robot's mechanical structure. The frame has been expanded by a dedicated landing gear with a height of 150mm, increasing the original ground clearance.
For the main motors of the drone, a dedicated for the multirotors EMAX MT2213 motors were selected. They are characterized by precise machining and hub-free-mounting of propellers, minimizing any unbalances of the propeller mounting. Such engine can deliver a maximum of 850g thrust (for this design it sums to a total of 3400g) with 10-inch propellers with a 4.5-inch pitch and 3S (11.1V) power supply. The weight of the motor including the nut and propeller is 70 grams. The motors are controlled by the classic FastPWM 30A ESC's with SimonK multirotor firmware, accepting a control signal with a frequency up to 400 Hz. The weight of one regulator is about 42g.

rd International Conference on Energy and Environmental Protection
The last element of the mechanical part is a LiPo 3S1P battery with a capacity of 2200mAh with a weight of 160g, providing flight time of 8 minutes. The total take-off weight (including the weight of flight controller) is approximately 1350g.

Design of the electronic part of the system
The main part of the control unit, which is the most important part of the project, is the ARM LPC4088 microcontroller from NXP with the Cortex-M4 core clocked at 120MHz. Due to the operation characteristics of the control equipment, the control unit was equipped with an additional auxiliary microcontroller, also NXP ARM LPC1114 chip with a Cortex-M0 core clocked at 50MHz.
The other important parts of the control unit are, inertial sensors (IMU), on the basis of which the stabilization of the platform takes place. For this purpose, two advanced MPU9250 IMU's from InvenSense were selected, each including: a 3-axis gyroscope, a 3-axis accelerometer and a 3-axis magnetometer. In addition to that, the inertial unit has been expanded with a precision pressure sensor MS5611 from TE Connectivity, a precision temperature sensor ATD7320 from Analog Devices and an additional LSM303C magnetometer from ST Microelectronics. All Sensors are mounted on a separate PCB connected to the main PCB using a flexible FFC conductor. This type of connection reduces the transmission of vibrations to the sensor board. The installation of sensors on a separate module ensures also an easy replacement of the sensors set without the need to replace the control board.
In addition to that, the control unit was equipped with an μUSB connector enabling to change it's configuration from the computer. The user interface was built using a color OLED display, a joystick, and two additional buttons. The possibility of recording measurement data, necessary to verify the correct operation of sensors, prepared filters and regulators, was ensured by equipping the system with a NandFlash high-speed memory module with a capacity of 256MB. With a sampling rate of 500Hz, this allows to flight data be recorded for about 7 minutes. The non-volatile memory used here contrary to the RAM type of memory, creates a black box of the system in a natural way, allowing to determine the cause of the system failure. The μSD memory card connector enables easy transfering of collected data to a computer, via a card, where it can be easily converted into a CSV file. The measuring unit has also been equipped with additional connectors, allowing to extend its capabilities in the future, including o an optical sensor that makes it easier to hold the position, and an external CAN bus. The use of the well-known automotive bus enables easy connection of additional external environmental sensors, without grounding loop problems known to the market control units, introducing additional interfernces. Such communication are conducted digitally with the differential bus, which additionally eliminates the problems with introducing more interference to the measurement sensors.

Design of the informatic part of the system
The software part of the system consists of several prepared programs. The most important of them is the software of the flight control unit, which was entirely prepared in C language. This software is divided into two microcontrollers: the main system with the Cortex-M4 core and the supporting Cortex-M0 core. As was mentioned earlier, the use of an additional core was necessary due to the specificity of the operation and the variety of manufacturers of available control equipment.
The main microcontroller takes control of all measuring sensors and flight stabilization in all modes of the system operation. After turning on the power supply of the unit, all E3S Web of Conferences 46, 00012 (2018) https://doi.org/10.1051/e3sconf/20184600012 3 rd International Conference on Energy and Environmental Protection internal microcontroller subsystems are initialized. This process in particular, includes the preparation of communication interfaces used. After sending the configuration parameters to each of the sensors, the configuration is read again to check if the sensors have correctly accepted the changes. If any of the sensors has not been initialized correctly, this indicates that it has been damaged. A critical error message will appear on the built-in display and further operation will not be possible. In the next step, the calibration data is read. This process covers both the configuration of the control unit itself from the internal memory of the main microcontroller as well as the sensor calibration data from the external memory on the interchangeable sensor PCB. If the data could not be read, the default values are used, and the possibility of arming the drone is blocked until the repair/re-calibration is done.
After initialization, the main control interrupt is started at the frequency of 500Hz, in which the measurement data from the sensors are collected and processed cyclically. In this interrupt, appropriate control signals are also generated, filtration of sampled signals is carried out, algorithms for stabilizing the robot are performed in each of the operating modes, and all data are written in the black box. Finally, the main program goes to an infinite loop. If the robot remains un-armed, the user interface is operated on the built-in display and communication with the PC is processed.
After arming the robot, the autopilot program is executed at a lower frequency of 10Hz. This frequency was selected due to the operating frequency of the GPS receiver used. The purpose of the autopilot is to supervise the control interrupt in the experimental navigation mode. This navigation mode use the roll and pitch axes. This mode of operation is possible to implement in a multirotor robot, because it has the ability to move sideways, not only forward and backward. In this case, the set direction (yaw) remains constant.

Verification tests
In order to accurately verify the correct operation of all algorithms, the verification tests were carried out in several successive stages, parallel to the work progress of the software part.
The first stage was the verification of the operation of used filters in Matlab, using the registered measurement data. This made it possible to verify the correct operation of all used measuring sensors, control equipment and the selection of optimal filter's parameters. The orientation of the measuring axes of all the sensors used was also set and checked. After this stage, all the measuring sensors and engine speed controllers used were calibrated.
The next stage was to analyze the black box on the drone, after implementing the filters and regulators. In this way, the operation of the implemented automatic control systems was verified, comparing the obtained results to a model created in parallel in the Simulink engineering environment.
The final stage was field tests. Based on them, the correct operation of regulators and filters during real flight tests was checked, which allowed to assess what further modifications will be needed to increase the stability of the platform, as well as enable more precise selection of controller parameters. During field tests, the data processing efficiency on the control unit was also verified.
The first of the tested modes was the altitude hold mode using atmospheric pressure measurement. Figure 1 shows the path traveled by the robot in this mode.
The robot in the altitude hold mode slowly moved chaotically without stabilizing the position while maintaining the set altitude. The starting position (0, 0) on the path map is the location where the robot was at the start of flight data recording.  The operation of the GPS position maintenance mode is very similar to the altitude maintenance mode, with the difference that in this case the position with the use of the GPS receiver is additionally stabilized. In this mode (figure 2), the robot did not move in straight line further than 0.9m from the set position. The moving area can be enclosed in a rectangle measuring 0.9m by 1.4m.
The implemented navigation mode combines the operation of the autopilot with previously described modes: position hold and altitude hold. The way in which navigation works is analogous to the position maintaining mode, but operates on a larger scale. The robot in this mode is vectorically controlled to the set point, performing forward/backward as well as sideways moves (Figure 3). Figure 4 shows a picture of the robot during operation in navigation mode -a trip from point to point.
A robot programmed in this way can be used to carry out stationary environmental measurements (after landing) in hard to reach areas, including roofs, recesses, towers or chimneys.   Currently, quadcopter is equipped with a MS5611 temperature/pressure sensor and a SVAN945A sound level meter. The effectiveness of the proposed solutions was confirmed during field tests. For example, temperature values of 28.74°C, atmospheric pressure 985.85hPa and equivalent sound level LAeq 38.7dB were recorded in the environment test point, respectively. Due to the strictly limited size of this article, detailed research results will be presented during the conference.

Conclusion
The new research station is the most technically advanced of all stations for testing cutting process built at the Institute of Mechanical Engineering at Warsaw University of Technology in Płock. It gives the possibility to conduct a wide range of tests for variable construction and working parameters of the cutting unit as well as for variable parameters of the plant itself, e.g.: stem's diameters or moisture. The obtained results allow for a better understanding of the cutting process of energy plants carried out with a two-disc cutting unit. The research results will also enable the construction of more efficient and energysaving cutting units for agricultural machines.