Introduction to Control Systems
Quote
Control systems is the science of making machines behave the way we want them to behave as opposed to how they would naturally behave.
Systems have input and output signals and a behavior that evolves over time. Systems can be broken down into components, which are something that we think we understand. In physical systems, inputs are generated by actuators, for example, DC motors or LEDs. Outputs are measured by sensors, for example, cameras or wheel encoders. These sensors produce observations.
The figure shows these parts in a chain. The blue words are an example of each part: one of the robot's wheels, which a motor drives and a wheel encoder measures.
In the case of a mobile robot, the system is the real physical robot and its environment around it. This system receives inputs from the robot's actuators, which results in an observable output by the robot's sensors. For example, a change in the camera viewport of the environment or a change in encoder ticks because of rotating wheels.
Controlling a system means designing a logical component that will output, at every instant in time, the commands for the plant actuators so that the output of our system follows a given plan.
Need for Control Systems
The main objectives of the controller are the following:
- Stability
- Performance
- Robustness
Stability
Mathematically, stability can be formalized as Bounded Input Bounded Output (BIBO) stability. A signal is bounded if its magnitude stays within a fixed finite limit for all time. A system is BIBO stable if every bounded input produces a bounded output.
The figure shows this for a wheel with its speed controller: the input is the target speed, and the output is the wheel's speed. This input is the reference of the closed loop figure, and all three plots of this page draw it with the same thin dashed line. Each dotted line is one such limit, a bound. Follow the two outputs after the input's step. For the same target step, the solid response settles. The dashed response keeps growing beyond any fixed limit.
One response can't prove that a system is stable, because the definition asks for every bounded input. The solid line only shows what a stable system does with this step. The dashed line is one kind of unstable response. Other unstable systems oscillate with a growing amplitude.
Performance
Besides being stable, a system also needs to perform well. Performance can be measured in several ways:
- Settling time: the time from a step of the target until the output enters a tolerance band around the target and stays in it. How quickly does the system converge to the plan?
- Tracking error: how closely a reference signal is followed or how precisely does the system converge.
- Allowed error after settling: how far the output may be from the target once it has settled. The tolerance band reaches this far above and below the target.
- Disturbance rejection: the ability to compensate for external stimuli. How well can the system recover from a disturbance, such as a load that slows a wheel?
- Noise attenuation: the ability to minimize the effect of high-frequency signals added to the measurements or inputs.
These are all good examples of performance criteria for controller design.
The figure shows the first four criteria for the speed of a wheel, each with its number. Follow the solid line, the wheel's speed, from the step of its target speed on the left. The settling time (1) runs from the step until the speed enters the gray tolerance band and stays in it. The speed is then still below the target, and the tracking error (2) has shrunk on the way. The band reaches as far above and below the target as the allowed error after settling (3). A disturbance slows the wheel for a moment (4), and the speed stays inside the band.
In the example, the disturbance is a load that slows the wheel, such as a carpet. The figure doesn't show the fifth criterion, noise.
Robustness
Robustness is the ability of the controller to provide stability and performance even in the presence of uncertainty in the mathematical model of the plant.
The figure shows such an uncertainty for one parameter of the model, the wheel radius. The model has one value for the radius, and the figure assumes that a real wheel's radius lies in a range around that value. All three cases use the same target angular speed. Follow each wheel's response toward that target. On the robot, the firmware uses encoder ticks to measure the wheel's actual angular speed in rad/s. The feedback loop of one wheel on the PID Controllers page shows how the robots measure and control this angular speed. With the same controller, the smallest wheel (short dashes), the model's wheel (solid line) and the largest wheel (long dashes) all enter the gray tolerance band and stay in it.
In this example the larger wheel takes longer to reach the tolerance band. The three lines show three chosen radii, and they are no proof for every radius in between. The smallest and the largest radius differ by 25 % from the model's value. This range was chosen so that the three lines can be told apart, and it is not the tolerance of the robots' wheels.
The plot shows how fast each wheel turns, not how fast the robot drives. A larger wheel rolling without slip travels farther per turn. The wheel-speed controller cannot detect that distance error.
Model uncertainty can mean that the wheels of the robot are of slightly different sizes or the distribution of mass is different than what's assumed. Also, the parameters of the system might just change over time because of wear and tear. A robust controller would handle these cases well despite the uncertainty. Robustness and performance are a trade-off, and striking the right balance is a challenge that really depends on the application.
Here the uncertain parameter is the wheel radius. The assumed range has a lower and an upper limit. The figure calls such a range a "bounded variation".
"Bounded variation" in the system behavior of a mobile robot could count as:
- Wear and tear of components over time.
- Slight imperfections in the assembly.
Controller Structure
With the mentioned objectives in mind, stability, performance, and robustness, it is important to think about the structure of the controller.
- Open Loop Control
- Closed Loop Control
The simplest approach is for the user to send a predetermined sequence of commands directly to the actuators, which is called open loop control.
The figure shows an open loop for the speed of a wheel. Follow the arrows from the reference to the outputs: no arrow leads back to the controller.
Open Loop Pros
- it can't make a stable process unstable: a bounded, preset command keeps the response of a stable process bounded, because no measurement is fed back
- it is convenient
- it works when the model of the system is good
Open Loop Cons
- everything must be planned in advance
- it can't make an unstable process stable or correct a slowdown, because it doesn't observe the output
If our understanding of the platform response is good, we will obtain the desired outcome. If it is not good or if something unexpected happens during the execution, then the end result will diverge from the plan. In open loop control, information flows only in one direction, from the controller to the plant.
To enable the controller to take into account the actual execution, it is possible to close the loop by feeding the sensor measurements back to the controller, creating a feedback loop.
The figure shows a closed loop around the system of the first figure, with the wheel's speed as the example again.
- The reference is the value that the output should have. In the example, it is the target speed of the wheel.
- The comparison subtracts the observation from the reference. The result is the error: how far the wheel's speed is from its target.
- The controller computes the commands from the error. In the example, a PID controller in the robot's firmware computes a motor command. When the measured wheel speed falls below the target, the error grows, and the controller raises the motor command.
- The actuators turn the commands into inputs of the process. The motor driver and the motor put a torque on the wheel.
- The process reacts with its outputs. The wheel turns at a speed that also depends on the robot's weight and on the ground.
- The sensors measure the outputs. The wheel encoder gives the measured wheel speed. This observation goes back to the comparison.
Without the path of the observations (6), the loop is open, as in the open loop figure, and the controller has no measured speed to subtract. An open loop controller for the same wheel could follow a plan that is set in advance: a fixed motor command for a fixed time. If the wheel slows down under a load, for example on a carpet, that command stays the same, and the wheel turns less far than planned. The closed loop measures the slowdown, and the controller raises the motor command. If the motor has enough torque, the wheel gets back to its target speed. If even the largest motor command supplies too little torque for this load, the wheel stays below its target speed, and the measured speed shows by how much. PID Controllers describes this controller for the robots.
Closed Feedback Loop Pros
- it adapts to circumstances
Closed Feedback Loop Cons
- it is less convenient
- it can destabilize a stable system
Feedback control is very powerful because it allows the whole system to adapt to circumstances as they are unfolding and apply corrections on the fly. The measurements themselves, though, generally need to be processed before being fed back to the controller. This is required because the raw measurements might include a lot of redundant data straight out of the sensors.
The part of the robot between the observations and the commands is called the agent. How to structure the agent is up to the designer, to us.
We could use different approaches, for example, a deep neural network trained from real data or a simulation to translate the images from the camera directly into commands to the wheels to keep the robot following a desired plan.
Traditionally, agents are designed with three main components, perception, planning, and control: to see, to plan, and to act. The figure shows such an agent. In the closed loop figure, the agent is the comparison and the controller, and the reference comes from outside. In the agent of the figure, the planner supplies the reference. The agent's controller compares the reference with the estimate that perception computes from the observations.
Perception
The perception block is responsible for transforming the data from the sensors into actionable information for the robot. This step is sometimes called filtering or estimation. These estimates of relevant quantities, for example, the position or the orientation of the robot's reference frame with respect to the world and the other objects in it, represent the robot's belief of its current state. This belief might correspond more or less to the truth, depending on the quality of the measurements and the perception solution used.
Planner
The planner instead provides a reference path for the robot to follow, for example, between two navigation points in a more general task of reaching a goal position while avoiding obstacles on the road. The planner receives the state estimate as input so it can adjust the nominal plan on the fly.
Controller
The plan and the state estimate are finally fed into the actual controller, which uses them to compute a decision applying a certain logic. For a mobile robot, the decision of the controller will be a sequence of commands which will be sent to the motors, finally closing the loop.
Summary
- Systems are input/output relations we can formalize
- Control is about making the system's output follow a given plan
- The control objectives are stability, performance and robustness
- The traditional feedback control architecture includes perception, planning and control steps
Designing a controller allows us to make systems behave in a desired way, rather than follow their natural dynamics. Although we can measure quantities of interest and drive the system through actuators, not all systems are controllable. Some systems simply can't be controlled.
Systems have their natural dynamics, fundamentally dictated by the laws of physics. More often than not, just "letting the system go" will not meet the user's requirements. Control systems leverage our abilities to measure quantities of interest and to actuate (or influence the physical world through devices), to drive the system where we want, and how we want.
In practice a controller consists of lines of code or one or more mechanical devices. A controller is typically a logic that outputs decisions. These decisions are translated to the real world through actuators. It is actually possible to create control logics with analog devices too.
Stability is the first design objective for most controllers because unstable systems are potentially unsafe. An unstable system might lead to overshooting driving behavior, not following a reference path and even driving outside of the road without heading back. There are very few instances in which making a system unstable might be desirable (exceptions being, e.g., acrobatic flight or selected military/destructive applications). The output of an unstable system can grow beyond any fixed limit, potentially with catastrophic results.
References
Comments
Comments are GitHub Discussions, shown with giscus. Loading them connects to giscus.app (hosted by Vercel, USA) and GitHub (USA); you need a GitHub account to comment.