To test and evaluate the model, a few designs were considered and after detailed research and consultancy with the experts the model that was chosen is discussed below. The modelling process start form the very basic model where just some basic concepts were used to model the control of the quadcopter. After getting successful results the model was enhanced to a more sophisticated model having real like features. Furthermore, the features of the quadcopter model and control can still be improved to a certain extent for a system or application. The basic model of quadcopter model with PD control is discussed below:
A classical PD control concept was applied to obtain the desired results. The control of the vertical position can be obtained by using the following control input (Patel et al. 2012)
π’1 = π1+ ππ cos π cos π
61
Where,
π1= ππ§ππ§Μ β ππ§π(π§ β π§π) (5.2)
Where, βzd is the desired altitude and kzd, kzp are the positive constantsβ. The angular position can
be controlled by applying the following equation: (Beard 2008)
π4= ππππΜ β πππ(π β ππ) (5.3)
Where βkοΉp and kοΉdβ are the proportional and deferential gain of the βPD controllerβ and βοΉdβ is the desired yaw angle (Beard 2008). Furthermore, by selecting the appropriate values for βkpd,
kzd, kοΉp and kοΉd;β it can be guaranteed, the response is in vertical direction and yaw axis. In PD
controller, the system can be βforced to attain the desired hovering altitudeβ of the quadcopter by calculating error and adding it to the input after multiplying it with a constant, given as,
π1= πΆππ(ππβ π) + πΆππ(ππΜ β πΜ) π2= πΆππ(ππβ π) + πΆππ(ππΜ β πΜ) π3= πΆππ(ππβ π) + πΆππ(ππΜ β πΜ)
(5.4)
The model shown below in Figure 5-1 was built on Simulink, which describes the PD model of Quadcopter system dynamics, the control input angles and the desired output angles. This system was used to achieve the desired altitude. The Euler angles were used as a feedback to the controller. The results of this model are shown below in Figure 5-2
62
Figure 5-2: Results of Pitch, Roll & Yaw from PD Control Model for Quadcopter
Furthermore, the complete control system with all the components is detailed and modelled to the best of the capabilities, can be seen in Figure 5-3 below,
63
The above model of the quadcopter is also built in MATLAB / Simulink, but it has real like features of the quadcopter design and plus it also has the haptic capability in it. This control system contains Aerodynamics effects, motor dynamics, quadcopter dynamics, pilot joystick control, PD control system. The results of this system are discussed below. The model which was used for the quadcopter has the parameters which are shown in Table 5-1 below.
Parameter Value Unit
Ixx 4.856x10-3 kg/m2 Iyy 4.856x10-3 kg/m2 Izz 8.801x10-3 kg/m2 Ax 0.25 kg/s Ay 0.25 kg/s Az 0.25 kg/s IM 3.357x10-5 kg/m2 g 9.81 m/s2 m 0.468 kg l 0.225 m k 2.980x10-6 b 1.140x10-7
Table 5-1: Parameter values for Simulation
An example case was used to simulate the model and get the desired results. Firstly, the quadcopter has the values of zero for position and angles, as itβs in a stable state; also, the body frame is congruent with the inertial frame. The hover thrust is equal to the total thrust and total thrust is equal to the gravity. The total simulation time is 2 seconds having 0.0001 seconds of intervals. The inertial positions x, y, z is shown in Figure 5-4, The angular velocities of the propellers and the control inputs are shown in Figure 5-5 and the angels π, π, πare shown in Figure 5-6.
After inputting all the above conditions in the system, the quadcopter climbed for the first 0.25 second by varies the propeller speed from the hover thrust and then the speed is dropped for the next 0.25 seconds. Therefore, the quadcopter climbs in 0.5 seconds to 0.1 meters. After the climb the quadcopter is in stable state.
64
To perform a roll motion, the speed of the second propeller is decreased and the speed of the fourth propeller is increased for 0.25 seconds. To stop this roll motion acceleration, increase the speeds of the second and the speed of fourth propeller is decreased for 0.25 seconds. Hence, the roll angle π was increased approximately 25 degrees after 0.5 seconds. Due to this (roll angle) the quadcopter headed towards the y-axis (negative) direction.
Like the roll motion, to do pitch motion, the speed of the first propeller is decreased and the speed of third propeller increased. To stop this, increase the speed of first and decrease the speed of third. Hence the pitch angle π was increased to approximately 22 degrees. Due to this (pitch angle) the quadcopter headed toward x-axis (positive) direction.
And now for yaw motion, the speed of the first & third propellers and second & fourth are increased and decreased respectively and when to stop this action, do the opposite to the speed of the propellers. Hence the yaw angle π increases to approximately 10 degrees.
So, for the entire duration of the simulation the total thrust was very close to that of initial total thrust. Due to the deviation of pitch and roll angles, it was found that there is a decrease in the thrust in the direction of z-axis. And therefore, the quadcopter heads toward the z-axis (negative) and then starts to descend.
65
Figure 5-5: Control Input ππ
Figure 5-6: Angles π. π½, π
The Figure 5-7 attached on the next page is the complete control model with haptic control which was used to run simulations for control of quadcopter with haptic device in a visual virtual environment. The results of these experiments are discussed in the later section of this chapter.
Since the control model has various subparts and cannot be attached here, therefore it can be viewed in detail in Appendix II.
66
Figure 5-7: Full PID Control Model with Haptic System Control for Quadcopter
1 2 3 4 5 6 7 8
67
Describing the above full control model as numbered:
1. It contains the Roll, Pitch and Yaw control loops
2. It contains the Hardware Interface control (Haptics and Keyboard) 3. Some initialisation commands for the quadcopter
4. This section was modelled using Sim Electronics for PMDC Motors 5. It contains the Sim Mechanics (Quadcopter Mechanics) blocks
6. It is a physical signal block used for control the thrust for each propeller 7. Itβs a block which stops the model getting out of physical ground in simulation 8. Contains some measurements for the body and surface