6.1 Simulink Model 82Figure 6.3: Block scheme inside the ¨Wheel¨ block.˙ω i = K w (ω ire f− ω i ) (6.1)It is also well known that the motor dynamics can be described by the equation:τ i = I m ˙ω i (6.2)where I m represents the motor inertia.By combining equation (6.1) and (6.2), we obtain the following relation defining the torquecontrol input:τ i = I m K w (ω ire f− ω i ) (6.3)If we do not take into account any gear-transmission and electrical issue typical <strong>of</strong> DCmotors, we have K w = 1I m, there<strong>for</strong>e the torque control torque is simply provided by the difference<strong>of</strong> the desired and measured wheel angular velocity. The block in yellow implementsthe motor model defined in (6.1) and provides both the wheel angular velocity and torque asoutput. It is worth noticing that such a model holds only if the motor can always provide the
6.1 Simulink Model 83desired torque. Such an assumption can be considered verified, except <strong>for</strong> the fact that, whenthe motor can not provide the required torque, the robot safe mode makes the motor stall.Moreover, the model does not take into account any elasticity effect due to the motor belt.However, the model is still meaningful as the elasticity-damping effects <strong>of</strong> the motor belt arealready take into account in the model <strong>for</strong> the tire longitudinal reaction <strong>for</strong>ce, as explainedin Section 4.2.The block in magenta computes the wheel center accelerations from the robot accelerationby employing (2.55), considering ˙V, ˙V i instead <strong>of</strong> V, V i , then ˙V i is integrated to provide V i .The blocks in light blue, red and green represent respectively the longitudinal, lateral andvertical reaction <strong>for</strong>ce block and implement (4.13), (4.9) and (4.15). In particular, while theblock in green directly implements (4.15), the blocks <strong>for</strong> the longitudinal and lateral reaction<strong>for</strong>ces present some differences with respect to (4.13), (4.9) due to simulation issues whichare further discussed in the following description <strong>of</strong> the ¨Flongitudinal¨ block. However, weprecise that, as such a description goes into details <strong>of</strong> the implementation <strong>of</strong> (4.13),(4.9), thereader, if not interested in, may go directly to Section 6.2 without any loss <strong>of</strong> comprehension.Figure 6.4(a) depicts the block scheme <strong>for</strong> the longitudinal reaction <strong>for</strong>ce. The same blockscheme is provided <strong>for</strong> the lateral reaction <strong>for</strong>ce, by replacing the µ ix with µ iy and ∆v ix withv iy as driving velocity.The block in cyan implements the piece-wise linear function in (4.12a), representing thelongitudinal dynamic friction coefficient when the wheels are slipping, and it multiplies itby the normal reaction <strong>for</strong>ce N i . In such a way, the output <strong>of</strong> this block differs from thestatic and kinetic friction <strong>for</strong>ce only <strong>for</strong> the constant terms µ smax , µ kmax , which is useful <strong>for</strong> theimplementation <strong>of</strong> the hysteresis block determining the switch <strong>of</strong> the contact point dynamics,as it is explained in the following.The block in gray provides the contact point velocity by implementing (4.13), as depictedin Figure 6.4. However, (4.13) presents an important issue from an implementation point <strong>of</strong>view, that is the complex behavior <strong>of</strong> the normal reaction <strong>for</strong>ce N ic perceived by the contactpoint when moving. As already introduced in Section 4.1, the normal reaction <strong>for</strong>ce N ic is notgiven only by the tire mass but it increases as the contact point gets closer to its equilibriumposition, thereby perceiving also the robot weight. This increase <strong>of</strong> the normal reaction <strong>for</strong>ceperceived from the contact point, i.e. the increasing <strong>of</strong> the kinetic friction <strong>for</strong>ce, makes thecontact point stops instead <strong>of</strong> following the wheel center velocity, under certain conditions