Feedback Loop Control System

Posted by PITHOCRATES - October 30th, 2013

Technology 101

Living through Winters became easier with Thermostats

When man discovered how to make fire it changed where we could live.  We no longer had to follow the food south when winter came.  We could stay through the winter.  And build a home.  As long as we could store enough food for the winter.  And had fire to stay warm.  To prevent our dying from exposure to the cold.

There’s nothing like sitting around a campfire.  It’s warm.  And cozy.  In large part because it’s outside.  So the smoke, soot and ash stayed outside.  It wasn’t always like that, though.  We used to bring that campfire inside the home.  With a hole in the roof for the smoke.  And families slept around the fire.  Together.  Even as some fornicated.  To propagate the species.  But that wasn’t the worst part about living around an indoor campfire.

Your distance from the fire determined how hot or cold you were.  And it was very hot by it.  Not so hot away from it.  Especially with a hole in the roof.  Worst, everyone got colder as the fire burned out.  Meaning someone had to get up to start a new fire.  The hard way.  Creating an ember.  Using it to start some kindling burning.  Then adding larger sticks and branches onto the kindling until they started to burn.  Which was a lot harder than turning the thermostat to ‘heat’ at the beginning of the heating season and forgetting about it.  Then turning it to ‘off’ at the end of the heating season.

A Feedback Loop Control System measures the Output of a System and Compares it to a Desired Output

Replacing the indoor campfire with a boiler or furnace made life a lot simpler.  For with a supply of fuel (natural gas, fuel oil, electricity, etc.) the fire never burned itself out.  And you never had to get up to start a new one.  Of course, that created another problem.  Shutting it off.

Boilers and furnaces are very efficient today.  They produce a lot of heat.  And if you let them run all day long it would become like a hot summer day inside your house.  Something we don’t want.  Which is why we use air conditioners on hot summer days.  So heating systems can’t run all day long.  But we can’t keep getting up all night to turn it off when we’re too hot.  And turning it back on when we’re too cold.  Which is why we developed the feedback loop control system.

We did not develop the feedback loop control system for our heating systems.  Our heating systems are just one of many things we control with a feedback loop control system.  Which is basically measuring the output of a system and comparing it to a desired output.  For example, if we want to sleep under a cozy warm blanket we may set the ‘set-point’ to 68 degrees (on the thermostat).  The heating system will run and measure the actual temperature (at the thermostat) and compare it to the desired set-point.  That’s the feedback loop.  If the actual temperature is below the desired set-point (68 degrees in our example) the heat stays on.  Once the actual temperature equals the set-point the heat shuts off.

The Autopilot System includes Independent Control Systems for Speed, Heading and Altitude

Speed control on a car is another example of a feedback loop control system.  But this control system is a little more complex than a thermostat turning a heating system on and off.  As it doesn’t shut the engine off once the car reaches the set-point speed.  If it did the speed would immediately begin to fall below the set-point.  Also, a car’s speed varies due to terrain.  Gravity speeds the car when it’s going downhill.  And slows it down when it’s going uphill.  The speed controller continuously measures the car’s actual speed and subtracts it from the set-point.  If the number is negative the controller moves the vehicle’s throttle one way.  If it’s positive it moves the throttle in the other way.  The greater the difference the greater the movement.  And it keeps making these speed ‘corrections’ until the difference between the actual speed and the set-point is reduced to zero.

Though more complex than a heating thermostat the speed control on a car is pretty simple.  It has one input (speed).  And one output (throttle adjustment).  Now an airplane has a far more complex control system.  Often called just ‘autopilot’.  When it is actually multiple systems.  There is an auto-speed system that measures air speed and adjusts engine throttles.  There is a heading control system that measures the aircraft’s heading and adjusts the ailerons to adjust course heading.  There is an altitude control system that measures altitude and adjusts the elevators to adjust altitude.  And systems that measure and correct pitch and yaw.  Pilots enter set-points for each of these in the autopilot console.  And these control systems constantly measure actual readings (speed, heading and altitude) and compares them to the set-points in the autopilot console and adjusts the appropriate flight controls as necessary. 

Unlike a car or an airplane a building doesn’t move from point A to point B.  Yet they often have more complex control systems than autopilot systems on airplanes.  With thousands of inputs and outputs.  For example, in the summer there’s chilled water temperature, heating hot water temperature (for the summer boiler), supply air pressure, return air pressure, outdoor air pressure, indoor air pressure, outdoor temperature, outdoor humidity, indoor temperature (at numerous locations), indoor humidity, etc.  Thousands of inputs.  And thousands of outputs.  And unlike an airplane these are all integrated into one control system.  To produce a comfortable temperature in the building.  Maintain indoor air quality.  Keep humidity levels below what is uncomfortable and possibly damaging to electronic systems.  And prevent mold from growing.  But not keep it too dry that people suffer static sparks, dry eyes, dry nasal cavities that can lead to nose bleeds, dry and cracked skin, etc.  To prevent a blast of air hitting people when they open a door.  To keep the cold winter air from entering the building through cracks and spaces around doors and windows.  And a whole lot more.  Far more than the thermostat in our homes that turns our heating system on and off.

www.PITHOCRATES.com

Share

Tags: , , , , , , , , , , , , , , , , , , , ,

Boolean Algebra, Logic Gates, Flip-Flop, Bit, Byte, Transistor, Integrated Circuit, Microprocessor and Computer Programming

Posted by PITHOCRATES - February 1st, 2012

Technology 101

A Binary System is one where a Bit of Information can only have One of Two States 

Parents can be very logical when it comes to their children.  Children always want dessert.  But they don’t always clean their rooms or do their homework.  So some parents make dessert conditional.  For the children to have their dessert they must clean their rooms AND do their homework.  Both things are required to get dessert.  Or you could say this in another way.  If the children either don’t clean their rooms OR don’t do their homework they will forfeit their dessert.  Stated in this way they only need to do one of two things (not clean their room OR not do their homework) to forfeit their dessert. 

This was an introduction to logic.  George Boole created a mathematical way to express this logic. We call it Boolean algebra.  But relax.  There will be no algebraic equations here.

In the above example things had only one of two states.  Room cleaned.  Room not cleaned.   Homework done.  Homework not done.  This is a binary system.  Where a bit of information can only have one of two states.  We gave these states names.  We could have used anything.  But in our digital age we chose to represent these two states with either a ‘1’ or a ‘0’.  One piece of information is either a ‘1’.  And if it’s not a ‘1’ then it has to be a ‘0’.  In the above example a clean room and complete homework would both be 1s.  And a dirty room and incomplete homework would be 0s.  Where ‘1’ means a condition is ‘true’.  And a ‘0’ means the condition is ‘false’.

Miniaturization allowed us to place more Transistors onto an Integrated Circuit

Logic gates are electrical/electronic devices that process these bits of information to make a decision.  The above was an example of two logic gates.  Can you guess what we call them?  One was an AND gate.  The other was an OR gate.  Because one needed both conditions (the first AND the second) to be true to trigger a true output.  Children get dessert.  The other needed only one condition (the first OR the second) to be true to trigger a true output.  Children forfeit dessert. 

We made early gates with electromechanical relays and vacuum tubes.  Claude Shannon used Boolean algebra to optimize telephone routing switches made of relays.  But these were big and required big spaces, needed lots of wiring, consumed a lot of power and generated a lot of heat.  Especially as we combined more and more of these logic gates together to be able to make more complex decisions.  Think of what happens when you press a button to call an elevator (an input).  Doors close (an action).  When doors are closed (an input) car moves (an action).  Car slows down when near floor.  Car stops on floor.  When car stops doors open.  Etc.  If you were ever in an elevator control room you could hear a symphony of clicks and clacks from the relays as they processed new inputs and issued action commands to safely move people up and down a building.  Some Boolean number crunching, though, could often eliminate a lot of redundant gates while still making the same decisions based on the same input conditions. 

The physical size constraints of putting more and more relays or vacuum tubes together limited these decision-making machines, though.  But new technology solved that problem.  By exchanging relays and vacuum tubes for transistors.  Made from small amounts of semiconductor material.  Such as silicon.  As in Silicon Valley.  These transistors are very small and consume far less power.  Which allowed us to build larger and more complex logic arrays.  Built with latching flip-flops.  Such as the J-K flip-flop.  Logic gates wired together to store a single bit of information.  A ‘1’ or a ‘0’.  Eight of these devices in a row can hold 8 bits of information.  Or a byte.  When a clock was added to these flip-flops they would check the inputs and change their outputs (if necessary) with each pulse of the clock.  Miniaturization allowed us to place more and more of these transistors onto an integrated circuit.  A computer chip.  Which could hold a lot of bytes of information. 

To Program Computers we used Assembly Language and High-Level Programming Languages like FORTRAN

The marriage of latching flip-flops and a clock gave birth to the microprocessor.  A sequential digital logic device.  Where the microprocessor checks inputs in sequence and based on the instructions stored in the computer’s memory (those registers built from flip-flops encoded with bytes of binary instructions) executes output actions.  Like the elevator.  The microprocessor notes the inputs.  It then looks in its memory to see what those inputs mean.  And then executes the instructions for that set of inputs.  The bigger the registers and the faster the clock speed the faster this sequence.

Putting information into these registers can be tedious.  Especially if you’re programming in machine language.  Entering a ‘1’ or a ‘0’ for each bit in a byte.  To help humans program these machines we developed assembly language.  Where we wrote lines of program using words we could better understand.  Then used an assembler to covert that programming into the machine language the machine could understand.  Because the machine only looks at bytes of data full of 1s and 0s and compares it to a stored program for instructions to generate an output.  To improve on this we developed high-level programming languages.  Such as FORTRAN.  FORTRAN, short for formula translation, made more sense to humans and was therefore more powerful for people.  A compiler would then translate the human gibberish into the machine language the computer could understand.

Computing has come a long way from those electromechanical relays and vacuum tubes.  Where once you had to be an engineer or a computer scientist to program and operate a computer.  Through the high-tech revolution of the Eighties and Silicon Valley.  Where chip making changed our world and created an economic boom the likes few have ever seen.  To today where anyone can use a laptop computer or a smartphone to surf the Internet.  And they don’t have to understand any of the technology that makes it work.  Which is why people curse when their device doesn’t do what they want it to do.  It doesn’t help.  But it’s all they can do.  Curse.  Unlike an engineer or computer scientist.  Who don’t curse.  Much.

www.PITHOCRATES.com

Share

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,