mechatronics lecture notes.pdf

1,440 views 24 slides Feb 26, 2023
Slide 1
Slide 1 of 24
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24

About This Presentation

Review on Measurement, control and instrumentation, review in mechatronic design, mechanical, electrical and hydraulic actuator systems, electronic controllers, microprocessors, sensor communication systems, assembly language programming, and review questions in each sections


Slide Content

Introduction to Mechatronics (Meng 5272) Lecture Notes
Tsegaye Getachew Alenka
Department of Mechanical Engineering
Wolaita Sodo University
[email protected]
February 26, 2023
Contents
1 Competencies and Objectives of the Course 1
1.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Competences (Learning Outcomes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Mechatronics, Introduction 1
2.1 Definition and Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Measurement control Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3 Performance of Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4 The Wheatstone Bridge Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 Control System, Actuating System and Mathematical Modeling 5
3.0.1 Mathematical models of Actuating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1 Semiconductors and Motor Controllers/Actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Mechatronic System Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3 Mechatronic Design Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 Micro-controllers and microprocessors 11
4.1 BASIC COMPUTER MODEL and Analogy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5 Sensor Communication Design 13
5.1 Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Sensor Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2.1 Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2.2 General Purpose Instrument Bus Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3 Digital Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3.1 Bivalent Axiomatic Set Theory/Logic Gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6 Assembly Language and PLC 18
6.1 Ladder Logic, Functional Block Diagram, Structured Text, Instruction List and Sequential Functional
Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 (a) Wheatstone Bridge Circuit (b) Realtime step vs frequency Response . . . . . . . . . . . . . . . . .
3 (a) Comparison of Open and Closed Loop Controller (b) components of closed loop controller . . . . .
4 Schematic of Synergistic Mathematical Model of Actuation Control Systems (a)Mechanical (b) Hy-
draulic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5 (a) Types of Motor Actuators (b) Types of Electronics . . . . . . . . . . . . . . . . . . . . . . . . . .
I

6 (a) Watt-Governor (b) Electronic Furnace Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7 (a) an 8051µP Architecture & Components (b) bus (c)µcontrollers vsµprocessors . . . . . . . . . . .
8 Bivalent logic gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9 Ladder Logic Program/Diagram of Pump Motor Control . . . . . . . . . . . . . . . . . . . . . . . . .
10 (a) Sequential Function Chart (SFC) of the pump (b)Function Block Diagram (FBD) . . . . . . . . .
List of Tables
1 Measurement instruments construction A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Measurement instruments construction B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 Differential Modelling of Physical Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 Comparison mathematical model of simple translational mechanical vs PID control systems . . . . . .
5 Basic Analogy of Computer Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6 8051 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7 Simple Programs in 8051 Assembly Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 Ψronics” 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
a rod called the core
(a permanent mag-
net), and two elec-
trical coils around
the core slides in-
side a hollow cylin-
drical tube called
a bobbin and DC
vltage generated in
the coils.
doppler works by
the same principle
as a car horn where
moving towards
you (or away from
you) has an ap-
parently higher (or
lower) pitch, only
that doppler works
with radio wave
instead of sound
wave, or frequency,
A double-pulse laser
illuminates a region
of flow under study,
and a digital camera
(sometimes two sepa-
rate cameras) records
two images – timed
with the two flashes
(pulses) of laser light.
The displacement of
illuminated particles
is then determined
by analyzing (interro-
gating) the two im-
ages with image pro-
cessing software
An optical technique
involving a laser is laser
Doppler velocimetry
(LDV), also called laser
velocimetry (LV) or laser
Doppler anemometry
(LDA). whereas PIV is
a Lagrangian technique,
following the motion of
individual particles, LDV
is an Eulerian technique,
since the velocity is mea-
sured at a fixed point in
the flow.
works in Bernoulli’s
principle where
Pitot-static probe
either both pres-
sures are measured
(pierced two holes
from side), or the
pressure difference
is measured (with
only one hole at
the front edge).We
consider here in-
compressible flow,
and assume that
the probe is aligned
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. mechanical systems(mechanical elements, machines, precision mechanics); andelec-
tronic systems(microelectronics, power electronics, sensor and actuator technology);
2. systems theory: Signals and Systems,and Data Acquisition), andLogic Systems,
Software, Computers, artefacts and Intelligence: automation, software engineering, artificial intelligence).
Table 2: Measurement instruments construction B
In piezoelectric (acceler-
ation, strainguage, etc)
instruments, A seismic
mass is placed on an
elastic return blade
equipped with two
or four piezoresistive
gauges in a Wheatstone
Bridge where the unit
vibration of a mass
applied by a force
proportional to acceler-
ation & the piezoelectric
element
C=ε0εr
A
d
Bimetalic strip thermo-
couples: two dissimilar
metals, joined together
at one end, that produce
a voltage (expressed in
millivolts) with a change
in temperature.
Gyroscopes in-
ertia navigation
can be used to
construct gyro-
compasses, which
complement or
replace magnetic
compasses vehi-
cles, to assist in
stability
The photoelectric
effect is a phe-
nomenon in which
photon energy (i.e.
from light) releases
electrons from their
otherwise more
stable state on a
surface where the
disruption mea-
sured called hall
effect with Loretz
force
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
y(t) =
1
C
Z
t
1
i(τ)dτwherei(τ) =
y(t)−
¯
y(t)
R
(1)
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.
2.
(a)
value when the input is zero),
(b)
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
R2
=
R4
R3
(2)
where the bridge output voltageV0is zero. With a preset strain, the resistance of the strain gauge changes by the
amount ∆R. This gives us the following equation:
VO=Vs
`
R1+ ∆R1
R1+ ∆R1+R2+ ∆R2

R4+ ∆R4
R3+ ∆R3+R4+ ∆R4
´
For strain measurements, the resistancesR1andR2must be equal in the Wheatstone bridge. The same applies
toR3andR4. With a few assumptions and simplifications, the following equation can be determined. theHto
Measurements using Strain Gauges;
Vo
Vs
=
1
4
`
∆R1
R1

∆R2
R2
+
∆R3
R3

∆R4
R4
´
(3)
In the last step of calculation, the term ∆R/Rmust be replaced by the following:
∆R
R
=k·ε
Herekis the k-factor of the strain gauge,εis the strain. This gives us the following:
Vo
Vs
=
k
4
(ε1−ε2+ε3−ε4) (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 calledData Acquisition System or in short DAQ. The modernized version of DAQ isSupervisory
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.
2.
its importance in measurement system
3.
4.
5.
6.
7.
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-disciplinarymainly: mechanical, hydraulic, and electricalin
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 19
th
CenturyJames
Watt’s centrifugal governorsee fig. 6 for the speed control of a steam engine. In 20
th
Century,Nyquist Plot or
Polar Plotof 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 spacesdomain via
Laplace mathematical transformation or modelling grasping a characteristic solution of equation of the system in
spacesdomain correlating an output response to its corresponding input and ploting dominant amplitude and phase
angle polar coordinates. Root locus method examined characteristic equation in ansLaplace 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 withproportional control action, P, the relationship between
5

Table 3: Differential Modelling of Physical Systems
Electrical System
Elec.Inductuctancev21=L
d
dt
iElec. power/EnergyE=
1
2
·L
2
1
Electrical Resistancei=
1
R
·v21powerP=
1
R
·v
2
21
Mechanical System
Rotational Springω21=
1
k
·
d
dt
TEnergyE=
1
2
·
T
2
k
Rotational massT=J·
d
dt
ω2EnergyE=
1
2
·J·ω2
2
rotational damperT=b·ω21powerP=b·ω
2
21
Translation Springv21=
1
k
·
d
dt
FEnergyE=
1
2
·
F
2
k
Translational MassF=M·
d
dt
v2E=
1
2
·M·v
2
2
translational damperF=b·v21powerP=b·v
2
21
Hydraulic Systems
fluid inertiaP21=I·
d
dt
QEnergyE=
1
2
·I·Q
2
fluid capacitanceQ=Cf
d
dt
P21EnergyE=
1
2
·CfP
2
21
fluid resistanceQ=
1
Rf
·P21powerP=
1
Rf
·P
2
21
thermal capacitanceq=Ct
d
dt
T2EnergyE=
1
2
·CtT2
thermal resistanceq=
1
Rt
·T21powerP=
1
Rt
·T21
the output of the controlleru(t) and the actuating error signale(t) is linear. In a controller withintegral control
action,PI, the value of the controller outputu(t) is integrated/summed-up and changed at a rate proportional to
the actuating error signale(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
a0
(n)
y+a
(n−1)
1
y+· · ·+an−1˙y+any
=b0
(m)
x+b1x+· · ·+bm−1˙x+bmx(n≥m)
(5)
Whereyis the output of the system andxis 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 commons
space domain that enables correlation as shown in eq. 6.
Transfer function =G(s) =
L[ output ]
L[ input ]




zero initial conditions
=
Y(s)
X(s)
=
b0s
m
+b1s
m−1
+· · ·+bm−1s+bm
a0s
n
+a1s
n−1
+· · ·+an−1s+an
(6)
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)
ˇ
˙x1
˙x2
˘
=
ˇ
0 1

k
m

b
m
˘ ˇ
x1
x2
˘
+
ˇ
0
1
m
˘
u u (t) =Kpe(t) +
Kp
Ti
R
t
0
e(t)dt+KpTd
de(t)
dt
↑→time-series model timeseries model ↑
ˇ
s−1
k
m
s+
b
m
˘
−1
=
1
s
2
+
b
m
s+
k
m
ˇ
s+
b
m
1

k
m
s
˘
U(s)
E(s)
=Kp
ı
1 +
1
Tis
+Tds
ȷ
Transfer Func.
↑→time invariant space domain model
G(s) =
Θ
1 0
Λ 1
s
2
+
b
m
s+
k
m
ˇ
s+
b
m
1

k
m
s
˘ ˇ
0
1
m
˘
=
1
ms
2
+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 spacesvariable. 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, thesynchronous motors/no slipwhere 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 motora 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 asactive
componentsbecause theytake part in the transformation of the energywhile other components, whichonly dissipate
or store energy, are called aspassive 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 valuey(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. Tmax,
2. Tr,
3. θmax,
4. θ,
5.
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.
2.
3.
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.
2.
3.
control systems
4.
cal/electronic components.
5.
6.
7.
8.
microprocessor
9. µs?
10.
11.
12.
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 computersare 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.
2.
3.
Microprocessors: classified based on their specification, application and architecture microprocessors are classified.
Based on size of data bus:
1.
2.
3.
4.
Based on application:
1.
application. Examples, 8085 to Intel Pentium.
12

2.
application. Example, 8051.
3.
signal processors and application-specific integrated circuit (ASIC) chips.
Components of microprocessor shown in Fig 7
1. µcontroller orµprocessor.
2.
(ADD),Subtraction (SUB), AND, OR
3.
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.
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.
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.
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.
memory, called stack. The beginning of the stack is defined by loading 16- bit address in the stack pointer
8.
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.
the instruction, which has been decoded.
4.2 Review Questions
1.
their difference
2.
3.
4.
5 Sensor Communication Design
Asynchronous transmissionimplies 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. Whilesyn-
chronous transmissionthere 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 transmissionWithin 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 asGeneral 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..
Anexternal busis 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 systemsare 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 controlinvolves 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 thehierarchical 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 agreater decision-making role. With the
distributed system, each computer system carries outessentially similar tasksto 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 transmissionoccurs in one ofthree modes.
Simplex mode:Transmission is only possible inone direction, from device A to device B, where deviceB 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 inone 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) radiois an example ofhalf-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. Thetelephone systemis 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 formultipoint 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 isonly 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 forlocal 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 bemultiple 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 commonlybus, 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 atoken, aspecial 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 involvesemptyslots 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 theEthernet 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 termmultiple
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 ismodulated 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 ofmodulated radio frequency
carriersto besimultaneously transmitted and so offers a multichannel capability.
ˆbaseband transmissionis used when digital information is passed directly through thetransmission medium.
Baseband transmission networks can only supportone information signal at a time.
. A LAN may be eitherbaseband 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 dataformat,
timing, sequencing, access control and error control. The three elements of a protocol are:
1. data format, coding and signal levels;
2. synchronization, control and error handling;
3. 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. TheCRC 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 protocolshave 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.
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.
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.
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.
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.
are connected together by the network. It is responsible for determining when to turn a communication between
two stations on or off.
6.
suitable form for user manipulation.
7.
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 loopAnother 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 busThe 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.
ExamlpeAn 8-bit R-2R DAQ has aVrefof 10 V. The binary input is 10011011. Find the analog output voltage.
SolutionAn 8 bit DAQ has maximum capacity ofM= 2
N
,2
8
= 256
10011011
= 1×2
7
+ 0×2
6
+ 0×2
5
+ 1×2
4
+ 1×2
3
+ 0×2
2
+ 1×2
1
+ 1×2
0
= 128 + 0 + 0 + 16 + 8 + 0 + 2 + 1
= 155
we can calculate the analog output voltage:
Vout=
input×Vref
256
=
155×10V
256
= 6.05V
6.05Vis 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= 12
4
+ 02
3
+ 12
2
+ 12
1
+ 02
0
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= 1016
2
+ 316
1
+ 1416
0
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= 1016
3
+ 116
2
+ 1216
1
+ 2 = 41410 (base 10)
10110B= 12
4
+ 12
2
+ 12
1
= 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= 25Dremainder = 0
25D/3 => quotient= 8Dremainder = 1
8D/3 => quotient= 2Dremainder = 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= 10010BFractional 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=.1011BCombine, 18.6875D= 10010.1011BThe 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.
2.
3.
4.
5.
Mnemonicsare 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 languageis 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
content of FFh and FF00h
Arithmetic: exchange the
content of FFh and FF00h
treatr6−r7 andr4−r5 as
two 16 bit registers. Per-
form subtraction between
them. Store the result in
20h (lower byte) and 21h
(higher byte).
divide the content of r0
by r1. Store the result
in r2 (answer) and r3 (re-
minder). Then restore the
original content of r0
Mov dptr,# 0FF00h
→take the address in
dptr,
Mov a, r7→get the con-
tent in acc,
Clr c→clear carry Mov a, r0 →get the con-
tent of r0 and r1
Movx a, dptr→get the
content of 0050h in a
Anl a, # 0F0h→mask
lower bit
Mov a, r4→get first lower
byte
Mov b, r1→in register A
and B
Mov r0, 0FFh→save the
content of 50h in r0,
Mov r6, a→send it to r6 Subb a, r6 ; subtract it
with other
Div ab→divide A by B
Mov 0FFh, a→move a to
50h
Swap a→xchange upper
and lower nibbles of acc
Mov 20h, a ; store the re-
sult
Mov r2, a→store result
in r2
Mov a, r0→get content of
50h in a
Orl a, r6→OR operation Mov a, r5→get the first
higher byte
Mov r3, b→and reminder
in r3
Movx @dptr, a ; move it
to 0050h
Mov r6, a→finally load
content in r6
Subb a, r7→subtract from
other
Mov b, r1→again get con-
tent of r1 in B
Mov 21h, a→store the
higher byte
Mul ab→multiply it by
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.
2.
3.
4.
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 + OffsetA1;
Else
FlowRate: = 100.0; Steam:
¯
ON
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
LDP RESS1
STMAXPRESS
RESET: LD 0
STAX43 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.
drawbacks of each.
2.
3.
4.
5.
20h and 20h to 30h.
6.
block are greater then the number in r2 and less then number in r3. Store the count in r4.
20

7.
8.
9.
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.
traditional system. Write at least three comparison facts/points of traditional and mechatronic system.
2.
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.
Vref= 1 volts, find the digital equivalent on the display that correspond toVin= 0.6 volts.
Part II: Choose the best answer
1.
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.
emissivity a) piezoelectric crystals b) Microphones condenser/ c) Camera temperature detector (Temperature
camera d) all
Part III: Say True or False
1.
2.
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-
tial transducer (LVDT/RVDT)
A Robust noncontact switching action, The digital
outputs are often directly fed to the digital controller
2 Photoresistors, photodiodes, photo
transistors, photo conductors, etc.
B Alternate to strain gages with very high accuracy
and bandwidth
3 Fiberscope C Good for measuring frequencies up to 40% of its
natural frequency
4 Inductance, eddy current, hall effect,
photoelectric, capacitance, etc
D Good for small force measurements
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] Introduction to MECHATRONICS, Oxford University Press,2007.
[2] https://www.zhaw.ch/en/engineering/
institutes-centres/ims/, Accessed: Feb 20, 2023.
[3] Institut fu¨r Automatisierungstechnik Technische Universita¨t Darmstadt Darmstadt Germany
2000,22, 29–55.
[4] MECHATRONICS: ELECTRONIC CONTROL SYSTEMS IN MECHANICAL AND ELECTRI-
CAL ENGINEERING Seventh Edition, Pearson Education Limited,2019.
[5]
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] MECHATRONICS AN INTRODUCTION , CRC Press: Taylor & Francis Group,2006.
[7] MECHATRONICS , John Wiley and Sons,2007.
[8] https://standards.ieee.org/ieee/488/
6465/, Accessed: Feb 20, 2023,2011.
[9]
garage,https://www.engineersgarage.com/simple-programs-in-8051-assembly-language/ , Accessed:
Feb 20, 2023,2011.
[10]
https://journals.sagepub.com/doi/10.1177/014233120002200103/, Accessed: Feb 20, 2023,2000.
22