Archive for September 2014
Selasa, 23 September 2014
Control Application is split into two parts: turtle graphics and the use of sensors to control or monitor applications.
I. Turtle Graphics
A ‘turtle’ is an on-screen object that follows command given to it by the user. As the turtle moves around the screen it drags a ‘pen’ that leaves a trail behind it.
The command language is called ‘LOGO’.
What is LOGO?
LOGO (also known as 'Turtle Graphics') was developed in 1967 as a way to teach
children basic computer programming.
In LOGO, a curser (called a turtle) can be controlled and moved around the screen by
inputting simple commands. As the curser moves around the screen it draws a line.
Here are some examples of LOGO commands being used to draw simple shapes. You will practice drawing each shape in an online
version of LOGO which can be accessed by clicking the link in the grey box found on the right of each example.
LOGO commands to draw it:
PENDOWN
FORWARD 60
RIGHT 90
FORWARD 60
RIGHT 90
FORWARD 30
RIGHT 90
FORWARD 30
LEFT 90
FORWARD 30
RIGHT 90
FORWARD 30
LOGO commands to draw it:
PENDOWN
FORWARD 40
RIGHT 90
FORWARD 20
PENUP
FORWARD 10
PENDOWN
FORWARD 20
RIGHT 90
FORWARD 40
RIGHT 90
FORWARD 20
PENUP
FORWARD 10
PENDOWN
FORWARD 20
(using REPEAT and ENDREPEAT)
Option 1:
PENDOWN
FORWARD 30
RIGHT 90
FORWARD 30
RIGHT 90
FORWARD 30
RIGHT 90
FORWARD 30
Option 2:
PENDOWN
REPEAT 4
FORWARD 30
RIGHT 90
ENDREPEAT
II. Application Using Sensors
Sensors could be used alongside computers to measure quantities (like temperature, light intensity etc) and then log changes in these quantities.
Sensors can also be used alongside computers to control different devices . The process
goes like this:
Input - Sensor detects data in the environment around it
Process - Data passed to a computer (microprocessor) inside the device which analyses it and decides what action to take. The computer sends instructions to the device telling it what to do.
Output - The device would carry out the instructions.
In both cases, sensors are used to send data to a computer where the data is processed – it is what happens next where the differences occur:
In monitoring, the computer simply reviews the data from the sensors
(by comparing it to data stored in memory) and updates its files and/or gives a warning signal if the values are outside given parameters. No changes to the process are made during monitoring.
In control applications, the computer again reviews the data from the sensors (by comparing it to data stored in memory). But if the values are outside the given parameters it takes action to try and get the values within acceptable ranges. It does this by sending signals to devices controlling the process (such as motors, valves, etc.).
Advantages of Using A Computer Control Devices
Cheaper
If a computer is monitoring and controlling applications, you don't need to employ people.
Higher Work Rate
Computers can control applications all day, every day without getting tired or bored.
Safer Computers can work in conditions that would be too dangerous for people. Examples include chemical plants, radioactive sites and extremely cold areas (antarctic).
Accuracy Computers will respond to inputs from sensors accurately every time. E.g. a heater will be switched on as soon as the temperature falls below 10°C.
Speed Computers will respond to data received from sensors very quickly. E.g. as soon as an infrared sensor detects an intruder, the alarm will sound.
Radioactive sites can be too dangerous for people to work in.
Examples:
1. Burglar Alarms
Burglar alarms work in almost the same way as a security light system.
Input - Infrared sensor detects movement when the sensor is broken and this information is sent to the computer.
Process - Computer makes the decision to sound the alarm
Output - Alarm is activated
a modern alarm system with infra-red sensors
2. Central Heating
Modern central heating systems can be programmed to maintain a constant desirable
temperature.
Let's imagine our perfect room temperature was set at 25°C , we could use sensors and a
computer to:
- Maintain the optimum temperature of 25°C
- Turn heating off when it rises above 25°C
- Turn heating on when it falls below 25°C
Here is how it would work:
Input - Heat sensor detects the current temperature and sends this data to the computer built into the heating system
Process - Computer would check the sensor heat data against the temperature setting stored in it's memory. Computer decides if the heating needs to be turned on (or off)
Output - Heating is switched on or off.
3. Computer Controlled Greenhouse
Automatic greenhouses can provide the optimum conditions for growing plants by
using computer control.
Computers can be used to monitor conditions and control a range of applications
(devices) to keep the perfect conditions constant.
Sensors needed to collect data:
-Light sensor
-Moisture sensor
-Heat sensor
Control applications (devices) needed:
-Grow lights to make plants flourish
-Motor to turn sprinkler on if plants need water
-Heater to warm the greenhouse
-Motor to open window vent to cool greenhouse down if it gets too hot.
III. Robotics
Minggu, 14 September 2014
A simulation is the creation of a model of a real system in order to study the behaviour of the system. The is computer generated and is based on mathematical representations.
The idea is to try and find out what mechanisms control how a system behaves and consequently predict the behaviour of the system in the future and also see if it is possible to influence this future behaviour.
Computer models have the advantage that they save money, can help find a solution more quickly and can be considerably safer (discussed further below). There are many examples of simulations, ranging from simple spreadsheet representations through to complex flight simulators. This section gives two examples: a model for showing a shop’s profit/loss and a traffic light simulation.
Why simulations are used?
-
They are less expensive than having to build the real thing (e.g. a bridge).
- On many occasions it is safer to run a simulation – some real situations are hazardous (e.g. chemical processes).
- With simulations, various scenarios can be tried out in advance.
- It is nearly impossible to try out some tasks in real life because of the high risk involved or the remoteness (e.g. in outer space, under the sea, in nuclear reactors, crash testing cars, etc.).
- It is often faster to do a simulation than the real thing. Some applications could take years before a result was known (e.g. climate change calculations, population growth, etc.).
Limitations:
-
They are only as good as the data used and the mathematical algorithmsrepresenting the real-life situations.
- They therefore have a limited use in some very complex applications (e.g. simulating a nuclear process).
- They can be very expensive to set up and often require specialist software to be written.
- They frequently require very fast processors/computer systems (which can be expensive) to do the necessary ‘number crunching’; many simulations are made up of
I. Tuck Shop Model
This example uses a spreadsheet to do the modelling. Spreadsheet models can be used to predict finance type outcomes based on mathematical values.
This prediction show us things like profit/loss, over budget/between budget, and help us answer 'What if ...?' type of questions, e.g. “What if we decrease the workforce by 15%? Will our profits increase or decrease?” .
This is made possible with the use of 'formulae' which recalculate results based on new data entered. Running questions like this through the spreadsheet can help managers make 'informed decisions' and reduce the risk of overspending and reduced profits.
II. Driving Simulation
These mimics the skill required to control vehicles such as cars, trucks, trains,and buses.
Uses:
- Use of vehicle controls (steering wheel, accelerator, gears, clutch etc)
- Practice driving maneuvers (emergency stop, reversing, parking etc)
- Learning how to handle large trucks safely
- Driving in hazardous conditions (snow, heavy rain etc)
Trainee drivers can build up a high level of confidence using the driving simulation before they actually begin to drive for real. Advantage: any mistakes or crashes are just 'virtual' and vehicles are not damaged or any people hurt.
Some driving simulators are used to mimic the effects of high-speed car crashes on the driver and passengers.
This replaces the old method of using actual cars and crash-test dummies and is muchcheaper and easier to set up.
Data taken from the simulation allows engineers to design and build safer cars. This is known as 'Computer Aided Engineering' (CAE).
III. Bridge Simulation
A computer model of a bridge can be used to test the design.
Bridges have to be able to survive extreme weather conditions. It is obvious not practical to build a real bridge and then wait to see if it falls down in a storm. Instead, a computer model of the bridge is created and tested in virtual storms.
If the model breaks, it can be quickly and cheaply re-designed andre-tested. If it doesn’t break, the real bridge can be built, confident that it will survive real storms.
Bridges can also be tested to see if they can cope with heavy traffic. The virtual bridge can be loaded with a traffic jam of virtual trucks to check that it won’t collapse.
A similar system is used by building designers, especially for very large or tall buildings, such as skyscrapers.
VI. Traffic Light Simulation
This replaces the old method of using actual cars and crash-test dummies and is muchcheaper and easier to set up.
Data taken from the simulation allows engineers to design and build safer cars. This is known as 'Computer Aided Engineering' (CAE).
III. Bridge Simulation
A computer model of a bridge can be used to test the design.
Bridges have to be able to survive extreme weather conditions. It is obvious not practical to build a real bridge and then wait to see if it falls down in a storm. Instead, a computer model of the bridge is created and tested in virtual storms.
If the model breaks, it can be quickly and cheaply re-designed andre-tested. If it doesn’t break, the real bridge can be built, confident that it will survive real storms.
Bridges can also be tested to see if they can cope with heavy traffic. The virtual bridge can be loaded with a traffic jam of virtual trucks to check that it won’t collapse.
A similar system is used by building designers, especially for very large or tall buildings, such as skyscrapers.
VI. Traffic Light Simulation
In this simulation it is necessary to consider:
- how and what data needs to be collected
- how the simulation is carried out
- how the system would work in real life.
The success (or failure) of a simulation model depends on how realistic it is, so the data needs to be collected by watching traffic for a long period of time at the Y-junction. This is best done by using induction loop sensors which count the number of vehicles at each junction.
Manual data collection is possible but is prone to errors and is difficult to do over an 18-hour period per day, for example. The following data is an indication of what would need to be collected:
- the number of vehicles passing the junction in all directions
- the time of day for the vehicle count
- how many vehicles build up at the junction at different times of the day
- how vehicle movements change at weekends, bank holidays, etc.
- how long it takes a vehicle to clear the junction
- how long it takes the slowest vehicle to pass through the junction
- the movements made by vehicles (e.g. left turns, right turns, filtering, etc.)
- additional environmental factors, such as whether there are pedestrian crossings nearby.
Carrying Out The Simulation
Data from the above list is entered into the computer and the simulation run. The results of the simulation are compared with actual traffic flow from a number of data sets. Once the designers are satisfied that it simulates the real situation accurately, then different scenarios can be tried out. For example:
- vary the timing of the lights and see how the traffic flow is affected
- build up the number of vehicles stopped at part of the junction and then change the timing of the lights to see how the traffic flow is affected
- increase or decrease traffic flow in all directions
- how emergency vehicles affect traffic flow at different times of the day.
Using the Simulation
This simulation can then be used to optimise the flow of traffic through the junction on an ongoing basis.
- Sensors in the road gather data and count the number of vehicles at the junction.
- This data is sent to a control box or to a computer. It may need to be convertedfirst into a form understood by the computer.
- The gathered data is compared to data stored in the system. The stored data isbased on model/simulation predictions which were used to optimise the traffic flow.
- The control box or computer ‘decides’ what action needs to be taken.
- Signals are sent out to the traffic lights to change their timing if necessary.
There are three basic types of processing:
batch processing , real-time (transaction) or online processing, real-time process control.
I. Batch Processing
This is where a number of similar jobs or tasks are collected together (batched) and processed by a computer all at once than individualy.
The jobs are then loaded into a computer system (known as a job queue) and processed all at once (in a batch) without human intervention. Once the batch processing starts, no user interaction is needed. This type of processing can only be done where there are no timing constraints, i.e. files don’t need to be updated immediately or a response from the computer is not needed straight away.
Used in the following arena:
- Producing bills
- Payroll
- Stock control
- Producing monthly credit card statements
- Processing bank cheques
- Marking multiple choice examination papers
- Warning systems on aircraft
- Guiding missiles
- Automatic greenhouses
- Burglar alarms
- Food warning system
Advantages: (1)Can be processed without a human present. (2) Long jobs can be left processing overnight when everyone has gone home.
Disadvantages: (1) Batch jobs can take a long time to process. (2) 'Batching' the input data to feed into the system can take a long time.
II. Real-time Transaction Processing (Online Processing)
This type of processing is where a user communicates directly with a computer system.
If the user change the data, it will automatically updated and re-processed.
Ex: booking seats on a flight or at the theatre, music concert booking tickets, etc.
Advantage: Processing is carried out automatically without human supervision.
Disadvantage: Need virus/hacker security
III. Real-Time Process Control
Similar to online processing but this one often uses sensors rather than human input in order to obtain its data.
This type of processing is carried out immediately. The computers respond to inputs without any delays.
Used in:
Advantage: Can carry out jobs human are unable to.
Disadvantage: Very expensive and its system failure can costs lives.
Thank You for Reading :)
This is where a number of similar jobs or tasks are collected together (batched) and processed by a computer all at once than individualy.
The jobs are then loaded into a computer system (known as a job queue) and processed all at once (in a batch) without human intervention. Once the batch processing starts, no user interaction is needed. This type of processing can only be done where there are no timing constraints, i.e. files don’t need to be updated immediately or a response from the computer is not needed straight away.
Used in the following arena:
- Producing bills
- Payroll
- Stock control
- Producing monthly credit card statements
- Processing bank cheques
- Marking multiple choice examination papers
- Warning systems on aircraft
- Guiding missiles
- Automatic greenhouses
- Burglar alarms
- Food warning system
Advantages: (1)Can be processed without a human present. (2) Long jobs can be left processing overnight when everyone has gone home.
Disadvantages: (1) Batch jobs can take a long time to process. (2) 'Batching' the input data to feed into the system can take a long time.
II. Real-time Transaction Processing (Online Processing)
This type of processing is where a user communicates directly with a computer system.
If the user change the data, it will automatically updated and re-processed.
Ex: booking seats on a flight or at the theatre, music concert booking tickets, etc.
Advantage: Processing is carried out automatically without human supervision.
Disadvantage: Need virus/hacker security
III. Real-Time Process Control
Similar to online processing but this one often uses sensors rather than human input in order to obtain its data.
This type of processing is carried out immediately. The computers respond to inputs without any delays.
Used in:
Advantage: Can carry out jobs human are unable to.
Disadvantage: Very expensive and its system failure can costs lives.
Thank You for Reading :)
Minggu, 07 September 2014
At Thursday, September 4th 2014, I learned about safety aspect in using ICT. There are 4 aspects of safety:
1. Electricity
a. Risks
- Electrical shock and burns
- Fire from overheating cables
b. Causes
- Plugging too many power cables into a socket
- Exposed electrical wires
- Spilling drinks over electrical equipment
- Overheating cables
c. How to Prevent
- Make sure wires are insulated.
- Keep drinks or food away from the computers.
- Do not use exposed electrical wires.
- Never open up an electrical devices without pulling out the cables from the socket.
- Do not plug too many power cables into a socket.
D. How to Handle
If there's an electrocution, do not touch the victim before turning off the power supply. Bring the victim to the nearest hospital.
2. Trailing Wires
a. Risks
People can easily be tripped over and fall. This can lead to back injuries.
b. Causes
Long wires spread across the floor.
C. How to Prevent
- Place cables inside cable ducts
- Tuck the wires under the carpet/flooring
- Use wireless technology
3. Heavy Equipment Falling
a. Risks
Equipment falling can cause serious injury if they fall on people
b. Causes
- Small space
- Weak supported tables
C. How to Prevent/Handle
- Avoid putting stuff on the edge.
- Use well-supported/larger table.
4. Fire Risks
a. Risks
- Burned
b. Causes
- Smoking
- Overheated electrical devices
- Overloaded circuit
- Covering air vents on devices like computers/laptops
C. How to Prevent
- Do not smoke
- Make an evacuation route
- Use smoke detector
- Do not use electrical devices for too long
D. How to Handle
- If there's a fire, call the fire department
- Bring victim to the hospital
Sources:
And my friend's presentation @ school
Thank You for Reading :)