.. _Control: ****************************** Robotic Control Systems ****************************** Control systems attempt to influence the state of a system towards a desired configuration. Control systems send a stimulus to the appropriate :term:`actuators`, measuring the result with :term:`sensors` and making needed corrections. External factors such as gravity, friction, drag, inefficiency of :term:`effectors`, amount of charge on batteries, and changes to the robot's environment (floor type, wind, slope of the floor) will impact the level of stimulus required. Examples of the types of stimulus include voltage or fuel levels sent to motors, hydraulic or pneumatic pressure in a cylinder, or rotational velocity (:math:`\omega`). The **state**, or output, of the system is :math:`\bm{x}`. The state of the system depends on its previous state, the stimulus applied to the actuators and the physics of the robot's environment. We can not determine :math:`\bm{x}` exactly, but can **estimate** it using sensors giving us variable :math:`\bm{y}`. We hope that our sensors are good enough to reasonably estimate what the robot actually does, :math:`\bm{y} \approx \bm{x}`. The desired set point, also called a **reference**, is :math:`\bm{r}`. The **error** between the reference and estimated system state is :math:`\bm{e}`, which is the input to the controller. The output of the *controller* is the **control Signal** :math:`\bm{u}`, which is the stimulus to the system. The **dynamics** of the system is the called the *system plant*. We need a model of the plant's physics and environment to be able to design a suitable controller. .. figure:: basic_block.png :align: center :width: 80% A feedback control system The system plant represents conditions that can change and that may not always be linear. We want to design the controller to react to the error signal (:math:`\bm{e}`) to produce a stimulus :math:`\bm{u}` such that :math:`\bm{e} \simeq 0` and hopefully :math:`\bm{x} \simeq \bm{r}`. We have two further requirements of the controller. We want it to be *robust*, which means that it can not depend on things that we do not know. If there are changes to the robot's environment, such as moving from a concrete floor to a carpeted floor, the controller should adapt to the change. It also must be *stable*, meaning that it will never go out of control. The robot can not start going really fast and crash into a wall. It also can not start oscillating in some way. A further desired goal is that the robot should be *smooth* in its movements. It should not be jerky with quick changes to the robot's speed or angle of direction. .. seealso:: Here are a couple free resources that go into more detail about control systems than this course or web site is able to do. * A free `book on control systems `_ -- This book gives complete coverage of control systems. The book may be purchased, but may also be freely viewed online or downloaded. * There is a free MOOC (Massive Online Open Course) called `Control of Mobile Robots `_. This free course is taught by Dr.\ Magnus Egerstedt and his team of graduate teaching assistants at Georgia Tech. This is an excellent course with lots of really good information. The course covers control systems in much more depth than this course or study guide, but has less emphasis on programming. .. toctree:: :maxdepth: 2 models linear PID motors