Control

1. Introduction

A computer control system is a computerised system designed to control a process.

Control systems use sensors such as temperature sensors and pressure pads to monitor physical quantities. Using software the control system will carry out actions based on the quantities it has measured. These actions might include turning on devices such as a light or pump or sounding a buzzer.

Control systems can often be found built into other machines. These are known as embedded systems. They are also used by companies to manufacture products using Computer Assisted Manufacturing (CAM) and robots.

Here are some example control systems :

Example Control Systems
Traffic Lights The computer controls the sequences of lights displayed at a cross-roads to ensure that cars do not crash. Additionally the computer operates a pedestrian crossing to let pedestrians cross the road when a button is pressed.
Simple Greenhouse The computer controls the temperature in a greenhouse to maintain the conditions required for the plants in it to grow. If the temperature gets too cold then the computer turns on a heater to keep the plants warm.
Robot Arm The computer controls the movement of a robot arm which sprays parts of a car body. The arm must only spray when the body part is present and must then follow a programmed spraying path. The arm must stop if any foreign object, such as a human being, gets in its way.

2. Components

A typical computer system which is used for control will need to include :

A computer (or microprocessor).  
Some sensors to enable the computer to detect quantities such as temperature or pressure.
Some devices for the computer to turn on and off.
An interface to connect the sensors and devices to the computer.
Some software to read data from the sensors and decide when to turn the devices on and off.

The sensors will be used to measure the physical quantities of interest. This data will be transmitted via the interface to the computer. The software that is running on the computer will use the data to decide which devices to turn on or off. The devices will then be turned on or off through the interface.

Sometimes the computer, software and interfaces can be combined together onto a single circuit board to be used inside a machine such as a washing machine (to control the wash cycle). This type of control system is called an embedded control system. A new car contains many embedded control systems.

3. Sensors

Control systems use sensors to gather information about the world. A sensor is a device which measures a physical quantity such as the temperature and then sends a voltage to the computer representing the quantity. Sensors can be either analogue or digital :

There are lots of different sensors available, each of which is designed to measure a specific quantity. Examples of sensors include :

Sensor Type Quantity Measured Application
Temperature sensorAnalogueHow hot/cold it is.Monitoring the temperature of a science experiment.
Light sensorAnalogueHow light/dark it is.Turning street lights on when it is dark.
Pressure sensor DigitalIf a pad is being pressed.Detecting cars arriving at a car park barrier.
pH sensorAnalogueThe acidity of a liquid.Monitoring river pollution.
ButtonDigitialIf the button is being pressed.Obtaining a ticket at a car park entry barrier.
Light GateDigitalDetects an object passing through the gate.Measuring the speed or acceleration of objects.
Passive Infra Red (PIR)DigitalDetects when an object moves into an area.Activating a burglar alarm if someone enters a room.

If you are designing a control system you will need to decide which sensors to use and where to put them. Control systems will use lots of sensors at the same time.

The data gathered by the sensors is used to decide when to turn the devices connected to the control system on and off.

4. Devices

Devices are used by a control system to make changes to the real world environment that the system controls. Devices are also known as actuators. The devices are activated by electrical signals sent to them by a computer.

There are lots of different devices available. Examples of common devices include :

Device Action Produced Application
Bulb Lights up an area. Lighting up a garden when a person walks into the area.
Motor Rotation of a shaft. Moving a buggy.
Buzzer Makes a short beep noise. Warning a pilot of a dangerous situation.
Pump Moves gasses or liquids from one place to another. Keeping a fish tank supplied with oxygen.
Heater Produces heat. Keeping a house warm in a central heating system.
LCD Display Displays short sequences of numbers or letters. Information readout on a till.

The action of many devices will depend upon how high or low the analogue voltage that is sent to the device is. For example :

The computer will use software to decide when to turn the devices on or off and to determine how high a voltage to send to a device. This decision will be based on the information that the system has gathered using its sensors.

5. Interfaces

An interface is put between the sensors and the computer. You can typically connect up to eight sensors and four devices to an interface made for a home computer. The interface contains two important components :

6. Software

The software used in a control system will regularly take readings from the sensors. Using this information the software must decide which devices to turn on or off.

When the control system is designed the user must input into the system the information it needs to take these decisions. This information will be in the form of an algorithm which describes when to take readings and under what conditions the different devices should be turned on and off.

The user would normally plan the algorithm using a flowchart, then input it into the computer using a programming language such as Logo.

This example shows the algorithm used to operate a very simple control system for a doorbell. When the button is pressed the bell sounds until the button is released.

The algorithm would be converted into a program and entered into the computer that will run the control system.

You can view the algorithm used to control three other systems later in the notes.

Example Control Systems
Traffic Lights
Simple Greenhouse
Advanced Greenhouse

7. Feedback

Most useful control systems use feedback. Feedback occurs when the previous outputs from a control system change the inputs, usually to keep the system in a stable state.

Consider a refrigeration system which is used to keep food frozen at below -20°C. A temperature sensor is used to measure the temperature inside the freezer. The system contains a refrigeration unit to cool the freezer. If the temperature is below -20°C then the refrigeration unit is turned off to save energy. If the temperature rises above -20°C then the refrigeration unit is turned on to cool the food down.

The cooling system inside the freezer will repeatedly follow this sequence of actions :

  1. The input from the temperature sensor causes the refrigeration unit to turn on because the temperature is above -20°C.
  2. The refrigeration unit is turned on so the temperature falls.
  3. The temperature becomes so cold that the temperature sensor causes the refrigeration unit to be turned off.
  4. The refrigeration unit is off so the temperature in the freezer rises slowly.
  5. The system goes back to step 1.

In this system the inputs first affect the outputs (temperature sensor causes refrigeration unit to turn on). Then the outputs affect the inputs (refrigeration unit changes temperature reading). Because the previous outputs affect the inputs we can say that the system involves feedback. The feedback keeps the system in a stable (cold) state.

8. Bit Patterns

When data is collected from sensors it is converted into digital data by an interface. This digital data is transmitted to a computer as a binary number.

Simple devices such as bells or bulbs can be activated by an interface sending an electrical voltage to them. The computer tells the interface whether to activate a device or not by sending it a bit. A 0 tells the interface to turn the device off and a 1 tells the interface to turn the device on.

Many control systems only use digital sensors and simple devices. In these systems all of the data that is passed between the computer and the interface can be represented as a group of bits in a byte, with each bit indicating the status of a sensor or controlling the status of a device.

This diagram shows data that is being used by a control system for a burglar alarm :

The current status of the alarm can be determined by interpreting the pattern of bits in the byte of data. Each bit represents the status of one sensor or device. Note that :

The alarm is currently switched on. This can be seen because the bit that relates to the Alarm On Switch is set to 1. The alarm has not detected a break-in. If a break-in is detected one of the sensors used to identify this (the door switches or pressure pad on the stairs) will set its bit to 1.

This diagram shows the change that occurs when a break-in happens :

The intruder has opened the front door. This has triggered the Front Door Switch so the bit associated with this sensor has been set to a 1. The computer responds by activating the Alert Bell and Alert Strobe Light devices. It does this by setting the corresponding bits to 1 :

This type of system, with the values of bits in a byte representing the status of sensors and devices is used by many control systems.

9. Advantages and Disadvantages

Using a computer to control a process has a number of important advantages over controlling the same process manually.

  1. Computer systems respond more quickly than humans. A computer system can take readings from sensors and turn devices on and off many thousands of times a second.
  2. Once the initial purchase cost has been paid, control systems are usually reasonably cheap to run. Most computer control systems have lower operating costs than similar systems which are manned by humans.
  3. Computer control systems are very reliable. Unlike a human a control system will not lose concentration. Computer systems can continue to operate reliably twenty four hours a day.

There are however some disadvantages of using a computerised system :

  1. The initial cost of designing a new system and purchasing hardware and software may be high.
  2. There may be job losses as computers replace humans.
  3. The control system will only operate correctly if the software program which runs the system has been designed well. Flaws in the design may produce unexpected problems during operation.

10. Designing

You will need to make several decisions when you design a control system. Exactly which items you need to specify will depend upon the particular system. Possibilities include :

1. What sensors and devices the system will use.
2. Where the sensors and devices will be located and how they will be connected to the computer.
3. What algorithm will be used to operate the system. This involves describing how the computer will decide when the devices should be turned on and off based on the inputs from the sensors. This algorithm could be described using a flowchart.

If you are asked to design a control system for a project you must also justify why you have designed the system the way you have.

11. Pedestrian Crossing

This control system is used to operate a simple pedestrian road crossing involving just one set of traffic lights. When a pedestrian wants to cross the road she presses the button located near the crossing. After a short pause the traffic lights will turn to red so that the pedestrian can cross. Red and green men lights and a buzzer are used to indicate when it is safe to cross.

The important components of this system are :

Input and Output Devices

The control system has these input and output devices :

Input Devices Output Devices
ButtonRed Light
Amber Light
Green Light
Red Man
Green Man
Wait Sign
Buzzer

Flowchart

The operation of the control system can be described by this flowchart :

Note that there is no stop box because the crossing once started never stops operating unless something goes wrong.

12. Simple Greenhouse

This control system is used to keep a greenhouse warm in the Winter. It keeps the temperature of the greenhouse above 20°C. If the temperature drops below 20°C then a heater is turned on to warm the greenhouse up.

The important components of this system are :

Input and Output Devices

The control system has these input and output devices :

Input Devices Output Devices
Temperature SensorHeater

Flowchart

The operation of the system is described by this flowchart :

13. Advanced Greenhouse

This control system is more advanced than the simple greenhouse control system described previously. As well as keeping the greenhouse warm in the winter it also prevents the greenhouse overheating in hot weather.

The system keeps the temperature of the greenhouse between 20°C and 26°C. If the temperature drops below 20°C then a heater is turned on to warm the greenhouse up. If the temperature rises above 26°C then a fan is turned on to cool the greenhouse down by blowing cold air from outside into the greenhouse.

The important components of this system are :

Input and Output Devices

The control system has these input and output devices :

Input Devices Output Devices
Temperature SensorHeater
Fan

Flowchart

The operation of the system is described by this flowchart :

14. Embedded Systems

Many computerised control systems are built into other devices that we use on a daily basis in the home and whilst travelling. A computer that is built into another machine is known as an embedded control system. Embedded systems have replaced mechanical or manual control of devices and enabled new sophisticated machines to be produced.

Here are some example of machines that commonly contain embedded systems :

MachineUse of Embedded System
Burglar Alarms Burglar alarms usually incorporate an embedded system that uses sensors to detect the presence of an intruder. The system will be able to activate devices such as an alarm bell and telephone dialler if a break-in occurs. It may also be able to keep a log of events and communciate with a remote central monitoring station.
Environmental Control Heating and air conditioning systems in homes, offices, cars and greenhouses use temperature sensors to measure the temperature of the area they control. They can turn on devices including heaters and air conditioning units and open vents to keep the temperature within a specified range.
VCR Video cassette recorders (VCRs) are controlled by embedded systems. The embedded system in a VCR will allow it to be programmed to turn on and off at specified times to record programs when the owner is absent.
Refrigerator The embedded system in a refrigerator will use a temperature sensor to measure the temperature inside the fridge and turn on a cooling unit if the temperature becomes too warm to keep food safely,
Car A modern car will incorporate many embedded systems to control various aspects of of its use. Some tasks that a car will use an embedded system for are :
  • Access Control/Alarm : A remote control can be used to lock and alarm a car when it is parked.
  • Anti-Lock Braking (ABS) : Computerised anti-lock braking systems allow cars to stop in shorter distances and be steered without skidding during breaking.
  • Engine Control Unit : The engine control unit will determine the spark timing and amount of fuel to inject into the engine to obtain the best balance of performance, economy and environmental efficiency.

Using embedded systems instead of manual or mechanical control mechanisms is generally preferred because :

15. CAD/CAM

Computer Assisted Manufacturing (CAM) is the use of computers to manufacture products. Computers are able to make products like bolts, panels and cogs by directly controlling machinery such as :

Computers pass instructions to the machines that they are controlling using a standard system called Computer Numerical Control, or CNC for short. The designs of the products made by a CAM system are often developed using a Computer Aided Design (CAD) package. These designs can then be transferred electronically to the CAM system. A system in which the design of an item is produced in a CAD package and then the item is automatically made by CAM machinery is known as CAD/CAM.

Computers can also be used in a more sophisticated way to control an entire manufacturing process such as making a car. In addition to making the component parts a computerised system can assemble, move, paint and test them. Robots are often used to do this.

16. Robotics and Automation

When most people think of a robot they imagine something that looks like a human, can perform a wide variety of tasks and thinks for itself. This is a long way from reality. The majority of robots are used in industry. They are designed to carry out one specific task over and over again. A robot will carry out its task very accurately but it is difficult to adapt a robot to carry out a task that is significantly different from the one it was designed for.

Robots are controlled by computer programs that respond to the inputs they receive from sensors. Robots use standard sensors such as buttons together with visual recognition systems that can be programmed to identify objects like screws or machine parts by processing images from a camera. Most robots use electrical motors or hydraulic systems to produce movement.

Here are some examples of uses that robots are put to :

Task TypeSuitabilityExample
Repetitive Tasks Many jobs in the manufacturing industry are very repetitive. Humans are not very good at these. They got bored and tired and make mistakes. Humans do not get much satisfaction from carrying out repetitive tasks. Over 50% of robots are used to manufacture cars. Robots can move car parts, screw or weld them together and paint complete cars. Each robot on a car production line will perform one specific job. It will be able to carry out its job highly accurately 24-hours a day.
Dangerous Situations Because robots are not affected by certain factors such as radiation and because human life is valued so highly robots are often used in situations that would be dangerous to humans. A robot buggy can be used to defuse a bomb. The buggy is equipped with cameras so that a controller can see where it is, a robot arm that the controller can use to lift a possible bomb and move it to a safer location and a high pressure water jet or gun that can be used to disarm a bomb.
Highly Accurate Robots can move and positions items much more accurately than a human can. Electronic components can be placed onto a circuit board and soldered together far more precisely using robots than by a human hand. They are also being used to assist surgeons in micro-surgical operations as unlike a surgeon's hand, a robot arm does not shake.
At Home Robots have not yet become popular in peoples homes as they are expensive and currently unsuitable for many domestic tasks. Robotic vacuum cleaners and lawnmowers are available but they are currently very expensive.

The main advantages of using robots instead of humans are :

There are also some disadvantages to using robots :

17. Traffic Control

You have already read about how a pedestrian road crossing can be operated by a computerised control system. Control systems can also be used in more sophisticated ways to manage the movement of traffic :

UseDescription
Traffic Lights

At road junctions such as crossroads and roundabouts traffic lights are commonly used to indicate which direction traffic can travel in at any one time. This reduces the likelihood of accidents and ensures that cars moving in each direction have the opportunity to pass through the junction.

The task of changing the colour shown at each set of lights to ensure that cars can only travel in one direction at a time is carried out by a computerised control system. The control system will let traffic move in each direction in turn.

There may be sensors in the road or on the lights that detect how many cars are passing in each direction. The amount of time that each light is on red or green for could be adjusted so that if more cars are travelling in one direction than another they get more time to go through the junction.

At quiet times of day the lights at a junction may be set to stay on green in one direction all of the time. Sensors will detect if any vehicles arrive at the lights from the other directions. If this happens the lights will change to let them pass.

Co-ordinating Traffic Flow In most urban areas you will find many sets of traffic lights. As you drive through a town you may pass through several sets of lights on just one road. If you have to stop at too many of these it can be frustrating and increase your journey time.

The operation of the traffic lights at different junctions can be co-ordinated to ensure that cars do not get stopped too many times. Here is an example of two sets of traffic lights at crossroads on one road :

Most traffic travels along this road in the direction indicated by the red arrow. If cars travel at around the speed limit then the operation of the two set of traffic lights will be co-ordinated so that when cars that passed through set A on green arrive at set B, the lights at this junction will also be on green to let them through.

In a real system the operation of many sets of traffic lights can be co-ordinated. By co-ordinating the operation of traffic lights throughout a town it is possible to reduce journey times for drivers.

The traffic lights are able to communicate with each other using wireless (radio) network connections. Information collected by sensors at the traffic lights may also be sent to a central monitoring station so that the people in charge of managing the traffic can spot busy routes and traffic jams. A central computer system may be able to adjust the timing of the various sets of lights so that if a traffic jam is building up the traffic in the busy area is given priority at the lights.

Congestion Charging In some cities and on major motorways there is so much traffic that journey times can be very long. One way to reduce the number of vehicles that are on the road and so speed up the flow of traffic is to charge drivers for the journeys that they make. This is known as congestion charging.

When a car enters an area covered by congestion charging a digital camera photographs it and sophisticated software reads the car registration from the number plate. This is looked up in a database so that the owner of the car can be identified. Other cameras will monitor the route that the car follows so that its entire journey is known. The car owner will then be charged for the journey. It may be possible to pay for the journey over the Internet by using online banking.

The cost of a journey will depend upon the route followed and the time of day. By charging more at busy times it is possible to persuade some drivers to travel at other times or use public transport instead.

Car Parking A computerised control system can be used to control access to car parks and charge the drivers that use them.

Magnetic sensors in the road detect when a car approaches an entry barrier. If there are spaces in the car park then a ticket will be printed for the driver to take and the barrier will be lifted. The ticket will have the time of arrival printed on it in human readable form and possibly also in machine readable form such as a barcode. When a driver leaves the car park a charge is made based on how long her car has been parked. This money may be collected by a person or by a machine that reads the barcode from the ticket and uses the data stored in the barcode to calculate how long the car has been parked for.

Sensors on the exit roads will count how many cars leave the car park. By counting the number of cars arriving and leaving a computer can calculate how many spaces are free. If the car park is full then a warning sign near the entrance will indicate this and cars that arrive at the car park will not be allowed to enter.

If there are several car parks in a town then signs can be placed on roads going into the town to indicate how many spaces are available in each car park. This will avoid the problem of people going to full car parks as they will be able to see a car park is full and choose an alternative less busy one to go to.

At the end of each day the computerised system will be able to calculate the total amount of money that has been taken at a car park.

Satellite Navigation (SatNav) Finding your way to a destination can be difficult, especially if you are going to a place for the first time. A computerised satellite navigation (or satnav) system can help to make this task easier. Most satellite navigation systems are fitted into vehicles. They consist of a receiver, a computer, a CD-ROM or DVD-ROM drive, an LCD monitor and a keyboard or remote control.

The receiver receives signals from a network of satellites called Global Positioning Satellites (GPS). From these the computer system can work out the location of the car. Maps are stored on a CD or DVD and based on the position of the car the computer can load the correct map and display it on the monitor with the car's position indicated.

Before setting out on a journey the driver can enter the name or postcode of the place that he is travelling to. The computer can locate the destination on the map and work out the best route for the driver to take. As the journey progresses the monitor will be used to indicate when the driver should turn onto another road. Directions may also be announced through speakers using speech synthesis so that the driver does not have to take his eyes off the road.

A satellite navigation system may also be linked to a traffic information system which can receive information about traffic jams and roadworks by radio. If a road involved in a journey is busy the computer system will be able to automatically change the recommended route to minimise the delay.

GCSE ICT Companion 04 - (C) P Meakin 2004