You are on page 1of 55

Control Engineering Exit Exam Module:

Courses: Measurement & Instrumentation, & Mechatronics

Prepared by:
Mohammed S. (Measurement & Instrumentation)
Tsegaye G. (Mechatronics)

Edited by:
Mechatronics, & Measurement & Instrumentation-Aregahegn A.

Reviewed by: Hailemariam G., Temesgen H/G. & Tsegaye G.


Dep't of Mechanical Engineering
CoE, Wolaita Sodo University
March 01, 2023

Edited by: Ic Engine & Reciprocating Mach


Tsegaye G. Mohammed S. Hailemariam G
Mechatronics
Introduction to Mechatronics (Meng 5272) Exit-Exam Module

Tsegaye Getachew Alenka


February 24, 2023

Contents
1 Competencies and Objectives of the Course 1
1.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Competences (Learning Outcomes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Mechatronics, Introduction 1
2.1 Definition and Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.2 Measurement control Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.3 Performance of Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.4 The Wheatstone Bridge Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.5 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 Control System, Actuating System and Mathematical Modeling 5


3.0.1 Mathematical models of Actuating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1 Semiconductors and Motor Controllers/Actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2 Mechatronic System Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.3 Mechatronic Design Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.4 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4 Micro-controllers and microprocessors 11


4.1 BASIC COMPUTER MODEL and Analogy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5 Sensor Communication Design 13


5.1 Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.2 Sensor Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.2.1 Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.2.2 General Purpose Instrument Bus Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.3 Digital Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.3.1 Bivalent Axiomatic Set Theory/Logic Gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

6 Assembly Language and PLC 18


6.1 Ladder Logic, Functional Block Diagram, Structured Text, Instruction List and Sequential Functional
Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.2 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

7 Miscellaneous & Objective Questions 21

List of Figures
1 (a) Concept of mechatronics: an interconnected energy and information flow (b) Definition: synergetic
integration of knowledge from main disciplines in mechatronics . . . . . . . . . . . . . . . . . . . . . . 2
2 (a) Wheatstone Bridge Circuit (b) Realtime step vs frequency Response . . . . . . . . . . . . . . . . . 4
3 (a) Comparison of Open and Closed Loop Controller (b) components of closed loop controller . . . . . 7
4 Schematic of Synergistic Mathematical Model of Actuation Control Systems (a)Mechanical (b) Hy-
draulic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5 (a) Types of Motor Actuators (b) Types of Electronics . . . . . . . . . . . . . . . . . . . . . . . . . . 9
6 (a) Watt-Governor (b) Electronic Furnace Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
7 (a) an 8051 µP Architecture & Components (b) bus (c)µcontrollers vs µprocessors . . . . . . . . . . . 12
8 Bivalent logic gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

I
9 Ladder Logic Program/Diagram of Pump Motor Control . . . . . . . . . . . . . . . . . . . . . . . . . 20
10 (a) Sequential Function Chart (SFC) of the pump (b)Function Block Diagram (FBD) . . . . . . . . . 20

List of Tables
1 Measurement instruments construction A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Measurement instruments construction B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 Differential Modelling of Physical Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4 Comparison mathematical model of simple translational mechanical vs PID control systems . . . . . . 7
5 Basic Analogy of Computer Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
6 8051 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
7 Simple Programs in 8051 Assembly Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

I
1 Competencies and Objectives of the Course
1.1 Objectives
Mechatronics, as an engineering discipline, is the synergistic combination of mechanical engineering, electronics, control
engineering, and computers, all integrated through the design process. It involves the application of complex decision
making to the operation of physical systems. Mechatronic systems depend for their unique functionality on computer
software. This course studies mechatronics at a theoretical and practical level; balance between theory/analysis and
hardware implementation is emphasized; emphasis is placed on physical understanding rather than on mathematical
formalities.
A case-study, problem-solving approach, with video hardware demonstrations, is used throughout the course. The
course of studies should enable students to analyze complex physical-technical combinations and to describe, to
model, to simulate and to develop Mechatronics systems using the methods of mechanical engineering, electrical
engineering and computer science. Students’ central task is A case-study, problem-solving approach, with video
hardware demonstrations, is used throughout the course. The course of studies should enable students to analyze
complex physical-technical combinations and to describe, to model, to simulate and to develop Mechatronics systems
using the methods of mechanical engineering, electrical engineering and computer science. Students’ central task is
the optimal configuration of the complete system.

1.2 Competences (Learning Outcomes)


After completion of this course students will
ˆ Understand the importance of the integration of modeling and controls in the design of mechatronic systems.

ˆ Understand the dynamic system investigation process and be able to apply it to a variety of dynamic physical
systems.

ˆ Understand the importance of physical and mathematical modeling (both from first principles and using system

ˆ identification experimental techniques) in mechatronic system design and be able to model and analyze mechan-
ical, electrical, electromechanical, fluid, thermal, chemical, and multidisciplinary systems.
ˆ Be able to develop a hierarchy of physical models for a dynamic system, from a truth model to a design model,
and understand the appropriate use of this hierarchy of models.
ˆ Become proficient in the use of MatLab/Simulink to model and analyze nonlinear and linear mechatronic systems.

ˆ Understand the key elements of a measurement system and the basic performance specifications and physi-
cal/mathematical models of a variety of analog and digital motion sensors.

ˆ Understand the characteristics and models of various electromechanical actuators (brushed dc motor, brushless
dc motor, and stepper motor) and hydraulic and pneumatic actuators.
ˆ Understand analog and digital circuits and components and semiconductor electronics as they apply to mecha-
tronic systems.

ˆ Understand and be able to apply various control system design techniques: open-loop feedforward control,
classical feedback control (root-locus and frequency response), and statespace control.
ˆ Have a general understanding of more advanced control design techniques: cascade control, inferential control,
model predictive control, adaptive control, fuzzy logic control, and multivariable control.
ˆ Understand the digital implementation of control and basic digital control design techniques.

ˆ Be able to use a microcontroller as a mechatronic system component, i.e., understand programming and inter-
facing issues. Be able to apply all these skills to the design of a mechatronic system

2 Mechatronics, Introduction
2.1 Definition and Concept
Mechatronics is a concept of Japanese origin (1980’s) and can be defined as the application of electronics and com-
puter technology to control the motions of mechanical systems. The word, mechatronics, is composed of “mecha”
from mechanism and the “tronics” from electronics. In other words, technologies and developed products will be
incorporating electronics more and more into mechanisms. [1] Mechanical systems are increasingly integrated with
actuators, sensors and digital electronics as in the figure 1 (a).[1]

1
(a) (b)

Figure 1: (a) Concept of mechatronics: an interconnected energy and information flow (b) Definition: synergetic integration of knowledge
from main disciplines in mechatronics

The design of mechatronic system involve interrelations during mechanical and electronic systems, the simultaneous
engineering with the goal of also creating synergetic effects as presented in the figure 1 (b).[2]. Mechatronics, therefore,
is the synergistic integration of mechanical engineering, with electronics and intelligent computer control in the design
and manufacturing of industrial products and processes.

2.2 Measurement control Review


Measurements of variables are needed for monitoring and control purposes. Typical variables that need to be measured
in a data acquisition and control system are:1. position, velocity, acceleration, 2. force, torque, strain, pressure, 3.
temperature, 4. flow rate, 5. humidity.. Many instruments constructed to work by the principle electromagnetism
with capacitive, resistive, and magnetic detection a few with Lorentz’s force measurement i.e.if a magnetic field
moves near an electrical wire, current flows through the wire. Whereas an LVDT measures displacement, an LVT
measures speed. The coils of opposite polarity around permanent magnet measures the net DC/AC voltage generated
proportional to object’s position measured and stored along with timer frequency, to compute motion. Tables 1 &
1 show review on schematic construction of various instruments. [3] Sensor is a device that responds to a change

Table 1: Measurement instruments construction A

An LVT consists of doppler works by A double-pulse laser An optical technique works in Bernoulli’s
a rod called the core the same principle illuminates a region involving a laser is laser principle where
(a permanent mag- as a car horn where of flow under study, Doppler velocimetry Pitot-static probe
net), and two elec- moving towards and a digital camera (LDV), also called laser either both pres-
trical coils around you (or away from (sometimes two sepa- velocimetry (LV) or laser sures are measured
the core slides in- you) has an ap- rate cameras) records Doppler anemometry (pierced two holes
side a hollow cylin- parently higher (or two images – timed (LDA). whereas PIV is from side), or the
drical tube called lower) pitch, only with the two flashes a Lagrangian technique, pressure difference
a bobbin and DC that doppler works (pulses) of laser light. following the motion of is measured (with
vltage generated in with radio wave The displacement of individual particles, LDV only one hole at
the coils. instead of sound illuminated particles is an Eulerian technique, the front edge).We
wave, or frequency, is then determined since the velocity is mea- consider here in-
by analyzing (interro- sured at a fixed point in compressible flow,
gating) the two im- the flow. and assume that
ages with image pro- the probe is aligned
cessing software into the flow,

in the physical phenomenon. Transducer is a device that converts one form of energy into another form of energy

2
Sensors are transducers when they sense one form of energy input and output in a different form of energy. For
example, a thermocouple responds to a temperature change (thermal energy) and outputs a proportional change in
electromotive force (electrical energy). Therefore, a thermocouple can be called a sensor and or transducer. The study
of mechatronic systems can be divided into the following areas of speciality:

1. physical system modelling: mechanical systems (mechanical elements, machines, precision mechanics); and elec-
tronic systems (microelectronics, power electronics, sensor and actuator technology);
2. information technology (systems theory: Signals and Systems,and Data Acquisition), and Logic Systems,
Software, Computers, artefacts and Intelligence: automation, software engineering, artificial intelligence).

Table 2: Measurement instruments construction B

In piezoelectric (acceler- C = ε0 εr A
d Bimetalic strip thermo- Gyroscopes in- The photoelectric
ation, strainguage, etc) couples: two dissimilar ertia navigation effect is a phe-
instruments, A seismic metals, joined together can be used to nomenon in which
mass is placed on an at one end, that produce construct gyro- photon energy (i.e.
elastic return blade a voltage (expressed in compasses, which from light) releases
equipped with two millivolts) with a change complement or electrons from their
or four piezoresistive in temperature. replace magnetic otherwise more
gauges in a Wheatstone compasses vehi- stable state on a
Bridge where the unit cles, to assist in surface where the
vibration of a mass stability disruption mea-
applied by a force sured called hall
proportional to acceler- effect with Loretz
ation & the piezoelectric force
element

Due to the fact that the controller is a digital computer, the following problems are introduced in a closed loop
control system: time delay associated with signal conversion and processing, sampling, quantization error due to finite
precision, and reconstruction of signals. While the switch is ON, the output voltage is

1 t
Z ¯
y(t) − y(t)
y(t) = i(τ )dτ where i(τ ) = (1)
C 1 R

Nevertheless, sensors/measurement instrument can either be designed for a discontinuous/continuous applications as


a system. Continuous applications require the process of signal conditioning: sampling, analogue to digital conver-
sion, filtering/manipulation and storing of data from single or multiple measurement instruments. Filtering involves
digital conversion, error verification and validation, real-time delay accommodation, time-space correlation, sampling
operation and specification.

2.3 Performance of Measurement


A measurement system must first be accurate, precise & repeatable before it can be reproducible. Repeatability
refers to a sensor’s ability to give identical outputs for the same input. Precision (or random) errors cause a lack of
repeatability Error is the difference between a measured value and the true input value. Two types of errors:

1. Bias (or systematic) errors and


2. Precision (or random) errors. Bias errors can be further subdivided into
(a) Calibration errors (a zero or null point error is a common type of bias error created by a nonzero output
value when the input is zero),
(b) Loading errors (adding the sensor to the measured system changes the system), errors due to sensor sensi-
tivity to variables other than the desired one (e.g., temperature effects on strain gages).

3
Saturation: All real actuators/instruments have some maximum output capability, regardless of the input. Deadband:
The dead band is typically a region of input close to zero at which the output remains zero. Once the input travels
outside the dead band, then the output varies with input. Engineering measurement signals are continuous: voltage
that varies over time; a chemical reaction rate that depends on temperature, etc. Analog-to-Digital Conversion (ADC)
and Digital-to-Analog Conversion (DAC) allow digital computers to interact with these signals. The output from the
sensor is conditioned (amplified, filtered, etc.). The conditioned analog signal is digitized using an analog-to-digital
converter (ADC). The digital information is acquired, processed and recorded by the computer. The computer may
then modify the system by outputting control signals. The digital control signals are converted to analog signals using
a digital-to-analog converter (DAC). The analog signals are conditioned (e.g. amplified and filtered) appropriately for
an actuator The actuator interacts with the system to give desired response

2.4 The Wheatstone Bridge Circuit

(a) (b)

Figure 2: (a) Wheatstone Bridge Circuit (b) Realtime step vs frequency Response

The Wheatstone bridge can be used in various ways to measure electrical resistance in all measurement system
circuit/sensor/transducer design construction:
ˆ For the determination of the absolute value of a resistance by comparison with a known resistance
ˆ For the determination of relative changes in resistance
The latter method is used with regard to strain gauge techniques. The four arms or branches of the bridge circuit are
formed by the resistances R1 to R4. The corner points 2 and 3 of the bridge designate the connections for the bridge
excitation voltage Vs. The bridge output voltage V0 , that is the measurement signal, is available on the corner points
1 and 4. as shown in Fig 2
Note: There is no generally accepted rule for the designation of the bridge components and connections. In existing
literature, there are all kinds of designations and this is reflected in the bridge equations. Therefore, it is essential that
the designations and indices used in the equations are considered along with their positions in the bridge networks in
order to avoid misinterpretation.
R1 R4
= (2)
R2 R3
where the bridge output voltage V0 is zero. With a preset strain, the resistance of the strain gauge changes by the
amount ∆R. This gives us the following equation:
 
R1 + ∆R1 R4 + ∆R4
VO = Vs −
R1 + ∆R1 + R2 + ∆R2 R3 + ∆R3 + R4 + ∆R4
For strain measurements, the resistances R1 and R2 must be equal in the Wheatstone bridge. The same applies
to R3 and R4 . With a few assumptions and simplifications, the following equation can be determined. the H to
Measurements using Strain Gauges;
 
Vo 1 ∆R1 ∆R2 ∆R3 ∆R4
= − + − (3)
Vs 4 R1 R2 R3 R4
In the last step of calculation, the term ∆R/R must be replaced by the following:
∆R
=k·ε
R
Here k is the k-factor of the strain gauge, ε is the strain. This gives us the following:
Vo k
= (ε1 − ε2 + ε3 − ε4 ) (4)
Vs 4

4
The next section discuss about mathematical modelling, that involves Laplace and Fourier transformation of real-time
sampling to space variable and signal manipulation. It should be accompanied by physical device circuit design along
with implication design. A dedicated standard device setup or unit responsible for sampling and measurement manip-
ulation is called Data Acquisition System or in short DAQ. The modernized version of DAQ is Supervisory
Control and Aata Acquisition or in short SCADA is a control system architecture comprising computers,
networked data communications and graphical user interfaces for high-level supervision of machines and processes

2.5 Review Questions


1. Define Mechatronics with an aid of neat sketch
2. Draw Wheatstone bridge circuit, write its mathematical model equations in strainguage construction and explain
its importance in measurement system
3. Define signal sampling
4. Compare SCADA against DAQ
5. Compare piezoelectric sensors with photoelectric sensors
6. Evaluate similarity and difference in working principles of LVDT, LDV and LVT
7. Describe an instrument or two working principle under hall effect. constract and explain bimetallic strrip
thermocouple

3 Control System, Actuating System and Mathematical Modeling


Control engineering or control systems engineering: is an engineering discipline that applies automatic control theory
to design systems with desired behaviors in control environments. The practice uses sensors and detectors to measure
the output performance of the process being controlled; these measurements are used to provide corrective feedback
helping to achieve the desired performance. Multi-disciplinary mainly: mechanical, hydraulic, and electrical in
nature, control systems engineering activities focus on implementation of control systems mainly derived by mathe-
matical modeling of a diverse range of systems. System – An interconnection of elements and devices for a desired
purpose. Process – The device, plant, or system under control.
The input and output relationship represents the cause-and-effect relationship of the process. In 19th Century James
Watt’s centrifugal governor see fig. 6 for the speed control of a steam engine. In 20th Century, Nyquist Plot or
Polar Plot of frequency responses of linear systems developed a method for analyzing the stability of controlled sys-
tems mainly for an open control systems displaying both amplitude and phase angle on a single plot, using frequency as
a parameter in the plot. Later, Root-locus method due to Evans was fully developed incorporating open loop control
of Nyquist along with the frequency response methods made it possible to design linear closed-loop control systems.
The Nyquist analysis involved transforming a time Response Analysis of Control Systems to an space s domain via
Laplace mathematical transformation or modelling grasping a characteristic solution of equation of the system in
space s domain correlating an output response to its corresponding input and ploting dominant amplitude and phase
angle polar coordinates. Root locus method examined characteristic equation in an s Laplace domain correlating the
coefficients to stability criteria without calculating the roots.

3.0.1 Mathematical models of Actuating Systems


The mathematical description of the dynamic characteristic of a system is similar for actuating systems, measurement
instruments and mechatronic systems. The first step in the analysis of dynamic system is to derive its mathematical
model. The transfer function of a linear time-invariant system is define to be the ratio of the Laplace transform (
transform for sampled data systems) of the output to the Laplace transform of the input (driving function), under
the assumption that all initial conditions are zero. Compact model form: If the original model is a higher order
differential equation, or a set of first order differential equations, the relation between the input variable and the
output variable can be described by one transfer function, which is a rational function of the Laplace space variable
s, without any time-derivatives. Representation of standard models: Transfer functions are often used to represent
standard models of controllers and signal filters. Simple to combine systems: For example, the transfer function for a
combined system which consists of two systems in a series combination, is just the product of the transfer functions
of each system. Simple to calculate time responses: The calculations will be made using the Laplace transform, and
the necessary mathematical operations are usually much simpler than solving differential equations. Simple to find
the frequency response: The frequency response is a function which expresses how sinusoid signals are transferred
through a dynamic system. Frequency response is an important tool in analysis and design of signal filters and
control systems. The frequency response can be found from the transfer function of the system. The category of
control systems is shown in Fig 3 For a controller with proportional control action, P, the relationship between

5
Table 3: Differential Modelling of Physical Systems

Electrical System

d 1
Elec.Inductuctance v21 = L i Elec. power/Energy E = · L21
dt 2
1 1 2
Electrical Resistance i = · v21 power P = ·v
R R 21

Mechanical System

1 d 1 T2
Rotational Spring · T Energy E = ·
ω21 =
k dt 2 k
d 1
Rotational mass T = J · ω2 Energy E = · J · ω2 2
dt 2
2
rotational damper T = b · ω21 power P = b · ω21
1 d 1 F2
Translation Spring v21 = · F Energy E = ·
k dt 2 k
d 1
Translational Mass F = M · v2 E = · M · v22
dt 2
2
translational damper F = b · v21 power P = b · v21

Hydraulic Systems

d 1
fluid inertia P21 = I · QEnergy E = · I · Q2
dt 2
d 1 2
fluid capacitance Q = Cf P21 Energy E = · Cf P21
dt 2
1 1 2
fluid resistance Q = · P21 power P = · P21
Rf Rf
d 1
thermal capacitanceq = Ct T2 Energy E = · Ct T2
dt 2
1 1
thermal resistance q = · T21 power P = · T21
Rt Rt

the output of the controller u(t) and the actuating error signal e(t) is linear. In a controller with integral control
action,PI, the value of the controller output u(t) is integrated/summed-up and changed at a rate proportional to
the actuating error signal e(t). Proportional-Plus-Derivative Control Action,, PD, the control action of a
proportional, and derivative controller. Lastly, Proportional-Plus-Integral-Plus-Derivative Control Action,
PID, the combination of proportional control action, integral control action, and derivative control action is termed
proportional-plus-integral-plus-derivative control action. It has the advantages of each of the three individual control
actions. The typical model equation for general control system follows, emphtransfer function, formulation of a linear,
time-invariant, differential equation system is defined as the ratio of the Laplace transform of the output (response
function) to the Laplace transform of the input (driving function) under the assumption that all initial conditions are
zero.
Consider the linear time-invariant system defined by the following differential equation 5
(n−1)
a0 (n) y + a1 y + · · · + an−1 ẏ + an y
(5)
= b0 (m) x + b1 x + · · · + bm−1 ẋ + bm x (n ≥ m)
Where y is the output of the system and x is the input. The transfer function of this system is the ratio of the Laplace
transformed output to the Laplace transformed input when all initial conditions are zero, or with with common s
space domain that enables correlation as shown in eq. 6.

L[ output ]
Transfer function = G(s) =
L[ input ] zero initial conditions
(6)
Y (s) b0 sm + b1 sm−1 + · · · + bm−1 s + bm
= =
X(s) a0 sn + a1 sn−1 + · · · + an−1 s + an

6
Practical mechatronic/control systems are an integration of all system components. See Fig 6, 4 1. [4], [1], [5], [6],
[7]. There is no isolated electrical, mechanical or hydraulic actuating system model but the practical relevance of
synergistic or an integrated system demands individual and integrated system model of either open loop (system
response without feedback) or closed loop control systems (system response with feedback).

(a)

(b)

Figure 3: (a) Comparison of Open and Closed Loop Controller (b) components of closed loop controller

Table 4: Comparison mathematical model of simple translational mechanical vs PID control systems

mechanical PID Electronic


Description: mass, damping and spring Description: Constants of (proportional, integral and
derivative)

      
ẋ1 0 1 x1 0 Kp Rt
= k b + 1 u u(t) = Kp e(t) + e(t)dt + Kp Td de(t)
ẋ2 −m −m x2 m
Ti 0 dt

↑→ time-series model timeseries model ↑


 −1  b

s −1 1 s+ m 1 U (s)

1

k b = s2 + b s+ k k E(s) = K p 1 + Ti s + Td s Transfer Func.
m s+ m m m −m s

↑→ time invariant space domain


 model
b
 
  1 s+ m 1 0
G(s) = 1 0 k 1
b
s2 + m s+ mk −m s m
1
= 2
ms + bs + k

↑→ Transfer Function

Individual components and physical phenomena inside them needs to be modelled following their corresponding
governing principles (governing mathematical laws) and integrated in space domain via transfer function in common
time invariant space s variable. kircholf’s law for exaple governs electrical circuit while newton’s second law governs
solid motion along with newton’s modified or navier-stokes equations or bernoulli governs fluid depending on param-
eter under consideration. It should be noted that as you can see in the figure 4, mechanical system can also have
varieties of components for which table 3

7
(a)

(b)

Figure 4: Schematic of Synergistic Mathematical Model of Actuation Control Systems (a)Mechanical (b) Hydraulic

3.1 Semiconductors and Motor Controllers/Actuators


Most mechatronic systems have motor actuators as shown in figure 5 (a). The stationary outer housing, called the
stator, supports radial magnetized poles. These poles consist of either permanent magnets or wire coils, called field
coils, wrapped around laminated iron cores. The purpose of the stator poles is to provide radial magnetic fields.
There is a small air gap between the rotor and the stator where the magnetic fields interact. AC motors: run with
alternating source input, the synchronous motors/no slip where rotor speed matches synchronous speed in the
stator are more efficient AC type have wound rotor whereas induction motors have permanent with less rotor speed.
The brushed DC motors have coils in their center rotating around permanent magnets while brushless DC motors have
permanent magnet in the center that rotate around the coils. The brushless motors offer a better power-to-weight and

8
(a)

(b)

Figure 5: (a) Types of Motor Actuators (b) Types of Electronics

torque-to-weight ratio than brushed motors. Apart from these general common construction, there are many other
types of motor precise electronic constructions such as: stepper motor a brushless DC servo motor that divides a
full rotation into a number of equal discrete steps, linear motor: servo type with its stator and rotor ”unrolled”
producing linear force, etc.
An electronic circuit is composed of various types of components. Some of these components are termed as active
components because they take part in the transformation of the energy while other components, which only dissipate
or store energy, are called as passive elements. The vacuum tubes, rectifier, transistors are some of-the common ac-
tive while the resistances, which dissipate the power and energy storing elements such as capacitances and inductances
are known as passive elements. The transformers may be regarded as a matching device. The success of any electronic
circuit depends not only on proper selection of the active elements but on the passive and matching elements too. The
proper function, of an active device is decided by the proper values of these passive elements. Hence the selection of
these elements such as resistances, inductances, capacitance, and transformers not only require the proper attention,
but also decide the proper function of the active devices as well as the circuit as a whole.

3.2 Mechatronic System Review


The control-theoretic view of a sensor is that it provides the exact value y(t) of a process variable. Sometimes – to
provide a degree of realism – white noise is added and it is left to a Kalman filter or observer in the control algorithm

9
to estimate the underlying state. In industry there is much more emphasis on measurement technology, for without
good sensing, good control is impossible. For process applications, analogue 4/20 mA transmitters were developed for
communicating measurements to a remote direct digital control (DDC) computer (see Figure 1b). Such a transmitter
has several advantages: the use of current loops allows for long cable runs without significant interference,transmitters
can be powered down the wires from the control room, and the standard enables the interworking of transmitters from
different vendors.
Classic example of automation is the watt governor where a closed loop cylinder position control system with mechan-
ical feedback used in the actuation of the main valve to widen or lessen the injection opening in accordance with the
requirements of driving conditions based on speed/centrifugal force measurements feedbacks of the flyballs: Flyballs
move outer with higher centrifugal force/speed demand rising lever by the push of lever arms increases fuel injection
and vice-versa Typical example is shown in the Figure a temperature control system that can be used to heat a room

(a) (b)

Figure 6: (a) Watt-Governor (b) Electronic Furnace Control

or oven. The heat is generated by the electric heater. Heat is lost to the outside through the walls. A thermometer is
used to measure the temperature. An analog controller has the desired temperature setting. Based on the difference
between the set and measured temperature, the op-amp turns ON or OFF the relay which turns the heater ON/OFF.
In order to make sure the relay does not turn ON and OFF due to small variations around the set temperature, the
op-amp would normally have a hysteresis functionality implemented on its circuit.
The question of actuator sizing is a question of determining the following requirements for an axis underworst operat-
ing conditions (i.e., largest expected inertia and resistive load), For example, for the mechanical system, the following
considerations taken:
1. maximum torque (also called peak torque) required, Tmax ,

2. rated (continuous or root mean squared, RMS) torque required, Tr ,


3. maximum speed required, θmax ,
4. positioning accuracy required, ∆θ,

5. gear mechanism parameters: gear ratio, its inertial and resistive load (force/torque), stiffness, backlash charac-
teristics.
Once the torque requirements are determined, then the amplifier current and power supply requirements are directly
determined from them.

3.3 Mechatronic Design Process


Earlier designs involved separate designs of components and integration of mechatronic systems. Now a days, the trend
in industrial practice is that the embedded control software development part of modern mechatronics engineering is
done involving three phases as shown in the figure 1.

1. Phase 1: Control software development and simulation in non-real-time environment.


2. Phase 2: Hardware in-the-loop (HIL) simulation and testing in real-time environment.
3. Phase 3: Testing and validation on actual machine.

10
In phase 1, the control software is developed by using graphical software tools, such as Simulink® and Stateflow,
simulated and analyzed on a non-real-time computer environment (Figure 1.29). The “plant model,” which is the
computer model of the machine to be controlled, is a non-real-time detailed dynamic model. Simulations and analysis
are done in this non-real-time environment. In phase 2, the “same control software” is tested on a target embedded
control module (ECM). That “same control software” is a C-code which is auto-generated from the graphical diagrams
of Simulink® and Stateflow using auto-code generation tools such as Simulink® Coder, Embedded Coder, and
MATLAB® Coder. The last phase involve physical experiment.

3.4 Review Questions


1. List down types of mechanical actuating system. Enumerate components of hydraulic actuating systems
2. Write steps involved in mechatronic design process
3. Write real-time, time-invariant and transfer function mathematical model of electrical, mechanical and hydraulic
control systems

4. Write characteristics and importance of passive electronic components and compare them with an active electi-
cal/electronic components.
5. Define Servo Motors, synchronous motors and brushless motors.
6. What is the function of a microprocessor in a system?

7. Why is the data bus in 8085 bidirectional?


8. How does microprocessor differentiate between data and instruction? Distinguish between microcontroller and
microprocessor
9. How long would the processor take to execute the instruction LDA 1753H if the T-state duration is 2µs?

10. Draw the timing diagram of the instruction LDAX B.


11. Sketch and explain the various pins of the 8085.
12. Explain direct addressing mode of 8085 with an example?

4 Micro-controllers and microprocessors


The digital computer is the brain of a mechatronic system. As such, it is called the controller when used for the
control function of an electro-mechanical system. Any computer with proper I/O interface devices (digital and analog
I/O) and software tools can be used as a controller. Microprocessor contains ALU, General purpose registers, stack
pointer, program counter, clock, timing circuit, interrupt circuit with more instructions input, less number of pins and
multifunctional flexible tasks with fewer bit handling. Whereas microcontroller contains the circuitry of microprocessor,
and in addition it has built in ROM, RAM, I/O Devices, Timers/Counters etc having fewer specialized tasks with
more bit handling in contrast to microprocessor, require less additional devices. Embedded computers are generally
used in real-time applications. Therefore, they have hard real-time requirements. Hard real-time requirement means
that certain tasks must be completed within a certain amount of time, or the computer must react to an external
event within a certain time. Otherwise the consequences may be very serious. The consequences of not meeting the
real-time response requirements in a desktop application are not as serious. Embedded computers are not general
purpose computing machines, but have more specialized architectures and resources. Memory resources in a desktop
PC are very large and conserving memory is not a concern for the programmer. Whereas memory resources in
microcontrollers are limited and memory space should be used carefully in order to not exceed that available. In
real-time programming, depending on the microcontroller/DSP type and the development environment we use, the
development environment at the compilation and link time may allow us to decide how to utilize the available memory
for variables and constants, in order to best fit the application program into the available memory. The components
of a development setup for a microcontroller-based control system: PC as host development environment including
the development software tools for the microcontroller, communication cable, microcontroller board, breadboard, test
and measurement tools, and electronic components supply kit.

4.1 BASIC COMPUTER MODEL and Analogy


Notice the following characteristics in a computer program: normally the program instructions are executed sequen-
tially, the order of execution can be changed using the conditional statements, the CPU, clock, ROM, RAM and
accumulators, and I/O are the key components of a basic computer operation. Microprocessor communicates and

11
(a)

(b) (c)

Figure 7: (a) an 8051 µP Architecture & Components (b) bus (c)µcontrollers vs µprocessors

Table 5: Basic Analogy of Computer Model

Brain CPU
wall clock clock
deck of instruction cards read only memory (ROM)
chalk-eraser-black-board random access memory (RAM)
pocket cards accumulators (also called registers)
input-output tray I/O devices
eyes, hands and arms bus to access resources (read/write)

operates in binary numbers 0 and 1. A typical microprocessor consists of arithmetic and logic unit (ALU) in associa-
tion with control unit to process the instruction execution. Almost all the microprocessors are based on the principle
of store-program concept. In store-program concept, programs or instructions are sequentially stored in the memory
locations that are to be executed. To do any task using a microprocessor, it is to be programmed by the user. The
semiconductor manufacturing technologies used for chips are:
1. Transistor-Transistor Logic (TTL)
2. Emitter Coupled Logic (ECL)
3. Complementary Metal-Oxide Semiconductor (CMOS)
Microprocessors: classified based on their specification, application and architecture microprocessors are classified.
Based on size of data bus:
1. 4-bit microprocessor
2. 8-bit microprocessor
3. 16-bit microprocessor
4. 32-bit microprocessor
Based on application:
1. General-purpose microprocessor- used in general computer system and can be used by programmer for any
application. Examples, 8085 to Intel Pentium.

12
2. Microcontroller- microprocessor with built-in memory and ports and can be programmed for any generic control
application. Example, 8051.
3. Special-purpose processors- designed to handle special functions required for an application. Examples, digital
signal processors and application-specific integrated circuit (ASIC) chips.

Components of microprocessor shown in Fig 7


1. Buses: wires/lines interconnecting various component blocks of µcontroller or µprocessor.
2. Arithmetic Logical Unit: The ALU performs the actual numerical and logical operations such as Addition
(ADD),Subtraction (SUB), AND, OR

3. Register (00h to 1Fh ASCII symbols/ R0 through R7 pins): Typical 8085 microprocessor includes six general
purpose registers to store an 8-bit data, one accumulator and one flag register. In addition, it has two 16-bit
registers: stack pointer and program counter. The programmer can use these registers to store or copy data into
the register by using data copy instructions.

4. Accumulator: Slower & cheaper version of RAM: The accumulator is an 8-bit register that is a part of ALU. This
register is used to store 8-bit data and to perform arithmetic and logical operations. The result of an operation
is stored in the accumulator.
5. Flag Register: The ALU includes five flip-flops, which are set or reset after an operation according to data
condition of the result in the accumulator and other registers. They are called Zero (Z), Carry (CY), Sign (S),
Parity (P) and Auxiliary Carry (AC) flags. The microprocessor uses these flags to test data conditions.

6. Counter: This 16-bit register deals with sequencing the execution of instructions. This register is a memory
pointer. The microprocessor uses this register to sequence the execution of the instructions. The function of the
program counter is to point to the memory address from which the next byte is to be fetched. When a byte is
being fetched, the program counter is automatically incremented by one to point to the next memory location

7. The stack pointer: is also a 16-bit register, used as a memory pointer. It points to a memory location in R/W
memory, called stack. The beginning of the stack is defined by loading 16- bit address in the stack pointer
8. Instruction Register/Decoder: It is an 8-bit register that temporarily stores the current instruction of a program.
Latest instruction sent here from memory prior to execution. Decoder then takes instruction and decodes or
interprets the instruction. Decoded instruction then passed to next stage.

9. Control Unit: Generates signals on data bus, address bus and control bus within microprocessor to carry out
the instruction, which has been decoded.

4.2 Review Questions


1. Compare the components of microcontroller against microprocessor with block diagrams and briefly describe
their difference
2. Describe the function and characteristics of counter; compare it with register and bus
3. compare control unit with ALU

4. Write classifications of microprocessors based on their specifications and raw materials they are made from.

5 Sensor Communication Design


Asynchronous transmission implies that both the transmitter and receiver computers are not synchronized, each
having their own independent clock signals. The time between transmitted characters is arbitrary clocks. While syn-
chronous transmission there is no need for start and stop bits since the transmitter and receiver have a common
clock signal and thus characters automatically start and stop always at the same time in each cycle.
Parallel data transmission Within computers, data transmission is usually by parallel data paths. Parallel data
buses transmit 8, 16 or 32 bits simultaneously, having a separate bus wire for each data bit and the control signals.
Thus, if there are eight data bits to be transmitted, e.g. 11000111, then eight data wires are needed.
Serial data transmission such as RS-232, The 20 mA current loop, I2C bus, CAN bus, USB, Fire-wire
: involves the transmission of data which, together with control signals, is sent bit by bit in sequence along a single
line. Only two conductors are needed, to transmit data and to receive data. Since the bits of a word are transmitted
sequentially and not simultaneously, the data transfer rate is considerably less than with parallel data transmission
such as General Purpose Instrument Bus; (GPIB), XT computer bus, AT bus, also referred to as the industry stan-
dard architecture (ISA) bus, The extended industry standard architecture (EISA) bus, General Purpose Instrument

13
Bus (GPIB)
For the parallel interface to a printer the Centronics parallel interface is commonly used. However, with instrumen-
tation the most commonly used parallel interface in communications is the General Purpose Instrument Bus (GPIB),
the IEEE 488 standard, [8] originally developed by Hewlett Packard to link its computers and instruments and thus
often referred to as the Hewlett Packard Instrumentation Bus. Each of the devices connected to the bus is termed a
listener, talker or controller. Listeners are devices that accept data from the bus, talkers place data, on request, on
the bus and controllers manage the flow of data on the bus by sending commands to talkers and listeners and carry
out polls to see which devices are active..
An external bus is a set of signal lines that interconnects microprocessors, microcontrollers, computers and pro-
grammable logic controllers (PLCs) and also connects them with peripheral equipment (i.e. Sensors & Actuators).
Thus a computer needs to have a bus connecting it with a printer if its output is to be directed to the printer and
printed. Multiprocessor systems are quite common. For example, in a car there are likely to be several microcon-
trollers with each controlling a different part of the system, e.g. engine management, braking and instrument panel,
and communication between them is necessary
Centralized computer control involves the use of one central computer to control an entire plant. This has the
problem that failure of the computer results in the loss of control of the entire plant. This can be avoided by the use
of dual computer systems. If one computer fails, the other one takes over. Such centralized systems were common in
the 1960s and 1970s. The development of the microprocessor and the ever reducing costs of computers have led to
multi-computer systems becoming more common and the development of hierarchical and distributed systems. [1].
With the hierarchical system, there is a hierarchy of computers according to the tasks they carry out. The comput-
ers handling the more routine tasks are supervised by computers which have a greater decision-making role. With the
distributed system, each computer system carries out essentially similar tasks to all the other computer systems.
In the event of a failure of one, or overloading of a particular computer, work can be transferred to other computers.
Serial data transmission occurs in one of three modes.
Simplex mode: Transmission is only possible in one direction, from device A to device B, where device B is not
capable of transmitting back to device A. This method is usually only used for transmission to devices such as printers
which never transmit information.
Half-duplex mode:Data is transmitted in one direction at a time but the direction can be changed. Terminals at each
end of the link can be switched from transmit to receive. Citizens Band (CB) radio is an example of half-duplex
mode; a person can receive or talk but not do both simultaneously.
Full-duplex mode: Data may be transmitted simultaneously in both directions between devices A and B. This is
like a two-lane highway in which traffic can occur in both directions simultaneously. The telephone system is an
example of full-duplex mode in that a person can talk and receive at the same time.

5.1 Networks
The term network is used for a system which allows two or more computers/ microprocessors to be linked for the
interchange of data. The logical form of the links is known as the network topology. The term node is used for a point
in a network where one or more communication lines terminate or a unit is connected to the communication lines.
The following are commonly used forms. Data Bus : This has a linear bus into which all the stations are plugged.
This system is often used for multipoint terminal clusters. It is generally the preferred method for distances between
nodes of more than 100m.
Star : This has dedicated channels between each station and a central switching hub through which all communications
must pass. This is the type of network used in the telephone systems (private branch exchanges (PBXs)) in
many companies, all the lines passing through a central exchange. This system is also often used to connect remote
and local terminals to a central mainframe computer. There is a major problem with this system in that if the central
hub fails then the entire system fails.
Hierarchy or tree : This consists of a series of branches converging indirectly to a point at the head of the tree.
With this system there is only one transmission path between any two stations. This arrangement may be formed from
a number of linked data bus systems. Like the bus method, it is often used for distances between nodes of more than
100m.
Ring: This is a very popular method for local area networks, involving each station being connected to a ring. The
distances between nodes are generally less than 100 m. Data put into the ring system continues to circulate round the
ring until some system removes it. The data is available to all the stations.
Mesh : This method has no formal pattern to the connections between stations and there will be multiple data
paths between them.
Local area network (LAN): used for a network over a local geographic area such as a building or a group of
buildings on one site. The topology is commonly bus, star or ring.
A wide area network (WAN): one that interconnects computers, terminals and local area networks over a
national or international level.

14
5.2 Sensor Communication
Sensor communication primarily concerned with local area networks. Network access control:Access control meth-
ods are necessary with a network to ensure that only one user of the network is able to transmit at any one time. The
following are methods used. With ring-based local area networks, two commonly used methods are:

ˆ Token passing : With this method a token, a special bit pattern, is circulated. When a station wishes to
transmit it waits until it receives the token, then transmits the data with the token attached to its end. Another
station wishing to transmit removes the token from the package of data and transmits its own data with the
token attached to its end.

ˆ Slot passing : This method involves empty slots being circulated. When a station wishes to transmit data it
deposits it in the first empty slot that comes along.
With bus or tree networks a method that is often used is:
ˆ Carrier sense multiple access with collision detection (CSMA/CD) : This method is generally identified
with the Ethernet LAN bus. With the CSMA/CD method, stations have to listen for other transmissions before
transmitting, with any station being able to gain control of the network and transmit, hence the term multiple
access. If no activity is detected then transmission can occur. If there is activity then the system has to wait
until it can detect no further activity.
ˆ Broadband and baseband: used for a network in which information is modulated onto a radio frequency carrier
which passes through the transmission medium such as a coaxial cable. Typically the topology of broadband local
area networks is a bus with branches. Broadband transmission allows a number of modulated radio frequency
carriers to be simultaneously transmitted and so offers a multichannel capability.
ˆ baseband transmission is used when digital information is passed directly through the transmission medium.
Baseband transmission networks can only support one information signal at a time.

. A LAN may be either baseband or broadband.

5.2.1 Protocol
Protocol used by the interface/component between a computer and the network to control the transfer of the data
into the network or from the network into the computer. A protocol is a formal set of rules governing data format,
timing, sequencing, access control and error control. The three elements of a protocol are:
1. Syntax, which defines data format, coding and signal levels;

2. Semantics, which deals with synchronization, control and error handling;


3. Timing, which deals with the sequencing of data and the choice of data rate.
When a sender communicates with a receiver then both must employ the same protocol, e.g. two microcontrollers
with data to be serially transmitted between them. With simplex communication the data block can be just sent from
sender to receiver. However, with half-duplex, each block of transmitted data, if valid, must be acknowledged (ACK)
by the receiver before the next block of data can be sent ; if invalid a NAK, negative acknowledgement, signal is sent.
Thus a continuous stream of data cannot be transmitted. The CRC bits, cyclic redundancy check bits, are a
means of error detection and are transmitted immediately after a block of data. The data is transmitted as a binary
number and at the transmitter the data is divided by a number and the remainder is used as the cyclic check code.
At the receiver the incoming data, including the CRC, is divided by the same number and will give zero remainder if
the signal is error-free. With full-duplex mode (Figure (b)), data can be continuously sent and received.
Open Systems Interconnection (OSI)Model: Communication protocols have to exist on a number of levels. The
International Organization for Standardization (ISO) has defined a seven-layer standard protocol system known as
the Open Systems Interconnection (OSI) model. The model is a framework for developing a coordinated system of
standards.

1. Physical layer : This layer describes the means for bit transmission to and from physical components of the
network. It deals with hardware issues, e.g. the types of cable and connectors to be used, synchronizing data
transfer and signal levels. Commonly used LAN systems defined at the physical layer are Ethernet and token
ring.
2. Data link layer : This layer defines the protocols for sending and receiving messages, error detection and correction
and the proper sequencing of transmitted data. It is concerned with packaging data into packets and placing
them on the cable and then taking them off the cable at the receiving end. Ethernet and token ring are also
defined at this level.

15
3. Network layer : This deals with communication paths and the addressing, routing and control of messages on
the network and thus making certain that the messages get to the right destinations. Commonly used network
layer protocols are Internet Protocol (IP) and Novell’s Internetwork Packet Exchange (IPX).
4. Transport layer : This provides for reliable end-to-end message transport. It is concerned with establishing and
maintaining the connection between transmitter and receiver. Commonly used transport layer protocols are
Internet Transmission Control Protocol (TCP) and Novell’s Sequenced Packet Exchange (SPX).
5. Session layer : This layer is concerned with the establishment of dialogues between application processes which
are connected together by the network. It is responsible for determining when to turn a communication between
two stations on or off.
6. Presentation layer : This layer is concerned with allowing the encoded data transmitted to be presented in a
suitable form for user manipulation.
7. Application layer : This layer provides the actual user information processing function and application-specific
services. It provides such functions as file transfer or electronic mail which a station can use to communicate
with other systems on the network.

5.2.2 General Purpose Instrument Bus Hardware


RS-232: The most popular serial interface is RS-232; this was first defined by the American Electronic Industries
Association (EIA) in 1962. The standard relates to data terminal equipment (DTE) and data circuit-terminating
equipment (DCE). Data terminal equipment can send or receive data via the interface, e.g. a microcontroller. Data
circuit-terminating equipment is devices which facilitate communication; a typical example is a modem. This forms an
essential link between a microcomputer and a conventional analogue telephone line. RS-232 Connections: Minimum
configuration , and PC Connection
The 20 mA current loop Another technique, based on RS-232 but not part of the standard, is the 20 mA current
loop (see the figure). This uses a current signal rather than a voltage signal. A pair of separate wires is used for
the transmission and the receiver loops with a current level of 20 mA used to indicate a logic 1 and 0 mA a logic 0.
Such current signals enable a far greater distance, a few kilometers, between transmitter and receiver than with the
standard RS-232 voltage connections.
I2C bus The Inter-IC Communication bus, referred to as the I2C bus, is a serial data bus designed by Philips for use
for communications between integrated circuits or modules. The bus allows data and instructions to be exchanged
between devices by means of just two wires. This results in a considerable simplification of circuits. The two lines
are a bidirectional data line (SDA) and a clock line (SCL). Both lines are connected to the positive power supply via
resistors (see the above figure). The device generating the message is the transmitter and the device receiving the
message the receiver. The device that controls the bus operation is the master and the devices which are controlled
by the master are the slaves. A modern automobile may have as many as seventy electronic control units (ECUs) for
various subsystems, e.g. engine management systems, anti-lock brakes, traction control, active suspension, airbags,
cruise control, windows, etc.

5.3 Digital Logic


Digital logic is the underlying logic system that drives electronic circuit board design. Digital logic is the manipulation
of binary values through printed circuit board technology that uses circuits and logic gates to construct the implemen-
tation of computer operations. Digital logic is the underlying logic system that drives electronic circuit board design.
Digital logic is the manipulation of binary values through printed circuit board technology that uses circuits and logic
gates to construct the implementation of computer operations.
Examlpe An 8-bit R-2R DAQ has a Vr ef of 10 V. The binary input is 10011011. Find the analog output voltage.
Solution An 8 bit DAQ has maximum capacity of M = 2N , 28 = 256

10011011
= 1 × 27 + 0 × 26 + 0 × 25 + 1 × 24 + 1 × 23
+ 0 × 22 + 1 × 21 + 1 × 20
= 128 + 0 + 0 + 16 + 8 + 0 + 2 + 1
= 155
we can calculate the analog output voltage:
input × Vref 155 × 10 V
Vout = = = 6.05 V
256 256
6.05 V is the voltage we would expect on the analog output pin.
Similarly Binary number system has two symbols: 0 and 1, called bits. It is also a positional notation, for example,
10110B = 10000B + 0000B + 100B + 10B + 0B = 124 + 023 + 122 + 121 + 020

16
Hexadecimal number system uses 16 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F, called hex digits. It is
a positional notation, for example,

A3EH = A00H + 30H + EH = 10162 + 3161 + 14160

Starting from the right-most bit (least-significant bit), replace each group of 4 bits by the equivalent hex digit (pad
the left-most bits with zero if necessary), for examples,

1001001010B = 001001001010B = 24AH

10001011001011B = 0010001011001011B = 22CBH


Conversion from Base r to Decimal (Base 10):Given a n-digit base r number: dn − 1dn − 2dn − 3...d2d1d0(baser), the
decimal equivalent is given by:

dn − 1rn − 1 + dn − 2rn − 2 + ... + d1r1 + d0r0

For examples,
A1C2H = 10163 + 1162 + 12161 + 2 = 41410 (base 10)
10110B = 124 + 122 + 121 = 22 (base 10)
Conversion from Decimal (Base 10) to Base r: Use repeated division/remainder. For example, To convert 261(base
10) to hexadecimal:
261/16 => quotient = 16 remainder = 5
16/16 => quotient = 1 remainder = 0
1/16 => quotient = 0 remainder = 1 (quotient = 0 stop)
Hence, 261D = 105H (Collect the hex digits from the remainder in reverse order) The above procedure is actually
applicable to conversion between any 2 base systems. For example, To convert 1023(base 4) to base 3:

1023(base4)/3 => quotient = 25D remainder = 0

25D/3 => quotient = 8D remainder = 1


8D/3 => quotient = 2D remainder = 2
2D/3 => quotient = 0 remainder = 2(quotient = 0stop)
Hence, 1023(base4) = 2210(base3) Decimal to Binary
Convert 18.6875D to binary: Integral Part, 18D

18/2 => quotient = 9 remainder = 0

9/2 => quotient = 4 remainder = 1


4/2 => quotient = 2 remainder = 0
2/2 => quotient = 1 remainder = 0
1/2 => quotient = 0 remainder = 1 (quotient = 0 stop)
Hence, 18D = 10010B Fractional Part, 0.6875D

.6875 ∗ 2 = 1.375 => whole number is 1

.375 ∗ 2 = 0.75 => whole number is 0


.75 ∗ 2 = 1.5 => whole number is 1
.5 ∗ 2 = 1.0 => whole number is 1
Hence .6875D = .1011B Combine, 18.6875D = 10010.1011B The IEEE-754 32-bit Single-Precision Floating-Point
Numbers, suppose that the 32-bit pattern is 1 1000 0001 011 0000 0000 0000 0000 0000, with:S = 1 sign signature for
negative,E = 10000001 exponent signature, F = 01100000000000000000000 signature for mantissa or fraction.

5.3.1 Bivalent Axiomatic Set Theory/Logic Gates


Most of mathematics (especially Axiomatic Set Theory and Number Theory) uses a bivalent logic in Fig 8, in which
statements are either true or false. Electronic computers employ logic gates for the most primitive computations,
taking 0 as false and 1 as true. An infinite number of gates are possible; here are six of the most common.

17
Figure 8: Bivalent logic gates

6 Assembly Language and PLC


Microcontrollers pin addresses and associated logic, jump, branching, data transfer etc instructions can be read in
referece [7] or manufacturer catalogue and set of instructions are standard. An 8051 has about 111 instructions that
can be grouped into the following categories
1. Arithmetic Instructions
2. Logical Instructions
3. Data Transfer instructions

4. Boolean Variable Instructions and


5. Program Branching Instructions
Mnemonics are an assembly language uses a mnemonic to represent, e.g., each low-level machine instruction or
opcode, each directive, typically also each architectural register, flag etc. An assembly language is a type of
low-level programming language that is intended to communicate directly with a computer’s hardware, for example
8051 components. The following table 7 shows Simple Programs in 8051 Assembly Language [9]. The heading row

Table 6: 8051 Instructions

Data Transfer Artithmetic Logical Boolean Program Branching


MOV,MOVC,MOVX ADD,ADDC,SUBB ANL,ORL,XRL CLR,SETB, MOV LJMP,AJMP,SJMP
PUSH,POP,XCH INC, DEC,MUL CLR,CPL,RL JC,JNC,JB JZ,JNZ,CJNE,JNB
XCHD DIV,DA A RLC ,RR, RRC JNB,JBC,ANL, DJNZ,NOP LCALL, ACALL,
SWAP ORL, CPL RET,RETI,JMP

18
column headers are tasks to be accomplished and the subsequent codes in each column are step by stem instructions
for an 8081 microcontroller. Higher level computer languages/instruction syntaxes/you name it with much enhanced

Table 7: Simple Programs in 8051 Assembly Language

Address: exchange the Arithmetic: exchange the treat r6−r7 and r4−r5 as divide the content of r0
content of FFh and FF00h content of FFh and FF00h two 16 bit registers. Per- by r1. Store the result
form subtraction between in r2 (answer) and r3 (re-
them. Store the result in minder). Then restore the
20h (lower byte) and 21h original content of r0
(higher byte).
Mov dptr,# 0FF00h Mov a, r7→ get the con- Clr c →clear carry Mov a, r0 →get the con-
→take the address in tent in acc, tent of r0 and r1
dptr,
Movx a, dptr→get the Anl a, # 0F0h→mask Mov a, r4→ get first lower Mov b, r1→ in register A
content of 0050h in a lower bit byte and B
Mov r0, 0FFh → save the Mov r6, a→send it to r6 Subb a, r6 ; subtract it Div ab→ divide A by B
content of 50h in r0, with other
Mov 0FFh, a → move a to Swap a → xchange upper Mov 20h, a ; store the re- Mov r2, a → store result
50h and lower nibbles of acc sult in r2
Mov a, r0→ get content of Orl a, r6→ OR operation Mov a, r5→ get the first Mov r3, b→ and reminder
50h in a higher byte in r3
Movx @dptr, a ; move it Mov r6, a→finally load Subb a, r7→subtract from Mov b, r1→again get con-
to 0050h content in r6 other tent of r1 in B
Mov 21h, a→ store the Mul ab→ multiply it by
higher byte answer
Add a, r3→ add reminder
in new answer
Mov r0, a→ finally restore
the content of r0

performance such as PLC, simulink should be learnt along with these sets at this level so that those instructions can
easily be understood and designed.
Various comercial microcontroller board designs printings in recent mechatronic developments such as internet of
things include Aurduino Uno, Red Board, Arduino mini etc working under standard 5v input except pro with 3.3v,
16 MHz clock speed, 6 analogue inputs, 14 digital i/o, 6 pulse pulse width modulation, and 1 universal asynchronous
receiver/transmitter either Universal Serial Bus/USB or future technology device international/FTDI standard port
configurations or Programming Interface.
Arduino is an open-source hardware and software company, project, and user community that designs and manufactures
single-board microcontrollers and microcontroller kits. An IoT platform is a multi-layer technology that enables
straightforward provisioning, management, and automation of connected devices within the Internet of Things universe.
It basically connects your hardware, however diverse, to the cloud by using flexible connectivity options, enterprise-
grade security mechanisms, and broad data processing powers. For developers, an IoT platform provides a set of
ready-to-use features that greatly speed up development of applications for connected devices as well as take care of
scalability and cross-device compatibility.

6.1 Ladder Logic, Functional Block Diagram, Structured Text, Instruction List and
Sequential Functional Chart
There are four basic steps in the operation of all PLCs; Input Scan, Program Scan, Output Scan, and Housekeeping.
These steps continually take place in a repeating loop. Four Steps In The PLC Operations
1. Input Scan: Detects the state of all input devices that are connected to the PLC
2. Program Scan:Executes the user created program logic
3. Output Scan: Energizes or de-energize all output devices that are connected to the PLC.
4. Housekeeping: This step includes communications with programming terminals, internal diagnostics, etc...
Ladder Diagram (LD) Traditional ladder logic shown in the Figure 9 is graphical programming language. Initially
programmed with simple contacts that simulated the opening and closing of relays, Ladder Logic programming has
been expanded to include such functions as counters, timers, shift registers, and math operations. Structured Text
(ST) – A high level text language that encourages structured programming. It has a language structure (syntax)
that strongly resembles PASCAL and supports a wide range of standard functions and operators. For example; the

19
Figure 9: Ladder Logic Program/Diagram of Pump Motor Control

equivalent program of ST for the Figure 9


If Speed1 > 100.0 then
FlowRate : = 50.0 + OffsetA 1;
Else
FlowRate : = 100.0; Steam: ŌN
EndIf ;
Instruction List (IL): A low level “assembler like” language that is based on similar instructions list languages found
in a wide range of today’s PLCs. The equivalent for the Figure 9 is:
LD R1
MPC RESET
LD P RESS1
ST M AXP RESS
RESET: LD 0
ST AX 43 Sequential Function Chart (SFC) A method of programming complex control systems at a more highly

(a) (b)

Figure 10: (a) Sequential Function Chart (SFC) of the pump (b)Function Block Diagram (FBD)

structured level. A SFC program is an overview of the control system, in which the basic building blocks are entire
program files. Each program file is created using one of the other types of programming languages. The SFC approach
coordinates large, complicated programming tasks into smaller, more manageable tasks. The equivalent SFC for Figure
9 is shown in FIGURE 10 (a)
Function Block Diagram (FBD) - A graphical language for depicting signal and data flows through re-usable function
blocks. FBD is very useful for expressing the interconnection of control system algorithms and logic. The equivalent
FBD for Figure 9 is shown in FIGURE 10(b)

6.2 Review Questions


1. What are characteristics of LAN, open area system interconnections and broadband? write advantages and
drawbacks of each.
2. Define FTDI and USB
3. What are syntax, semantics and timing protocols
4. Describe token passing and slot passing
5. Write an assembly language programming to find out how many equal bytes between two memory blocks 10h to
20h and 20h to 30h.
6. Write an assembly language programming for given block of 100h to 200h. Find out how many bytes from this
block are greater then the number in r2 and less then number in r3. Store the count in r4.

20
7. Determine truth table for S-R flip-flop based on NOR gate shown in the figure below

8. determine 32 bit single precision floating point signature number representation of 1.735.
9. Write an assembly language programming for the crystal frequency is given as 12 MHz. Make a subroutine that
will generate delay of exact 1 ms. Use this delay to generate square wave of 50 Hz on pin P2.0

7 Miscellaneous & Objective Questions


More objective and multiple choice questions with answers can be found online at [2] [10]. Refer websites and practice
Part I: Answer the following questions correctly and neatly.
1. What are the two main tasks of mechatronic systems? . Describe why mechatronic system is preferred over
traditional system. Write at least three comparison facts/points of traditional and mechatronic system.
2. The general schematic diagram representing mechatronic system is shown in figure 1. Select one of the fol-
lowing applications [Modular color segregation system, Manufacturing automation, Circuit board assembler, or
automatic juice maker.] After selection based on your preference, write the name(s) and function(s) at least one
element under each of the following components a) actuator b) sensor c) input signal conditioning and interfacing
d) graphical display e) output signal conditioning and interfacing f) digital control (architecture).

Schematic diagram of mechatronic system

3. For a 10 bit Data Acquisition System (Analogue to Digital Converter for this case) with a reference voltage
Vref = 1 volts, find the digital equivalent on the display that correspond to Vin = 0.6 volts.
Part II: Choose the best answer
1. In which of the following principle is the synergetic integration characterized by detects metal object, uses an
electro-magnetic field to detect a conductive target, sensing coil in the end of the sensor probe, when excited
creates an alternating magnetic field which induces small amounts of eddy current in the target object, eddy
currents create an opposing magnetic field which resists the field, being generated by the sensor probe coil, the
interaction of the magnetic fields is dependent on the distance, between the sensor probe and the target, and com-
paratively inexpensive but conducting targets sensing. a) Capacitive measurements b) Inductive Measurements
c) Optical Measurement d) all

2. Which of the following synergetic system employs stephan bolts man law by foccussing ray/radiation between
emissivity a) piezoelectric crystals b) Microphones condenser/ c) Camera temperature detector (Temperature
camera d) all
Part III: Say True or False

1. Smaller accelerometers have bigger dynamic range


2. Piezoelectric type accelerometers have high dynamic/frequency range than microphones condenser/capacitive

Part IV: Match by placing the letter correspond to the best explanation from column B to space
preceding associated numbers of mechatronic sensor elements under column A.

21
Column A Column B
1 Linear/Rotational variable differen- A Robust noncontact switching action, The digital
tial transducer (LVDT/RVDT) outputs are often directly fed to the digital controller
2 Photoresistors, photodiodes, photo B Alternate to strain gages with very high accuracy
transistors, photo conductors, etc. and bandwidth
3 Fiberscope C Good for measuring frequencies up to 40% of its
natural frequency
4 Inductance, eddy current, hall effect, D Good for small force measurements
photoelectric, capacitance, etc
5 Infrared thermography E Good for very high flow rates Can be used for both
upstream and downstream flow measurements
6 Interferometer F High resolution with wide range capability, Very
stable in static and quasi-static applications
7 Optical fiber As strain sensor G Laser systems provide extremely high resolution
in large ranges Very reliable and expensive
8 Seismic accelerometer H Measure light intensity with high sensitivity Inex-
pensive, reliable, and noncontact sensor
9 Strain gauge elements I Noncontact point sensor with resolution limited by
wavelength Measures whole-field temperature distri-
bution
10 Ultrasonic stress sensor J Small (0.2 mm diameter) field vision scope using
SMA coil actuators
K Very high accuracy in small ranges Provides high
resolution at low noise levels

References
[1] A. K. K.K., Introduction to MECHATRONICS, Oxford University Press, 2007.
[2] Institute of Mechatronic Systems: Research Focused on Mechatronics, https://www.zhaw.ch/en/engineering/
institutes-centres/ims/, Accessed: Feb 20, 2023.
[3] R. Isermann, Institut fu¨ r Automatisierungstechnik Technische Universita¨t Darmstadt Darmstadt Germany
2000, 22, 29–55.
[4] W. Bolton, MECHATRONICS: ELECTRONIC CONTROL SYSTEMS IN MECHANICAL AND ELECTRI-
CAL ENGINEERING Seventh Edition, Pearson Education Limited, 2019.
[5] A. DP., Relay autotuning: a use of old ideas in a new setting. Transactions of the Institute of Measurement and
Control. 2000;22(1):103-122. doi:10.1177/014233120002200105, https://journals.sagepub.com/doi/abs/10.
1177/014233120002200105/, Accessed: Feb 20, 2023, 2000.
[6] R. H. Bishop, MECHATRONICS AN INTRODUCTION, CRC Press: Taylor & Francis Group, 2006.
[7] S. Cetinkunt, MECHATRONICS, John Wiley and Sons, 2007.
[8] IEE, Web-based networking protocol for expanding IEEE-488 ATE, https://standards.ieee.org/ieee/488/
6465/, Accessed: Feb 20, 2023, 2011.
[9] H. C. FacebookTwitterLinkedInRedditPinterestShare, Simple Programs in 8051 Assembly Language, engineers-
garage, https://www.engineersgarage.com/simple- programs- in- 8051- assembly- language/, Accessed:
Feb 20, 2023, 2011.
[10] I. R., Mechatronic systems: concepts and applications: Transactions of the Institute of Measurement and Control,
https://journals.sagepub.com/doi/10.1177/014233120002200103/, Accessed: Feb 20, 2023, 2000.

22
Instrumentation and Measurement
Course-4
Course Name: Instrumentation and Measurement /Course Code: MEng 3261

Contact Hours per Semester


Lecture Tutorial Practice or Home study ECTS Remark
Laboratory Credits
32 48 0 28 4
Course break down:-
Course Chapters Topic
Chapter 1 Basic Concepts Of Measurements And Instrumentation
Chapter 2 Measurement Error Analysis
Chapter 3 Transducers And Their Response
Chapter 4 Signal Conditioning
Chapter 5 Data Transmission, Processing, Display And Recording
Text Book

Main Course Objectives/Learning outcomes


 To understand instrumentation and measurement in mechanical
engineering field specifically electrical transducers for measuring
force, displacement, velocity, temperature…
 To use temperature, velocity, flow, force, acceleration, current,
voltage measuring instruments
 To calibrate instruments
 To conduct simple experiments

page1
Chapter One
1. Basic Concepts of Measurements and Instrumentation
1.1 Classification of instruments
• Analog instrument

The measured parameter value is display by the moveable pointer. The pointer will moved
continuously with the variable parameter/analog signal which is measured. The reading is inaccurate
because of parallax error (parallel) during the skill reading. E.g.: ampere meter, voltage meter, ohm
meter etc.

• Digital instrument

The measured parameter value is display in decimal (digital) form which the reading can be read thru
in numbers form. Therefore, the parallax error is not existed and terminated. The concept used for
digital signal in a digital instrument is logic binary ‘0’and ‘1’.

1.2 Characteristic of instruments


Figure 1.1 presents a generalized model of a simple instrument. The physical process to be measured
is in the left of the figure and the measure and is represented by an observable physical variable X.

Fig. 1) Simple instrument model

For example, the mass of an object is often measured by the process of weighing, where the measure
and is the mass but the physical measurement variable is the downward force the mass exerts in the
Earth’s gravitational field. There are many possible physical measurement variables.

The key functional element of the instrument model shown in Figure 1.1 is the sensor, which has the
function of converting the physical variable input into a signal variable output.

page2
Signal variables have the property that they can be manipulated in a transmission system, such as an
electrical or mechanical circuit. Because of this property, the signal variable can be transmitted to an
output or recording device that can be remote from the sensor. In electrical circuits, voltage is a
common signal variable. In mechanical systems, displacements or force are commonly used as signal
variables. Other examples of signal variable are shown in Table 1.1.

Table 1.1: Example physical variables

The signal output from the sensor can be displayed, recorded, or used as an input signal to some
secondary device or system. In a basic instrument, the signal is transmitted to a Display or recording
device where the measurement can be read by a human observer. The observed output is the
measurement M.

There are many types of display devices, ranging from simple scales and dial gages to sophisticated
computer display systems. The signal can also be used directly by some larger system of which the
instrument is a part.

Two basic characteristic of an instrument is essential for selecting the most suitable instrument for
specific measuring jobs:

1. Static characteristic
2. Dynamic characteristic

Static characteristic of an instrument are, in general, considered for instruments which are used to
measure an unvarying process condition.

Several terms of static characteristic that have discussed:

1. Instrument – A device or mechanism used to determine the present value of a quantity under
observation.

page3
2. Measurement – The process of determining the amount, degree, capacity by comparison
(direct or indirect) with the accepted standards of the system units being used.
3. Accuracy – The degree of exactness (closeness) of a measurement compared to the expected
(desired) value.
4. Resolution – The smallest change in a measured variable to which instruments will response.
Also known as ‘Threshold.

5. Precision – A measure of consistency or repeatability of measurements, i.e. successive


readings do not differ or the consistency of the instrument output for a given value of input. A
very precise reading though is not perfectly an accurate reading.
X n  X
Precision  1 
X’
With; Xn = measured value
X’ = average value or expected value
6. Expected value – The design value that is, “most probable value” that calculations indicate
one should expect to measure.
7. Hysteresis – The different loading and unloading curve due to the magnetic hysterisis of the
iron. E.g.: Occur to a moving iron voltmeter, it is slowly varies from zero to full scale value
and then back to zero; the input-output curve will be different.
8. Dead Zone/band – The total range of possible values for instrument will not give a reading
even there is changes in measured parameter.
9. Nominal value - Is some value of input and output that had been stated by the manufacturer
for user manual.
10. Bias – A constant error that occur to instrument when the pointer not starting from zero scale.
11. Range – A minimum and maximum range for instrument to operate and it is stated by the
manufacturer of the instrument.
12. Sensitivity – The ratio of the change in output (response) of the instrument to a change of
input or measured variable.

output
S
input
Dynamic characteristic are concerned with the measurement of quantities that vary with time.
1.1 Process of measurement
Measurement is essentially the act, or the result, of a quantitative comparison between a given
quantity and a quantity of the same kind chosen as a unit. The result of measurement is
expressed by a number representing the ratio of the unknown quantity to the adopted unit of
measurement.
The step taken before measure:

page4
1. Procedure of measurement: Identified the parameter or variable to be measured, how to record
the result
2. Characteristic of parameter: Should know the parameter that to be measured; ac, dc, frequency
or etc.
3. Quality: Time and cost of equipment, the instrument ability, the measurement knowledge and
suitable result.
4. Instrument: Choose a suitable equipment; multi-meter, voltmeter, oscilloscope or etc.

During measurement:

1. Quality: Make sure the chosen, instrument is the best, the right position when taken result,
the frequent of measurement.
2. Safety first: Electric shock, overload effect, limitation of instrument.
3. Sampling: See the changing of parameter during measurement, which value should be
taken when the parameter keep changing. Take enough samples and it is accepted.

Chapter Two
2. Errors in measurement
Error is defined as the difference between the true value (expected value) of the measure and the
measured value indicated by the instrument.

Error may be expressed either as absolute error or as a percentage of error.

Absolute errors are defined as the difference between the expected value of the variable and the
measured value of variable.

Where, Yn = expected value

Xn = measured value

OR

page5
Yn  X n
Percentage error = X100%
Yn

Yn  X n
Relative Accuracy, A = 1 

Yn

Percentage relative accuracy, %ar = 100% *(Relative Accuracy Value)

OR, %ar= 100% - (Percentage error Value)

Example 1:
The expected value of the voltage across a resistor is 90 V. However, the measurement gives a
value of 89 V.
Calculate:
a) Absolute error
b) Percentage error
c) Relative accuracy
d) Percentage of accuracy

Solution
Expected value of voltage across a resistor, Yn = 90 V Measured value
of voltage across a resistor, Xn = 89 V

Try to solve (a-d) by your own. (Hint: a/1V.b/1.1111% c/0.9889 d/98.889%


2.1. Types of error
Errors are generally categories under the following three major heating:
1. Gross Errors - Is generally the fault of the person using instruments and are due to such
things as incorrect reading of instruments, incorrect recording of experimental data or
incorrect use of instrument.
2. Systematic Errors – are due to problems with instruments, environment effects or
observational errors.
 Instrument errors – It is due to friction in the bearings of the meter movement,

page6
incorrect spring tension, improper calibration, or faulty instruments.
 Environmental errors – Environmental conditions in which instruments are used
may cause errors. Subjecting instruments to harsh environments such high
temperature, pressure, humidity, strong electrostatic or electromagnetic fields, may
have detrimental effects, thereby causing error.
 Observational errors - Those errors that introduced by observer. Two most
common observational errors are probably the parallax error introduced in reading
a meter scale and error of estimation when obtaining a reading from a scale meter.
3. Random Errors – are generally the accumulation of a large number of small effects and
may be of real concern only in measurements requiring a high degree of accuracy. Such
errors can be analyzed statistically.
2.2.Statistical analysis of error in measurement
How to analyze an error? Use statistic method
When we measure any physical quantity, our measurements are effected by a multitude of
factors.
Arithmetic mean – the sum of a set of numbers divided by the total number of pieces of data

Where;

 X + X + X + ... + Xn
Arithmetic Mean, X  1 2 3

n
1 n
=  Xn
n n=1

Xn = nth reading taken


n = total number of readings taken
Note: The algebraic sum of the deviations of a set numbers from their arithmetic mean is zero.
The average deviation is an indication of the precision of the instrument used in measurement or the
sum of the absolute values of the deviation divided by the number of readings.

Average deviation, D= d1  d 2  d3  ...  d n


n

page7
Where,

/d1/, /d2/, /d3/ ... /dn/ >> absolute value of deviations

The standard deviation is the square root of the sum of all the individual deviations squared, divided
by the number of readings.

Standard deviation, S =

Example:

For the following given data, calculate


a) Arithmetic mean (Ans: 49.8600)
b) Deviation of each value (Ans: -0.16, +0.24, +0.34, -0.26, -0.16)
c) Algebraic sum of the deviations (Ans: 0)
d) Calculate the average deviation (Ans: 0.232)
e) Calculate the standard deviation (Ans: 0.27)
Given Data:
 x1 = 49.7
 x2 = 50.1
 x3 = 50.2
 x4 = 49.6
 x5 = 49.7
2.3.Limiting error

Most manufacturers of measuring instrument state that an instrument is accurate within a certain
percentage of a full-scale reading.
For example, the manufacturer of a certain voltmeter may specify the instrument to be accurate
within  2% with full-scale deflection.

2.4.Measurement error combinations

When a quantity is calculated from measurements made on two or more instruments, it must be
assumed that errors due to instrument inaccuracy combine in worst possible way. The resulting
error is then larger than the error in any one instrument.
o Sum of quantities: E = (V1 + V2)  (V1 + V2)
o Difference of quantities: E = (V1 - V2)  (V1 + V2)
o Product of quantities
o Percentage error in P = (% error in I) + (% error in E)
o Quotient of quantities:
o Percentage error in E/I = (% error in E) + (% error in I)
o Quantity Raised to a power:

page8
o Percentage error in AB = B (% error in A)

Sum of Quantities
Where a quantity is determined as the sum of two measurements, the total error is the sum of the
absolute errors in each measurement. As illustrated in Figure 1.2:

E = (V1 + V2)  (V1 + V2)

Figure 2.1: Error in sum of quantities equals sum of errors

Difference of Quantities
Figure 2.2 illustrated a situation in which a potential difference is determined as the difference
between two measured voltages. Here again, the errors are additive;

E = (V1 - V2)  (V1 + V2)


Figure 1.3: Error in difference of quantities equals sum of errors

page9
Product of Quantities
When a calculated quantity is product of two or more quantities, the percentage error is the sum of the
percentage errors in each quantity.

V1  V1
Figure 1.4: Percentage error in product or quotient of quantities equals sum of percentage errors

Percentage error in Power (P) = (% error in I) + (% error in E)

Quotient of Quantities
Here again it can be that the percentage error is the sum of the percentage errors in each quantity.

Percentage error in E/I = (% error in E) + (% error in I

Quantity Rose to a power


When a quantity A is raised to a power B, the percentage error in AB can be shown to be: Percentage
error in AB = B (% error in A)

Example 1:

A 600V voltmeter is specified to be accurate within  2% at full scale. Calculate the limiting
error when the instrument is used to measure a voltage of 250V.

Solution

The magnitude of the limiting error is 0.02 X 600 = 12 V

page10
Example 2:

A voltmeter reading 70V on its 100V range and an ammeter reading 80mA on its 150mA range are used to
determine the power dissipated in a resistor. Both these instruments are guaranteed to be accurate within 
1.5% at full-scale deflection. Determine the limiting error of the power. (Ans: 4.956%)

Chapter Three

3. Transducers and Their Responses


3.1. Introduction to transducers
A transducer is a device that converts one form of energy to other form. It converts the measurand to a usable
electrical signal.

In other word it is a device that is capable of converting the physical quantity into a proportional electrical
quantity such as voltage or current. The physical quantity may be mechanical, chemical, optical or thermal.

Transducers are classified based on,

 Application.
 Method of energy conversion.
 Nature of output signal.

The transducers can be classified as:

I. Active and passive transducers.


II. Analog and digital transducers.
III. On the basis of transduction principle used.
IV. Primary and secondary transducer
V. Transducers and inverse transducers.

Other ways of Classification of Transducers include:

 Electrical transducers: voltage, current, frequency, R-C- I component and its effects.
 Non-electrical transducers: Detector (sensor) and Physical quantity is obtained which is converted to
electrical quantity.
 Displacement transducers: Capacitive, oscillation, potentiometric, photoelectric, piezoelectric (Force
Summing Devices).
 Opto-electronic transducers: Converts light energy into electrical energy, Photoconductive cell,
photovoltaic cell, solar cell, photo tube, photo multiplier, etc.
A) Active Transducers
These transducers do not need any external source of power for their operation. Therefore they are also called
as self-generating type transducers.

 The active transducers are self-generating devices which operate under the energy conversion principle.

page11
 As the output of active transducers we get an equivalent electrical output signal e.g. temperature or
strain to electric potential, without any external source of energy being used.

Classification of Active transducer

Fig. Classification of Active transducers

B) Passive Transducers
These transducers need external source of power for their operation. So they are not self-generating type
transducers.

 A DC power supply or an audio frequency generator is used as an external power source.


 These transducers produce the output signal in the form of variation in resistance, capacitance,
inductance or some other electrical parameter in response to the quantity to be measured.
Classification of Passive transducers

page12
Active and Passive transducers (Comparative view)
Active Transducers

 Self-generating type.
 Energy for generating output is obtained from physical phenomenon.
 Thermocouple
 Piezoelectric transducer
 Photovoltaic cell
 Photoelectric (photoemission) cell

Passive Transducers
 Externally powered.
 Resistance type
 Strain gauge
 Potentiometric device
 Thermistor
 Inductive type
 LVDT
 Capacitive type
 Hall effect transducer
3.2. Basic requirements of a transducer
 Linearity –characteristics between input and output.
 Ruggedness –ability to withstand overload and protection measures.
 Repeatability –ability to produce same output for same input at different times and environment.
 High stability & reliability –output should not be affected by temperature, vibration, other
environmental conditions, with minimal error.
 Good dynamic response –ability to change output quickly for dynamic variation in input with respect
to time.
 Convenient instrumentation –high analog output, high SNR, direct measurement or after
amplification.
 Good mechanical characteristics –ability to withstand deformation and deterioration in performance
caused by various mechanical strains.
A) Resistive Transducer
Resistive transducers are those transducers in which the resistance changes due to the change in some physical
phenomenon. The resistance of a metal conductor is expressed by a simple equation.

R = ρL/A
Where R = resistance of conductor in Ω

L = length of conductor in m

A = cross sectional area of conductor in m2

page13
ρ= resistivity of conductor material in Ω-m.

Fig.

B) Capacitive Transducer
In capacitive transduction transducers the measurand is converted to a change in the capacitance. The
relationship between the capacitance and the size of capacitor plate, amount of plate separation, and the
dielectric is given by

C = εoεrA / d
d = is the separation distance of plates (m)

C = is the capacitance (F, Farad)

εo= absolute permittivity of vacuum


εr = relative permittivity

A = is the effective (overlapping) area of capacitor plates (m2)

A movable diaphragm forms one plate of the capacitor. The distance between diaphragm and static plate
changes when a force applied to the diaphragm. The change in capacitance is measured with an ac- bridge
circuit or oscillator circuit as change in frequency.

 Can measure both static and dynamic changes.


 Drawback :- Sensitivity to temperature variations

page14
Fig.

C) Inductive Transducer
When a force is applied to the ferromagnetic armature the air gap changes and varying the reluctance of the
magnetic circuit.

 Applied force is measure as change of inductance in the coil.


 Can measure both static and dynamic changes.
 Drawback:- Limited frequency response.

Fig.

page15
Chapter Four
4. Signal Conditioning
The output from a transducer is generally a continuously varying or analogue signal. In contrast digital
processors store and process signals sampled at particular times and represented as binary numbers. Any
modern instrumentation must therefore include a component (described in the P2 course), known as an
Analogue-to-Digital converter (ADC), which converts the analogue input signal into a digital signal that can
be read by the digital processor.

Figure 4.1: A block diagram of a typical instrumentation system with several different output devices

The simplest and cheapest possible instrumentation system is one in which the output from the transducer is
connected directly to the input of an ADC. However, both the transducer and the ADC are standard
components that have not been designed for any particular application. More importantly, transducers rely
upon physical processes that rarely, if ever, generate output signals that are compatible with the ADC input
range. In particular the maximum change in the output signal from a sensor is often smaller than the minimum
change in signal that can be detected by the ADC. This means that in this simplest system even the maximum
change in the transducer output may be undetectable.

Instrumentation systems must therefore include a circuit before the ADC that amplifies the output from the
transducer to make it detectable by the ADC. Such a circuit is referred to as signal conditioning.

In instrumentation, signal conditioning generally means manipulating an analogue signal (from a sensor) in
such a way that it meets the requirements of the next stage of a system for further processing. In general the
most common “next stage” will involve analogue-to-digital converters.

Signal inputs accepted by signal conditioning circuits include DC voltage and current, AC voltage and current
(and possibly but rarely electric charge). The processes that are performed by these circuits will almost
certainly include amplification and filtering. In addition to these functions the signal conditioning may also
include a step to isolate the input circuits from the rest of the system (one area where this is important is in
medical electronics where isolation protects the patient who is hosting the sensors) and/or a non-linear step
(such as a log or an anti-log amplifier) to compensate for any non-linearity of the sensor.

Although isolation and non-linear stages are key to a few systems this course will focus on the amplification
and filtering that must be included in almost all systems. Commonly used amplifiers for signal Conditioning.

page16
Simple Amplifier Circuits for Signal Conditioning
The output from many transducers is a voltage and there are two simple circuits (described in the P2 course),
the non-inverting and the inverting amplifier, which can be used to amplify a voltage signal.

Non-inverting amplifier (P2 Revision):

Fig.4.2. A non-inverting amplifier circuit

Don’t forget the analysis of any op-amp circuit to understand its function is based on the simple ideal op-amp
rules (taken from P2):

An ideal op-amp has an infinite input resistance, an infinite differential gain and an output resistance of zero.
The infinite gain means that provided there is negative feedback: (be sure you understand WHY?)

This equation and the characteristics of an ideal op-amp can be used to show that for the non-inverting
amplifier

page17
Inverting amplifier (P2 Revision):

Fig.4.3. an inverting amplifier circuit

Using the same rules as above and noting that for the inverting amplifier V+ is connected to ground (V) we
can show that:

Equation???????????????

Instrumentation systems are widely used to control and monitor many different “host” systems. Any physical
variable that is being measured has to be converted to an electrical signal, usually an analogue signal, by an
input transducer or sensor. Useful information then has to be extracted from this signal, most often by a
program in a digital processor. Conversion from an analogue sensor output to a digital input for the processor
is a two-stage process involving analogue signal processing (conditioning) and an analogue-to-digital
converter.

Each instrumentation system therefore usually consists of four constituent parts, the sensor, and analogue
signal processing circuits, an analogue-to-digital converter and a digital processor.

Sensors rely upon physical processes that allow an electrical signal to be generated in response to a change in a
physical variable. These physical processes usually result in small output signals. A key part of any analogue
signal processing circuit is therefore a circuit that amplifies the changes in the output signal from a sensor.

page18
Chapter Six
5. Data Transmission, Processing, Display And Recording
6.1. Concept and Classification of Recorders

Concept
• A recorder records electrical and non-electrical quantities as a function of time.

• Currents and voltages can be recorded directly while the non-electrical quantities are recorded indirectly by
first converting them to equivalent currents or voltages with the help of sensors or transducers.

“The recorders can be classified as following.

Figure 6. 1 Classification of recorders

page19
Analog Recording
 An analog recording is one where a property or characteristic of a physical recording medium is
made to vary in a manner analogous to the variations in air pressure of the original sound.
 Generally, the air pressure variations are first converted (by a transducer such as a microphone)
into an electrical analog signal in which either the instantaneous voltage or current is analogous
to the instantaneous air pressure.
 The variations of the electrical signal in turn are converted to variations in the recording
medium by a recording machine such as a tape recorder or cutting lathe.
 Example – PMMC instrument (Permanent Magnet Moving Coil)

Graphic Recorders
 Graphic recorders generally are devices which display and store a pen and ink record of the
history of some physical event.
 Basic elements of a recorder include a chart for displaying and storing the recorded information,
a stylus moving in a proper relationship to the paper and suitable means of interconnection to
couple the stylus to the source of information.

The graphic recorders can be classified in two categories:

 Strip chart recorders: A strip chart recorder records one or more variables with respect to time. It is an
X-t recorder.
 X-Y recorders: An X-Y recorder records one or more dependent variables with respect to an
independent variable.

6.2. Basic Strip chart recorder


Figure 2.2 shows basic constructional features of a strip chart recorder.

A strip chart recorder consists of:

page20
(i) Paper drive systems: It should move the paper at a uniform speed. A spring wound
mechanism may be used but in most of the recorders and a synchronous motor is used for
driving the paper.
(ii) Marking mechanism: The most commonly used marking mechanisms are as following:
a. Marking with ink filled stylus
b. Marking with heated stylus
c. Chopper bar
d. Electric stylus marking
e. Electrostatic stylus
f. Optical marking method

(iii) Tracing systems: There are two types of tracing systems used for producing graphic
representations.

 Curvilinear system
 Rectilinear system

Working Principle: A strip chart recorder has:

i. A long roll of graph paper moving vertically.


ii. A system for driving the paper at some selected speed. A speed selector switch is generally
provided. Chart speed of 1-100 mm/s is usually used.
iii. A stylus for making marks on the moving graph paper. The stylus moves horizontally in
proportional to the quantity being recorded.
iv. A stylus driving system which moves the stylus in a nearly exact replica or analog of the
quantity being recorded.
v. A range selector switch is used so that input to the recorder drive system is within the
acceptable level.
vi. Most recorder use a pointer attached to the stylus. This pointer moves over a calibrated scale
thus showing the instantaneous value of the quantity being recorded. An external control circuit
for the stylus may be used.

6.3. Types of Strip Chart Recorders


The different types of strip chart recorders are:

1. Galvanometer type
2. Null type

Galvanometer type strip chart recorder

This type of strip chart recorder operates on the deflection principle. The deflection is produced by a
galvanometer which produces a torque on account of a current passing through its coil. This current is
proportional to the quantity being measured.

page21
Figure 6. 3 Galvanometer type strip chart recorder

 These recorders use a D’Arsonval galvanometer.


 The pointer is equipped with a stylus. As the current flows through the coil, it deflects. When
the pointer comes to rest on account of controlling torque exerted by springs, the stylus also
comes to rest. Thus, the value of quantity is recorded.
 This type of recorder is not useful for recording fast variations in either current or voltage or
power. This records only the average values and hence it should be designed for these.
 The type of chart used depends upon the form of movement. The recorder shown in figure 6.3
uses a chart having rectilinear system of tracing.
 The recorders can work on ranges from a few mA to several mA or a few mV to several mV.
It has narrow bandwidth of 0 to 10 Hz. It has a sensitivity of 0.4 mV/mm or from a chart of
100 mm width a full scale deflection of 40 mV is obtained. For measurement of smaller
voltage linear amplifiers are used.
 In these recorders the bearings must be substantially larger than those used in indicator
instruments, because of the large mass of coil and stylus.

Null type strip chart recorder

 Many recorders operate on the principle whereby a change in its input, produced
by the signal from the sensor or transducer, upsets the balance of the measuring
circuit of the recorder.
 As a result of this unbalance, an error signal is produced that operates some
device which restores balance or brings the system to Null conditions.

page22
 The amount of movement of this balance restoring device then, is an indication
of the magnitude of the error signal, and the direction of the movement is an
indication of the direction of the quantity being measured has deviated from
normal.
 The signal from the transducer may take any of the several forms. It may be a
voltage, a current or it may be a value of resistance, inductance or capacitance.
The recorder, therefore, must be of a type able to accept the form of the input
signal.

There are a number of null type recorders. They are

 Potentiometric recorders
 Bridge recorders and
 LVDT recorders

6.4. X-Y type recorders

Figure 6. 4 Potentiometric type recorder

 A strip chart recorder records the variations of a quantity w.r.t. time while a X-Y
recorder is an instrument which gives a graphic record of the relationship between two
variables.
 In X-Y recorders, an emf is plotted as a function of another emf. This is done by having
one self-balancing potentiometer control the position of the rolls while another self-
balancing potentiometer controls the position of the recording pen (stylus).
 In some X-Y recorders, one stylus moves in the X direction and second stylus moves in
the Y direction at right angles to the X direction, while the paper remains stationary.

page23
 With the help of X-Y recorders and appropriate transducers, a physical quantity may be
plotted against another physical quantity.
 Hence, an X-Y recorder consists of a pair of servo-system, driving a recording pen and
moving arm arrangement, with reference to a stationary paper chart. Attenuators are
used to bring the input signals to the levels acceptable by the recorder.

Figure 6.5 below shows a block diagram of a typical X-Y recorder.

Figure 6. 5 Block diagram of a typical X-Y recorder

 A signal enters each block of the two channels. The signals are attenuated to the
inherent full scale range of the recorder; the signal then passes to a balance circuit where
it is compared with an internal reference voltage. The error signal and the reference
voltage is fed to a chopper which converts d.c. signal to an a.c. signal. The signal is then
amplified in order to actuate a servomotor which is used to balance the system and hold
it in balance as the value of the quantity being recorded changes.
 The action described above takes place in both axes simultaneously. Thus we get a
record of one variable w.r.t. another.

page24
 The use of X-Y recorders in laboratories greatly simplifies and expedites many
measurements and tests. A few examples are being given below:
 Speed torque characteristics of motors
 Lift drag wind tunnel tests
 Plotting of characteristics of vacuum tubes, Zener diodes rectifier and transistors etc.
 Regulation curves of power supplies
 Plotting stress-strain curves, hysteresis curves and vibrations amplitude against swept frequency
 Electrical characteristics of materials such as resistance vs. temperature plotting the output from
electronic calculators and computers.

6.5. Magnetic Tape Recorders


It is frequently desirable and in many cases necessary, to record data in such a way that they can be retrieved
or reproduced in electrical form again. The most common and most useful way of achieving this is through the
use of magnetic tape recording.

Principle

 When a magnetic tape is passed through a recording head, any signal recorded on the
tape appears as magnetic pattern dispersed in space along the tape, similar to the original
coil current variation with time.
 The same tape when passed through a reproduce or playback head reproduces variations
in the reluctance of the winding thereby inducing a voltage in the winding dependent
upon the direction of magnetization and its magnitude on the magnetic tape. The
induced voltage is proportional to the rate of change of flux linkages. Therefore the emf
induced in the winding of reproducing head is proportional to the rate of change of level
of magnetization on the tape.

page25
Figure 6. 6 Elementary Magnetic Tape Recorder

 There are three methods of magnetic tape recording which are used for instrumentation purposes. They
are:
 Direct recording
 Frequency Modulation (FM) recording
 Pulse Modulation (PM) recording
 FM recorders are generally used for instrumentation purposes.
 The PDM recording is used in instrumentation systems for special applications where a large number
of slowly changing variables have to be recorded simultaneously.

Advantages

 They have a wide frequency range from dc to several MHz.


 They have a wide dynamic range which exceeds 50 db. This permits the linear recording from full scale
signal level to approximately 0.3% of full scale.
 They have low distortion.
 The magnitude of the electrical input signal is stored in magnetic memory and this signal can be
reproduced whenever desired. The reproduced signal can be analyzed by automatic data reduction
methods.
 The recorded signal is immediately available, with no time lost in processing. The recorded signal can
be played back, or, reproduced as many times as desired without loss of signal.
 When the information has been processed, the tape can be erased and reused to record a new set of
data.
 It permits multi-channel recording. A tape facilitates the continuous record of a number of signals,
which may have a wide range of frequency, to be made simultaneously.
 The use of magnetic tape recorders provides a convenient method of changing the time base. Data may
be recorded at very fast speeds and played back at speeds with low frequency recorders like graphic
recorders.

6.6. Digital Tape Recorders


Working Principles

 An analog signal is converted to digital by an analog-to-digital converter, which


measures the amplitude of an analog signal at regular intervals, which are specified by
the sample rate, and then stores this sampled & quantized numerical value in computer
hardware such as compact disc or hard disc.
 Digital recordings are very accurate, the accuracy determined only by the quality of D/A
and A/D converters.
 For optical disc recording technologies such as CDs or DVDs, a laser is used to burn
microscopic holes into the dye layer of the medium.
 A weaker laser is used to read these signals.

page26
 This works because the metallic substrate of the disc is reflective, and the unburned dye
prevents reflection while the holes in the dye permit it, allowing digital data to be
represented.
 The digital data recorders are basic two type, namely, Incremental and synchronous.

6.7. Digital Storage Oscilloscope (DSO)

Construction
 DSOs use digital storage techniques while analog storage CROs use special CRTs called
storage tubes.
 In this technique, the waveform to be stored is digitized, stored in a digital memory, and
retrieved for display on the storage oscilloscope. The stored waveform is continually
displayed by repeatedly scanning the stored waveform and therefore, a conventional
CRT can be employed for the display and thus some of the cost of the additional
circuitry for digitizing and storing the input waveform is offset.
 The stored display can be displayed indefinitely as long as the power is applied to the
memory, which can be supplied with a small battery. The digitized waveform can be
further analyzed by either the oscilloscope or by loading the contents of the memory
into a computer.
 A generalized block diagram of digital storage oscilloscope is shown in fig. 6.7.

Figure 6. 7 Block diagram of Digital Storage Oscilloscope (DSO)

page27
 Some of the DSOs use 12 bit converters, giving 0.025% resolution and 0.1% accuracy
on voltage and time readings, which are better than the 2-5% of analog storage
oscilloscopes.
 Split screen capabilities enable easy comparison of the two signals.
 The only drawback of DSO is limited bandwidth by the speed of their analog-to-digital
converters. However, 20 MHz digitizing rates available on some oscilloscopes yield a
bandwidth of 5 MHz, which is adequate for most of the applications.

Limitations
1. Oscilloscope loading and Probe Use: To counteract the loading effect on an oscilloscope, voltage probes are
used. Voltage probes are devices which increase the input impedance of an oscilloscope by inserting high
impedance in series with the oscilloscope inputs.

2. Hum and Noise Pickup: The oscilloscope is designed to be capable of amplifying and displaying small input
signals. This capability also makes it susceptible to amplification of small unwanted signals and noise,
especially when set to its most volts/division capability.

The magnitude of hum picked up by an oscilloscope depends upon the impedance of the circuit under testing,
the length of the oscilloscope leads, and the type of shielding used by these leads. Hum signals are largest
when long, unshielded leads are connected to high-impedance circuits. The best way to reduce the level of
such interference signals is to use short cables which have a shield that can be connected to ground.
Differential inputs are also designed to help reduce noise pickup in low-level signals.

Oscilloscope Errors:

 Reading error
 Parallax error
 Calibration error
 Frequency-response error
 Loading error

Oscilloscope Measurement Applications

1. Checking individual electrical components such as vacuum tubes, diodes, transistors, ICs, magnetic
components, relays, and choppers.
2. Checking amplifiers and amplifier circuits.
3. Displaying transducer outputs.
4. Television, radio and communication equipment checking and repair.
5. Electrical diagnosis of automobile engines.
6. Special curve-tracer oscilloscopes are available for plotting the current-voltage characteristics of
transistors, diodes, and other elements.
7. In Radar, CRO is used for providing the visual indication of target such as airplane, ship etc.
8. In Medical Sciences, the low speed time base CROs are used in electrocardiogram (ECG),
electromyogram (EMG) and Electroencephalogram (EEG), which are employed for diagnosis of the
condition of heart, brain and muscles, respectively of the patient body.

page28

You might also like