3.1.4. Motor Control

Using the height and orientation control variables obtained from attitude–altitude and angular velocity controller outputs, the angular velocities required for the motors are obtained as in Equations (19) and (20) [38]. Thus, the thrust required for the movement of the quadcopter in the specified path is obtained by controlling the speed of the motors *wi*, *i* = 1, 2, 3, 4 as:

$$w\_1^2 = \frac{u\_1}{4K\_T} + \frac{u\_3}{2lK\_T} + \frac{u\_4}{4K\_d} \qquad w\_2^2 = \frac{u\_1}{4K\_T} - \frac{u\_2}{2lK\_T} - \frac{u\_4}{4K\_d} \tag{19}$$

$$w\_3^2 = \frac{u\_1}{4K\_T} - \frac{u\_3}{2lK\_T} + \frac{u\_4}{4K\_d} \qquad w\_4^2 = \frac{u\_1}{4K\_T} + \frac{u\_2}{2lK\_T} - \frac{u\_4}{4K\_d} \tag{20}$$

The power consumed by each motor of quadcopter is indicated as:

$$P\_{m\_k} = P\_{h\_k} = (2\rho A\_p)(\frac{K\_t K\_\tau}{K\_t})^3 w\_k^3 \qquad k = 1, 2, 3, 4 \tag{21}$$

where *Pmk* denotes the power consumed by the *k*th motor, *Phk* explains the hovering power consumed by the *k*th motor, *ρ* is air density (kg/m3), *Ap* refers to the propeller cross-section (m2), *Kv* is the back electromotive force (EMF) constant, *K<sup>τ</sup>* is the torque proportionality constant, and *KT* is the thrust coefficient.
