Open access peer-reviewed chapter

Modeling and Simulation of a Solar-Powered Quadcopter Using MATLAB

Written By

Rahmi Elagib and Ahmet Karaarslan

Submitted: 10 August 2023 Reviewed: 13 August 2023 Published: 11 October 2023

DOI: 10.5772/intechopen.1002671

From the Edited Volume

Drones - Various Applications

Dragan Cvetković

Chapter metrics overview

76 Chapter Downloads

View Full Metrics

Abstract

Solar-powered quadcopters have the potential to revolutionize the way we think about aerial transportation and surveillance. These aircraft can potentially fly for extended periods of time without the need for external fuel, making them ideal for a wide range of applications. In this paper, we present a modeling and simulation approach for a solar-powered quadcopter using MATLAB. The model includes the quadcopter’s dynamics, solar panel power generation, and energy storage system. A PID control system for the solar-powered quadcopter simulation model was created using MATLAB/Simulink. The simulation findings indicate that the solar-powered quadcopter can be accurately simulated and controlled with a PID controller. It also reveals that a solar-powered quadcopter can fly for 2.18 hours with a state of charge (SOC) of more than 20%, compared to a nonsolar quadcopter’s flying duration of 34.37 minutes. The results of this study can be used to design and optimize the performance of solar-powered quadcopters for various applications.

Keywords

  • quadcopter
  • MATLAB
  • PID
  • solar-powered
  • unmanned aerial vehicles

1. Introduction

Solar-powered quadcopters have gained significant attention in recent years due to their potential for extended flight and their ability to operate in a wide range of environments. These aircraft are typically equipped with photovoltaic cells, which convert sunlight into electricity that can be used to power the quadcopter’s motors and electronics. However, there are many challenges to overcome in order to make solar-powered quadcopters a practical reality, including the design of efficient and lightweight solar panels, the optimization of the energy storage system, and the management of the quadcopter’s power consumption.

Modeling and simulation can be a powerful tool for understanding the performance and behavior of solar-powered quadcopters. By building a virtual model of the quadcopter and its components, it is possible to study the effects of various design choices and operating conditions without the need for physical experimentation. In this paper, we present a modeling and simulation approach for a solar-powered quadcopter using MATLAB. The model includes the quadcopter’s dynamics, solar panel power generation, and energy storage system. The simulation results are used to study the performance of the solar-powered quadcopter under different solar insolation conditions.

There have been several previous studies on the use of solar power for small unmanned aerial vehicles (UAVs), including solar-powered quadcopters. These studies have primarily focused on the use of photovoltaic cells to generate electricity for the UAV’s motors and electronics. However, there have been few comprehensive studies on the design and performance of a fully solar-powered quadcopter.

Many researchers proposed solar-powered quadcopters that use hybrid energy sources to increase flight durations, such as integrating rotational energy harvesting, laser power beaming, and solar energy [1, 2, 3] J. Meyer et al. [4] present a design for sustained solar-powered electric flight on small scale Low Altitude Long Endurance (LALE) UAVs. This model improved the airframe construction, energy storage mediums, motor and propeller efficiency, and the availability of lightweight photovoltaic cells for UAV power generation. Goh et al. [5] used 148 solar cells to create a fully solar-powered quadcopter. It weighed about 2.6 kg and reached a height of 10 m. Even after building a massive working model, their quadcopter’s overall flight time was only about 1 minute and 38 seconds. Kingry et al. [6] developed a solar-powered quadcopter using an array of C60 solar cells with 22% efficiency. Because they wanted to attain a very high-flying time, which requires using numerous solar cells, their demonstrator weighed roughly 8.175 kg. The flight time of this solar-powered quadcopter was approximately an hour. Verbeke et al. evidenced a modified configuration for narrow corridors that results in up to 60% more endurance [7]. Pang et al. recently incorporated variable pitch rotors into a gasoline engine to extend flight duration to 2 to 3 hours [8].

Despite the development of small-scale solar-powered quadcopters in [9, 10, 11, 12], there aren’t many studies that address the modeling and control of a solar-powered quadcopter problem. Proportional-integral-derivative (PID) control, model predictive control, and PID-LQR integrated control are examples of effective control systems that have been used to develop robust and effective controllers in various solar-powered quadcopters. In this study, a 1.147 kg solar-powered quadcopter will be modeled, simulated, and PID-controlled in MATLAB/Simulink. The main contribution of this study is the building of a realistic MATLAB/Simulink model for a solar-powered quadcopter in order to increase flying duration while taking into consideration the issue of controlling and stabilizing the vehicle, which can serve as a solid basis for designing an actual model.

This work is divided into the following sections: Section II includes the Model Description, and Section III depicts the PID Controller Design for a solar-powered quadcopter. Section IV discusses the Simulation Results. Section V covers the Conclusion as well as future work.

Advertisement

2. Model description

The model of the solar-powered quadcopter consists of three main components: the quadcopter dynamics, the solar panel power generation, and the energy storage system.

2.1 The quadcopter dynamics model

In this section, a mathematical model of quadcopter flight dynamics was developed. The quadcopter’s linear position is defined as (x, y, z), and the three Euler angles are defined as (ϕ,θ,ψ). The quadcopter has four motors, two of which spin clockwise and the others counterclockwise, so the torque generated is negated.

A quadcopter’s altitude and attitude can be controlled by varying the speed of each rotor (Ω1,Ω2,Ω3,Ω4).

The flight dynamics model of the solar-powered quadcopter is built on a number of assumptions, such as the quadcopter’s rigid and symmetrical structure, the coincidence of the center of gravity and the origin of the body fixed frame, and proportional relationships between thrust/drag torques and the square of rotor speed, and rigid propellers. The flight dynamics model of a quadcopter is derived from Newton-Euler equations and Newton’s second law as follows:

x¨=1msinψsinϕcosψsinθsinϕU1AxẋE1
y¨=1mcosψsinϕ+sinψsinθcosϕU1AyẏE2
z¨=g1mcosψcosϕU1AyẏE3
ϕ¨=IyyIzzIxxψ̇θ̇+JrΩrIxxθ̇+lIxxU2Aϕϕ̇IxxE4
θ¨=IzzIxxIyyψ̇ϕ̇JrΩrIyyϕ̇+lIyyU3Aθθ̇IyyE5
ψ¨=IxxIyyIzzθ̇ϕ̇+lIzzU4Aψψ̇IzzE6

The input signal U1 is the total thrust of the four rotors. And U2, U3, U4 are the moments for pitch, roll, and yaw, respectively. Where m represents the mass of the quadrotor, Jr is the inertia of the rotor, and Ixx, Iyy, and Izz are the inertia of the quadrotor in x,y,and z, respectively. More information can be found about the dynamics model in our previous works [13, 14].

2.2 The solar power system modeling and simulation

Instead of using just solar energy, a hybrid system of LiPo battery and solar energy is designed to extend the entire flying duration of the quadrotor. This system consists mostly of PV arrays, maximum power point tracking (MPPT), a buck converter, and a battery. Because the modeling of such systems has been extensively studied in several studies, our primary focus here will be the simulation of this system.

Maximum power point tracking (MPPT) is a solar charge controller that controls the amount of power from the solar array feeding the battery. It prevents electricity from running back to the solar panels overnight and prevents the deep cycle batteries from being overloaded during the day. A DC-to-DC transformer, the MPPT charge controller can convert power from a higher voltage to power at a lower voltage. Since the quantity of power remains constant, if the output voltage is less than the input voltage, the output current will be greater than the input current, maintaining the constant value of the product P=VI. Therefore, a charge controller should be able to select the ideal current-voltage point on the current-voltage curve to get the most out of a solar panel. Buck converter, the MPPT is built on a synchronous buck converter circuit. It reduces the greater solar panel voltage to the battery’s charging voltage. Additionally, it modifies the voltage of its input to capture the solar panel’s maximum output before transforming that output to meet the battery’s fluctuating voltage needs. Solar panels, the quadcopter’s solar power system’s key component is the solar panel. There are several names for solar panels, including photovoltaic solar modules, solar plates, solar PV modules, and solar power panels. PV arrays are made up of 30 solar cells that create power to charge the battery. The most important consideration when choosing a solar cell for a quadcopter is efficiency. As a result, it was decided to employ SunPower C60 solar cells, irradiation 500 W/m2, 25C. Under conventional testing settings, each cell possesses the electrical characteristics as shown in Table 1 (STC). PV array voltage can be higher than battery voltage for MPPT. Lithium-ion polymer (LiPo), the battery utilized in simulation is a 3200 mAh Li-Po battery with configuration: 3S1P/11.1v/3Cell, constant discharge: 30C, and peak discharge (10 sec): 60C. The simulation of the proposed solar-powered quadcopter power system (solar cells, a Li-Po battery, an MPPT, and a boost converter) is shown in Figure 1.

ParameterSymbolValue
Maximum powerPmpp3.42 W
Voltage at maximum powerVmpp0.582 V
Current at maximum powerImpp5.93A
Open-circuit voltageVOC0.687 V
Short-circuit CurrentISC6.28I
Cell efficiencyη22.5%

Table 1.

SunPower C60 cell electrical characteristics.

Figure 1.

The Simulink of built solar-powered quadcopter battery circuit.

Advertisement

3. Quadcopter PID controller

PID is used in this investigation to obtain the desired altitude and attitude. The proposed control law is developed by dividing the system model into two subsystems, a fully actuated subsystem and an under-actuated subsystem, as shown in Figure 2. Unlike in the under-actuated subsystem, where the inputs U2 and U3are smaller than the number of outputs (x, y, ϕ, θ), in the fully actuated subsystem, there are two outputs (z, ψ) for each of the inputs (U1, U4).

Figure 2.

UAV control system block diagram.

Many articles, including [15], have investigated the PID controller. The PID controller has three different parameters: the proportional term, the integral term, and the derivative term. The proportional term determines the direct action with regard to the computed error, the integral term determines the response with respect to the sum of recent mistakes, and the derivative term determines the reaction with respect to the error’s rate of change. The controller equation is given by the following formula:

UXt=Kpet+KIet.dt+KDdetdtE7

In Simulink, PID controllers may be represented as gains or as a continuous time transfer function (Table 2).

ParameterSymbolValue
Quad. massm1.147 kg
Arm lengthl0.36 m
Gravityg9.81 m/s2
Rotor inertiaJr2.6e-06 kg.m2
Inertia constantsIyy,Ixx9.5* 103kg.m2
Izz1.86* 102kg.m2
Thrust coeff.b1.4865e-07 N.s2
Drag coeffi.d2.925e-09 N.m.s2

Table 2.

The parameters of the quadcopter.

Advertisement

4. Simulation results

The suggested PID design parameters have been tuned manually in MATLAB/Simulink in order to track the trajectory smoothly. Table 3 lists the parameters of the recommended controllers.

Controller TuningPID
RollPitchYawAltitude
KP1.991.990.121.8
KI1.991.990.122.1
KD0.110.1101.9

Table 3.

PID design parameters tuning.

Figures 36 show the solar-powered quadcopter’s response to altitude, roll, pitch, and yaw velocity. The system response is excellent, and the control procedure is carried out with very minor overshoots. However, there is a noticeable overshoot in the case of altitude and yaw velocity control, at 60 seconds for altitude and 66, and 71 seconds for yaw velocity.

Figure 3.

The actual and desired altitude values.

Figure 4.

The actual and desired roll values.

Figure 5.

The actual and desired pitch values.

Figure 6.

The actual and desired yaw values.

A trajectory can be simulated to show that the simulation is appropriately controlled and operating. A 3D trajectory may be created using the trajectory inputs and states of altitude, roll, pitch, and yaw velocity. Figure 7 shows the three-dimensional trajectory, whereas Figure 8 illustrates the sensor position output.

Figure 7.

The quadcopter position sensor reading.

Figure 8.

The quadcopter trajectory.

The RPM of the motors is also provided in Figure 7 for further controller demonstration. The aforementioned overshoot may also be seen in the RPM diagram at the same time period (Figure 9).

Figure 9.

The quadcopter RPM.

The quadcopter’s voltage, current, and battery state of charge (SOC) are simulated in both cases, with and without solar cells. The results are compared to show how using solar cells improves flight duration. Figures 1017 compare battery simulation results with and without solar cells.

Figure 10.

The battery voltage vs. time when solar cells are used.

Figure 11.

The battery voltage vs. time when no solar cells are used.

Figure 12.

The battery current vs. time when solar cells are used.

Figure 13.

The battery current vs. time when no solar cells are used.

Figure 14.

The battery SOC vs. time when solar cells are used.

Figure 15.

The battery SOC vs. time when no solar cells are used.

Figure 16.

The battery power vs. time when solar cells are used.

Figure 17.

The battery power vs. time when no solar cells are used.

Figures 10 and 11 illustrate that when solar cells are used, the voltage is higher than when they are not used.

Figures 12 and 13 show that when solar cells are employed, the current drawn is lower than when they are not. When determining the quadcopter flying time, these current values are critical.

Figures 14 and 15 show that the SOC is lower when solar cells are employed than when they are not used. This means that when solar cells are not employed, the quadcopter discharges more quickly.

Figures 16 and 17 show that when solar cells are utilized, the battery power gradually decreases because the quadcopter uses a part of the cell current, causing the battery power to decrease due to the drop in battery current.

The flight time can be calculated in both situations using the following formula:

The quadcopter flight time=The battery capacity×save discharge rate/AADE8
AAD=AUW×P/V=AUW×IE9

where P is the power needed to lift one kilogram of equipment, expressed in watts per kilogram, I is the current (in amps) needed to lift one kilogram into the air, and AAD is the average amp draw, expressed in amperes. AUW is the all-up weight of your drone, which is the total weight of the equipment that goes up in the air, including the battery. Also, it can be calculated directly from Omni calculator website [16] or using trigonometry.

Flight times are calculated using Eqs. (8) and (9).

Flight time is 34.37 minutes when no solar cells are used, and 2.18 hours when solar cells are used.

Advertisement

5. Conclusion

This article discusses the modeling and control of a solar-powered quadcopter, resulting in significantly longer flight duration. The quadcopter’s flight dynamics and aerodynamics models are being developed. To simulate the model in MATLAB, a mathematical model in Newton-Euler form was derived. An accurate plant model was built using MATLAB/Simulink, and motor dynamics and battery dynamics were integrated. The solar-powered quadcopter power system was modeled utilizing SunPower C60 sun cells and an MPPT, Buck Converter. These parameters were added to the plant model to make it more realistic for real-world application. The designed solar-powered vehicle was controlled by PID controllers, and the system reaction was recorded after the PID controllers had been tuned. The simulation results demonstrate that the system is properly controlled and operated.

Furthermore, the results reveal that the solar-powered quadcopter performs well under typical solar irradiation circumstances. While the nonsolar-powered quadcopter can fly for 34.3 minutes, the solar-powered quadcopter can fly for 2.18 hours with the battery’s state of charge (SOC) maintaining over 20%. Although the angle of the panels is greatly important on solar panel power output, this article does not focus on this issue; thus, additional research on this topic may be done in future works. A real model will be developed and tested outdoors in the future to compare simulation results with real-world results.

Advertisement

Acknowledgments

I’d like to thank Prof. Dr. Ahmet Karaarslan for his patient guidance, support, and counsel.

Advertisement

Conflict of interest statement

The authors have no conflicts of interest to declare that are relevant to the content of this article.

References

  1. 1. Sowah R, Acquah MA, Ofoli AR, Mills GA, Koumadi KM. Rotational energy harvesting to prolong flight duration of quadcopters. In: 2015 IEEE Industry Applications Society Annual Meeting. Addison, TX, USA; 2015. pp. 1-7. DOI: 10.1109/IAS.2015.7356835
  2. 2. Shaheed MH et al. Flying by the sun only: The solarcopter prototype. Aerospace Science and Technology. 2015;45:209-214. DOI: 10.1016/j.ast.2015.05.016
  3. 3. Achtelik MC, Stumpf J, Gurdan D, Doth K-M. Design of a flexible high performance quadcopter platform breaking the MAV endurance record with laser power beaming. In: 2011 IEEE/RSJ International Conference on Intelligent Robots and Systems. San Francisco, CA, USA; 2011. pp. 5166-5172. DOI: 10.1109/iros.2011.6094731
  4. 4. African Electrical Technology Conference Institute of Electrical and Electronics Engineers South African Section & Polytechnic of Namibia. (2007). IEEE; 2007. Available from: http://ieeexplore.ieee.org/servlet/opac?punumber=4401437 [Retrieved: September 25, 2023]
  5. 5. Goh CS, Kuan JR, Yeo JH, Teo BS,Danner A. A fully solar-powered quadcopter able to achieve controlled flight out of the ground effect. Progress in Photovoltaics: Research and Applications. 2019;27(10):869-878. DOI: 10.1002/pip.3169
  6. 6. Kingry N, et al. Design, Modeling and Control of a Solar-Powered Quadcopter. In: 2018 IEEE International Conference on Robotics and Automation (ICRA). Brisbane, QLD, Australia; 2018. pp. 1251-1258. DOI: 10.1109/ICRA.2018.8462896
  7. 7. Verbeke J, Hulens D, Ramon H, Goedemé T, De Schutter J. The design and construction of a high endurance hexacopter suited for narrow corridors. In: 2014 International Conference on Unmanned Aircraft Systems (ICUAS). Orlando, FL, USA. 2014. pp. 543-551. DOI: 10.1109/ICUAS.2014.6842296
  8. 8. Pang T, Peng K, Lin F, Chen BM. Towards long-endurance flight: Design and implementation of a variable-pitch gasoline-engine quadrotor. In: 2016 12th IEEE International Conference on Control and Automation (ICCA). Kathmandu, Nepal; 2016. pp. 767-772. DOI: 10.1109/ICCA.2016.7505371
  9. 9. Bemporad A, Pascucci CA, Rocchi C. Hierarchical and hybrid model predictive control of quadcopter air vehicles. In: IFAC Conference on Analysis and Design of Hybrid Systems. 2009
  10. 10. IEEE Robotics and Automation Society. ICRA 2009: 2009 IEEE International Conference on Robotics and Automation, Kobe, Japan. IEEE Press; 2009. ISBN: 978-1-4244-2788-8
  11. 11. Tran NK, Bulka E, Nahon M. Quadrotor control in a wind field. In: 2015 International Conference on Unmanned Aircraft Systems (ICUAS), Denver, CO, USA. 2015. pp. 320-328. DOI: 10.1109/ICUAS.2015.7152306
  12. 12. Amin R, Aijun L, Shamshirband S. A review of quadrotor UAV: Control methodologies and performance evaluation. International Journal of Automation and Control. 2016;10(2):87-103. DOI: 10.1504/IJAAC.2016.076453
  13. 13. Elagib R, Karaarslan A. Stabilization of Quadcopter Using the Combination of LQR And SMC Methods Conference: International Marmara Sciences Congress, Kocaeli, TÜRKİYE. 2022;13(2):283-292. ISBN: 978-605-70762-4-3
  14. 14. Elagib R, Karaarslan A. Implementation and stabilization of a quadcopter using Arduino and the combination of LQR and SMC methods. Journal of Engineering Research and Reports (JERR), London, UK. 2022:42-58. DOI: 10.9734/jerr/ 07 2022/v23i7735
  15. 15. Romero LE, Pozo DF, Rosales JA. Quadcopter Stabilization by Using PID Controllers. Quito, Ecuador: MASKANA; 2014
  16. 16. Omni Calculator. Drone Flight Time Calculator. Available from: https://www.omnicalculator.com/other/drone-flight-time [Accessed: September 26, 2023]

Written By

Rahmi Elagib and Ahmet Karaarslan

Submitted: 10 August 2023 Reviewed: 13 August 2023 Published: 11 October 2023