Syllabus coverage
- Describe how sensors, microprocessors and actuators can be used in collaboration to create automated systems
- Describe the advantages and disadvantages of an automated system used for a given scenario, including scenarios from industry, transport, agriculture, weather, gaming, lighting and science
- Understand what is meant by robotics: a branch of computer science that incorporates the design, construction and operation of robots, with examples including factory equipment, domestic robots and drones
- Describe the characteristics of a robot, including a mechanical structure or framework, electrical components such as sensors, microprocessors and actuators, and being programmable
- Understand the roles that robots can perform, in areas including industry, transport, agriculture, medicine, domestic settings and entertainment, and describe the advantages and disadvantages of their use
- Understand what is meant by artificial intelligence (AI): a branch of computer science dealing with the simulation of intelligent behaviours by computers
- Describe the main characteristics of AI as the collection of data and the rules for using that data, the ability to reason, and the ability to learn and adapt
- Explain the basic operation and components of AI systems that simulate intelligent behaviour, limited to expert systems and machine learning
Part of the IGCSE Computer Science syllabus 0478.
Automated systems: sensors, microprocessors and actuators
An automated system is one that carries out a job without a person operating it. Three parts work together to make that possible: sensors, a microprocessor and actuators.
A sensor is an input device that measures a physical quantity in its surroundings, such as temperature, light, moisture, pressure or movement, and converts that measurement into data the microprocessor can use. A microprocessor is a processor built on a single integrated circuit chip, and it is the part that runs the program controlling the system: it takes the readings coming in from the sensors, compares them with the values stored in the program, and decides what should happen next. An actuator is an output device that converts a signal from the microprocessor into a physical action, such as a motor turning, a valve opening or closing, a heater switching on or a light coming on.
The three parts form a loop. The sensor measures the environment and sends the reading to the microprocessor. The microprocessor compares that reading with the value stored in its program and decides whether anything needs to change. If it does, the microprocessor sends a signal to an actuator, which makes the change. The environment is now different, so the sensor measures again and the loop repeats. That repeating cycle is what makes the system automatic, and it also means the system corrects itself: if the reading drifts away from what is wanted, the next pass through the loop pulls it back.
| Part | What it is | Its job in the system |
|---|---|---|
| Sensor | An input device that measures a physical quantity in the surroundings | Collects data about the environment, such as temperature, light, moisture, pressure or movement, and sends it to the microprocessor |
| Microprocessor | A processor on a single integrated circuit chip, running the control program | Takes the readings from the sensors, compares them with the values stored in the program and decides what to do next |
| Actuator | An output device that produces a physical action | Carries out the decision, for example switching a heater on, opening a valve, turning a motor or lighting a lamp |
A control loop in action
Take a greenhouse that keeps itself at the right temperature. A temperature sensor measures the air inside the greenhouse and sends a reading to the microprocessor many times a second. The program holds a value, say 22 degrees Celsius, and a rule about what to do either side of it.
If the reading is below the stored value, the microprocessor sends a signal to the heater, which switches on and warms the air. If the reading is above the stored value, the microprocessor switches the heater off and opens a vent or starts a fan, so that the air cools. Because the sensor keeps sending readings, the temperature is never simply set and forgotten: each pass through the loop measures the effect of the last action and corrects it if necessary.
The same pattern appears wherever an automated system is used. In street lighting, a light sensor sends readings to a microprocessor, which compares them with a stored value and switches the lamps on when the light level falls below it. In a factory, a pressure or proximity sensor reports on a production line and the microprocessor stops the machine through an actuator if the reading is outside the safe range. In a weather station, sensors for temperature, pressure and wind speed send readings to a microprocessor that records them automatically and raises an alert when a value crosses a threshold.
The microprocessor does not have to be doing anything clever. It is following a program of rules written by a person: if the reading is above this value, do that; if it is below, do this. What makes the system useful is that it can do it continuously, far more often than a person could watch a dial, and without ever getting bored or distracted.
- The sensor measures the environment and sends the reading to the microprocessor.
- The microprocessor compares the reading with the value stored in its program.
- If the reading is outside the stored value, the microprocessor signals an actuator to act.
- The actuator changes the environment, and the sensor measures it again, so the loop repeats and the system corrects itself.
Advantages and disadvantages of automated systems
The advantages all come from the same source: a machine can do the same job continuously, in the same way, without getting tired. An automated system can run all day and all night without a break or a wage, it produces the same result every time because it never has an off day, it can work in conditions that would be dangerous or impossible for a person such as extreme heat, toxic gas, deep water or outer space, and it can measure and react faster and more precisely than a person can.
The disadvantages come from the same source too. Designing, building and installing an automated system is expensive, and it needs a power supply and usually a network connection. It must be maintained, and repairing it needs staff with technical skills that a manual process did not need. If the system fails, the whole process can stop at once, and there may be nobody on site able to take over by hand. It can reduce the number of workers needed for that job. And it will only ever do what it has been programmed to do, so anything outside its rules, such as an unusual item on a production line or a sensor that has failed, is handled badly unless somebody has planned for it.
For a scenario question, the marks are in the detail of the situation rather than in automation in general. A robot arm that welds car bodies never gets tired and never varies, which matters when thousands of identical welds are needed, but it cannot deal with a body shell that has arrived at the wrong angle, so a person still has to be there for the unexpected. That is the shape of every good answer: one advantage and one disadvantage, each tied to what the question actually describes.
| Scenario | What an automated system might do | One advantage and one disadvantage of automating it |
|---|---|---|
| Industry | A robot arm welds, paints or assembles parts on a production line, with sensors checking that each part is in position | Advantage: identical work at a consistent quality, all day. Disadvantage: it cannot cope with an unusual item, so the line may have to stop and wait for a person |
| Transport | A train or a warehouse vehicle follows a route automatically, using sensors to detect obstacles and its own position | Advantage: it runs to a precise timetable and never gets tired or distracted. Disadvantage: it cannot judge an unexpected situation, such as debris on the track, as well as a human driver |
| Agriculture | Sensors measure soil moisture and the system waters only when needed; machines sow, weed or harvest automatically | Advantage: water and fertiliser are used only when the crop needs them. Disadvantage: the equipment is expensive and needs maintenance that a small farm may struggle to provide |
| Weather | A weather station measures temperature, pressure, wind speed and rainfall continuously and reports the readings automatically | Advantage: readings are taken day and night in places where people cannot stay. Disadvantage: a failed or badly calibrated sensor sends wrong data, and there is no one there to notice |
| Gaming | A game uses sensors in a controller or camera to detect the player's movement and reacts to it | Advantage: the game responds to the player's real movement, which makes it more immersive. Disadvantage: the sensors can misread fast or unusual movement, so the game reacts wrongly |
| Lighting | A light sensor switches street lamps on when the light level falls below a stored value and off when it rises | Advantage: lamps are on only when they are needed, which saves energy, and nobody has to switch them by hand. Disadvantage: a fault or dirt on the sensor can leave a whole street in darkness |
| Science | Automated instruments take readings in a laboratory, under the sea or in space, and log the data for later analysis | Advantage: measurements can be taken continuously in places where a person could not work. Disadvantage: the instrument can only collect what it was programmed to collect, so an unexpected event may be missed |
Robotics and the characteristics of a robot
Robotics is a branch of computer science that incorporates the design, construction and operation of robots. Examples include factory equipment such as robot arms on a production line, domestic robots such as a machine that cleans floors on its own, and drones that fly and carry cameras or sensors.
A robot has three characteristics you should be able to describe. It has a mechanical structure or framework: a body, made of parts that can move, which lets it carry out physical actions in the world rather than just processing data. It contains electrical components, including sensors, microprocessors and actuators: the sensors tell it about its surroundings and its own position, the microprocessor runs its program and decides what to do, and the actuators move the parts. And it is programmable: it follows a set of instructions that can be written and changed, so the same robot can be given a new job by changing its program rather than by rebuilding it.
The mechanical structure is what separates a robot from an automated system such as a central heating controller. Both use sensors, a microprocessor and actuators, and both follow a stored program, but only the robot has a body that moves and acts physically. The programmability is what separates a robot from an ordinary machine: a washing machine has a motor and a drum, but the sequence it follows cannot be rewritten to make it do a different job, whereas a robot arm can be reprogrammed for a new model.
| Characteristic | What it means |
|---|---|
| A mechanical structure or framework | A physical body of parts that can move, so the robot can carry out actions in the world |
| Electrical components | Sensors, microprocessors and actuators: the sensors gather information, the microprocessor runs the program and decides, and the actuators produce movement |
| Programmable | It follows a set of instructions that can be written and changed, so the same robot can be given a different job by changing the program |
The roles robots perform, and their advantages and disadvantages
Robots are used across a wide range of areas. In industry they weld, paint, assemble and move parts on production lines, and they work in places people cannot safely go. In transport they move goods around warehouses, and they are used in vehicles and trains that drive or run themselves. In agriculture they sow, weed, spray and harvest, and they can work a field precisely using sensors to tell a crop from a weed. In medicine they assist in surgery, where a robotic arm can hold an instrument steady and move it more precisely than a hand. In domestic settings they vacuum floors, cut grass and help with household tasks. In entertainment they appear in films and theme parks, and drones are used to film from the air.
The advantages are that a robot works without getting tired, keeps going for as long as it has power, and produces the same result every time, so quality is consistent. It can work in conditions that would harm a person, such as extreme heat, toxic fumes or a vacuum, it can be more precise than a person, and it reduces the cost of labour for the work it takes over. In surgery, a steadier instrument and a smaller movement mean smaller cuts and a quicker recovery.
The disadvantages are the mirror image. Robots are expensive to design, build and buy, and they need skilled people to program and maintain them, which is a new cost rather than no cost. They take over work that people used to do, so jobs are lost in that area. They cannot deal with a situation outside their program, so an unusual object or an unexpected event can stop the process or cause an accident, and a robot that malfunctions while working near people is a safety risk. Finally, they need a power supply, and a robot doing a job badly can do it badly very quickly, because there is no person in the loop noticing the mistake.
| Area | What robots do there | Advantage | Disadvantage |
|---|---|---|---|
| Industry | Weld, paint, assemble and move parts on production lines | Consistent quality and continuous work without breaks | Cannot deal with an unusual item, so a person is still needed for the unexpected |
| Transport | Move goods in warehouses; drive or operate vehicles and trains | Works to a precise route and timetable without getting tired | Cannot judge an unexpected hazard as well as a human, and a failure can be dangerous |
| Agriculture | Sow, weed, spray and harvest using sensors to identify crops | Works precisely over large areas and uses less spray and fertiliser | Expensive equipment needing skilled maintenance |
| Medicine | Assist in surgery by holding and moving instruments with great precision | Steadier and more precise movement, giving smaller cuts and quicker recovery | Very high cost, and the surgeon must be trained to use it |
| Domestic settings | Vacuum floors, cut grass and carry out household tasks | Saves time on routine jobs and works without supervision | Costs more than doing the job by hand, and cannot handle an unusual mess or obstacle |
| Entertainment | Appear in films and theme parks; drones film from the air | Can perform actions and reach viewpoints that people cannot | Programming and running them is expensive, and a fault is very visible to the audience |
Artificial intelligence: what it means
Artificial intelligence (AI) is a branch of computer science dealing with the simulation of intelligent behaviours by computers. The word to hold on to is simulation: the computer is not thinking or understanding in the way a person does. It is processing data using rules in a way that produces behaviour which looks intelligent to the person watching it.
AI has three main characteristics. First, it is a collection of data and the rules for using that data: the facts and the rules are what the system works from, and without them it has nothing to act on. Second, it has the ability to reason: it can draw conclusions from the data and the rules, working out an answer or a decision rather than simply looking one up. Third, it can include the ability to learn and adapt: some AI systems change their own processes or their own data as they receive more information, so their behaviour improves with use rather than staying fixed at whatever the programmer first wrote.
Those characteristics are what make AI useful for tasks that are hard to write as a fixed list of instructions: recognising a face in a photograph, translating between languages, filtering out unwanted messages, or suggesting what to watch next. The system is not told every single answer in advance; it works from data and rules, and in the learning case it adjusts itself as more data arrives.
- AI is a branch of computer science dealing with the simulation of intelligent behaviours by computers.
- It is a collection of data and the rules for using that data.
- It has the ability to reason: to draw conclusions from the data and rules.
- It can include the ability to learn and adapt, changing its own processes or data as it receives more information.
Expert systems and machine learning
The syllabus names two AI systems that simulate intelligent behaviour, and you need their components as well as their operation.
An expert system is an AI system that reproduces the decision-making of a human expert in a particular subject. It is built from four parts. The knowledge base holds the facts and the data about that subject, written in by the human expert. The rule base holds the rules for using that knowledge, written as conditions: if this is true, then that follows. The inference engine is the part that applies the rules to the facts it has been given, working through them to reach a conclusion. The interface is the part that lets the user ask questions, answer the questions the system asks back, and see the conclusion and the reasoning behind it.
Using one is a conversation. The user describes the problem through the interface. The inference engine applies the rule base to the knowledge base and to the information the user has given, and it may ask for more information where a rule needs it. It then produces a conclusion or a recommendation, with the reasoning that led to it. Expert systems are used where expert knowledge is scarce or expensive: supporting a diagnosis, finding the fault in a piece of equipment, or advising on which product suits a customer's needs.
Machine learning is different in where the rules come from. Machine learning is when a program has the ability to automatically adapt its own processes and/or data, so instead of being given every rule by a person it is given data and finds the patterns in it for itself. As more data is fed to it, it adjusts and improves, which is why a system that filters unwanted messages or recognises faces gets better with use.
The distinction is worth stating plainly in an exam answer. In an expert system, a human expert supplies the knowledge and writes the rules, and the system applies them to the facts of each case. In machine learning, the data is supplied and the program works out the patterns and adapts its own processes or data, so the rules are not all written by a person.
| Expert system | Machine learning | |
|---|---|---|
| Where the knowledge comes from | A human expert supplies the facts and writes the rules | Large amounts of data are supplied, and the program finds the patterns in it |
| Main components | Knowledge base, rule base, inference engine and interface | A program that can adapt its own processes and/or data as it is given more data |
| How it produces an answer | The inference engine applies the rule base to the knowledge base and to the information given by the user | The program applies the patterns it has learned from the data, and improves as it receives more data |
| What changes over time | Little: the rules change only when a person changes them | The program adapts its own processes or data as it learns, so its behaviour changes with use |
| Typical use | Supporting a diagnosis, diagnosing a fault in equipment, advising on a suitable product | Recognising faces or speech, filtering unwanted messages, suggesting what to watch next |
Key terms you must be able to define
- Automated system
- A system that carries out a job without a person operating it, using sensors, a microprocessor and actuators working together.
- Sensor
- An input device that measures a physical quantity in its surroundings, such as temperature, light, moisture, pressure or movement, and converts it into data a microprocessor can use.
- Microprocessor
- A processor built on a single integrated circuit chip. In an automated system it runs the control program, compares the readings from the sensors with the values stored in the program and decides what should happen.
- Actuator
- An output device that converts a signal from a microprocessor into a physical action, such as a motor turning, a valve opening or a heater switching on.
- Feedback
- The repeating cycle of an automated system: the actuator changes the environment, the sensor measures the change and the microprocessor compares the new reading with the stored value again.
- Robotics
- A branch of computer science that incorporates the design, construction and operation of robots. Examples include factory equipment, domestic robots and drones.
- Robot
- A machine with a mechanical structure or framework and electrical components such as sensors, microprocessors and actuators, which is programmable so that it can be given instructions to carry out physical tasks.
- Programmable
- Able to follow a set of instructions that can be written and changed, so that the same machine can be given a different job by changing its program rather than being rebuilt.
- Artificial intelligence (AI)
- A branch of computer science dealing with the simulation of intelligent behaviours by computers.
- Simulation
- Imitating a behaviour without being it: an AI system produces behaviour that looks intelligent by processing data using rules, rather than understanding it as a person would.
- Reasoning
- The ability to draw conclusions from data and rules, working out an answer or a decision rather than looking one up.
- Expert system
- An AI system that reproduces the decision-making of a human expert, built from a knowledge base, a rule base, an inference engine and an interface.
- Knowledge base
- The part of an expert system that holds the facts and data about the subject, supplied by the human expert.
- Rule base
- The part of an expert system that holds the rules for using the knowledge, written as conditions such as if this is true then that follows.
- Inference engine
- The part of an expert system that applies the rules to the facts to reach a conclusion, asking the user for more information where a rule needs it.
- Interface
- The part of an expert system through which the user asks questions, answers the questions the system asks, and sees the conclusion and the reasoning behind it.
- Machine learning
- AI in which a program has the ability to automatically adapt its own processes and/or data, finding patterns in the data it is given and improving as more data is supplied, rather than being given every rule by a person.
Applied to real systems
Cambridge sets 0478 in systems you already use - a phone, a school network, a supermarket till, a website, a bank. Use these as models for how to apply the theory to a context you have not seen before, then write your own.
A moisture sensor in the soil sends readings to a microprocessor, which compares them with the stored value for that crop. If the soil is drier than the stored value, the microprocessor signals a valve to open and water the field; if it is wetter, the valve stays shut. The same field may be worked by a machine that uses sensors to tell a crop from a weed, which is an advantage over spraying the whole field, though the equipment is expensive and needs maintaining.
Robot arms weld and paint car bodies on the production line. Each one has a mechanical structure that moves, sensors that report the position of the part, a microprocessor running the program, and actuators that move the arm. The advantage is the same weld, at the same quality, thousands of times a day. The disadvantage is that a body shell that arrives at the wrong angle is not something the robot can reason about, so the line stops and a person has to sort it out.
Two very different technologies meet here. A surgical robot is a robot with a mechanical structure and actuators, controlled by a surgeon, that holds an instrument steady and moves it with great precision, so the cuts can be smaller. An expert system is used to support a diagnosis: its knowledge base holds the medical knowledge, its rule base holds the rules written by clinicians, and its inference engine applies them to the symptoms the patient reports to reach a conclusion, which the doctor then judges.
Street lighting is automated by a light sensor. The microprocessor compares the reading with a stored value and switches the lamps on through an actuator when the light falls below it, so no one has to drive round switching them by hand and the lamps burn only when they are needed. The weakness is that a faulty or dirty sensor can leave a street dark, and there is nobody in the loop to notice.
A game reads sensors in the controller or a camera to detect the player's movement and reacts to it, which is what makes the game feel responsive. Behind the scenes, a learning system may also be adjusting the difficulty: it has been given data about how players behave, and it adapts its own processes as it learns how well this particular player is doing, which is machine learning rather than a set of rules written out by hand.
Sensors for temperature, pressure, wind speed and rainfall take readings continuously and send them to a microprocessor, which logs them automatically and raises an alert when a value passes a threshold. Nobody has to be present, which is the point: the station can sit on a mountain or a buoy at sea. The limit is that it collects only what it was programmed to collect, and a sensor that drifts out of calibration produces wrong data with no one on site to spot it.
Flashcards
Click a card to flip it. Mark honestly — the tracker uses this.
Exam-style questions
8 questions, 27 marks. Write your answer, then reveal the mark scheme and tick each point you actually made. Answering honestly here is what makes the rest of the site useful.
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Exam technique for this topic
- For an automated system question, describe the loop in order: the sensor takes a reading, the microprocessor compares it with the stored value, the microprocessor signals an actuator, and the actuator makes the change. All three parts must appear, and the comparison is what shows you understand the system.
- Scenario questions ask about the scenario, not about automation in general. Name an advantage and a disadvantage that would only make sense in that setting, such as working in a vacuum for a robot in space or never getting tired for a factory on three shifts.
- For the characteristics of a robot, give all three: a mechanical structure or framework, electrical components such as sensors, microprocessors and actuators, and that it is programmable. These are three separate marks.
- For AI, use the word simulation and give the three characteristics: a collection of data and the rules for using it, the ability to reason, and the ability to learn and adapt.
- For expert systems, name all four components and say what each one does: knowledge base, rule base, inference engine and interface. Then separate expert systems from machine learning by who supplies the rules, because that is the comparison the examiners are looking for.