Top Banner
Topic 7: Control
21

Topic 7: Control

Feb 24, 2016

Download

Documents

segalla segalla

Topic 7: Control. The term for a device that converts one type of energy to another is transducer . Both sensors and actuators are transducers. Overview. Inputs - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Topic 7: Control

Topic 7: Control

Page 2: Topic 7: Control

Overview

InputsSensors capture analog data, such as temperature, pressure, light. This is converted to digital by a AD (analog-to-digital) converter, so that it can be processed by a computer.

ProcessingThe microcontroller or CPU makes a decision on the basis of the data input. If some threshold is reached, then some action is taken.

OutputsThe system affects the outside world in some way, e.g. turning on a heater, moving a robot arm, adjusting the speed of a motor. The generic term for the mechanism by which a control system acts on its environment is an actuator.

The term for a device that converts one type of energy

to another is transducer. Both sensors and actuators are

transducers.

Page 3: Topic 7: Control

Examples of control systems

• Automatic doors• Heating systems• Taxi meters• Elevators• Washing machines

• Process control• Device drivers• Domestic robots• GPS systems• Traffic lights

The following are cited by the IB as examples of control systems. You should make sure that you can describe each one of them in terms of inputs, processing and outputs.

Page 4: Topic 7: Control

Automatic DoorsInputs• Optical motion sensors emit infrared or microwave radiation and detect it

rebounding off an approaching person. The amount of radiation detected is converted to a digital value by an AD converter.

Processing• If the value corresponding to the amount of radiation reflected back into the

sensor exceeds some pre-set threshold, a command is issued by the microcontroller to open the doors.

Outputs• Motors attached either to a hydraulic arm, belt or cable pull or slide the doors

open. After some pre-set delay, the doors close again.

Page 5: Topic 7: Control

Heating SystemsInputs• Temperature sensors detect ambient temperature and convert the analog data

into digital so that it can be interpreted by the microcontroller. (There are lots of ways to measure temperature but a common one is a thermistor, whose resistance changes with temperature.)

Processing• If the temperature value is above or below some pre-set threshold, then a signal

is sent to the appropriate temperature control device.

Outputs• Turning a fan on/off• Turning a heater on/off• Turning an air conditioner on/off• Opening/closing windows

Page 6: Topic 7: Control

Taxi MetersInputs• Sensors attached to the transmission of the car measure the distance travelled.

This is converted into a digital value by an AD converter.• A timer measures the journey time elapsed.

Processing• If the taxi travels a preset distance, then an amount is added to the fare total.• If the taxi waits for a preset period, then an amount is added to the fare total.• In practice, the microcontroller will use some algorithm to determine, from the

combination of distance travelled and time elapsed, when to increase the fare total.

Outputs• An amount is added to the fare total and a small digital display shows the

running total.

Page 7: Topic 7: Control

ElevatorsInputs• Passengers press buttons to call the elevator.• Passengers press buttons to tell the elevator where to go.• A load sensor converts the current weight of the occupants of the elevator, converts it to a digital

value using an AD converter, and sends this value to the microcontroller.

Processing• The microcontroller calculates where to go and in what order according to three pieces of

information:– Where passengers are waiting– Where passengers want to go– Where the elevator is currently

• If the load value exceeds a pre-set threshold, the microcontroller produces some sort of appropriate output.

Outputs• The elevator is moved using either a hydraulic ram or a steel rope on a motor-driven pulley.• The doors are opened using cables on a motorized pulley that slide the doors on rollers.• A warning or alarm may sound in the event of excessive load, and the elevator may cease to

function until the load is reduced.

Page 8: Topic 7: Control

Washing MachinesInputs• The programme number is entered by the user through buttons• The amount of water in the drum is detected by a pressure sensor beneath the

drum (AD conversion)

Processing• The microcontroller responds to the programme choice by activating the

appropriate cycle• When the amount of water reaches a pre-set level, the microcontroller issues a

command to shut off the water supply

Outputs• The water supply is turned on when a cycle begins and shut off when it reaches

the correct level• The drum turns according to the cycle chosen

Page 9: Topic 7: Control

Device DriversInputs• Requests issued by the operating system or application software

Processing• Translation of the request into low-level instructions understood by the

hardware

Outputs• The hardware reacts appropriately

Page 10: Topic 7: Control

Domestic RobotsFew models exist yet. Examples are:• Vacuum cleaners• Lawn mowers• Pool cleaners• Security patrollersInputs• Vacuum cleaners, lawn mowers and pool cleaners all sense the perimeter of the area in which

they are to work. They do this with a combination of cameras and pressure sensors.• Security robots also detect movement and/or heat.

Processing• Domestic robots build a map of their surroundings from their sensory input. They use this

information to decide where to move and how to act.

Outputs• Motors controls wheels and cleaning/mowing equipment.• Security robots can also take video of suspicious activity or alert a human.

Page 11: Topic 7: Control

Global Positioning SystemsInputs• High-frequency, low-power radio waves are sent to and received from at least

three geostationary satellites.

Processing• The amount of time taken for the signal to come back from each satellite allows

the handheld unit to calculate its own position.

Outputs• The basic information provided by a GPS is your location, but some can also

calculate speed and journey duration, together with a route travelled.

Page 12: Topic 7: Control

Traffic LightsThere are different types of traffic lights, some for traffic only, some for pedestrians to cross.Inputs• A button is pressed by a pedestrian when they want to cross the road.• Some traffic lights can sense when a car is waiting.• Some traffic lights can be overridden by humans who are watching the traffic through

cameras.• Some traffic lights just work on timers.

Processing• The system receives a signal from its sensory input requesting that it initiate its

sequence. The system calculates how long since it last changed. If this time was sufficiently long ago, it initiates its sequence.

Outputs• The lights change according to a pre-set sequence.• A sound alerts visually-impaired pedestrians.

Page 13: Topic 7: Control

Process Control (Generic)This is a generic term for all control systems that perform some task in a way that is regulated by the conditions of the system. Use this example to help you describe a system you have not encountered in the examples provided.

Inputs• The system gathers data about the current state of the system from sensors that

convert analog data to digital data so that it can be read and understood by the CPU or microcontroller (AD conversion).

• Examples are heat, light, pressure, gas concentrations, movement, distance, pH, salinity, saturation, etc.

Processing• The microcontroller compares the current state information with pre-

programmed thresholds and acts accordingly.• For example if it is too cold, then a heater is turned on, if it movement is

detected, an alarm goes off, etc.

Outputs• The digital signal from the microcontroller causes some effect in the physical

world through an actuator (digital-to-analog or DA conversion). The effect of the actuator is to regulate the state of the system.

Page 14: Topic 7: Control

Microprocessor versus Microcontroller

• A microcontroller is made up of a microprocessor (the CPU), plus some ROM and RAM, plus I/O ports, all integrated into a single chip.

• Essentially a small CPU with a program written into its ROM

• Part of an embedded system (a dedicated, single-purpose computer system forming part of a larger mechanical device)

Page 15: Topic 7: Control

Feedback

Input(Sensor)

Processing(CPU)

Output(Actuator)

F E E D B A C K

Page 16: Topic 7: Control

Hardware associated with control systems

• Input– Sensors– AD Converters

• Processing– Microcontroller/Microprocessor

• Output– Actuators– Transducers– Fan, sprinkler, alarm, etc

Page 17: Topic 7: Control

Related topics

• Given a description of a control system, you may be asked to:– Construct a flowchart– Write pseudocode

Page 18: Topic 7: Control

Example question• An air conditioning system is activated when the room temperature exceeds 24

degrees Celsius. It is deactivated when the room temperature falls below 22 degrees Celsius.

• (a) Explain the role of feedback in this system.• (b) Explain why an analog-to-digital converter is required.• (c) Identify three hardware devices that the system might use.• (d) Draw a flowchart to model the system. • (e) Construct pseudocode for the algorithm described above.• (f) Explain why there is a difference between the temperatures at which the

system is activated and deactivated.

Page 19: Topic 7: Control

Social and ethical issues of embedded systems

• Tagging prisoners– Fewer parole violations– Invasion of privacy

• Surveillance and CCTV– Reduction in crime– Invasion of privacy– Information can be misused (e.g. blackmail, discrimination,

marketing)• Safety systems– Greater levels of safety– Overreliance– Threat from hackers

Page 20: Topic 7: Control

Distributed computing

• A distributed system is made up of separate autonomous computers that communicate and coordinate their actions using messages such that they appear to the user to be a single integrated computing facility.

Page 21: Topic 7: Control

Comparison

Centralised• One component with non-

autonomous parts• Component shared by users

all the time• All resources accessible• Software runs in a single

process• Single Point of control• Single Point of failure

Distributed• Multiple autonomous

components• Components are not shared by

all users• Resources may not be

accessible• Software runs in concurrent

processes on different processors

• Multiple Points of control• Multiple Points of failure