# Calculation of the Hardware and Electrical Parameters Choosing a motor highly depends on the application or purpose. For example, a drive system motor turns a wheel to provide locomotion and for actuators, motor usually runs through an extreme gear ratio to output just a couple rotations per second, but at very high torque for moving a heavy, offset mass like on a robot arm. Also, it needs to be able to provide enough power, preferably where it's most efficient near its top-end speed. On a horizontal surface, a wheeled robot’s motors must produce enough torque to overcome any imperfections in the surface or wheels, as well as friction in the motor itself, so it does not require much torque to move purely horizontally. On an inclined surface, it must produce enough traction to counteract the effect of gravity. Let's consider one general example: In the below figure, the robot is at angle $\theta$ $mg_x$ - causes the robot to move downwards $mg_y$ - balances by the normal force the surface exerts on the wheels. Equations are: $mg_x = mg*sin(\theta)$ $mg_y = mg*cos(\theta)$ ![alt-text-1](https://i.imgur.com/2FimIaX.png) ![alt-text-2](https://i.imgur.com/HTJWQri.png) there must be friction between the surface to not slide down, which in turn produces torque. Torque required is \begin{equation} T = f*R \end{equation} this is a very simple example, if the robot is accelerating or decelerating, all forces need to be balanced and to be put in the above equation. This value is total torque, for N wheels, this value need to be divided by N for the torque needed for each motor. so final torque needed is (considering acceralation) \begin{equation} T = (100/e)*{(a+g*sin(\theta))*M*R \over N} \end{equation} where e is the efficiency estimated by multiplying all individual efficiencies of the motor, motor controller, gearing, etc. Now the total power $P$ of motor can be calulated as \begin{equation} P = T*w \end{equation} Torque can be calculated from above and $w$ is specified in the specifications. It is recommended to select maximum angular velocity to find corresponding maximum power. Now from power and choosing supply voltage from system design, we can calculate current by \begin{equation} P = I*V \end{equation} and to get the battery capacity for intented time $t$, it is given by \begin{equation} c = I*t \end{equation} Now there is sufficient torque to overcome the friction force that impedes motion. As we choose the motor from above, we will know the RPM from the specifications, the circumference of the wheel is \begin{equation} C = \pi*d \end{equation} the speed of the robot travels for this rotation of the wheel, \begin{equation} V = C*N \end{equation} where $V$ is linear velocity, $C$ is the circumference of the wheel, and $N$ is the rotational speed. So we have intended speed from that wheel diameter is calculated. Furthermore, the tire type highly depends on the terrain we are using. so by referring to the manufacture charts available we can choose the particular tire for our purpose. **Example** Payload=100Kg; speed= 2m/s; (say)accelertion:1m/s^2 Force = 100N that is total force reuiqred to meet the functional requirement is 100N. Assume robor has 4 motors adn wheels,so each will required 25N. Torque = 25*r; r is wheel radius, let's say it turned out to be 0.35/2m Torque= 4.375Nm: required torque at each wheel calculate the required RPM by the wheel diameter and from given speed as: wheel D = 0.35m, C = 1.09m, RPM =1.83*60 =110 so choose the motor which has required torque and RPM. Based on that and required supply voltage according to application and functionality, we will choose a battery, consider the running time say average 1.5hr working and supply voltage is 24V as we have 4 motors, the total is 4*24V, stall current = 20A, to calculate capacity: c = 120Ah, In practice, motors will run at maximum torque for a limited amount of time, so for the best battery, taking average current drawn by each motor is suitable for calculating capacity. Now the charging time of the battery is \begin{equation} Charging\ time = Ah/Charging\ current \end{equation} generally charging current is 10% of battery Ah, so it will be 12A, so charging time = 120/12= 10hr. Discharging time is battery Ah*battery Volt/applied load (neglecting all losses).