Control systems are exactly what you think they are: systems designed to control something. Perhaps a better way to put it is systems design control the behavior of something. The term “control systems” does an excellent job of being vague and most of us (originally) don’t think too much about it until its brought to our attention or we crash a robotic armature into itself and investigate how that horrifying event was allowed to happened. Usually during this investigation our internal dialog has a loop running that goes something like: “why the hell will the system allow me to manipulate it in a self-destructive way!?!”
What I found was my own ignorance, I hadn’t implemented a proper control system. One could make a case claiming that I hadn’t taken ANY control system into account whatsoever. I jumped in too deep, too fast (sound familiar?) and paid the price of crashing a rotating arm into another part of the system. Luckily, a friend stepped in and repaired the arm for me and metaphorically pointed to a large neon sign on the wall and said “you can’t ignore this”. He walked over to pull the chain dangling beneath the sign, the high voltage energized the gas in the tubes blinding me with the now unavoidably obvious words: Control Systems.
Evidence of Control Systems
There is evidence of control systems all around us, we use them all day without giving them any thought. I get up in the middle of the night in a daze, I shuffle down the hallway like a zombie for a glass of water and I never miss the handle of the cupboard with my outstretched arm. I swing open the door to the cabinet the appropriate distance without any problems and grasp a glass with my other hand. I do these things without actively focusing on them but nevertheless, these are control systems. I don’t squeeze the glass until it shatters in my hand as I grab it from the cupboard. I also have the ability to turn on the water from the faucet, fill the glass, turn the water off, and the only thing wet is the inside of the glass, not my hand or even the sink basin below the water faucet. This is an example of many complex control systems working towards a glass of water.
Rockets ignite and propel satellites into earth’s orbit, an elevator delivers us to the desired floor, control systems are everywhere. They have been around since forever and can be seen in some of our STEM forefathers’ (I think I just coined that phrase) most notable work.
300 B.C. the Greek mathematician and inventor Ktesibios creates a water clock that uses a control system with water as an input and time as an output. Everything in between water and time is the control system.
Improving on previous windmill designs, in 1809 William Cubitt created windmill sails with automatic shutters that were adjusted by wind-speed and a counterweight, this is a control system. Wind is the input and constant rotational energy is the output.
To observe an existing system and point at the input and output stating “water in, time out, everything in between them is a control system” doesn’t explain how a control system works or is designed but we’re getting there. These inventions require some fairly complex mathematics and we’ll get to that in a subsequent article but for now we’re laying a base of understanding. We have looked at a few examples of control systems in nature and a few man-made control systems. I shared my ignorance of control systems and then tried to redeem myself by telling you that I can fill a glass of water.
We will also have a look at some block diagrams and I should warn you that at some point we’ll encounter some mathematics you’ll never want to see again. Luckily the first thing we’ll do when we see these dreadful maths is devise a plan to get the hell outta there. Once we are safely out of harms way we will take care of some simpler operations i.e. we’ll do a bit of algebra instead of calculus and differential equations. Now come with me, friend, for after the break the real fun begins.
The Block Diagram
For our purposes I have drawn up an oversimplified version of a single input, single output (SISO) control systems. The block diagram is the control system. We can manipulate it with algebra and introduce new components as needed to get the desired output. We will however quickly replace these generic labels with labels that better describe the elements of the system. We will also break the “Control System” block into multiple blocks that make up the system. You can think of this diagram as the high level description you would give to a child, remember “water in, time out, everything in between them is a control system”. The next bit is a little more detailed yet still symbolic in that we aren’t looking at the mathematical components of each block quite yet.
Lets create an example of a specific control system we hypothetically want to design. How about a large satellite dish? Good, its done. So we have a large satellite dish that is rotated by a geared motor. The desired position of the dish is input with a potentiometer which the controller uses to determine the magnitude and direction of required movement to achieve desired output. Also taken into account is the motor itself, the load we are moving (large satellite dish), and the gearing required to do so. The output of this system should be fed back to the input by something called (wait for it), feedback. The feedback path contains a second potentiometer that is adjusted as the dish rotates and goes into a summing junction with the input.
We can now draw a new block diagram to represent the more detailed description of what we have going on in this system.
We have discussed the function blocks and the basic flow of the system, let’s have a look at the signals, which are in blue in the above diagram. The initial angular input is an angle which the potentiometer (Input Transducer) converts into a voltage. At the summing junction there are two signals coming in and one going out, the two coming in are the voltage proportional to input and voltage proportional to output. If you notice the polarity markings on the input signals we have the input minus the output which results in the error signal. The angular output is in fact an angle that corresponds to the direction that the dish is pointing. In order to use the angle in our control system the potentiometer on the right (Output Transducer) converts that angle to a voltage that is sent to the summing junction. That junction is responsible for comparing the user control, and making sure action is taken until the actual position matches it.
Modifying The System
If we know that the behavior of the system is to drive the error signal to zero then we have two ways to measure the output of the system. Transient response and steady state error can both be measured to analyze the outcome of our control system and modify it accordingly.
Transient response is the signal’s reaction to a change in the system, which can be seen in the Step Response plot to the right. There are 3 types of transients which can be classified by the type of damping ratio used: over-damped, under-damped, and critically damped. The goal being a response as close to critically damped as possible.
We can visualize the importance of both the transient and the steady state error if we look at the plot response as a representation of an elevator going from the basement to the first floor. The under-damped oscillation is obviously going to be a problem and possibly cause some uneasy stomachs along the way as the speeding elevator overshoots the floor and overcompensates in the opposite direction, repeatedly. The over-damped elevator will get us there in a very smooth fashion, eventually. The critically damped response is shown in red and defined to be the fastest settling signal without oscillation.
In regards to the robotic arm that I crashed and wondered why this was possible, we can see one answer to that question in the step response plot. It’s possible that I was controlling an under-damped system and the arm crashed in the overshoot of the first half cycle of oscillation as seen by the blue line in the plot.
In this example there is not any steady state error introduced. Steady state error in the elevator scenario would result in the elevator doors opening somewhere between floors 1 and 2. Had this been the case we would deal with the steady state error by changing our controller so that the doors open at floor 1.
Clicking the antenna simulation screenshot to the left will take you to the interactive simulator in a new tab (requires flash). You can play with the value of the gain to see how it changes the output response. Hint: you have to hit the rewind button to start a new simulation.
A transfer function is similar in concept to the gain of a system and is defined as the ratio of output to input. We use the term transfer function instead of gain in reference to a control system as it implies the use of the s-domain (I realize that I have not introduced what the hell an “s-domain” is but lets overlook this for now as it will be explained in a separate article) to get a desired response from a system.
The block diagram as we have drawn it contains a lot of information about the control system, the main thing it lacks is the maths required to model the system. The transfer function is where the math could be found and in our system is the combination of the controller (math) and the plant (more math).
Controller & Plant
The controller contains the mathematical models of amplifiers for the signals and the power to drive the large motor. The plant contains mathematical models that represent the specs of our motor which would be readily available in a real world situation and include things such as the motor’s RPM at a certain voltage, and the resistance of the motor. We would also need information about the gear ratio between the motor and the satellite (this is a mechanical amplifier). The motor will have a mechanical load during operation and we can predict what this will be with an equivalent mechanical load equation which uses: equivalent viscous damping of the load, and the equivalent load inertia. In keeping with our math-less theme of this introduction we’ll skip what that means mathematically for now.
The intent of this article is to shed some light on what control systems are and a basic idea of how they work. I think control systems are interesting and exciting in that we can calculate some of the variables to use in complex systems rather than take wild guesses at non-trivial unknowns (which used to be my jam).
We, as hackers and engineers learn on a curve as does the rest of the population and just like everyone else we sometimes reach a plateau in our ability to make the improvements on our own designs. I think a basic understanding of control systems could help a lot of us get through this slump. I will attempt to do you the same favor my friend did for me in opening my eyes to what a control system is, how to analyze what is going on in a system, and we will all get a little better at designing our own systems along the way.
What To Expect Next Time
In the next edition of Beyond Control we will look at some examples of electrical systems in the time domain. We’ll talk about their transfer functions in the s-domain, why we need the s-domain, and what it takes to go from the time domain to the s-domain (and back). That’s two sentences of me saying math, without saying math. See you next time!