CPS Module-5
CPS Module-5
STRUCTURE :
o If I have to write a program to store Student information, which will have Student's name,
age, branch, permanent address, father's name etc., which included string values, integer
values etc. I use arrays for this problem, I will require something which can hold data of
different types together.
o Construct individual arrays for storing names, roll numbers, and marks.
o Can use a special data structure to store the collection of different data types.
Definition of Structure:
Structure in c is a user-defined data type that enables us to store the collection of different data
types. Each element of a structure is called a member (or) Structure is a user-defined datatype in
C language which allows us to combine data of different types together. Each element of a
structure is called a member. struct keyword is used to define the structure
{
data_type member1;
data_type member2;
.
.
data_type memeberN;
} structure variables;
Example :1
struct employee
{
int id;
char name[20];
float salary;
} emp;
Example :2
struct student
{
int stusn;
char stname[20];
float marks;
} stud;
Here, struct is the keyword; employee is the name of the structure; id, name, and salary are the
members or fields of the structure. Let's understand it by the diagram given below:
We can declare a variable for the structure so that we can access the member of the structure
easily. There are two ways to declare structure variable:
1. By struct keyword within main() function
2. By declaring a variable at the time of defining the structure.
The example to declare the structure variable by struct keyword. It should be declared within the
main function.
struct employee
{ int id;
char name[50];
float salary;
};
Example Program :
#include<stdio.h>
struct employee
{
int empid;
char empname[50];
float empsalary;
};
void main( )
{
struct employee emp;
printf("Enter the Employee id :");
scanf("%d",&emp.empid);
printf("Enter the Employee Name :");
scanf("%s",&emp.empname);
printf("Enter the Employee salary :");
scanf("%f",&emp.empsalary);
printf("The Employee details are : \n");
printf("The Employee id is : %d\n",emp.empid);
printf("The Employee Name is :%s\n",emp.empname);
printf("The Employee salary is:%.2f\n",emp.empsalary);
}
Output:
The another way to declare variable at the time of defining the structure.
struct employee
{
int id;
char name[50];
float salary;
}e1,e2;
Example Program:
#include<stdio.h>
struct employee
{ int empid;
char empname[50];
float empsalary;
}emp; //declaring e1 variable for structure
void main( )
{
//store employee information
printf("Enter the Employee id :");
scanf("%d",&emp.empid);
printf("Enter the Employee Name :");
scanf("%s",&emp.empname);
printf("Enter the Employee salary :");
scanf("%f",&emp.empsalary);
printf("The Employee details are : \n");
printf("The Employee id is : %d\n",emp.empid);
printf("The Employee Name is :%s\n",emp.empname);
printf("The Employee salary is:%.2f\n",emp.empsalary);
}
Output:
(or)
#include<stdio.h>
void main()
{
struct car
{
char name[100];
float price;
};
// car1.name -> "xyz"
//car1.price -> 987432.50
struct car car1 ={"xyz", 987432.50};
//printing values using dot(.) or 'member access' operator
printf("Name of car1 = %s\n",car1.name);
printf("Price of car1 = %f\n",car1.price);
}
Output:
xyz
987432.50
Example 2:
#include<stdio.h>
void main()
{
struct car
{
char name[100];
float price;
};
void main()
{
struct car car1;
car1.name="xyz";
car1.price =987432.50;
Array of Structures :
An array of structres in C can be defined as the collection of multiple structures variables where
each variable contains information about different entities. The array of structures in C are used
to store information about multiple entities of different data types. The array of structures is also
known as the collection of structures.
Example:
struct car
{
char make[20];
char model[30];
int year;
};
C Pointers
Definition: The pointer in C language is a variable which stores the address of another variable.
This variable can be of type int, char, array, function, or any other pointer. In simple A pointer is
a variable in C, and pointers value is the address of a memory location. (Or)
POINTER is a variable that stores address of another variable. A pointer can also be used to
refer to another pointer function. A pointer can be incremented/decremented, i.e., to point to the
next/ previous memory location. The purpose of pointer is to save memory space and achieve
faster execution time.
Declaring a pointer
Like variables, pointers have to be declared before they can be used in the program. Pointers can
be named is user defined. A pointer declaration has the following form.
data_type * pointer_variable_name;
Here,
data_type is the pointer's base type of C's variable types and indicates the type of the
variable that the pointer points to.
The pointer in c language can be declared using * (asterisk symbol). It is also known as
indirection pointer used to dereference a pointer.
Pointer_variabe_name is user defined pointer variable name.
Example:
Here, 5 is assigned to the c variable. And, the address of c is assigned to the pc pointer.
VARIABLE POINTER
Example :
#include <stdio.h>
void main()
{
/* Pointer of integer type, this can hold the
* address of a integer type variable. */
int *p;
int var = 10;
/* Assigning the address of variable var to the pointer
* p. The p can hold the address of var because var is
* an integer type variable. */
p= &var;
printf("Value of variable var is: %d", var);
printf("\nValue of variable var is: %d", *p);
printf("\nAddress of variable var is: %p", &var);
printf("\nAddress of variable var is: %p", p);
printf("\nAddress of pointer p is: %p", &p);
}
Output:
Explanation :
Example :
#include <stdio.h>
void main()
{
int* pc, c;
c = 22;
printf("Address of c: %x\n", &c);
printf("Value of c: %d\n\n", c); // 22
pc = &c;
printf("Address of pointer pc: %x\n", pc);
printf("Content of pointer pc: %d\n\n", *pc); // 22
c = 11;
printf("Address of pointer pc: %x\n", pc);
printf("Content of pointer pc: %d\n\n", *pc); // 11
*pc = 2;
printf("Address of c: %x\n", &c);
printf("Value of c: %d\n\n", c); // 2}
}
Output:
p = &first;
q = &second;
sum = *p + *q;
Output:
In this program there are two integer variables x, y and two pointer variables p and q.
Assign the addresses of x and y to p and q respectively and then assign the sum of x and y to
variable sum. & is address of operator and * is value at address operator.
Steps:
Example:
Here, we have declared a normal integer variable num and pointer variable ptr, ptr is being
initialized with the address of num and finally getting the value of num using pointer
variable ptr.
#include <stdio.h>
int main()
{ //normal variable
int num = 100;
//pointer variable
int *ptr;
//pointer initialization
ptr = #
//pritning the value
printf("value of num = %d\n", *ptr);
}
Output:
Advantage of pointer
1) Pointer reduces the code and improves the performance, it is used to retrieving strings,
trees, etc. and used with arrays, structures, and functions.
3) It makes you able to access any memory location in the computer's memory.
Declaring a pointer
Like variables, pointers have to be declared before they can be used in the program. Pointers can
be named is user defined. A pointer declaration has the following form.
data_type * pointer_variable_name;
Here,
data_type is the pointer's base type of C's variable types and indicates the type of the
variable that the pointer points to.
The pointer in c language can be declared using * (asterisk symbol). It is also known as
indirection pointer used to dereference a pointer.
Pointer_variabe_name is user defined pointer variable name.
Example:
Example :
#include<stdio.h>
void main ()
{
int var = 20; /* actual variable declaration */
int *ip; /* pointer variable declaration */
ip = &var; /* store address of var in pointer variable*/
printf("Address of var variable: %x\n", &var );
/* access the value using the pointer */
printf("Value of *ip variable: %d\n", *ip );
}
Output:
Example 1:
#include <stdio.h>
void main()
{
int i = 10; // normal integer variable storing value 10
int *a; // since '*' is used, hence its a pointer variable
/* '&' returns the address of the variable 'i' which is stored in the pointer variable 'a' */
a = &i;
/* below, address of variable 'i', which is stored by a pointer variable 'a' is displayed */
printf("Address of variable i is %u\n", a);
/* below, '*a' is read as 'value at a' which is 10 */
printf("Value at the address, which is stored by pointer variable a is %d\n", *a);
}
Output :
Example Programs :
Example: 1
C program to create, initialize, assign and access a pointer variable :
#include <stdio.h>
void main()
{
int num; /*declaration of integer variable*/
int *pNum; /*declaration of integer pointer*/
pNum=# /*assigning address of num*/
num=100; /*assigning 100 to variable num*/
//access value and address using variable num
printf("Using variable num:\n");
printf("value of num: %d\naddress of num: %u\n",num,&num);
//access value and address using pointer variable num
printf("Using pointer variable:\n");
printf("value of num: %d\naddress of num: %u\n",*pNum,pNum);
}
Output
Example: 2
// function : swap two numbers using pointers
void swap(int *a,int *b)
{
int t;
t = *a;
*a = *b;
*b = t;
}
void main()
{
int num1,num2;
printf("Enter value of num1: ");
scanf("%d",&num1);
printf("Enter value of num2: ");
scanf("%d",&num2);
//print values before swapping
printf("Before Swapping: num1=%d, num2=%d\n",num1,num2);
//call function by passing addresses of num1 and num2
swap(&num1,&num2);
//print values after swapping
printf("After Swapping: num1=%d, num2=%d\n",num1,num2);
}
Output:
Sample Output :
An Autonomous Institute
NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067
Definition:
According to the father of Artificial Intelligence, John McCarthy, it is “The science and
engineering of making intelligent machines, especially intelligent computer programs”.
Artificial Intelligence is a way of making a computer, a computer-controlled robot, or a software
think intelligently, in the similar manner the intelligent humans think.
AI is accomplished by studying how human brain thinks and how humans learn, decide, and work
while trying to solve a problem, and then using the outcomes of this study as a basis of developing
intelligent software and systems.
Applications:
AI has been dominant in various fields such as −
Gaming − AI plays crucial role in strategic games such as chess, poker, tic-tac-toe, etc., where
An Autonomous Institute
NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067
machine can think of large number of possible positions based on heuristic knowledge.
Natural Language Processing − It is possible to interact with the computer that understands
natural language spoken by humans.
Expert Systems − There are some applications which integrate machine, software, and special
information to impart reasoning and advising. They provide explanation and advice to the users.
Vision Systems − These systems understand, interpret, and comprehend visual input on the
computer. For example,
A spying airplane takes photographs, which are used to figure out spatial information or
map of the areas.
Doctors use clinical expert system to diagnose the patient.
Police use computer software that can recognize the face of criminal with the stored portrait
made by forensic artist.
Speech Recognition − Some intelligent systems are capable of hearing and comprehending the
language in terms of sentences and their meanings while a human talks to it. It can handle different
accents, slang words, noise in the background, change in human’s noise due to cold, etc.
Handwriting Recognition − The handwriting recognition software reads the text written on paper
by a pen or on screen by a stylus. It can recognize the shapes of the letters and convert it into
editable text.
Intelligent Robots − Robots are able to perform the tasks given by a human. They have sensors to
detect physical data from the real world such as light, heat, temperature, movement, sound, bump,
and pressure. They have efficient processors, multiple sensors and huge memory, to exhibit
intelligence. In addition, they are capable of learning from their mistakes and they can adapt to the
new environment.
Examples
1. Siri--She's the friendly voice-activated computer that we interact with on a daily basis. She helps
us find information, gives us directions, add events to our calendars, helps us send messages and so
on. Siri is a pseudo-intelligent digital personal assistant.
2. Alexa--When Amazon first introduced Alexa, it took much of the world by storm. However, it's
usefulness and its uncanny ability to decipher speech from anywhere in the room has made it a
revolutionary product that can help us scour the web for information, shop, schedule appointments,
set alarms and a million other things, but also help power our smart homes and be a conduit for
those that might have limited mobility.
reactions and choices of films. This tech is getting smarter and smarter by the year as the dataset
grows.
Definition
Powerful and open platform for mobile application development.
Android is an Open source software stack
Operating System
Middlewares
Set of API Libraries for writing application
Built on open source Linux Kernel.
Hardware access is available to all applications through API Libraries and Application
interaction.
All applications have equal standing.
Android applications are normally written in java
Use its own custom virtual machine Dalvik Virtual Machine
Android SDK includes everything we need to start developing, testing and debugging
applications.
Description/Working
Full documentation
SDK include extensive code level reference information.
Include developer guide
Sample code
Online support
Applications
The current stable version is Android 10, released on September 3, 2019. The core Android source
code is known as Android Open Source Project (AOSP), which is primarily licensed under
the Apache License.
Smart Phones.
A range of other electronics, such as game consoles, digital cameras, PCs and others,
each with a specialized user interface.
Well known derivatives include Android TV for televisions and Wear OS for wearables,
both developed by Google.
Google Play
Is a digital distribution service operated and developed by Google.
It serves as the official app store for the Android operating system, allowing users to browse
and download applications developed with the Android software development kit (SDK)
and published through Google.
Google Play also serves as a digital media store, offering music, books, movies, and
television programs.
Applications are available through Google Play either free of charge or at a cost.
They can be downloaded directly on an Android device through the Play Store mobile
app or by deploying the application to a device from the Google Play website.
Examples
1. Facebook Integration
2. Open File chooser with Camera option in Webview File option
An Autonomous Institute
NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067
Definition:
Big Data is nothing but a large volume of data. Data could be of any kind i.e. structured data like
numbers, dates, group of words etc., semi-structured json, XML etc., or unstructured data like text,
images, videos etc. It is so difficult to process this data using a traditional database. The data can be
collected from various sources like social media, emails, banking transactions, online shopping,
mobile devices, and many other sources. This data when gathered, manipulated, stored and
analyzed, can help organizations to gain useful insights to increase their revenue, gain new and
retain old customers and improve operations.
2. Social Media
The statistic shows that 500+terabytes of new data get ingested into the databases of social media
site Facebook, every day. This data is mainly generated in terms of photo and video uploads,
message exchanges, putting comments etc.
An Autonomous Institute
NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067
3. A single Jet engine can generate 10+terabytes of data in 30 minutes of flight time. With many
thousand flights per day, generation of data reaches up to many Petabytes.
Applications
In Banking: The use of customer data invariably raises privacy issues. By uncovering hidden
connections between seemingly unrelated pieces of data, big data analytics could potentially reveal
sensitive personal information.
In Credit Cards: Credit card companies rely on the speed and accuracy of in-database analytics to
identify possible fraudulent transactions. By storing years’ worth of usage data, they can flag
atypical amounts, locations, and retailers, and follow up with cardholders before authorizing
suspicious activity.
In Data Mining: Decision trees illustrate the strengths of relationships and dependencies within data
and are often used to determine what common attributes influence outcomes such as disease risk,
fraud risk, purchases and online signups.
In Agriculture: The data environment constantly adjusts to changes in the attributes of various data
it collects, including temperature, water levels, soil composition, growth, output, and gene
sequencing of each plant in the test bed.
In Enterprise: For enterprises around the world, in many industries, in-database analytics are
providing a competitive advantage.
Characteristics Of Big Data
(i) Volume – The name Big Data itself is related to a size which is enormous. Size of data plays a
very crucial role in determining value out of data. Also, whether a particular data can actually be
considered as a Big Data or not, is dependent upon the volume of data. Hence, 'Volume' is one
characteristic which needs to be considered while dealing with Big Data.
An Autonomous Institute
NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067
Definition:
Cloud computing is a type of computing that relies on shared computing resources rather than
having local servers or personal devices to handle applications.
In its most simple description, cloud computing is taking services ("cloud services") and moving
them outside an organization's firewall. Applications, storage and other services are accessed via
the Web. The services are delivered and used over the Internet and are paid for by
the cloud customer on an as-needed or pay-per-use business model.
1. On-demand self-service: This means that cloud customers can sign up for, pay for and start
using cloud resources very quickly on their own without help from a sales agent.
2. Broad network access: Customers access cloud services via the Internet.
4. Rapid elasticity or expansion: Cloud customers can easily scale their use of resources up or
down as their needs change.
An Autonomous Institute
NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067
5. Measured service: Customers pay for the amount of resources they use in a given period of
time rather than paying for hardware or software upfront. (Note that in a private cloud, this
measured service usually involves some form of chargebacks where IT keeps track of how many
resources different departments within an organization are using.)
6. On-demand self-service: This means that cloud customers can sign up for, pay for and start
using cloud resources very quickly on their own without help from a sales agent.
7. Broad network access: Customers access cloud services via the Internet.
9. Rapid elasticity or expansion: Cloud customers can easily scale their use of resources up or
down as their needs change.
10. Measured service: Customers pay for the amount of resources they use in a given period of
time rather than paying for hardware or software upfront. (Note that in a private cloud, this
measured service usually involves some form of chargebacks where IT keeps track of how many
resources different departments within an organization are using.)
Cloud computing can be divided into several sub-categories depending on the physical location of
the computing resources and who can access those resources.
Public cloud vendors offer their computing services to anyone in the general public. They
maintain large data centers full of computing hardware, and their customers share access to that
hardware.
By contrast, a private cloud is a cloud environment set aside for the exclusive use of one
organization. Some large enterprises choose to keep some data and applications in a private cloud
for security reasons, and some are required to use private clouds in order to comply with various
regulations.
Organizations have two different options for the location of a private cloud: they can set up a
private cloud in their own data centers or they can use a hosted private cloud service. With a
hosted private cloud, a public cloud vendor agrees to set aside certain computing resources and
allow only one customer to use those resources.
A hybrid cloud is a combination of both a public and private cloud with some level of integration
between the two. For example, in a practice called "cloud bursting" a company may run Web
servers in its own private cloud most of the time and use a public cloud service for additional
An Autonomous Institute
NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067
Cloud services are typically deployed based on the end-user (business) requirements. The primary
services include the following:
An Autonomous Institute
NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067
Definition:
The internet of things, or IoT, is a system of interrelated computing devices, mechanical and
digital machines, objects, animals or people that are provided with unique identifiers (UIDs)
and the ability to transfer data over a network without requiring human-to-human or human-
to-computer interaction.
The internet of things is also a natural extension of SCADA (supervisory control and data
acquisition), a category of software application program for process control, the gathering of
data in real time from remote locations to control equipment and conditions. SCADA systems
include hardware and software components. The hardware gathers and feeds data into a
computer that has SCADA software installed, where it is then processed and presented it in a
timely manner. The evolution of SCADA is such that late-generation SCADA systems
developed into first-generation IoT systems.
An IoT ecosystem consists of web-enabled smart devices that use embedded processors,
sensors and communication hardware to collect, send and act on data they acquire from their
environments. IoT devices share the sensor data they collect by connecting to an IoT gateway
or other edge device where data is either sent to the cloud to be analyzed or analyzed locally.
Sometimes, these devices communicate with other related devices and act on the information
they get from one another. The devices do most of the work without human intervention,
although people can interact with the devices for instance, to set them up, give them
instructions or access the data.
An Autonomous Institute
NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067
The internet of things helps people live and work smarter as well as gain complete control
over their lives. In addition to offering smart devices to automate homes, IoT is essential to
business. IoT provides businesses with a real-time look into how their companies’ systems
really work, delivering insights into everything from the performance of machines to supply
chain and logistics operations.
IoT enables companies to automate processes and reduce labor costs. It also cuts down on
waste and improves service delivery, making it less expensive to manufacture and deliver
goods as well as offering transparency into customer transactions.
IoT touches every industry, including healthcare, finance, retail and manufacturing. Smart
cities help citizens reduce waste and energy consumption and connected sensors are even
used in farming to help monitor crop and cattle yields and predict growth patterns.
As such, IoT is one of the most important technologies of everyday life and it will continue to
pick up steam as more businesses realize the potential of connected devices to keep them
competitive.
Applications of IoT:
There are numerous real-world applications of the internet of things, ranging from consumer
IoT and enterprise IoT to manufacturing and industrial IoT .IoT applications span numerous
verticals, including automotive, telecom and energy.
In the consumer segment, for example, smart homes that are equipped with smart
thermostats, smart appliances and connected heating, lighting and electronic devices can be
controlled remotely via computers and smartphones.
Wearable devices with sensors and software can collect and analyze user data, sending
messages to other technologies about the users with the aim of making users' lives easier and
more comfortable. Wearable devices are also used for public safety for example, improving
first responders' response times during emergencies by providing optimized routes to a
location or by tracking construction workers' or firefighters' vital signs at life-threatening
sites.
An Autonomous Institute
NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067
In healthcare, IoT offers many benefits, including the ability to monitor patients more closely
to use the data that's generated and analyze it. Hospitals often use IoT systems to complete
tasks such as inventory management, for both pharmaceuticals and medical instruments.
Smart buildings can, for instance, reduce energy costs using sensors that detect how many
occupants are in a room. The temperature can adjust automatically for example, turning the
air conditioner on if sensors detect a conference room is full or turning the heat down if
everyone in the office has gone home.
Definition: Data science is a multi-disciplinary field that uses scientific methods, processes,
algorithms and systems to extract knowledge and insights from structured and unstructured data.
Data science is the same concept as data mining and big data use the most powerful hardware, the
most powerful programming systems, and the most efficient algorithms to solve problems
Mathematics Expertise: Solutions to many business problems involve building analytic models
grounded in the hard math, where being able to understand the underlying mechanics of those
models is key to success in building them. Many inferential techniques and machine learning
algorithms lean on knowledge of linear algebra.
Technology and Hacking: Data scientists utilize technology in order to wrangle enormous data
sets and work with complex algorithms, and it requires tools far more sophisticated than Excel.
Data scientists need to be able to code — prototype quick solutions, as well as integrate with
complex data systems. Core languages associated with data science include SQL, Python, R, and
SAS.
Strong Business Acumen: It is important for a data scientist to be a tactical business consultant.
An Autonomous Institute
NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067
Working so closely with data, data scientists are positioned to learn from data in ways no one else
can. That creates the responsibility to translate observations to shared knowledge, and contribute to
strategy on how to solve core business problems.
Phase 1—Discovery: Before you begin the project, it is important to understand the various
specifications, requirements, priorities and required budget. You must possess the ability to ask the
An Autonomous Institute
NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067
right questions. if you have the required resources present in terms of people, technology, time and
data to support the project.
Phase 2—Data preparation: In this phase, you require analytical sandbox in which you can
perform analytics for the entire duration of the project. You need to explore, preprocess and
condition data prior to modeling. Further, you will perform ETLT (extract, transform, load and
transform) to get data into the sandbox. You can use R for data cleaning, transformation, and
visualization.
Phase 3—Model planning: Here, you will determine the methods and techniques to draw the
relationships between variables. These relationships will set the base for the algorithms which you
will implement in the next phase. You will apply Exploratory Data Analytics (EDA) using various
statistical formulas and visualization tools.
Phase 4—Model building: In this phase, you will develop datasets for training and testing
purposes.
Phase 5—Operationalize: In this phase, you deliver final reports, briefings, code and technical
documents.
Phase 6—Communicate results: Now it is important to evaluate if you have been able to achieve
your goal that you had planned in the first phase. So, in the last phase, you identify all the key
findings, communicate to the stakeholders and determine if the results of the project are a success
or a failure based on the criteria developed in Phase 1.
Applications:
1. Fraud and Risk Detection
The earliest applications of data science were in Finance. Companies were fed up of bad debts and
losses every year. However, they had a lot of data which use to get collected during the initial
paperwork while sanctioning loans. They decided to bring in data scientists in order to rescue them
out of losses.
2. Medical Image Analysis
Procedures such as detecting tumors, artery stenosis, and organ delineation employ various different
methods and frameworks like Map Reduce to find optimal parameters for tasks like lung texture
classification. It applies machine learning methods, support vector machines (SVM), content-based
medical image indexing, and wavelet analysis for solid texture classification.
3. Internet Search
All these search engines (including Google) make use of data science algorithms to deliver the best
result for our searched query in a fraction of seconds
Definition
Wireless sensor network (WSN) refers to a group of spatially dispersed and dedicated
sensors for monitoring and recording the physical conditions of the environment and organizing the
collected data at a central location. WSNs measure environmental conditions like temperature,
sound, pollution levels, humidity, wind, and so on.
An Autonomous Institute
NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067
The WSN is built of "nodes" – from a few to several hundreds or even thousands, where each node
is connected to one (or sometimes several) sensors. Each such sensor network node has typically
several parts: a radio transceiver with an internal antenna or connection to an external antenna,
a microcontroller, an electronic circuit for interfacing with the sensors and an energy source,
usually a battery or an embedded form of energy harvesting. A sensor node might vary in size from
that of a shoebox down to the size of a grain of dust. The cost of sensor nodes is similarly variable,
ranging from a few to hundreds of dollars, depending on the complexity of the individual sensor
nodes. Size and cost constraints on sensor nodes result in corresponding constraints on resources
such as energy, memory, computational speed and communications bandwidth. The topology of the
WSNs can vary from a simple star network to an advanced multi-hop wireless mesh network. The
propagation technique between the hops of the network can be routing or flooding.
Description/Working
Hardware: Basic hardware components are nodes which form network. Nodes are of varying size
and cost depending on the type of sensors. In many applications, a WSN communicates with
a Local Area Network or Wide Area Network through a gateway. The Gateway acts as a bridge
between the WSN and the other network. This enables data to be stored and processed by devices
with more resources, for example, in a remotely located server. A wireless wide area network used
primarily for low-power devices is known as a Low-Power Wide-Area Network (LPWAN).
Wireless Communication Standards: There are several wireless standards and solutions for
sensor node connectivity. Thread and ZigBee can connect sensors operating at 2.4 GHz with a data
rate of 250kbit/s. Many use a lower frequency to increase radio range (typically 1 km), for
example Z-wave operates at 915 MHz and in the EU 868 MHz has been widely used but these have
a lower data rate. With the emergence of Internet of Things, many other proposals have been made
to provide sensor connectivity. LORA is a form of LPWAN which provides long range low power
wireless connectivity for devices, which has been used in smart meters. Wi-SUN connects devices
at home.
Software: Major software component is Operating systems for wireless sensor network nodes.
They are typically less complex than general-purpose operating systems. They more strongly
resemble embedded systems, for two reasons. First, wireless sensor networks are typically deployed
with a particular application in mind, rather than as a general platform. Second, a need for low costs
and low power leads most wireless sensor nodes to have low-power microcontrollers ensuring that
mechanisms such as virtual memory are either unnecessary or too expensive to implement.
Any algorithms or protocols implemented should aim for Lifetime maximization. Energy/Power
Consumption of the sensing device should be minimized and sensor nodes should be energy
efficient since their limited energy resource determines their lifetime. To conserve power, wireless
sensor nodes normally power off both the radio transmitter and the radio receiver when not in use.
An Autonomous Institute
NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067
Applications
Area monitoring
Area monitoring is a common application of WSNs. In area monitoring, the WSN is deployed over
a region where some phenomenon is to be monitored. A military example is the use of sensors to
detect enemy intrusion; a civilian example is the geo-fencing of gas or oil pipelines.
Health care monitoring
There are several types of sensor networks for medical applications: implanted, wearable, and
environment-embedded. Implantable medical devices are those that are inserted inside the human
body. Wearable devices are used on the body surface of a human or just at close proximity of the
user. Environment-embedded systems employ sensors contained in the environment. Possible
applications include body position measurement, location of persons, overall monitoring of ill
patients in hospitals and at home.
Environmental/Earth sensing
There are many applications in monitoring environmental parameters, like Air pollution
monitoring, Forest fire detection, Water quality monitoring.