Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
11 views26 pages

CMS Textbook Topic 7 HL

Control systems are automated devices that guide other systems to perform tasks without human intervention, enhancing productivity and efficiency. They operate on an input-process-output model, utilizing sensors for feedback and can include examples like automatic doors, heating systems, and washing machines. Modern control systems often integrate microprocessors and sensors to optimize their performance and adaptability.

Uploaded by

svsb8831
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views26 pages

CMS Textbook Topic 7 HL

Control systems are automated devices that guide other systems to perform tasks without human intervention, enhancing productivity and efficiency. They operate on an input-process-output model, utilizing sensors for feedback and can include examples like automatic doors, heating systems, and washing machines. Modern control systems often integrate microprocessors and sensors to optimize their performance and adaptability.

Uploaded by

svsb8831
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Top

『厂 `
Chapter 3

7-Control

巨 Topic 7 - Control 1

7.1 Control

Centralized control systems

7.1.1 A range of control systems

2
A control system is one or more devices that guide other devices or systems. This allows for
the completion of various tasks in an automatic manner, without any human intervention.
Control systems are set up once and can then perform the actions that they have been
programmed to do in an automatic manner, relieving humans from repetitive and mundane
tasks, as well as increasing productivity and efficiency. Control systems may include sensors
to gain feedback from the environment and motors to control any actuators in an
appropriate manner.

An example of a control system is


contained in the automatic doors that
can be found in various locations, such as
supermarkets. Instead of humans
manually having to open and close these
doors, a motion sensor is located at the
top of the automatic doors, which allows
the control system to become aware of
any motion. The sensor may use infrared
or microwave signals that bounce off of
Image 7.1: Automatic doors objects to determine motion. After
receiving feedback from the
environment, the sensor forwards its signal to a microprocessor and allows the control
system to operate its actuators to open the doors only when motion is detected.
Furthermore, more advanced automatic doors include photocell sensors that can tell if

1 International Baccalaureate Organization. (2012). IBDP Computer Science Guide.


2 Control System. (12, May 2016). In Wikipedia, The Free Encyclopedia. Retrieved 19:05, May 13, 2016,
from https://en. wikipedia.org/wiki/Control_system
someone is at the door, so that the doors do not close on them. This results in a control
system that is very convenient, as well as efficient, when one considers that doors cannot
now be left open accidentally, which may be costly when a heating or air-conditioning
system is operating. Furthermore, automatic doors allow access to both the elderly and the
disabled, since both might find it difficult to open or close a manual door.

Control systems are mostly input, process, output systems. That means that an input is
provided to the system, which is processed by some algorithm, and an action is performed.
The results of the action can then be measured by the control system (through the use of
sensors) and feedback can be provided as input. The control system can then act upon the
new input and the cycle continues as seen in Figure 7.1.


下L
I

0
t
t
u
p
u
Input Process

.,

b
k
a
c
Figure 7.1: Control System

There are some circumstances however where an action might need to take place while the
control system is performing some other action. For example, when a second person
approaches an automatic door while it is closing, a signal must be sent to the control system
to re-open the doors. In this situation the signal sent to the control system is known as an
interrupt. An interrupt is a signal sent to the control system indicating that the system needs
to attend to the specific signal immediately.

A number of control systems are considered below. All of them use computer systems in
order to operate and so depict the many possibilities for control systems with developments
in computer systems.

• Heating system: In any such


control system, be it in a car, a
house or any other place, an
initial temperature is given as
°
input by the user (eg. 24 (). That
input signifies the ideal value of
the output and the goal of the
control system. That is, the
control system will aim to reach
the value provided by the user. Image 7.2: Smart heating system
Sensors allow the control system
to measure the temperature of the environment and determine any actions that it
might need to perform, in order to reach the desired temperature. For example,
given an actual temperature of 18 ° C (as input from the sensors) and a desired
°
temperature of 24 C (as input from the user), the control system would turn on the
heater until the input from the temperature sensors was equal to the desired user
temperature. At that point, the heater would turn off and would turn on again only
when the actual temperature falls below the desired temperature. Having such a
control system allows for the conservation of energy and is more efficient than
turning a heating system on and off manually. This is because the automatic system
would reach the desired temperature once and then turn on to compensate for
even a small drop in the desired temperature. On the other hand, in a manual
system, since there would not usually be a user holding a thermometer and turning
the system on and off, every time the temperature fell or rose above the desired
temperature, the energy wasted would be greater. Furthermore, newer "smart"3
heating systems also have the potential to connect to the Internet, allowing the user
to operate them from afar. For example, one could turn on the heating system of
his/her house as one leaves work, so that the temperature is ideal when the user
arrives home.
• Taxi meters: Initially, taxi meters were
mechanical, bulky and made a
characteristic ticking sound. Through­
out the years, and through the use of
computer-operated control systems,
taximeters have improved, preventing
fraud as well as providing a number of
helpful features. For example, receipts
are automatically issued when a fare is
completed. Seat sensors detect the
presence of passengers in order to
prevent passenger journeys that do
not operate the taximeter. Credit
cards are supported, as well as radio
communication and GPS systems, so
to assist drivers, provide security, and
better calculate distance. Taxi meters
have become more efficient, less
error-prone, and automatic, relieving Image 7.3: Old and new taxi meters
the driver from hassles that could
distract him/her from driving.
• Elevators: Primitive elevators date back to ancient times and were notoriously
dangerous and mostly used to move objects, instead of people. As engineering
improved, so did elevator technology.

3 Smart thermostat. (19, April 2016). In W心pedia, The Free Encyclopedia. Retrieved 19:25, May 13,
2016, https://en. wikipedia.org/wiki/Smart_thermostat
Developments in computer systems
also played a significant role and
many modern elevators are
controlled by computer operated
control systems. An elevator control

龋譬 _
system takes in a number of sensor
readings as well as the desired
destination, in order to turn a winch

__
motor with the correct number of

_ ____
revolutions so that the elevator car
reaches its destination. The system
needs to know the initial and the
Image 7.4: Elevator
desired destinations, as well as the
location of each floor. The system
reads the desired destination from the user and uses sensors to detect the current
location, as well as the location of each floor. In many systems, a load (weight)
sensor may also exist that tells the control system how full the car is, so that the
computer system in control may use this information accordingly (ex. not stop to
take more passengers without unloading some current passengers). Finally,
elevators also include automatic doors that open and close only when the elevator
car is at specific floors. They also use motion sensors, as discussed before, to
prevent doors from closing on people entering or exiting the car. Many elevators
include a stop button, that stops the elevator car from moving in emergency
situations (for example, when a dress is caught between the elevator doors). When
pressed, this button sends an interrupt signal to the processor of the control system,
requesting its immediate attention, and stopping the car. As such, even though
elevators are control systems that are being used every day, efficiently and securely,
a number of inputs from sensors and complex algorithms are constantly executed by
control systems to make this possible.
• Washing machines: The first washing
t
machines date back to the mid 18 h
century, when manually rotating

drum washers were first introduced.


· '
4

Washing machines with electro­


mechanical timers appeared in the
th
mid 20 century, making automatic
th
washing possible. In the late 20
century, washing machines with
control systems driven by computer
Image 7.5: Washing machine
systems were first introduced. In
modern washing machines, sensors are used to determine and control the load size,
water level, temperature, as well as the user interface. All these sensors allow for a
finely-tuned washing cycle that better suits the needs of the clothes, as well as take
into account the environment by consuming less electricity and water. Furthermore,
modern washing machines are safer, since the door is controlled by a computer
system that locks it during operation, avoiding accidents. If the door is opened
before the washing machine has finished, or if the stop button is pressed, an
interrupt signal is sent to the processor of the control system, requesting its
immediate attention, and stopping the washing machine.
• Process control: Process control
refers to the control of one or more
variables (such as temperature) in a
system. It strives to maintain the
output of a specific process within a
desired range. Open and closed loop
(feedback) controllers exist. An
example of an open loop controller
is a tank with a manual valve that
controls the heat dissipated by a coil
Image 7.6: Tank with temperature gauge
used to heat the liquid in the tank. In
this scenario, there is no feedback as
to the temperature of the liquid at any one point in time. Only if the relationship
between the heat dissipated by the coil and the temperature increase of the liquid is
known, can one be certain of the liquid's temperature. On the other hand, in a
closed loop (feedback) controller, the actual temperature of the liquid is detected,
using temperature sensors, and the coil temperature is adjusted to achieve the
desired liquid temperature. In this example, the valve can either be an on/off valve
or a variable one. With an on/off valve the valve is turned on until the desired liquid
temperature was reached, then turned off, and on again after the temperature
dropped below the desired temperature. With a variable valve, the heat through the
coil is proportional to the difference between the current and the desired liquid
temperatures. The coil initially has a higher temperature, that slowly lowers, as the
liquid temperature reached the desired temperature. Developments in computer
systems allow for the automatic adjustments of the valve in order to achieve the
desired temperature, with minimal or no human interaction. If an error happened
with the valve so that it did not work as expected (for example, it did not turn off
and the desired liquid temperature was exceeded by an undesirable amount), an
interrupt could be sent to the processor, indicating that the processor would need to
bring the system to a hold immediately.
• Device drivers: Device drivers are computer programs used to control a computer
device of any kind, from keyboards and printers to graphics and sound cards. These
computer programs allow operating systems (OS) and other programs to access the
devices with a layer of abstraction (i.e. without needing to know how the actual
devices are used). The computer bus usually connects the drivers with the devices,
allowing the drivers to send commands and receive data. Since drivers are
developed specifically for each device, they are hardware-dependent, as well as
operating-system specific, so that they are as efficient as possible.
• Domestic robots: Domestic robots using
computer guided control systems are already
appearing in households. Vacuum, pool and
gutter cleaning robots are examples of
autonomous domestic robots that one might
come in contact with in everyday houses. A
number of sensors are packed within these
robots to provide "intelligent" behavior. For
example, vacuum cleaning robots use a suite
of sensors to map and find their way around
rooms that may include clutter and r
furniture. Using various cameras they can
create house maps, using landmarks, and
know their current position as well as
previous locations. Furthermore, they can
return to their charging base whenever
necessary, and complete the cleaning
afterwards. Sensors can also detect the Image 7.7: Cleaning robot
material on which the vacuum is currently on
and perform appropriate kinds of cleaning. All these possibilities would not be
available without closed-loop computer-controlled systems.
• GPS systems: Every day millions of
people use GPS systems to find their
way around cities, mountains or
even the sea. Whether used to find
a new cafe or guide a missile, GPS
systems are required to work
efficiently, precisely and with near
100% availability (no down time).
The GPS system is a large, complex,
computer controlled system that
Image 7.8: GPS satellite system
includes both hardware and
software elements and needs
constant maintenance and support to work in such an effective manner as it does. It
uses around 30 satellites in orbit around the Earth, as well as a number of extra
satellites that are "fail-safes" (if one of the satellites fails, one of the extra satellites
will take its place until the first one is fixed). These solar-powered satellites circle the
Earth twice per day. A GPS receiver allows a user to know exactly where he/she is on
Earth. It includes a sensor that locates four or more of the GPS satellites, figures out
its distance to each one, calculates the time difference between the satelites and
uses a mathematical principle called trilateration to deduce its location.
Furthermore, modern GPS systems also receive input from their users, pinpointing
their desired destinations, as well as map data that may be updated through
software updates.
• Traffic lights: Traffic lights play a key role in road safety. They manage traffic,
prevent accidents and allow pedestrians to cross the roads without jeopardizing
their lives. Traffic lights are usually control systems operated by computer systems
and can be either "fixed time" or "dynamic control".
o Fixed time: As the name suggests,
fixed time traffic lights are open
loop control systems, in that they
do not receive any feedback from
the environment in order to alter
their performance. They are
configured to change color after a
given period of time and they do
so repeatedly. Fixed time traffic
lights can be implemented with an
electro-mechanical signal control­
ler and as such does not neces­
sarily need a computer system.
o Dynamic control: Using a closed
loop control system to provide
feedback on the amount of traffic
passing by, dynamic control traffic
Image 7.9: Traffic light with sensor
lights can adapt their settings
appropriately, following some algorithm. These kinds of traffic lights are
operated through computer systems and would not be available otherwise.
They can use one of the two different types of sensors to detect traffic
conditions:
either embedded into the surface of the road or mounted on the traffic light
itself (or some other high position). The sensors that are embedded into the
surface of the road have the ability to sense when a car passes over it.
Mounted sensors are less expensive and can provide the same feedback,
including real-time photos or video.

7.1.2 The uses of microprocessors and sensor input in control systems

Today, most modern control systems use microprocessors in order to efficiently and
effectively read sensor input, process it according to an algorithm, and finally perform some
action(s).

A microprocessor, as its name suggests, is a "small" processor, that contains most, or all, of a
central processing unit (CPU) functions on a single chip or integrated circuit (IC). Like a CPU,
a microprocessor performs arithmetic and logic operations, as well as any other data
operations necessary, through the use of registers. This is described in detail in Topic 2 -
4
Computer Organization in the Core Computer Science for the 1B Diploma Program book .
Therefore, it is a programmable, input-process-output device that also includes some
internal memory.

Various types of microprocessors exist, all of which have been developed with some specific
purpose in mind:

• General purpose: Capable of running a wide range of different programs and usually
integrated into a larger system. The CPU found in a desktop computer is a general
purpose microprocessor. Desktop computers also include various peripheral devices,
as well as external memory, all of which the microprocessor needs to interact with.
• Embedded controller or microcontroller: Microcontrollers are usually stand-alone
chips that may include the main elements of a larger system, such as RAM and ROM,
although smaller in capacity. These controllers are designed to perform some
precise task(s) and do not need, or cannot include, a whole computer system.
Microcontrollers may be found in most of the control systems described in section
7.1.1. Automatic doors, heating systems, taxi meters, elevators, washing machines,
domestic robots, GPS systems and traffic lights, all use microcontrollers to function
in an efficient and timely manner. Microcontrollers, in general, need less power to
function and are smaller in size, compared to desktop computers. They can be
integrated into smaller, lower powered electronic devices.
• Graphics processing unit (GPU): Computer graphics have become so detailed and
realistic in recent decades that an additional, special kind of microprocessor, is
included in most computer systems to handle them. This type of microprocessor is
known as the GPU and includes hardware to allow for faster handling of graphics
related mathematics (such as matrix multiplication and vector arithmetic). GPUs are
responsible for calculating and rendering polygons and pixels on the screen.

Microprocessors improve control systems in a number of ways. First of all, they can
process input data much faster than a human ever could and as such they can react to
changes in the input quickly. Control systems that depend on microprocessors are
automated and as such are error-free compared to manual or mechanical systems.
Furthermore, they can operate throughout the year with little to no off-time (down
time) and in conditions that are harsh or dangerous for humans.

Of course, since embedded microprocessors are pre-programmed systems that follow


some specific algorithms, they would probably not be able to operate in the most
effective way or at all (in an unexpected event). Moreover, as microprocessors need
power to operate, the system would not be able to function if there was a power
shortage.

4D血triou K. Hatzitaskos M. (2015). Core Computer Science for the 18 Diploma Program. Athens:
Express Publishing. More information at: https://www.expresspublishing.co.uk/gr/en/content/core­
computer-science-ib-diploma-program
In order for microprocessors to perform any processing, they need to receive input. For
that to be accomplished sensor input is needed. A sensor converts continuous physical
(analogue) quantities (such as speed, temperature, humidity, pressure, etc.) into
discrete digital signals using an analogue-to-digital converter (ADC). These signals can
then be read as input by microprocessors. The input is processed, according to some
algorithm(s), and output is returned.

5
Although a wide variety of sensors exist , all of which share a number of common
properties determining their quality: /

• I
Accuracy: Determines wheth7'f- the measurement of the physical quantity and
therefore the final delivered digital signal is accurate (for example, a
° °
temperature of 18 C should not be measured as 19 ().
• Range: Determines the acceptable range of the physical quantity within which
the sensor may acquire readings (for example, a temperature sensor might be
° °
able to accurately operate between -30 C to 60 C, but not above or below those
temperatures).
• Resolution: Determines the smallest increment that the sensor may detect (for
°
example, one temperature sensor might be able to determine increments of 1 C
° °
accurately, measuring whether the temperature is 17 C or 18 C, while another
°
might be able to determine increments of 0.1 C accurately, measuring whether
° °
the temperature is 17.0 C or 17.1 C.

Sensors should also have two more characteristics, without which their readings would be
useless. Firstly, sensors should be insensitive to any other physical conditions present that
could influence the reading. For example, when measuring a temperature, the measurement
should not be affected by wind. Secondly, the sensors should not influence the measured
property in any way. In our temperature-measuring example, the sensor should not
dissipate heat into the environment and influence the temperature around the sensor.

7.1.3 Different input devices for the collection of data in specified situations

As described in the previous section, sensors are usually an integral part of control systems
6
and act as input devices. A growing list of available sensors exists that can measure
anything from density to heat and motion to magnetic fluctuations. Sensors sense a physical
property and then transform it into an electrical signal.

5 List of sensors. (19, April 2016). In Wikipedia, The Free Encyclopedia. Retrieved 19:30, May 13, 2016,
https ://en.wiki pedia.org/wi ki/List_of_sensors

r
l __
103 |
一一一一一一 一· 一一一一一一一一一一一一一一一一一一一一一一一一一一一一一 一 一一 一 一一一一 一 一 一一 一一 一 一一一一 一 一 、
,,

· `
Useful Information: An Analogue to Digital Converter or ADC is used by every system ,
'
l
that uses sensors to convert continuous analogue data to discrete digital signals I
I

handled by a microprocessor. ADCs cannot read and convert all the data that is I

acquired by the sensors, but rather convert analogue data from sensors every few
milliseconds (depending on the sensor). This way, the data converted by the ADCs and
handled by the microprocessor is actually a sample (a part) of the actual physical
quantity being measured. Depending on how frequently the sampling is performed by ;
the ADCs, a lot of information might be lost. 1

、 、- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ',
The main sensor categories are discussed below. This list is non-exhaustive and more
6
categories are available . Even in the categories presented, a large number of different
sensors usually exist.

Sensor types may be:

• Sound: Sound sensors, as the name suggests, detect sound waves and are widely
used in microphones.
• Motion: Motion sensors detect moving objects. They are widely used in
security/alarm systems, as well as automated lighting control, so that the lights are
only on when necessary to conserve energy.
• Vibration: Vibration sensors detect vibrations and are placed on surfaces that can
vibrate. They are widely used in security/alarm systems (placed on windows), as well
as acoustic musical instruments (instead of microphones).
• Optical/Image: A wide variety of optical sensors exist, depending on the physical
quantity measured. Two widely-used optical sensors are the following:
o Active pixel sensor (APS): Used in almost all digital cameras, they contain
an array of pixel sensors that can imprint light.
o Infrared (IR): Used to sense invisible radiant energy with longer wavelengths
than those of visible light. Widely used in security/alarm systems to detect
motion at night, where visibility is low or non-existent.
• Pressure: Pressure sensors detect pressure. They are used in a variety of settings,
including touch-screen devices, as well as the automotive industry (they regulate the
engine power according to the pressure on the pedals) and others.
• Temperature: Temperature sensors detect temperature. They are widely used
within thermostats to control the temperature of a given setting.
• Proximity: Proximity sensors can detect the presence of nearby objects without any
physical contact. They are widely used in cars to help drivers reverse or park.

7.1.4 The relationship between a sensor, the processor and an output transducer
In the previous chapter, we learnt how a sensor senses continuous, physical (analogue)
quantities (such as speed, temperature, humidity, pressure, etc.) as analogue signals. It then
transforms these analogue signals into discrete, digital ones using an analogue-to-digital
converter (ADC). These signals can then be read as input by processors. The input is
processed according to some algorithm(s), and output is delivered.

A processor performs arithmetical and logical operations and is the core element of any
computer system. It receives input, in electrical form, from a number of sensors (from
sensors on a tracking device, such as a mouse, to motion sensors above automatic doors)
and performs some sort of output (from moving a mouse cursor to opening doors).

In the process of sensing physical quantities, using sensors, and transforming them into
analogue signals, a conversion takes place. The device that converts one form of energy to
another is called a transducer. Transducers, in computer systems, are responsible for
converting physical quantities (such as speed, temperature, humidity, pressure, etc.) into
electrical signals, as well as vice versa. The conversion process from one form of energy to
another is called transduction.

Sensors can be categorized as transducers, as they sense a physical quantity and transform it
into another form of energy (typically an electric signal). However, other devices (apart from
sensors) can be categorized as transducers. The most common of these are called actuators
and are used during the output. Actuators are the devices responsible for moving some kind
of mechanism. They are transducers in that they receive some form of energy (usually
electric current) and convert it into motion. Control systems use actuators to perform some
actions in an environment (for example, a mechanical motor in an automatic door is an
actuator that receives electric current and converts that form of energy into kinetic energy
so that the motor moves and the doors open).

_ 4星星I 匮詈冒
1

Input Signal Output

丿
I
Physical (ex. motion)
quantity

ADC: Electronic DAC: Electronic


signal signal

Figure 7.2: Input, process, output and transducers

Figure 7.2 depicts how a control system that uses a processor works as an input, process,
and output device. An input signal is recorded by a sensor, which transforms the physical
quantity into an electrical signal. Since it converts one form of energy to another, the sensor
is a transducer. The electrical signal is further converted into an electronic signal, using an
analogue-to-digital converter (ADC), so that it may be processed by the processor. After the
processor runs any necessary algorithm(s) on the input data it outputs an electronic signal.
That output is converted into an electrical signal, using a digital-to-analogue converter
(DAC), so that it may be used as input to an actuator. The actuator will convert the electrical
signal into motion. Since the actuator converts one form of energy to another, it is a
transducer.

7.1.5 The role offeedback in a control system

i上以4d1了 咡E 八矿·-
__".ii1t1•

Feedback was discussed in section 7.1.1 and described in Figure 7.1. Feedback refers to the
process where information about the result of an output, from a control system, is used as
part of the new input to the control system in order to determine the best course of action
for the next output. Feedback is a loop as shown in Figure 7.1.

Feedback is essential to control systems that need to react to their environment and its
changes. For example, as discussed in section 7.1.1, there can be two kinds of traffic lights,
fixed time and dynamic control. Fixed time traffic lights do not take the environment into
account and just change color after a pre-programmed amount of time. On the other hand,
dynamic control traffic lights use sensors to take the environment into account every time
the lights change color. Imagine the following scenario: A dynamic control traffic light uses a
sensor to identify when no cars are near and changes the car lights from green to red, so
that the pedestrians can pass. This action is the output. The traffic light then receives
feedback from this action (a line of cars starts forming) and uses that feedback as input in
order to turn the car lights green again when a long line has been formed. The input first
affected the output (no cars, so the car lights turned red), the output affected the input (a
line formed}, and the new input affected the output (the car lights turned green}. After a
while, the output would affect the input again. The feedback keeps the system in a stable,
working state avoiding long queues on the road and helping pedestrians cross safely.

Another example of how important feedback is in a control system, and how it keeps the
system stable, was described in section 7.1.1, during the discussion about process control.

7.1.6 Social impacts and ethical considerations associated with the use of
embedded systems
67
• Electronic tagging {tagging prisoners) ' : Offenders that have been found guilty of
minor offences, inmates that are entitled to leave time (vacation time away from the
correctional center), or individuals under house arrest may be "tagged" with the use
of electronic monitoring devices.
Overcrowding of correctional facilities impacts their ability to provide effective
rehabilitation. Minor offences can be efficiently dealt with using prisoner tagging. Each
individual wears a bracelet or anklet that uses GPS to allow correctional officers to
monitor their location at all times. Tampering with the device or trying to remove it
raises an alarm.
Electronic tagging has been shown to effectively deter crime, as well as save habitual
offenders from a continued life of crime. Monitored offenders were less likely to
abscond or commit new offences than those not monitored. Electronic tagging
benefits society immensely by reducing crime rates, reducing the money spent on
crime. There are a number of "hidden" costs surrounding any crime; for example, the
time spent by police officers to solve it, instead of working to prevent possible future
crimes. One should also consider court rooms and lawyer's time, as well as the
occupation of prison cells and the need for the creation of further correctional
facilities if the number of offenders increases.
Electronic tagging could also improve the rehabilitation and reintegration of
offenders, by allowing them to leave the correctional facilities sooner (or not enter at
all), maintain gainful employment, as well as contact with their families.
However, there is plenty of criticism concerning prisoners'electronic tagging. First of
all, one could argue that it is a very lenient form of punishment. Furthermore, it does
not physically restrain offenders and allows them to perform further illegal actions, if
they want to. Having a large number of offenders outside the correctional facilities
with electronic tags needs a large task force of individuals that can monitor them and
intervene whenever necessary. If the offender performs an illegal action and raises an
alarm (but the task force does not have enough officers to intervene because they are
all occupied with other tasks), the idea behind the electronic tagging is rendered
useless.
Another argument against the
tagging of offenders is that wear­
ing an electronic tag may add
psychological pressure to the
wearer, especially to the younger
offenders.
Apart from offenders, electronic
tagging could be used to monitor
the whereabouts of people with
health problems such as dementia Image 7.10: A CCTV camera
(ex. Alzheimer's disease). Finally,

6 Electronic tagging. (26, February 2016). In Wikipedia, The Free Encyclopedia. Retrieved 19:30, May
16, 2016, https://en.wikipedia.org/wiki/Electronic_tagging
7 Prisoner e-tagging a'resounding success'. (23, May 2012). In iTWeb. Retrieved 19:08, May 28, 2016,
http://www.itweb. co.za/index.php?option=com_content&view= article&id=55068
electronic tags could also be placed on immigrants, preventing them from staying in
a country illegally.
• Surveillance, CCTV (Closed Circuit Television): Over the past years a large number of
cameras have been installed on highways and cities in various countries around the
world. CCTV cameras can often be spotted on top of or near traffic lights and
intersections, in parks, outside shops or any other position. People are now so
accustomed to them that they do not even notice their existence. Recent advances
in computer graphics and artificial intelligence have enabled CCTV systems to use
algorithms for facial recognition, as well as license plate recognition, to locate or
follow a target.
CCTV supporters claim that by using this surveillance technique, street and shop
crimes are reduced, drivers follow the rules of the road, and in general individuals
are not tempted to perform illegal acts.
However, there are a number of questions to be answered:
o How many CCTV cameras should operate in an area before surveillance
becomes excessive, to the point of loss of privacy?
o Can the information from surveillance techniques ever be misused or fall in
the wrong hands?
o Do surveillance techniques actually reduce crimes or do they just alter it (for
example, move it to some other non-surveilled area, or within households,
where CCTV cannot be installed yet)?
o Should workplaces install CCTV cameras or other electronic means to
monitor their workers?
o Should schools install CCTV cameras or other electronic means to monitor
both students and teachers?
o Are citizen rights more important than prevention of potential wrongdoing?

Surveillance has a myriad of social impacts and ethical considerations that must be
taken into account. Most forms of electronic surveillance systems are embedded
control systems.
• Improved safety systems: After any system, from an elevator to a car, has been
developed and deployed into the wider world, it is subject to everyday use. This use
may not always be as intended. For example, too many people may enter an
elevator, increasing its weight, beyond what can be handled by the elevator's motor.
Another example could be a car driven into a wall. Safety systems are put in place so
as to avoid such unfortunate events. However, since everyday life is full of
unexpected events that cannot be predicted, safety systems improve in order to
anticipate them as much as possible. Sometimes these events are properly dealt
with. For example, when too many people enter an elevator, a warning light comes
on and the elevator does not move until enough people have left. Another example
could be the airbags deployed during a car crash to protect the passengers.
In general, safety systems are put
into place to protect anything that
might be harmed when something
does not go as planned. Safety
systems are upgraded and improved
when they are used but fail for some
reason. For example, front airbags
were developed to avoid injuries
during car crashes. However, in a
number of accidents, cars had been
struck from the sides. The
passengers were injured, since the
front airbags did not protect them.
Side airbags were created to
minimize harm in these accidents.
The airbag, as a safety system, was
improved. Car brakes are a similar Image 7.11: Airbag safety system

case of the new safety system being


improved from the failure of the previous safety system. Forcefully using the car
brakes resulted in the locking of the wheels which generated the car skidding, which
led to a larger distance covered before the car stopped, compared to when the
wheels did not lock. Following these observations, the Anti-lock Braking System
(ABS) was developed, to improve the car braking safety system, by preventing the
wheels from locking and skidding. This way the stopping distances decreased.

Distributed systems

7.1.7 Comparison of centrally controlled systems with distributed systems

In its simplest form, a centrally controlled system is a system with a dedicated computer
system that is responsible for all the necessary calculations, as well as anything else that
needs to be performed so that the control system can function. On the other hand,
distributed systems have multiple computers, with each one performing part of the
necessary calculations, as well as anything else needed for the control system to function.
There are arguments to be made for both systems.

• Centralized systems: All computer resources reside in a single computer system.


Client devices need to be able to connect efficiently and effectively to that single
computer system.
The benefits are (usually) lower operational costs (as each client needs minimal
hardware), greater security (as all data is centrally stored), less administrative
overhead and backup complexity (since all resources are in a single location), as well
as greater overall control.
One of the disadvantages is that clients need to connect to the central system to
perform any necessary actions, making the connection a probable point of failure. If
the single computer system or the connection to it fails, the whole system is not able
to function effectively.
• Distributed systems: Computer resources are distributed across various systems and
each system is self-sustaining for the most part. A central system may exist that
coordinates the rest of the systems in some way, but each system has all the
necessary resources to perform any necessary action on its own, without needing to
communicate with the central system every time. Even if there is no connection to
the central system, there would be no catastrophic failure and the distributed
system, as a whole, would still function correctly. Distributed systems are easily
expandable since self-sustained systems may be added or removed at any point in
time without affecting the overall system.
The disadvantage to this approach is (usually) its cost. It requires additional
hardware to be present at each system, so that it can operate on its own, as well as
special software that allows each system to do so. Backup of the system requires
more bandwidth or resources at each site, adding to the cost and the complexity of
the system. Security can also be an issue, since it is more difficult to control and
secure a number of systems than a single one.

Cost is a variable factor when comparing centralized to distributed systems. In general,


distributed systems require additional hardware that increases the cost of the whole system.
However, centralized systems require a single computer system that is very powerful in
order to efficiently and effectively coordinate the system as a whole. As such, the cost of a
very powerful computer system and its maintenance may be higher than the cost of the
additional hardware needed in distributed systems, or vice versa.

8
Here is an example of traffic signal control systems , which may be either centrally­
controlled or distributed:

• Centrally controlled systems: Every light on each intersection depends on the


availability of an effective communications network. Every light needs to be able to
communicate with the central computer in a real-time fashion and will not be able
_
to operate, at least as effectively, if the communication is lost. If the central
computer stops operating, all the intersections are affected and stop operating
effectively. Fault-tolerant systems exist, with two identical central computers, so
that if one fails the other can take over. Also, a central computer has a maximum
load limit, meaning that it cannot be responsible for real-time coordination of an
unlimited number of traffic lights at intersections. A central control system is not

8 Traffic Signal Control Systems. (2011). In United States Department of Transportation, Research and
Innovative Technology Administration. Retrieved 18:50, May 20, 2016,
http://ntl. bts.gov/Ii b/j po docs/edldocsl/13480/ch 3. pdf
easily expandable and requires a significant amount of investment in order to do so.
However, centralized real-time adaptive control algorithms may easily be installed
and real-time surveillance of the system allows for better control of the system.
• Distributed systems: A powerful and robust control system at the intersection is
responsible for the traffic lights. It does not receive or transmit mandatory real-time
control commands over the communications network. It can even operate when the
central computer (that is responsible for the grid of traffic signal control systems) is
not available. Connection to the central computer is limited and only necessary for
synchronization purposes. Expansion of the system is easy, just by adding new traffic
lights and their infrastructure, and does not affect the rest of the system.
Centralized real-time adaptive control algorithms and surveillance are not available,
but may be substituted by local adaptive control algorithms runnig at each
intersection.

7.1.8 The role of autonomous agents acting within a larger system

Agents can be anything that can perceive its environment, through sensors, and act upon it,
through effectors. Examples of agents may be humans (that have eyes, ears and other
sensors) to robotic agents (that have cameras, sonars and other sensors) and software
agents (that have sensors in the form of bits and can sense their digital environment through
those sensors).

Autonomous agents are entities operating on


behalf of an owner (usually a user or another
program) with a degree of autonomy and
with minimal to no interference from the
owner. These agents follow algorithms
supplied by the owner to achieve some
desired goal(s). Examples of autonomous
agents include autonomous robots, software
agents that search the world wide web,
software computer viruses, etc. Autonomous
agents perform actions that depend on their Image 7.12: Autonomous agent (car)
own "experiences" through their sensors.
They can apply different sets of pre-programmed actions in different situations and even
build their own set of actions through learning algorithms. Autonomous agents display
artificial intelligence in that they need to "reason" according to their acquired knowledge.
The representation of knowledge is a key-concept for those agents.
The environment within which agents operate plays a significant role in the design,
implementation and effectiveness of the agents. Most of the times, agents do not have
complete control over their environments. They can perceive and influence some of the
environment, and the environment may then influence the agents in return. The complexity
9
of the agent's decision-making is affected by the properties of the environment :

• An environment may be accessible or inaccessible, and may or may not be able to


obtain complete and accurate information of the environment. Most real world
environments fall under the inaccessible category, where the environment is too big
for an agent to be able to sense it as a whole and senses only a subset.
• An environment may be deterministic or non-deterministic, according to whether
an agent's action will have a pre-defined, guaranteed, effect without any possibility
of uncertainty or not. In a deterministic environment, the next state of the
environment is determined by its current state and the agent's action. Most real
world environments fall under the non-deterministic category, in that they are too
complex, are affected by various elements, and probably ever-changing.
• An environment may be episodic or non-episodic, according to whether an agent's
actions are divided into "episodes" or not. If they are divided into "episodes", the
next episodes do not depend on the previous episodes and an action's output will
not depend on what actions the agent took before. Most real world environments
fall under the non-episodic category, in that the agent's earlier actions affect the
future actions.
• An environment may be static or dynamic, and may or may not change while the
agent is deliberating an action. Most real world environments fall under the dynamic
category, in that an environment is independent of the agent and does not wait for
an agent's action before it changes.
• An environment may be discrete or continuous, depending on the number of
distinct and clearly defined states that it may or may not be in. Most real world
environments fall under the continuous category.

,,
I •
1
Useful Information: The book 11Artificial Intelligence: A Modern Approach"LV
II10
by Stuart ,
Russell and Peter Norvig is a great read and resource that goes well beyond the 1B
syllabus. Chapter 2, which deals with Intelligent Agents can be read at link:
http://www.cs.berkeley.edu/~russell/aima le/chapter02.pdf ,
、- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'
l

Having understood the meaning of autonomous agents and their environment, a number of
examples follow illustrating the role of autonomous agents within a larger system.

9 Stuart Russell, Peter Norvig. Artificial Intelligence: A Mo dern Approach, Upper Saddle River (New
Jersey, 1995)
• 10
Autonomous agents in space missions•u: Autonomous agents may be of help in both
unmanned and manned missions. One type of unmanned mission that needs to take
place every day, all day (24/7) is the control and coordination of satellites orbiting
Earth. Before the use of
autonomous agents, 2-3 persons
were needed per satellite. With
the increase in the number of
satellites this led to a large
number of staff responsible for
their control, which resulted
(amongst other things) in a large
financial burden.
Another type of unmanned
missions with difficult and/or Image 7.13: Autonomous space agent
restricted time frame commu-
nication with the device(s) launched in space, are the deep space missions. Sending
a message from Earth to a planet far away, such as Mars or Jupiter, takes minutes or
even hours, and may only be available for only a few hours per day. The bandwidth
of the connection is also limited. As such, these devices cannot be controlled in a
real-time manner. However, they need to be able to act in a real-time manner, as
well as be able to face any situations when communication with Earth is unavailable.
Autonomous agents allow deep space mission devices to perform real-time tasks
when connection to Earth is limited or non-
existent, preventing pitfalls and unwanted
situations.
In manned missions, the crew spends a long
period of time, each day, in monitoring and
maintaining. Monitoring is a repetitive and
mundane task. Furthermore, most mistakes in
manned missions are made by humans that may
let something go unnoticed due to negligence or
tiredness. Autonomous agents can be
responsible for monitoring both everyday tasks,
as well as human actions while performing some
maintenance tasks.
Of course, it is impossible to take into account all
the possible events that could occur. As such,
autonomous agents that do not request human
intervention in unfamiliar circumstances could Image 7.14: Probable future
autonomous agent picker robot
lead to errors and to the detriment of a mission.

10 Stefan Buttcher. Autonomous Agents in Space Missions. Course project for CS886 - Multi-Agent

Systems for Real-World Applications, University of Waterloo, Spring 2004. Retrieved 19:25, May 31,
2016, http://stefan.buettcher.org/cs/cs886/project.pdf
11
• Autonomous agents in warehouses : Autonomous agent robots named "Kiva" (or
Amazon robots or bots) are already operating in Amazon's warehouses. These
robots carry shelves of products to human workers, who in turn pick the items that
need to be shipped. This automation allows for the shipping of a far larger number
of items to costumers than just using human workers. Apart from these bots,
Amazon created the Amazon Picking Challenge (APC), in which researchers
competed for building a new bot that would be able to perform the item picking
process, instead of human workers. The challenge was hard and most teams failed
completely, while the ones that managed to perform better still performed a lot
worse than humans. However, the challenge showed that these difficulties might
soon be overcome. In all likelihood, bots controlled by autonomous agents will soon
be used in warehouses around the world.
• 12, 13, 14
Autonomous agents m cars : The idea of fully autonomous cars has been a
worldwide endeavor for many years. The DARPA (Defense Advanced Research
Projects Agency) Grand Challenge was the first ever competition to formalize this
aim, offering prize money to the team able to build a driverless car that could avoid
obstacles and reach a certain goal. Since that time, a number of autonomous vehicle
prototypes and tests have been conducted, in both urban and rural settings, with
increasing success. Autonomous agents are the "brain" of every such autonomous
vehicle. Agents use sensors to read information about the car's internal and external
states, process the information, and act on it. Agents need to act correctly in an
inaccessible, non-deterministic, non-episodic, dynamic and continuous environment
that is extremely complex.
• 15
i
Autonomous agents in video games �: As video games have improved in quality
throughout the years and the industry has grown to be one of the most important in
the entertainment business, games have pushed the barriers further in various fields
of computer science (including graphics and
artificial intelligence), in order to get better,
more realistic appearances and behaviors.
This need for complex and sophisticated
environments cannot depend on pre­
programmed elements that loop or always
repeat the same patterns of behavior.
Agents need to be installed reacting in a
manner that will not repeat over time. Image 7.15: Autonomous agents in games

11 Amazon, robots and the near-future, rise of the automated warehouse. (26, January 2016). In
TechRepublic. Retrieved, 18:00, May 31, 2016, http://www.techrepublic.com/article/amazon-robots­
and-the-near-future-rise-of-the-automated-warehouse/
12 DARPA Grand Challenge. (25, April 2016). In Wikipedia, The Free Encyclopedia. Retrieved 19:52,
May 31, 2016, https://en.wikipedia.org/wiki/DARPA_Grand_Challenge
13 Autonomous car. (26, May 2016). In W心pedia, The Free Encyclopedia. Retrieved 19:55, May 31,
2016, https://en.wikipedia.org/wiki/Autonomous_car
14 Google Self-Driving Car project, https://www.google.com/selfdrivingcar/
15 Thannia Blanchet. Autonomous Agents in Videogames. Retrieved 19:25, May 31, 2016,
http://www.cs.unm.edu/~pdevineni/papers/Blanchet.pdf
End of chapter example questions with answers

Exercise 1: A control system is used to control an elevator car to allow people to go to their
desired floor in a building.

1. Identify various types of sensors in this system.


2. Identify other pieces of hardware, other than sensors, that are part of the
control system.
3. Outline the sequence of steps that will take place within the computer control
system, when a person presses the button to call the elevator.
4. Define the term interrupt, as well as a situation in which it may occur in this
system.

Answer to Exercise 1:

1. Three sensors that will be pr�sent in this system are: proximity, motion and
pressure.
2. Other pieces of hardware may include a microprocessor, actuators, transducers,
as well as analogue-to-digital and digital-to-analogue converters.
3.
a. When a person presses the button, the pressure sensor is activated.
b. The signal is sent to the microprocessor that determines when the
elevator car should arrive at the floor where the person resides.
c. A signal is sent to the actuators/transducers to move the car to the floor
on which the person pressed the button.
d. After arriving on the floor, another signal is sent to the actuators of the
automatic door to open the car doors.
e. After a fixed time and if there is no other input in the motion sensor of
the automatic doors, the doors close.
f. A signal is sent to the actuators to move the car to the desired floor.
g. After arriving on the floor, another signal is sent to the actuators of the
automatic door to open the car doors so that the person steps out.

This sequence of steps is a simplified version of what might happen in


real life, since a microcontroller must take into account a number of
other factors. For example, other people may need to be served at the
same time or an indication that the maximum elevator car weight was
reached.
4. A signal sent to the processor (by either software or hardware) requesting the
processor's immediate attention to a specific event is an interrupt. An example
of where this might be used in the elevator control system is the following. After
the elevator reaches a desired floor and opens its automatic doors to unload
and load people, the doors start closing. At that point a person that wants to
enter the elevator puts his/her foot between the two closing doors. A (light or
pressure) sensor would sense that the doors did not close and that there is an

| -
l15
|
object between them and would send an interrupt to the processor to open the
doors.

Exercise 2: Discuss how computer control systems have been used throughout industries to
replace human workers in various accounts.

Answer to Exercise 2: Computer control systems can work 7 days a week, 24 hours a day
(24/7), all year round. They also work tirelessly and accurately, performing monotonous
tasks without any complaints. They can also be used in dangerous environments, such as
radioactive, or where there are a lot of fumes, fires, etc., or in environments that cannot be
(easily) reached by humans, such as deep sea, space, etc. The initial cost of a computer
control system is usually considerable, but once set up, the system will be more economical
in the long run. Also, it will reduce labor cost, may increase the quality of work, as well as
performance and productivity. Finally, since there will be fewer workers involved, safety will
increase. However, such systems may lead to an increase of unemployment and workers
made obsolete will need to retrain in order to find a different kind of job.

Exercise 3: Describe how a GPS device can locate its position.

Answer to Exercise 3: Read section 7.1.1.

Exercise 4: Describe how control traffic lights can function dynamically.

Answer to Exercise 4: Read section 7.1.1.

Exercise 5: An intersection of a main road and a secondary road is regulated by a set of


traffic lights. The secondary road is a one way street. Pedestrian lights are also present
allowing people to cross the secondary road.

• By the press of a button, the pedestrian lights, as well as the traffic lights on the
main road change to green (Go), while the traffic lights on the secondary road turn
red (Stop), allowing people to cross the road.
• If no pedestrians want to cross and there is a vehicle on the secondary road, the
pedestrian lights and the traffic lights on the main road turn red (Stop) and green
(Go) on the secondary road.
• Otherwise, on all other accounts, every two minutes the traffic lights on the main
road, as well as the pedestrian lights, change from green (Go) to red (Stop), while
the traffic lights on the secondary road change from red (Stop) to green (Go), and
vice versa.
Traffic lights

一.
Main road

Button
- `? Ill

�nHghts

Secondary road

1. Suggest how the sensors and the microprocessor controlling the traffic lights
may "sense" a vehicle approaching on the secondary road and perform all the
necessary steps.
2. Define the term interrupt, as well as a situation in which it may occur in this
system.

The intersection is located in a small town, far from any major cities. As such, its
communications network is not very good and is constantly unavailable.

3. The traffic lights installed in the intersection can either belong to a centrally
controlled system or a distributed one. Discuss the advantages and
disadvantages of both.

Answer to Exercise 5:

1.
a. Either a touch/weight sensor in the road or a camera on top of the
traffic lights may be installed to detect an approaching or waiting vehicle
on the secondary road.
b. An analogue-to-digital converter is used to convert the analogue signal
from the touch/weight sensor to its digital counterpart. The same
applies to the camera.
c. The digital signal (either the weight or an image) is processed by the
microprocessor.
d. Finally, a signal is sent to the traffic lights so that the pedestrian and the
main road traffic lights turn red (Stop), while the traffic lights on the
secondary road turn green (Go).
2. A signal sent to the processor (by either software or hardware), requesting the
processor's immediate attention to a specific event, is an interrupt. An example
of where this might be used in the traffic lights control system is the following:
A vehicle approaches from the secondary road and the sensors send a signal to
the microprocessor. At the same time, a pedestrian that wants to cross the
secondary road presses the pedestrian lights button. An interrupt signal is sent
to the microprocessor requesting the processor's immediate attention, changing
the traffic lights on the secondary road to red (Stop), while the pedestrian lights
turn green (Go).
3. Since the intersection is located in a small town, far from any major cities, and as
such, its communications network is not very good and is constantly unavailable,
running the town's traffic lights on a distributed system may lead to poor traffic
light performance due to connection failures. Even if a powerful central
computer is installed, if the connection to the traffic lights is not reliable, the
traffic lights would not function properly. For further advantages and
disadvantages read section 7.1.7.

Exercise 6: Discuss the ethical and social implications of forcing people to carry GPS devices.
Provide specific examples.

Answer to Exercise 6: Read section 7.1.6.

Exercise 7: Discuss the ethical and social implications of countries and/or individuals
installing CCTV cameras throughout cities and/or around their homes.

Answer to Exercise 7: Read section 7.1.6.

Exercise 8: A number of control systems may be used around the house such as:

• smart heating systems that turn on/off automatically as needed


• automatic doors/windows that open/close or even lock as needed
• lighting that turns on/off/dim or even changes colors as needed
• air conditioning that turns on/off as needed
• automatic cleaning that turns on/off as needed

1. Discuss how a user may access these systems.


2. Discuss two advantages of incorporating such technology inside the house.

Answer to Exercise 8:

1. The control systems described, as well as any other control system centered around
the house could be accessed and controlled in one of the following ways:
• Via a remote control:
o May be misplaced within the house.
o Needs batteries or to be charged to function.
o Portable enough to access the systems from anywhere in the house.
• Via a fixed remote control:
o Installed on a wall in the house.
o The user knows where the control is, as he/she cannot move it.
o Does not need batteries to operate.
• Via computer/smartphone:
o May be misplaced or lost.
o Needs to be charged to function.
o Requires internet/Wi-Fi connection to function.
o Control systems may be accessed from far away.
o Extremely portable.

2. The advantages of incorporating such technology inside the house include the
following:
a. Cost reduction: By scheduling exactly when these control systems function,
one can control expenses, reduce costs and save energy.
b. Improved comfort: By scheduling exactly when these control systems
function, one can cater for his/her specific needs. For example, he/she can
turn the heater on just before leaving work and arrive to a warm house.

You might also like