CMS Textbook Topic 7 HL
CMS Textbook Topic 7 HL
『厂 `
Chapter 3
7-Control
巨 Topic 7 - Control 1
7.1 Control
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.
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.
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
.
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.
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.
• 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
丿
I
Physical (ex. motion)
quantity
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.
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
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.
8
Here is an example of traffic signal control systems , which may be either centrally
controlled or distributed:
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.
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).
,,
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.
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.
| -
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.
• 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.
Exercise 7: Discuss the ethical and social implications of countries and/or individuals
installing CCTV cameras throughout cities and/or around their homes.
Exercise 8: A number of control systems may be used around the house such as:
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.