An Overview of Control Systems and MCUs
Control systems make up a substantial percentage of all embedded systems and there are many varieties that fall within the broad category. Stuart takes us on a brief tour of control systems, explaining the differences and discussing which are best suited for specific applications and why the differences matter.
Control systems are how the real world is controlled by an MCU. In this article, I’ll focus on what a control system is and how it works. I’ve touched on some of these concepts in previous columns, so I’ll be repeating but summarizing some of the same information here. This article won’t turn you into a controls engineer, but it will give you an understanding of what control systems are and what they do. I’ll focus on embedded control systems here. And I’ll leave out the calculus.
WHAT IS A CONTROL SYSTEM?
A control system is a way to maintain some device at a specific temperature, speed, pressure, or something similar. A control system may turn things on or off in response to some external signal. Control systems can be mechanical or electrical; in the “olden” days, mechanical governors were used to control the speed of steam and diesel engines. Figure 1 shows a very simplified example; a pair of hinged weights are attached to a drive shaft that is driven from the engine, which drives the drive wheel either through a belt or gearing. As the speed goes up, centrifugal force causes the weights to move away from the center, closing a throttle valve (not shown) and decreasing the speed. If the speed is too low, the weights move closer to the center, opening the valve and increasing the speed.
There are a lot of ways to define and describe a control system, open loop, closed loop, linear, discrete, or by the specific type of control used, such as proportional-integral-derivative (PID).
Components of a Control System: A control system has some kind of input, or setpoint. This can be variable, such as the temperature setting on a thermostat, the speed setting of a motor, or the pressure setting of an industrial pump. The setting could be fixed, such as the 5V setting of a fixed-output voltage regulator.
The system also has some kind of actuator. Actuator is a generic term for something that accepts electrical signals and produces motion, such as a motor or a pump. In some cases, the output isn’t mechanical motion but might be light level or heat or voltage. These are generally transducers that translate electrical energy into some other form. These might take the form of a pulse width modulation (PWM) transistor driving an LED array, or a heater, or an audio speaker. In an embedded system, the output could be a serial control word to an external module such as a stepper motor controller.
Finally, the control system has a controller. This might be as simple as an op amp or as complex as one or more computers that control a manufacturing plant. The controller accepts the input and adjusts the output to make the controlled device match the setpoint. Note that the term “controlled device” might not be the actuator output; in the furnace in your house, the temperature of the house is the controlled output, not the temperature of the gas flame or electric heating coils.
It is important to note that, although examples of control systems often have one input and one output, an actual system may have multiple inputs and multiple outputs. To take a simple example, when your air conditioner turns on, the intent of the control system is to cool the house to a set temperature. But to do that, the compressor, compressor fan, blower motor, and other components are all activated. A chemical processing plant might have multiple inputs such as temperature from multiple sources, pressure from multiple pumps, and some kind of gas sensors.
OPEN AND CLOSED LOOP CONTROL
Figure 2 shows examples of an open loop and closed loop control system to control a heater, maybe a stove in a kitchen. The top diagram is an open loop control; if the control knob is set at 50%, the timer turns the heater on for 20 seconds and off for 20 seconds. If the knob is set at 100%, full heat, the heater is on all the time. This works but the temperature isn’t very precise, although a pan of boiling water won’t care. The electronic switch has no way to measure the temperature of whatever is being heated, so the duty cycle, once set by the knob, is fixed.
Closed Loop Control: The lower diagram in Figure 2 shows a closed loop control system for a heater. Maybe this one is in a medical instrument that needs more precise temperature control. The knob might be calibrated in °C or might even be a fixed value. A temperature sensor detects the temperature of whatever is being heated, and the electronic switch turns the heater on and off as needed to maintain the selected temperature. This will be much more precise, but it comes at the cost of an added sensor and added complexity in the electronic switch.
The key thing that sets closed loop control apart from open loop control is the addition of feedback. I discuss this in my article, “Feedback – What Is Feedback and What’s It Good For?” (Circuit Cellar 417, April, 2025), so I won’t rehash that here. [1] Essentially, feedback in a control system samples the output, whether it’s the temperature of a heater or the speed of a motor, and adjusts the drive to the controlled device to maintain a desired value. The output of a feedback system is determined by the difference between the setpoint and the actual output.
Figure 3 shows positive and negative feedback systems. In both systems, the setpoint, the desired output value (speed, temperature, etc.) is input to a summing junction. The other input of the summing junction is the feedback. The output of the summing junction feeds the forward transfer block, and the output feeds back into the feedback block. Note that the feedback input isn’t necessarily feeding back from the actuator/transducer. For example, in the case of the medical heater mentioned earlier, the feedback probably wouldn’t be the heater itself, but the temperature of whatever is being controlled, whether it’s a single biological sample or the temperature of a cabinet that contains many such samples.
You will notice that the positive and negative feedback diagrams look identical, except that the positive feedback system adds the feedback value to the setpoint, reinforcing it. This is indicated by the plus symbol on the summing point input. The negative feedback system subtracts the feedback value from the setpoint, as indicated by the minus symbol on the summing point input.
In both cases, the equations for the forward transfer function and the feedback function might be a pure number, as in an op amp with a fixed gain, or a complex, frequency-dependent equation. Forward transfer gain is typically indicated by G and feedback gain is typically indicated by H. However, you may see diagrams with different nomenclatures. In an embedded system, the summing junction, forward, and feedback blocks will typically all be implemented in software.
The error signal, often designated as E, is the driver for the forward transfer and is some function of the difference between the setpoint and the actual output. I say “some function” because the actual value depends on the equations that define the forward and feedback blocks.
The overall transfer function for the positive feedback system is defined by:
Output = G/(1-GH)
For the negative feedback case, the equation is:
Output = G/(1+GH)
You can derive these as follows (we’ll call the setpoint R and the output C):
For the positive feedback case:
Eq A: C = EG
Eq B: E = R+CH
Substituting B into A:
C = GR+GCH
C-GCH = GR
C(1-GH) = GR
C/R = G/(1-GH)
You can do the same thing to derive the negative feedback case:
Eq A: C = EG
Eq B: E = R-CH
C = GR-GCH
C(1+GH) = GR
C/R = G/(1+GH)
Again, G and H may be very complex, frequency-dependent equations. But this general form applies, regardless of how much math is needed to calculate the values.
Time-Invariant Systems: A time-invariant control system is one in which a given input always produces the same output, regardless of time. An example would be a switching voltage regulator. If the load on the output changes, maybe because a heater switches on and off, the regulator will adjust the duty cycle and/or frequency of the PWM driver to maintain the voltage. If the load periodically switches on and off, each time it changes, the signal to the PWM driver will be the same as it was the last time. A time-invariant system doesn’t remember previous settings or any kind of history.
Time-Variant Systems: Time-variant control systems are the opposite of time-invariant systems in that the response of the output to an input change is time-dependent. An example would be directional control of a rocket or missile; as the fuel is used up, the center of gravity and the weight change, so a given error will produce a different output response to the guidance fins. You could argue that the variance isn’t really time but remaining fuel, but the principle is the same; the output is not necessarily the same in response to a given input.
Linear Systems: Linear systems are systems for which the output has a proportional relationship with the input. If the input doubles, the output doubles. An op amp configured as an inverting amplifier is a simple linear control system. If the gain is 2, then if the input voltage goes from 1V to 2V, the output will go from 2V to 4V. At the most basic level, the gain and feedback equations for a linear control system will not have any exponential terms.
Non-Linear Systems: Non-linear systems are those that do not have a linear relationship between input and output. Non-linear control systems are more difficult to design and stabilize. The brakes on a modern car are a non-linear control system; when brakes are applied, sensors detect wheel slip and the antilock braking will engage, which modulates braking to prevent wheel lockup. An autonomous vehicle is a complex non-linear system with many inputs and outputs that interact. For example, controlling speed must be interrupted when an emergency vehicle approaches: the steering and brakes have to move the vehicle off the road and then resume normal operation when it is safe to do so.
REAL WORLD LIMITATIONS
As mentioned, a linear control system has an output that is proportional to the input setpoint. In a digital control system, the setpoint will be a number, which might represent voltage, temperature, pressure, speed, direction, or any number of other things. When we say the control system will make the output number match the setpoint number, there are some real-world considerations that must be accounted for. In this section, I’ll focus mainly on closed-loop control.
Time Delay: As mentioned previously, an op amp amplifier or voltage regulator can be thought of as a simple control system. In most cases, those simple examples have as an output the electrical voltage at the output of the device itself. But in a real-world scenario, the control system may be controlling a heater coil but measuring the temperature of, perhaps, the air in a test chamber.
The heating coil takes some time to go from application of current to full heat; if you’ve ever seen one of those small space heaters, you’ve probably noticed that the coils take some seconds to go from dark to dull red to bright red as they heat up. Similarly, the air in the test chamber doesn’t reach its temperature instantly.
Even when the heater is at full output, it takes time to warm up after the heat is applied. This is thermal inertia, which is the resistance of things to changes in temperature. Similarly, a stepper or DC motor driving something via the drive shaft has some inertia. You can’t start spinning a stepper motor at the full step rate; you must ramp it up or down. A pump that fills a tank takes some time to change the liquid level; the output in liquid doesn’t instantly match the setpoint just because the pump is on. The delay between the controller output changing and the measured value changing is sometimes called dead time.
When we say that a linear control system has an output that is proportional to the setpoint, what we’re really saying is that the output is driven to the setpoint, but it might not get there instantly. Therefore, the actual output waveform to the heater, or stepper, or whatever is being driven, has to compensate for this delay. There are various methods to do this.
— ADVERTISMENT—
—Advertise Here—
For example, proportional control applies an output to the driven device that is proportional to the difference (E) between the setpoint and the actual output. In the heater example, if the heater is far below the setpoint, the heater drive will be large to heat the space as quickly as possible. As the temperature approaches the setpoint, the heater power will be reduced. In an MCU-driven system, this usually means PWM control of the heater.
Stability: A control system is considered stable when it reaches the desired setpoint without oscillations, excessive overshoot, or other unwanted effects. There are stability analysis techniques such as Routh-Hurwitz and Nyquist, but those alone would fill a couple of articles.
Figure 4 shows a proportional control output of a switching voltage regulator that I used as an example in a previous article. You can see that the output voltage ramps up toward the setpoint, overshoots a bit, oscillates around the setpoint a couple of times, and then stabilizes.
We need to differentiate between an oscillation that is caused by instability and one that is caused by the design. Figure 5 shows the typical temperature for a household furnace. The thermostat turns the furnace on until it reaches 0.5° above the setpoint temperature, then turns it off until the temperature falls 0.5° below the setpoint. The temperature is oscillating, but it’s not instability; it’s hysteresis in the design to prevent the furnace from cycling too quickly. The on and off time for this illustrative example might be ten minutes on and ten minutes off. Although they are shown the same, it’s entirely possible that the furnace might be able to heat the house faster than the heat is lost when the furnace is off; in that case, the off time would be longer than the on time.
If the oscillation grows until some limit is reached, the system is oscillating and is unstable. Other indications of instability are excessive oscillations before the system settles at the setpoint
Safety/Reliability: In some cars, the temperature sensor measures the temperature of the engine coolant. If all the coolant is lost, the sensor will not indicate high temperature, even though the engine is overheating. The sensor is working, but the proper operation of the sensor depends on presence of coolant. Without it, the driver doesn’t know the car is overheating until it quits.
In my article, “When Technology Goes Wrong: How Bad It Can Get, and What You Can Do About It” (Circuit Cellar 399, October 2023), I mention the importance of handling failures. [2] In a control system, things can fail: sensors, motors, heaters, and many other parts. If a stepper motor fails, you can’t position it correctly. How does your system know that happened, and how should it react? Shut down? Notify a human operator? A modern cruise control system on a car will detect when the vehicle’s wheels are slipping on a slick road and will turn off cruise control. What limits do you need on things like how long a heating coil is allowed to remain at full power before you call it a failure and shut it off? The correct response might depend on the application. If you are controlling the temperature of a medical instrument (say, something that is testing blood samples), it might be better to shut down than to overheat and destroy the samples. Sometimes giving up is better than reporting a faulty result.
I read some years ago about a motorized medical table that could be tilted for treatment. But if an operator left a step stool under one corner, the table could turn over and injure the patient. Figure 6 illustrates the problem. In a case like that, the control system was doing what it was supposed to, but it probably also needed a sensor that indicated the base was coming off the floor, and to return everything to neutral when that happened. If an unsafe state is a possibility, then safety must be an essential design consideration.

A tiliting medical table that encounters a block can create a dangerous condition without proper control.
How much effort, hardware, and code you need to add to a control system to handle faults depends on the application. Anything that can be a safety issue needs high confidence that something going wrong won’t create an unsafe condition. If you’re just controlling the brightness of an LCD backlight, you can probably live with failures.
Load Variations: Control systems are designed to apply the control to some load. Whether it’s heating your house or controlling the speed of a car using cruise control, loads can vary. A cruise control must work on level ground and hills. Going up a hill requires more throttle (whatever form it takes) to maintain the speed. Control systems will, usually, need to operate over a range of loads. For cruise control, there is some limit to the degree of incline where the system will maintain speed. The furnace in a house is designed for the size of the house and the local climate; the furnace may be unable to maintain the desired temperature on an exceptionally cold day.
Tuning: Tuning a control system is the process of adjusting the various parameters to achieve system goals. Those goals may include the speed at which the output reaches the setpoint when the load changes or the setpoint is changed. It may also limit the amount of allowable overshoot. In some cases, the performance requirements may necessitate some tradeoffs. It may be impossible to achieve the desired speed of achieving setpoint without having out-of-specification overshoot. In a case like that, something has to give. It’s also important to confirm that the final configuration meets the full range of required loads and is sufficiently stable. The size of the furnace in your house is based on climate and square footage. It’s not unusual for a furnace to run almost continuously on the coldest days: that represents the maximum load for the system.
SIMULATION
There are many software packages that can simulate control systems such as MATLAB and Simulink. There are software packages for simulating large plants, such as refineries, although those are outside the scope of this article. One important consideration is that any simulation is only as good as the inputs and assumptions built into it. You can do all kinds of simulations with incorrect inputs and still end up with something that doesn’t work.
REFERENCES
[1] Stuart Ball, “Feedback – What Is Feedback and What’s It Good For?” Circuit Cellar 417, April, 2025.
[2] Stuart Ball, “When Technology Goes Wrong: How Bad It Can Get, and What You Can Do About It.” Circuit Cellar 399, October, 2023.

Stuart Ball recently retired from a 40+ year career as an electrical engineer and engineering manager. His most recent position was as a Principal Engineer at Seagate Technologies.





