Big loop is car speed loop. Inside it there are various loops that contoll/look-up for currents (motor / battery / brake - charging, etc.), anti-slip, torque-limit, inverter control, etc. depending of complexity / requirments of project. As motor choosed change, one or more of such internal...