Data Acquisition Systems Overview
Data Acquisition Systems Overview
Interfacing
Data Acquisition (DAQ)
• Data Acquisition (DAQ) is the process of measuring physical phenomena (like temperature, light, pressure,
vibration) and converting them into digital signals for monitoring, analysis, or control.
Component Role
Measures physical property (e.g.,
Sensor
temperature)
Signal Conditioning Amplifies, filters, or modifies signal
ADC (Analog-to-Digital Converter) Converts analog signal into digital
Microcontroller/DAQ Card Reads data, processes, stores, or transmits
Visualizes or logs the data (e.g., Arduino
Software
IDE, LabVIEW)
Types of DAQ Systems
Uses a personal computer as the main processing and control hub, with external DAQ devices connected via
USB, PCIe, or Ethernet.
Product Description
Key Features:
Multifunction DAQ with analog I/O
• High sampling rates. NI USB-6009
and digital pins
• Large data storage & visualization.
Educational kit with LabVIEW
• Ideal for lab-scale or industrial use DAQExpress + NI myDAQ
integration
Affordable DAQ for sensors and
LabJack U3-HV
voltage logging
DAQ Systems
• Compact systems with microcontrollers or single-board computers that handle data acquisition, processing, and
sometimes visualization locally.
Platform Description
Basic ADC, I2C/SPI support, large
Arduino UNO / Mega
• Key Features: community
Wi-Fi, Bluetooth, 12-bit ADC,
• Low power ESP32
multi-core processing
• On-device processing High precision ADCs, RTOS,
STM32 Nucleo + Mbed OS
cloud-capable
• Ideal for edge computing & IoT
Embedded Linux with PRUs for
BeagleBone Black
real-time DAQ
• Scalable, plug-and-play systems composed of chassis + I/O modules. Widely used in industrial and high-end
R&D environments.
Platform Description
• Key Features:
Modular DAQ with timing/sync,
• Hot-swappable modules NI PXI / cDAQ
LabVIEW support
• Thousands of I/O combinations Modular switching + measurement
Keysight DAQ970A
• Designed for rugged environments DAQ
Industrial DAQ for structural and
HBM QuantumX
fatigue testing
• Pros: DAQeUSB (ADLINK) Compact DAQ with USB interface
• High precision, modularity
• Suited for mission-critical industrial setups
• Integration with SCADA, MES systems
Emerging/New DAQ Systems
• Sampling rate is the number of samples taken per second from a continuous analog signal to convert it into a
digital format.
• Measured in Hz (e.g., 1000 Hz = 1000 samples/sec) (Also known as the sampling frequency)
• Nyquist Theorem: To avoid losing information, the sampling rate must be at least twice the maximum frequency
present in the signal.
• This minimum required sampling rate is called the Nyquist rate.
• If your signal contains components up to 200 Hz (e.g., machine vibration), you must sample at ≥ 400 Hz.
• In the ecosystem of Digital Twins (DTs), the lifeline between the physical and digital worlds is the sensing and
communication system. A Digital Twin is only as accurate and useful as the data it receives from its real-world
counterpart — the Physical Twin (PT). This makes sensing and communication not merely a technical add-on but
a foundational enabler of the DT’s value proposition.
• Details common sensor types, their operation principles, and limitations such as:
• Sampling frequency issues, Quantization errors, Sensor noise and drift and Immeasurable quantities
Limited Sampling Frequency
• In a Digital Twin system, especially in IoT-based implementations, communication protocols define how data is
packaged, transmitted, received, and interpreted between the physical and digital counterparts. Choosing the
right protocol depends on factors like latency, reliability, bandwidth, power consumption, and topology.
Categories of Protocols
1. Device-Level (Sensor to Gateway)
• I2C, SPI, UART, Modbus
• Short-range, high-speed, low-latency wired protocols
Receiver
Gateway
Media
Method Protocol Medium Notes
• Laptop can run
Mosquitto (MQTT
Router (no broker), Node-RED, or
MQTT / Best
Wi-Fi LAN internet
HTTP / TCP
needed)
flexibility a custom Python
server.
For
Bluetooth /
BLE Profile Short-range wearables,
• Raspberry Pi, Jetson
BLE
R small setups Nano, STM32.
Very stable
• Siemens IoT2040
USB/Serial UART / SPI Wired but not (secure)
scalable • Advantech WISE series
Best for fixed (5G)
MQTT /
Ethernet
HTTP
LAN cable industrial • Moxa UC series (Edge)
settings
Sensor → (I²C (1-2) / UART (15)/ Ethernet (100) / Modbus RTU) → Local Gateway → (TCP/IP or other LAN protocol) → Local
Server → Digital Twin Dashboard
Data Flow
• A gateway (physical or virtual network node) is a bridge or translator between two different systems, typically
between devices that collect data (like sensors) and the cloud or a server that processes it.
• The open systems interconnection (OSI) model was developed by the International
Organization for Standardization (ISO) as a model for a computer communications
architecture and as a framework for developing protocol standards. It consists of seven layers:
Principles of OSI Model
• The Internet Layer's job is to permit hosts to inject packets into any network and have
them travel independently to the destination (potentially on a different network).
• The internet layer defines an official packet format and protocol called IP (Internet Protocol),
plus a companion protocol called ICMP (Internet Control Message Protocol) that helps it
function.
• The Transport Layer segments the incoming byte stream into discrete messages and
passes each one on to the internet layer.
• TCP (Transmission Control Protocol), is a reliable connection-oriented protocol that allows a byte
stream originating on one machine to be delivered without error on any other machine on the
internet.
• UDP (User Datagram Protocol), is an unreliable, connectionless protocol for applications that do
not want TCP’s sequencing or flow control and wish to provide their own.
TCP/IP
• The Modbus protocol was created in 1979 by Modicon* as a means of sharing data between their
PLCs.
• Modicon took the approach of openly publishing its specification and allowing its use by anyone without
asking for royalties.
• These factors, along with the simplicity of the protocol itself, allowed it to become the first widely
accepted de facto standard for industrial communication.
• Modbus-IDA a nonprofit organization oversees the evolution of the protocol and seeks to drive its adoption
by continuing to openly distribute the protocol specifications and providing an
infrastructure for device compatibility certification.
Modbus Interaction a n d Data Models
• The Modbus communication protocol provides a means whereby one device may read and
write data to memory areas located on another remote device.
• The typical example of a remote device is an RTU (remote terminal unit) providing a
physical interface (inputs and outputs) to an industrial process device taking the
initiative to read and write data is usually a PLC.
• Two devices interact over the Modbus protocol using the client–server interaction model.
• It's the server manufacturer to decide the semantics attributed to the data located in these
memory areas.
Modbus Serial
• The request/reply exchange is performed using request and reply APDUs, which are transmitted
within frames that always have the same structure :
• Address:This field contains the slave address. In a request frame, it identifies the destination device, while
in a reply frame it identifies the sender. Each slave has a unique address in the range 1–247. Address 0 is used (by the
master) for broadcasting messages. The range 248–255 is reserved.
• Modbus APDU: This field is the application layer.
• CRC: This field is used for error detection purposes. The content depends on the transmission
mode (RTU or ASCII) being used.
Modbus TCP
• A Modbus TCP network consists of multiple devices connected through a TCP/IP
network, interacting following the client–server model.
• Connection establishment and management are handled by the TCP/IP protocol and
occur independently of the Modbus protocol.
• Some Modbus server devices may support multiple connections from distinct clients
simultaneously.
• Similarly, clients may establish multiple connections to distinct servers.
Ethernet
• OSI Model → Lives in the Data Link layer (Layer 2) and Physical layer (Layer 1)
• TCP/IP Model → Fits into the Link layer
Network Layer (IP address Data Link Layer (MAC Physical Layer (Wi-Fi
locates the cloud server) address of router and Pi) radio waves)
List of Common Device-to-Device Communication Protocols
Node A Node B
Node B
Node A
• Static Routing
• Dynamic Routing
1. Alternate Routing
• Switching Approaches
1. Datagram (Independent Entities, Receiver's Burden, !Overhead)
2. Virtual Circuit (Preplanned, Asynchronous, Special Control Pckt--> !Overhead)
• Advantages
[Link] Initial setup delay time
[Link] for Congestion
3. Reliable
Comparision
Packet Switching Routing Strategies
• Adaptive Routing
• Bellman Ford Algorithm
Congestion Control
• The objective here is to maintain the number of packets within the network below the level at
which performance falls off dramatically.
• If the rate at which packets arrive and queue up exceeds the rate at which packets can be
transmitted, the queue size grows without bound and the delay experienced by a packet goes to
infinity.
• Even if the packet arrival rate is less than the packet transmission rate, queue length will grow
dramatically as the arrival rate approaches the transmission rate
• Strategies at the point of Saturation
• Stop and Discard --> Latency
• Love thy Neighbour
Congestion Control
As the load increases, utilization increases for a while.
Then as the queue lengths at the various nodes begin to grow, throughput actually drops because the buffers at
each node are of finite size.
When a node's buffers are full, it must discard packets. Thus, the source stations must retransmit the discarded
packets in addition to the new packets; this only exacerbates the situation: As more and more packets are
retransmitted, the load on the system grows, and more buffers become saturated
Preventive Measures:
• The simplest way to cope with congestion is for the frame relaying network to simply discard
frames arbitrarily, with no regard to the source of a particular frame.
• To provide for a fairer allocation of resources, the frame relaying bearer service includes the
concept of a committed information rate (CIR). This is a rate, in bits per second, that the network
agrees to support for a particular frame-mode connection. Any data transmitted in excess of the
CIR is vulnerable to discard in the event of congestion.
• Committed Burst Size (Bc). The maximum amount of data that the network agrees to transfer,
under normal conditions, over a measurement interval T. These data may or may not be
contiguous (i.e., it may appear in one frame or in several frames).
• Excess Burst Size (Be). The maximum amount of data in excess of Bc that the network will attempt
to transfer, under normal conditions, over a measurement interval T. These data are uncommitted
in the sense that the network does not commit to delivery under normal conditions. Put another
way, the data that represent Be are delivered with lower probability than the data within Bc.
Congestion Avoidance with Explicit Signaling
• Forward explicit congestion notification (FECN). Notifies the user that congestion
avoidance procedures should be initiated where applicable for traffic in the same
direction as the received frame. The notification indicates that this frame, on this
logical connection, has encountered congested resources.
Latest / Emerging
• Matter Protocol (2022) – For seamless smart home device interoperability (runs over Thread, Wi-Fi, Ethernet).
• 6LoWPAN – IPv6 over Low-Power Wireless Personal Area Networks (enabling DT devices to be IP-addressable).
• TSN (Time-Sensitive Networking) – Ethernet extension for deterministic latency in Industry 4.0.
• Li-Fi – High-speed data transfer using light (still niche but promising).
Carrier Sense Multiple Access Protocols
• Required--> To be able to detect what other stations are doing, and thus adapt their
behavior accordingly
• 1-persistent CSMA
• When a station has data to send, it first listens to the channel to see if anyone else is
transmitting at that moment.
• If the channel is idle, the stations sends its data. Otherwise, if the channel is busy, the
station just waits until it becomes idle.
• ! If a collision occurs, the station waits a random amount of time and starts all over again
• The Problem of bandwidth-delay product
Carrier Sense Multiple Access Protocols
• Non-persistent CSMA
• Non-greedy Algorithm
• When a station senses the channel when it wants to send a frame, and if no one else
is sending, the station begins doing so itself..
• If the channel is already in use, the station does not continually sense it for the purpose of
seizing it immediately upon detecting the end of the previous transmission.
• ! If a collision occurs, the station waits a random amount of time and starts all over again
• Longer delays than 1-persistent CSMA
• The Problem of bandwidth-delay product
Carrier Sense Multiple Access Protocols
• p-persistent CSMA
• When a station becomes ready to send, it senses the channel.
• If it is idle, it transmits with a probability p.
• With a probability q = 1 − p, it defers until the next slot.
• If that slot is also idle, it either transmits or defers again, with probabilities p and q.
• This process is repeated until either the frame has been transmitted or another station has
begun transmitting.
Comparative Analysis of Carrier Sense Multiple Access Protocols
Collision Free Protocol
• A Bit-Map Protocol
• A station j may announce that it has a frame to send by inserting a 1 bit into slot j. After all
N slots have passed by, each station has complete knowledge of which stations wish to
transmit.
• ! Since everyone agrees on who goes next, there will never be any collisions
• The desire to transmit is broadcast before the actual transmission are called reservation
protocols because they reserve channel ownership in advance and prevent collisions
Collision Free Protocol
• Token Passing
• The token represents permission to send.
• If a station has a frame queued for transmission when it receives the token, it can send
that frame before it passes the token to the next station.
• If it has no queued frame, it simply passes the token.
Client Broker
• An MQTT client is any • The broker is responsible
device (from a micro for receiving all messages,
controller up to a full- filtering the messages,
fledged server) that runs determining who is
an MQTT library and subscribed to each
connects to an MQTT message, and sending the
broker over a network. message to these
subscribed clients.
QoS in MQTT
QoS (Quality of Service) defines how reliably a message is delivered between the publisher and subscriber.
List of Subscriptions
• A single SUBSCRIBE message can include multiple topics with different QoS
levels.
• Example: Subscribe to home/+/temperature and alerts/fire in one request.
Wildcard Support
• Topics can include wildcards to match patterns.
• Example: home/+/temperature matches all rooms' temperature topics.
• After SUBACK
The client starts receiving messages for all successfully subscribed
topics.
MQTT - Topics
• Topic refers to an UTF-8 string that the broker uses to filter messages for each connected client. The topic
consists of one or more topic levels. Each topic level is separated by a forward slash (topic level separator).
subscription to myhome/groundfloor/+/temperature
MQTT - Retained Messages
• A retained message is a normal MQTT message with the retained flag set to true. The broker stores the last
retained message and the corresponding QoS for that topic.
• Retained messages help newly-subscribed clients get a status update immediately after they subscribe to a
topic. The retained message eliminates the wait for the publishing clients to send the next update.
• Why it's needed: MQTT often runs on unreliable networks. Devices may
disconnect unexpectedly (e.g., power loss, weak signal).
• What is LWT?
A special message set by a client when it connects to the broker.
If the client disconnects ungracefully (without sending a DISCONNECT), the
broker sends the LWT message to a predefined topic.
• LWT Message Includes:
• Topic: Where the message will be published.
• Payload: The actual message (e.g., “Device offline”).
• QoS & Retain Flag: Controls delivery and storage.
• Graceful Disconnect: If the client disconnects properly, the
broker discards the LWT message.
MQTT - Keep Alive and Client Take-Over
• Problem: In unreliable networks, a client may disconnect unexpectedly (e.g., crash, battery drain). This can cause a half-
open connection, where one side thinks the connection is still active.
• Solution – Keep Alive:
• When a client connects, it sets a keep-alive interval (in seconds).
• If no messages are sent during this time, the client must send a PINGREQ to check if the broker is still alive.
• The broker replies with PINGRESP.
Timeout Rule:
If the broker doesn’t hear from the client within 1.5×
keep-alive interval, it disconnects the client.
Similarly, the client disconnects if it doesn’t get a
response from the broker.
Hypertext Transport Protocol (HTTP)
History of HTTP
• Inception (1989–1991)
• Created by Tim Berners-Lee at CERN as the foundation of the World Wide Web.
• The idea: exchange hypertext documents (HTML) between servers and clients.
• Early Versions
• HTTP/0.9 (1991): Extremely simple, only supported GET requests.
• HTTP/1.0 (1996): Added status codes, headers, and more request methods.
• HTTP/1.1 (1997): Persistent connections, caching, chunked transfer — still widely used today.
• Modern Era
• HTTP/2 (2015): Multiplexing (multiple requests in one connection), header compression, faster browsing.
• HTTP/3 (2022): Uses QUIC (UDP-based) for lower latency, better security.
Hypertext Transport Protocol (HTTP)
•Client-Server Model
• Client (e.g., browser, IoT device)
sends a request.
• Server responds with a response.
•Stateless Protocol
• Each request is independent; server
doesn’t “remember” previous
requests (cookies/sessions help
maintain state).
HTTP Request Structure
• A request is what the client (browser, IoT device, etc.) sends to a server.
Headers
• Content-Type: text/html
• Tells client what’s in the body (HTML, JSON, image, etc.).
• Content-Length: 1256
• Number of bytes in the body → helps client know when message ends.
• Body
• Actual content requested (HTML page, JSON, file, etc.).
Using HTTP Locally
1. Organize a database.
1. Data dependence
2. Rigidity
3. Static nature
4. Lack of integration
5. Data duplication
6. Inconsistency
7. Difficulty in sharing information
8. Inefficiency
9. Inability to handle ADHOC requests
DATABASE MODELS
1. HIERARCHICAL DATABASE
The nodes in level 2 are the children of node at level 1. The nodes at level 2 in turn
become parents of nodes in level 3 and so on.
2. NETWORK DATABASE
The network database is a combination of several hierarchies in which child files can
have more than one parent file, thereby establishing a many-to- many relationship
among data.
In both hierarchical and network databases data relationships are predefined and
embedded in the structure of the database. Access to data is processed by associated
application programs.
A limitation of both hierarchical and network systems is the restriction they place on
data access.
• They both require that the rules of data access be defined when the data structure is
defined. The access rules are difficult to modify after the database has been
implemented.
• They are suited for batch operations that are highly structured and repetitive
involving high transaction rates.
3. RELATIONAL DATABASE MANAGEMENT SYSTEMS (RDBMS)
Data is organized in the form of a table for a large variety of manufacturing
applications.
An entity set is a set of entities of the same type and is represented by a set of
attributes.
An entity relationship model (E-R Model) is based on the perception of the real world
which consists of a set of entities and relationships among them.
• The relational database eliminates the need to follow predefined access paths to
reach target data, and makes data access more flexible.
• The database user gains quicker access to information since the database provides
direct access to all data. The access is independent of the way it is stored.
• Hence relational database facilitates unanticipated queries and makes it well suited
to the manufacturing environment.
Features of RDBMS include:
• ADHOC or unanticipated queries. This is typical in a manufacturing environment.
• Relational database is dynamic. The relationships change and are extended
frequently in a manufacturing database.
• Suitable where enterprise information has to be available to a large number of users
for decision making.
• Desirable where application specifications, development and maintenance costs are
to be kept at the minimum level.
• Tight Consistency
Schema in RDBMS
A query language is one with which a user requests information from a database.
Two categories of query languages are:
• Procedural
• Non-procedural
There are a number of commercial query languages available today. They can be
classified as:
SQL - Structured Query Language
QUEL - Query Language
QBE - Query by Example
Column-oriented databases
• However, there are many scenarios where writes are rare, but we
often need to read a few columns of many rows at once.
• In this situation, it’s better to store groups of columns for all rows
as the basic storage unit—which is why these databases are
called column stores.
• A collection of documents
• A document is a key value collection where the key allows access to its value.
• Documents can contain many different key-value pairs, or key-array pairs, or even
nested documents.
• Graph databases such as Neo4J and the set of databases derived at least in
part from the design of Google’s Bigtable database (such as MongoDB,
HBase, Hypertable, and Redis) all are focused slightly less on Availability and
more on ensuring Consistency and Partition Tolerance.
• Finally, the databases Cassandra, Project Voldemort, CouchDB, and Riak are
more focused on Availability and Partition-Tolerance.
• However, this does not mean that they dismiss Consistency as unimportant.
CA :
• Single site cluster, therefore all nodes are always in contact, when partition
occurs system block.
CP :
• Some data may not be accessible, but the rest is still consistent/accurate.
AP :
• System is still avaiable under partioning, but some of the data returned
may be inaccurate.
Database Scalability & Reliability: Sharding, Replication, and Partitioning
Modern applications (IoT, Digital Twins, Social Media, E-commerce) deal with massive, real-time data.
Key Ideas:
• The load is balanced out nicely between servers—for example, if we have ten servers, each one only
has to handle 10% of the load.
Sharding - Strategies
• All the replicas have equal weight, they can all accept
writes, and the loss of
any of them doesn’t prevent access to the data store.
• With a peer-to-peer replication cluster, we can ride over node failures without losing access to
data.
• When we can write to two different places, we run the risk that two people will attempt to
update the same record at the same time—a write-write conflict.
• Inconsistencies on read lead to problems but at least they are relatively transient.
Inconsistent writes are forever.
Partitioning (Performance & Manageability. )
• Partitioning = splitting a table into smaller parts for easier management & performance.
Types of Partitioning:
• Horizontal Partitioning (rows → similar to sharding).
• Vertical Partitioning (columns → e.g., separating large text fields).
• Range, List, Hash Partitioning (built-in RDBMS techniques).
Data Warehouse
Data Warehouse
• The term Data Warehouse was coined by Bill Inmon in 1990, which he defined in the following
way:
• A data warehouse is a subject-oriented, integrated, time-variant and non-volatile collection of
data in support of management's decision making process
• Subject Oriented: Data that gives information about a particular subject instead of about a
company's ongoing operations.
• Integrated: Data that is gathered into the data warehouse from a variety of sources and merged into
a coherent whole.
• Time-variant: All data in the data warehouse is identified with a particular time period.
• Non-volatile: Data is stable in a data warehouse. More data is added but data is never removed.
This enables management to gain a consistent picture of the business.
Data Warehouse
• A central location where consolidated data from multiple locations (databases) are stored.
• Data Warehouse is maintained separately from the operational database
• End Users access it whenever any information if needed.
• Note: Data Warehouse is not loaded with new data every time.
OLAP vs OLTP
Online Transaction Processing OLTP
• Information technology to help the knowledge worker (executive, manager) make faster and better
decisions
• On-line analytical processing (OLAP) is an element of decision support systems (DSS)
• Decision support places some rather different requirements on database technology compared to
traditional on-line transaction processing applications
• OLTP → Database
• OLTP applications typically automate clerical data processing tasks such as order entry and
banking transactions that are the bread-and-butter day-to-day operations of an organization.
• These tasks are structured and repetitive, and consist of short, atomic, isolated transactions. The
transactions require detailed, up-to-date data, and read or update a few (tens of) records accessed
typically on their primary keys.
• Consistency and recoverability of the database are critical, and maximizing transaction throughput
is the key performance metric.
• Consequently, the database is designed to reflect the operational semantics of known applications,
and, in particular, to minimize concurrency conflicts.
Data Warehouse Online Analytical Processing (OLAP)
• Data warehouses, in contrast, are targeted for decision support.
• Historical, summarized and consolidated data is more important than detailed, individual records.
• The workloads are query intensive with mostly ad hoc, complex queries that can access millions of
records and perform a lot of scans, joins, and aggregates.
• Query throughput and response times are more important than transaction throughput.
• To facilitate complex analyses and visualization, the data in a warehouse is typically modeled
multidimensionally.
• OLAP operations include rollup (increasing the level of aggregation) and drill-down (decreasing
the level of aggregation or increasing detail) along one or more dimension hierarchies,
slice_and_dice (selection and projection), and pivot (re-orienting the multidimensional view of
data).
• Data warehouses might be implemented on standard or extended relational DBMSs, called
Relational OLAP (ROLAP) servers. These servers assume that data is stored in relational databases,
and they support extensions to SQL and special access and implementation methods to efficiently
implement the multidimensional data model and operations
Examples
• OLAP
• Bank Manager wants to know how many customers are utilizing the ATM of this branch. Based on
which he’ll take a call to continue the ATM location
• An insurance company wants to know the number of policies each agent has sold. This will help in
better performance management of agents.
• OLTP
• A supermarket server which records each single product purchased at the market.
• A bank server which record every time a transaction is made for a particular account.
Data Mart
• A smaller version of Data Warehouse which deals with single subject
• Focused on one area.
• Simple and easy way to build.
• Limited source.
Database Design Methodology
• Fact Table
• A ‘fact table’ is a group of associated data items.
• It consists of values of dimensions and measure.
• This means that a fact table can be defined from the given dimension and measure.
• A fact table typically consists of two types of columns such as foreign keys and measure.
• Foreign keys are linked to dimension tables and measures consist of numeric facts as shown in
Figure
Database Design Methodology
• Dimension
• The term ‘dimension’in data warehousing is a
collection of reference information about a
measurable event. The descriptive information that gives
context to facts.
• These events are stored in a fact table and are Examples:
known as facts. • Time Dimension → date,
month, year
• The dimensions are generally the entities for which
• Location Dimension → city,
an organization wants to preserve records. region, country
• The descriptive attributes are organized as • Product Dimension → name,
columns in dimension tables by a data warehouse. category, brand