Modeling, Programming and Simulations Using LabVIEW Software (Riccardo de Asmundis) (2011)
Modeling, Programming and Simulations Using LabVIEW Software (Riccardo de Asmundis) (2011)
PROGRAMMING AND
SIMULATIONS USING
LABVIEW™ SOFTWARE
Edited by Riccardo de Asmundis
Modelling, Programming and Simulations Using LabVIEW™ Software
Edited by Riccardo de Asmundis
Published by InTech
Janeza Trdine 9, 51000 Rijeka, Croatia
Statements and opinions expressed in the chapters are these of the individual contributors
and not necessarily those of the editors or publisher. No responsibility is accepted
for the accuracy of information contained in the published articles. The publisher
assumes no responsibility for any damage or injury to persons or property arising out
of the use of any materials, instructions, methods or ideas contained in the book.
Preface IX
Released by National Instruments (Austin, Texas) for the first time in 1986 for the
Apple Macintosh, LabVIEW was conceived as a practical and original programming
environment for hardware control and interfacing with host computer. The main aim
was the introduction of an easy interface between a micro-computer and the instruments
controlled by it, with a graphical interface which simulates the actual instrument on
the computer screen: from this the derivation of the term “Virtual Instrument” and
the more general “Virtual Instrumentation”. The strong originality of LabVIEW as
a programming language, instead, came from the innovative way of programming
introduced since the beginning: a pure graphical way, in which the characters-based
program lines are replaced with one or more graphical schemes which take the role
of the human interface for the developer specialist. This way both “user interface”
(the windows with which the final user will interact) as well as the “source code” (the
actual program written by the developer) have high quality graphics aspects, carrying
the two different contents and purposes. A meta-language is internally generated
during development processes and is used as source for the LabVIEW Compiler for
the generation of the final executive object. This object runs under a specific “run time
engine” which is the real object handled by the Operating System and is automatically
installed with the LabVIEW development system.
The development system has undergone an enormous evolution in the years, with an
assessed regulation in terms of the new delivered versions today: a new version every
year which carries in its name the reference to the year itself, and at least two releases
in the same year. The latest version (LabVIEW 2010) represents the current evolution
of a long improvement process which never stops: it includes, for instance, among
many features, the straightforward control of NI-DAQ devices, several Protocols for
Instruments controls and driving, Advanced automatic code generation as “Express
Vis”, direct Web integration, real time development environment for RT processing,
FPGA code designing and integration, advanced graphical tools, high powerful
mathematical processing tools, direct integration with Matlab and Mathematica, tools
for modeling and industrial controls, and so on. The current philosophy related to the
use of most of these tools is a strong reduction of the development time as well as the
effective “designing time”: many Virtual Instruments are already there and “ready to
use”.
"For more than 20 years, NI LabVIEW graphical development has revolutionized the development
of scalable test, measurement, and control applications. Regardless of experience, engineers and
scientists can rapidly and cost-effectively interface with measurement and control hardware,
X Preface
analyze data, shared results, and distribute systems." This sentence was pronounced by
Jeff Kodosky, one of National Instruments founder and the LabVIEW inventor, in the
occasion of the 20th birthday of LabVIEW in 2006. Well, this should be the philosophy
to be carried on by each single developer who, to be considered a good developer,
should follow the product into its evolution along the years in order to be up to date for
the new features and possibilities and to use it in an effective way.
We divided the book into four parts, based on the field of applications of the presented
chapters.
The first Part is called “LabVIEW in Monitoring and Controls Domains” and includes
four Chapters: it is dedicated to one of the canonical ways of utilization of LabVIEW,
namely the control of instrumentation and experiments, even with distributed facilities
in some cases. The Applications presented here are characterized by a general and
common approach which is typical for LabVIEW in the control domain: this approach
is based upon a set of instruments and/or sensors read out by the controlling PCs;
data are then archived locally and optionally distributed to other control points over a
network. Such an approach can be very powerful for the improvement of the quality of
a laboratory, which can share resources and data, sometimes in a very flexible way.
In the third Part, “LabVIEW for Specific Processes and Applications”, we include
Chapters characterized by very specific application fields. The purpose of these
applications are similar to the ones presented in the first part, but with the main
difference of being not so general as designing approach but strictly tuned for the
application treated. Situations that lead to these solutions are the ones where the
measures can be difficult or can involve specific hardware sometimes specifically
developed for that. The development approach can be considered as limited to some
kind of particular files (i.e. low current measurement, very low voltage or high voltage
measurement, small dimensioned specimen, etc.). Four Chapters are included in
semiconductor, spectroscopy and optical fields and in the health field.
The last Part, named “LabVIEW in the Educational Domain”, includes two chapters
whose content is somehow related to the education. They present general purpose
applications for laboratory control but with an approach or a finality typical of the
educational environment.
We hope this book dedicated to LabVIEW and its aspects can strongly evolve in the
future, by including not only more Applications developed, but also by transmitting
Preface XI
to the reader the likeness in the LabVIEW development without forgetting its power,
flexibility and the universality intrinsically existing in it.
Riccardo de Asmundis
National Institute of Nuclear Physics, Napoli
European Organization for Nuclear Research (CERN), Geneva
Certified LabVIEW Developer and Instructor, National Instruments
Part 1
1. Introduction
In modern analytical chemistry not only do new measurement principles have to be
investigated but newly found techniques also need to be developed into integrated and
more and more automated analytical solutions. Exploring new techniques in research and
development (R&D) environments mostly means designing different setups incorporating a
huge variety of different equipment. Whether this hardware is a pump, a valve or more
complex elements such as oscilloscopes, lasers or detectors, in one way or another they can
be controlled by a computer or the acquired data is digitized and evaluated afterwards.
Those setups, however, change frequently in R&D labs to evaluate new ideas or to improve
a current setup. Inevitably whenever the setup chances, the software controlling it will also
need adaptation. An ideal software platform, therefore, would reduce the time needed for
making those changes to a minimum, giving the researcher the possibility to focus on the
evaluation of new approaches and the characterization of new techniques. Especially for
small startup companies it might also be of great interest that the needed software packages
can be maintained and adopted by the scientist himself instead of the need to outsource it to
a software company. This would not only reduce the cycle time from a new idea to the first
prototype but also has the potential to decrease the associated costs.
One programming language ideally suited for such a software environment is LabVIEW
from National Instruments. Due to its graphical programming language all data flow is
visualized directly in the source code. This fact makes it easier to read and understand a
given program, especially for beginners without programming experience in classical
programming languages, such as C++ or Visual Basic. Another point where LabVIEW
outperforms other programming languages is it’s rich library of Graphical User Interface
(GUI) elements, for example XY graphs are predefined as well as 3D graphs. Another
advantage of LabVIEW is the very simple way to create parallel running tasks. In
combination with LabVIEW’s queues, which represent a "first in - first out" buffer system,
separating the readout of data and its evaluation can be separated easily. Using National
Instruments hardware for the data readout brings easy integration for the software
developer. Secondly interfaces for RS-232, GPIB, USB etc. are also provided for
communicating with third party hardware.
All these advantages make LabVIEW a good choice for developing software in R&D
laboratories. Generally speaking, laboratories focus on the development of software for their
4 Modelling, Programming and Simulations Using LabVIEW™ Software
current experimental setup ending up with a LabVIEW program built for this specialized
task. Dominguez et al. designed a LabVIEW program to control a Sequential Injection
Analysis (SIA) system (Dominguez et al., 2010) which consisted of a valve and a peristaltic
pump. Jitmanee et al. used a more complex liquid handling system consisting of three
valves and three pumps to automatically prepare samples for Inductive Coupled Plasma
Mass Spectrometry (ICP-MS) measurements (Jitmanee et al., 2007). Barzin et al. proposed a
spectrophotometric method for pH measurements in miniaturized systems where LabVIEW
handles data acquisition from a flowmeter and a spectrometer and is linked to a Matlab
feedback loop to calculate the appropriate flow rate which is sent to a syringe pump
afterwards via LabVIEW (Barzin et al., 2010). In all these examples the program is limited to
control the hardware it was designed for. In the first two examples automation tasks are
carried out whereas in the latter one a complex control feedback loop is realized. When we
started working with LabVIEW we wanted to create a software platform, which gives the
operator the freedom to combine different hardware elements in any imaginable way
without the need to make changes to the program code. Only adding new hardware to the
software platform should require software changes, which would be easier using LabVIEW
than any other programming language.
First we created a program that allowed the combination of valves, pumps and an high
voltage supply for the sample preparation with an UV detector and infrared spectrometers
from Bruker Optics to build different setups including SIA (Růzicka, 1992) and flow
injection analysis (FIA) (Růzicka, 1981) systems as well as capillary electrophoreses systems
(Wagner et al., 2010). To address all necessary components in a simple way we decided to
use a scripting language containing commands representing tasks including switching a
valve, applying voltages or starting measurements. The script was written manually and
afterwards started sending commands to the connected hardware consecutively. This
system allowed the easy combination of the integrated hardware into different analytical
systems. However, after adding support for additional hardware and the need for more
complex commands the GUI became too crowded with elements and writing the scripts
became more and more difficult due to the number of available commands.
Our first program allowed the scientist to combine all integrated components with ease but
adding new hardware components to the program became more and more sophisticated
due to the growing source code. Therefore, we decided to create a new platform based on a
client server approach, where every hardware component is controlled by a dedicated client
which can be controlled remotely by a server application. A schematic of this software
platform can be seen in figure 1. Each of the clients can be run in three different modes. The
local mode directly interacts with the connected hardware upon user input, the programming
mode sends commands to the server application and in the server mode the clients receive
commands from the server and execute them on their hardware. In that manner adding new
hardware is done by adding client specific program code to a provided client template,
containing all necessary code to handle the communication with the server. Additionally the
user doesn’t need to remember client specific commands because the programming of a
sequence can be done with the GUI of each client.
In the following we will describe our Advanced Total Laboratory Automation System (ATLAS),
including a list of existing clients as well as two examples of experimental setups controlled
by ATLAS.
Advanced Total Lab Automation System (ATLAS) 5
Data Acquisition
ATLAS Server
Lasers
Valves
Pumps
Others
Fig. 1. Schematic of our Advanced Total Laboratory Automation System (ATLAS). Each
hardware component is controlled by a dedicated client program which can communicate
with the ATLAS server to be remote controlled.
1 http://zone.ni.com/devzone/cda/tut/p/id/4095
2 http://zone.ni.com/devzone/cda/tut/p/id/3055
6 Modelling, Programming and Simulations Using LabVIEW™ Software
FGV. Otherwise the server may try to send data to an unreachable client which would lead to
a timeout. All data between the server and the clients is transported by using the STM Write
Message and STM Read Message VIs. Beside the string that has to be sent, a cluster, containing
timeout settings, can be attached to the STM Write Message VI. At first, the meta data index,
containing the data channel names is obtained, flattened to a string and concatenated with
the data to send. In the next step the byte length of this data string is calculated and attached
to the beginning of the string. Finally, the complete string is written to the TCP connection.
The receiving program utilizes the STM Read Message VI to read the first four bytes of the
transported string. These four bytes are converted to an integer representing the length of
the remaining data string. In a second step this value is taken to read the residual data.
Finally, the transported string can be accessed for further processing.
status
initialize
cmd:XY
status
ready
status:ready
XY|do|sth.
ATLAS Server
Client
status:wait
execute
status
status:wait
status
ready
status:ready
XY|do|sth.
execute
Fig. 2. Simplified communication scheme between the ATLAS server and one client.
Advanced Total Lab Automation System (ATLAS) 7
Receiving further status queries from the server clients respond with either status:ready,
status:wait or status:error. status:ready means that the client is ready to accept instructions
from the server and that both, software and hardware, are working correctly. status:wait will
be sent if the client is executing a command, such as measuring a voltage or recording a
spectrum. In the case that a hardware failure occurred or an invalid command was sent to
the client, it will respond with status:error.
After the user starts the execution of the sequence by clicking the corresponding button, the
server checks whether all required clients are connected. If so, it will run the command
interpreter, described in section 2.2.2. Afterwards the server begins distributing commands
to the correct clients. After a command was sent the server goes on with polling the status of
the connected clients. The addressed client starts executing the received command and
answers status:wait to the server. The server will continue the execution of the script as soon
as its status requests are answered with status:ready instead of status:wait.
In case a device failure occurs (e.g.: a tubing is plugged, a device becomes disconnected) or
an invalid command was sent, the client controlling the according device will answer the
status request from the server with status:error. As a result the server terminates the running
sequence and executes the alias-command AL|error. As explained later in section 2.2.2 the
server notifies all connected clients of the error event. The clients will execute a special
protocol that contains commands for such an error case. Usually it is sufficient to abort the
experiment, but some devices have to be shut down in a special way to avoid further
problems.
This procedure is repeated in the for-loop for each client and after each client responds
status:ready the server takes the next available command from the script. The corresponding
client is identified by its client ID and the command is sent over the corresponding TCP
connection. In addition the timestamp and the sent string are logged and the progress of the
script execution is visualized.
User input such as loading, saving, starting and canceling of sequences, as well as saving the
server-send-log, is treated by an additional event handler structure. Whenever a script is
executed the server automatically saves the script sequence to be able to connect recorded
measurement data unambiguously with the used sequence.
Table 1. Examples for the script-interpreter features. It is able to handle loops, formulas and
aliases.
2.2.2.1 Loop constructions in the script sequence
Often a part of a sequence has to be executed many times. For example, a scientist wants to
measure a large number of liquid samples by using valves and pumps. One way to solve
this problem is to enter every line of the sequence manually, which means that every change
of the valve-position and every operation of the pump has to be written down in the
sequence. As this way is inefficient and hard to adopt to further experiments, the ATLAS
server implements a function that is similar to a for-loop in conventional programming. In
C++, for example, a for-loop begins with for(int i=5; i<13; i++){ and ends with }
whereas the repeated code is located between the braces. Scientists, who want to use such a
function in their ATLAS sequence, have to write the repeated section between the lines
loop($i=5|13|1) and loop_end. The opening bracket is followed by $, a variablename,
= and the starting point for the variable. The next number is the last variable value and the
third number represents the increment. Nested loops are also allowed whereas different
variable names have to be used.
10 Modelling, Programming and Simulations Using LabVIEW™ Software
3 http://zone.ni.com/reference/en-XX/help/371361G-01/gmath/advanced_formula_vis/
4 http://zone.ni.com/devzone/cda/tut/p/id/2926
5 http://zone.ni.com/devzone/cda/tut/p/id/3023
Advanced Total Lab Automation System (ATLAS) 11
init
switch: local
programming
running state changed server
exit
Fig. 4. Scheme of the client’s architecture, which consists of a state-machine. It enables the
software to switch between the different operating modes "client", "server" and local".
in server mode and passes them on to the third loop functioning as the consumer loop. In
programming mode, however, the second loop is used to send script commands to the
ATLAS server upon user interaction. The consumer loop interprets the script commands
and translates them into hardware interactions. The exchange of commands between these
three loops is realized by a queue (referred to as command queue) code structure. A second
queue (referred to as status queue), which can also be seen in figure 5 is used to transport
the status of the client from the consumer loop to the server loop and on to the ATLAS
server if the client is in server mode. The differences in program execution for the three
different states are explained in further detail below.
• local mode: The communication between the server and the client is deactivated. User
interaction on the front panel triggers the event handler which assembles a script
command, representing the user input from the GUI, and adds this script command to
the command queue triggering the consumer loop execution.
• programming mode: The server loop is used to send script commands received via the
command queue to the ATLAS server after receiving a status request from the server. The
consumer loop, however, does not pass on any command to the connected hardware.
• server mode: The server loop is used to receive script commands from the ATLAS
server and adds them to the command queue. The event handler structure, however,
can still add commands to the command queue on user input to enable the user to
interrupt automated script execution. The server loop is also used to reply to status
requests from the ATLAS server according to the current state of the client, which is
transported over the status queue as described above.
server loop
consumer loop
Fig. 5. Block diagram of a simplified ATLAS client, showing the running state. See the text
for further information.
Advanced Total Lab Automation System (ATLAS) 13
3. Sample applications
3.1 Example I: Quantification of lactate in aqueous solution using an External Cavity
Quantum Cascade Laser
In clinical diagnostics numerous parameters, such as glucose, phosphate and lactate in
blood have to be measured with high precision and accuracy in short time intervals. One
14 Modelling, Programming and Simulations Using LabVIEW™ Software
⎛ I (cm −1 ) ⎞
A(cm −1 ) = − log ⎜ ⎟ = ε ⋅c ⋅l (1)
⎜ I (cm −1 ) ⎟
⎝ 0 ⎠
In this formula I0 denotes the measured intensity of the light reaching the detector without
sample whereas I gives the intensity after the light was absorbed by the sample. ε[L/cm] is
the molar absorption coefficient at a given wavenumber. c[mol/L] denotes the concentration
of the analyte and l[cm] gives the path length of the measurement cell.
Increasing the optical path length of the measurement cell would solve both drawbacks,
described above, at the same time. Larger cell dimensions would make the cleaning of the
cell easier, accompanied by better sensitivity because of the increased interaction length.
Replacing the IR spectrometer with a Quantum Cascade Laser (QCL) (Faist et al., 1994)
enables the penetration of higher path lengths at one wavenumber due to the higher energy
output of the laser compared to the light source of an IR spectrometer. Applying an External
Cavity Quantum Cascade Laser (EC-QCL), which can shift its emission wavenumber over a
range of 200 cm–1 gives a spectrum instead of a single absorbance value at a given
wavenumber.
Using an EC-QCL enabled us to use an optical path length of 130 μm for the measurement of
physiological relevant compounds in Ringer solution. Using ATLAS we realized an
experimental setup for the measurement of liquid samples and tested it on lactate samples
in Ringer solution.
3.1.1 Experiment
For our studies we combined an EC-QCL (tuning range: 1030 – 1230 cm–1) from Daylight
Solutions Inc. with a thermoelectrically cooled Mercury Cadmium Telluride (MCT) detector
and a Sequential Injection Analysis (SIA) system for sample preparation (Brandstetter et al.,
2010). The detector signal was digitized by a specially designed analogue to digital
Advanced Total Lab Automation System (ATLAS) 15
Proprietary Connection
RS-232
Teflon Tubing
Holding Coil EC-QCL
Flow Cell
Injection-Valve
14-Way-Valve wavenumber:
1160 cm^-1
Waste
Detector Laser-Driver
Peristaltic-Pump
Ethanol
DL
Digital Board
DB
Fig. 6. Experimental setup for the measurement of lactate in Ringer solution using an
External Cavity Quantum Cascade Laser.
converter (ADC) board which was read out by the digital board ATLAS client. Using a SIA
system improves on manual sample injection by means of reproducibility and repeatability.
Applying the SIA system also helps to reduce sample contaminations since the system can
be cleaned automatically before a new sample is injected for the next measurement.
For this setup, shown in figure 6, the ATLAS clients for the digital board, the EC-QCL from
Daylight Solutions Inc., the syringe pump from Cavro Inc., valves by Vici Inc. and the client
for the Gilson Miniplus 3 peristaltic pump were connected to the ATLAS server. All
hardware parts were connected to a notebook by RS-232 connections over USB-to-RS-232
converters. The peristaltic pump in the setup was only used if air bubbles were found in the
tubings. In that case the system was purged with ethanol first to drive the bubbles out of the
system and afterwards the ethanol flask was exchanged with Ringer solution manually and
the tubings were filled with Ringer solution again.
In a first experiment lactate in Ringer matrix was pumped through the measurement spot
repeatedly to examine the achieved flow profiles. Therefore, the whole system was filled with
Ringer solution first. The laser parameters were sent by the client to the laser control unit and
the emission wavenumber was tuned to 1130 cm–1. After initiating the emission of light the
data acquisition was started and the intensity of the detected signal was streamed onto the
hard drive continuously. In the meantime the syringe pump picked up the lactate sample
through the 14-way-valve into the holding coil. After switching the 14-way-valve back to
connect the holding coil with the measurement cell the syringe pump dispensed the lactate
sample through the measurement cell. The pickup and dispense procedure was repeated
while the data acquisition continued. In figure 7 the obtained flow profile for two repetitions is
plotted against time. Whenever the sample solution passes the measurement cell the measured
intensity on the detector decreases due to absorption taking place in the cell. The obtained flow
profiles are in good agreement with theory. Optimization of the pumped lactate volume and
the used flow rates allowed adjustments of the system in such a way that, at the maximum of
the absorption, undiluted sample was measured. Knowing the exact time when this maximum
reached the flow cell was crucial for the following experiment.
To obtain a calibration curve for lactate in Ringer solution a second command sequence was
programmed. Firstly Ringer solution was pumped through the measurement cell utilizing a
16 Modelling, Programming and Simulations Using LabVIEW™ Software
Time [min]
0,0 0,5 1,0 1,5 2,0 2,5 3,0 3,5
34500
34000
Detector Intensity [a.u.]
33500
33000
32500
32000
31500
0 25 50 75 100 125 150 175 200 225
Time [sec]
Fig. 7. Lactate solution was pumped through the measurement cell twice while the EC-QCL
emitted light at 1130 cm–1 and the digital board read out the detector values.
Cavro syringe pump. After the cell was purged the flow was stopped and the ATLAS server
sent a signal to the digital board to start recording. Afterwards the EC-QCL was started by
the server to scan over a wavenumber region ranging from 1030 to 1230 cm–1. This
measurement served as I0(cm–1) in equation (1). Then the valves switched positions allowing
the syringe pump to pick up a sample of lactate into the holding coil. After the 14-way-valve
was switched to connect the holding coil with the flow cell the sample was pumped into the
measurement spot. Subsequently, the flow was stopped at the absorption maximum
determined earlier. Now the EC-QCL received a trigger signal from the server to start
another measurement, which gave I(cm–1) in equation (1). Then the valve of the syringe
pump was switched to the opposite direction and picked up Ringer solution from the
storage flask. After switching the valve back the whole system was purged again. This step
was repeated twice to flush any possible remaining lactate out of the measurement spot.
The sequence described above was automatically repeated for all five sample concentrations
by changing the 14-way-valve to the appropriate position in each of the measurement runs.
Afterwards the absorbance spectra were calculated manually and the data shown in figure 8
were plotted in Origin. Calculating a linear calibration function for the measured
absorbances at the band maxima gave a R2 value of 0.996.
In conclusion we can report that setting up a SIA system using ATLAS can by achieved
easily. The integration of the EC-QCL and the data acquisition electronics into the SIA
sequences was simple too after the ATLAS clients for the laser and the ADC board had been
developed.
0,040
0,040
1 mmol/l
0,035 5 mmol/l 0,035
10 mmol/l
0,030 15 mmol/l 0,030
20 mmol/l
0,025
0,025
Absorbance [AU]
Absorbance [AU]
0,020
0,015 0,020
0,010
0,015
0,005
0,010
0,000
-0,005 0,005
-0,010 0,000
1180 1160 1140 1120 1100 1080 0 5 10 15 20
-1
Wavenumber [cm ] Concentration [mmol/l]
Proprietary Connection
RS-232 UV-Detector
HPLC-Column
Sample Ultimate 3000
Capillary burst
Piezoelectric
Dispenser
Agilent 0123
XY DI
UV
XY-Stage-Controller
Stepper-Motor
Stepper-Motor
Fig. 9. Experimental setup for the coupling of a liquid chromatography system with offline
IR detection utilizing a micro dispenser for sample deposition.
3.2.1 Experiment
Our system, as shown in figure 9, was built combining an Ultimate 3000 capillary LC system
(Dionex, Sunnyvale, CA, USA), which is not implemented in ATLAS yet, a Dionex UV
detector, a home built XY stage and a micro dispenser from Picology AB (Bjaerred, Sweden).
The UV detector was configured and read out via a RS-232 connection by an ATLAS client.
The stepping motors of the XY stage were connected to a controller board (Trinamic TMCM-
610) which was controlled by another ATLAS client. The piezo crystal of the micro
dispenser was actuated by a specially designed electronics board which amplified a burst
signal generated by an Agilent 33120A function generator. The burst period, giving the
number of droplets dispensed each second, and the burst amplitude, giving the volume of
each dispensed drop, were set by a dedicated dispenser ATLAS client. The droplets of the
eluent were dispensed onto a heated plate of IR transparent CaF2 mounted on the XY stage
moving the plate constantly during the deposition.
A typical experiment consisted of the following steps. First the injection of the sample onto
the LC column was initiated manually since the LC system is not implemented into the
ATLAS system yet. Immediately afterwards a preprogrammed ATLAS control sequence
was started containing the following steps:
• The desired wavelengths for the UV measurement are set
• The absorbance signal of the UV detector is set to zero
• The dispenser parameters are set
• The movement of the XY stage is initiated at a certain speed and a programmed
distance to travel
• The UV measurement is started
• The dispensing of the droplets is triggered
After the elution of the injected substances was completed the CaF2 plate was removed from
the XY stage and was analyzed on a Hyperion 3000 IR microscope from Bruker Optics
(Ettlingen, Germany). The plate was measured in transmission mode applying a line scan
along the deposited material.
Advanced Total Lab Automation System (ATLAS) 19
0,0150
0,016
UV trace at 210nm
0,12 IR trace at 1657cm
-1
0,014
0,0125
0,10
0,012
0,0100
Absorbance [AU]
UV Absorbance [AU]
IR Absorbance [AU]
0,08 0,010
0,008 0,0075
0,06
0,006
0,04 0,0050
0,004
0,02 0,0025
0,002
0 2 4 6 8 10 12 14 16
2000 1800 1600 1400 1200 1000 800
Time [min] -1
Wavenumber [cm ]
final version and the source code of ATLAS will be made available on our website
(http://www.cta.tuwien.ac.at/cavs), to allow other users to use and improve it.
5. Acknowledgment
The authors want to thank Eva Aguilera Herrador, Julia Kuligowski and Markus
Brandstetter for supplying us with their measurement data which are presented in section 3.
6. References
Armenta, S. & Lendl, B. (2010). Capillary liquid chromatography with off-line mid-ir and
raman micro-spectroscopic detection: Analysis of chlorinated pesticides at ppb
levels, Anal Bioanal Chem 397(1): 297–308.
Barzin, R., Shukor, S. & Ahmad, A. (2010). New spectrophotometric measurement method
for process control of miniaturized intensified systems, Sensors and Actuators, B:
Chemical 146(1): 403–409.
Brandstetter, M., Genner, A., Anic, K., Lendl, B. (2010). Tunable external cavity quantum
cascade laser for the simultaneous determination of glucose and lactate in aqueous
phase, Analyst, available online, doi: 10.1039/c0an00532k.
Dominguez, R., Muñoz, R. & Araiza, H. (2010). Automated analytical system based on the
sia technique, Pan American Health Care Exchanges, PAHCE 2010 pp. 117–119.
Faist, J., Capasso, F., Sivco, D., Sirtori, C., Hutchinson, A. & Cho, A. (1994). Quantum
cascade laser, Science 264(5158): 553–556.
Griffiths, P. R. & Haseth, J. A. D. (2007). Fourier Transform Infrared Spectrometry, Wiley-
Interscience.
Jitmanee, K., Teshima, N., Sakai, T. & Grudpan, K. (2007). Drc™ icp-ms coupled with
automated flow injection system with anion exchange minicolumns for
determination of selenium compounds in water samples, Talanta 73(2): 352–357.
Laurell, T., Wallman, L. & Nilsson, J. (1999). Design and development of a silicon
microfabricated flow-through dispenser for on-line picolitre sample handling, J.
Micromech. Microeng 9(4): 369–376.
Quintás, G., Kuligowski, J. & Lendl, B. (2009a). On-line fourier transform infrared
spectrometric detection in gradient capillary liquid chromatography using
nanoliter-flow cells, Analytical Chemistry 81(10): 3746–3753.
Quintás, G., Kuligowski, J. & Lendl, B. (2009b). Procedure for automated background
correction in flow systems with infrared spectroscopic detection and changing
liquid-phase composition, Appl Spec 63(12): 1363–1369.
Růzicka, J. (1981). Flow Injection Analysis, Vol. 62 of Chemical Analysis, Wiley, John & Sons,
Incorporated.
Růzicka, J. (1992). The second coming of flow-injection analysis, Analytica Chimica Acta
261(1- 2): 3–10.
Wagner, C., Armenta, S. & Lendl, B. (2010). Developing automated analytical methods for
scientific environments using labview, Talanta 80(3): 1081–1087.
2
1. Introduction
A medium size research facility has a difficulties to develop control systems for their own
special equipments, especially for accelerator facilities, because there is only few experts for
constructing the control system and the control objects are not mass-product ones in most
case. We have experienced such situation and we found a solution for a development in a
medium size accelerator complex, SAGA Light Source (SAGA-LS) by using distributed MS-
PC control system which is connected with a standard Internet protocol and is developed by
Labview.
The SAGA Light Source (SAGA-LS) (Tomimasu, et al., 2003), (Iwasaki, et al., 2003) is a
medium size synchrotron light research facility located at Kyusyu-Island, Japan. The
accelerator control programs have been developed in-house from the beginning of the
machine commissioning using Labview. At this stage almost all of the components of the
accelerator, for instance, magnet power supplies, radio frequency (RF) system, vacuum
monitoring and beam position monitoring system, are controlled and monitored by server
and client model with LabView. During the commissioning period integrated sub-systems
such as a feed-forward orbit correction system for insertion devices, a feedback power
supply control system, a beam based beam position monitor (BPM) calibration and the other
control applications have also been developed with Labview. E-mail services for alarm
information and Web server that delivers accelerator status for entire facility are also
developed by Labview. External codes are available to help the accelerator operation. For
example TRACY2 (Nishimura, 1988) is used for accelerator modelling to establish the
machine parameters in cooperate with Labview control system. In this chapter we describe
the SAGA-LS accelerator control system as an example of developments of the control
system for a medium size research facility using Labview.
2. Design
SAGA-LS accelerator consists of 255 MeV injector linac and 1.4 GeV electron storage ring.
The circumference of the storage ring is 75.6 m. Figure 1 shows the geometrical layout of
SAGA-LS facility. At this stage 10 beam lines are offered to user experiments.
The control system for the SAGA-LS accelerator, which consists of magnet power supplies, a
radio frequency, and a vacuum monitoring system, should be implemented with
communication interfaces, because those are distributed in wide area of the facility, and
22 Modelling, Programming and Simulations Using LabVIEW™ Software
operators have to manipulate these components from the control room. The Ethernet LAN is
standard communication interfaces and we can easily use it with MS-PCs and LabView
system with server and client model. We adopted Ethernet LAN as communication
interfaces with each accelerator devices and PCs, because of its high cost performance. For
the connectivity to the accelerator hardware, we selected commercial base off-the-shelf
distributed input output devices (I/O devices) such as PLC (FA-M3; YOKOGAWA), and
Fieldpoint (National Instruments). A serious issue on SAGA-LS facility is its tightly
restricted budget and, hence, the limited number of staff in the facility. Thus, the control
system for SAGA-LS should be simple and robust, while inexpensive, easy to develop, to
maintain and to be expandable. The solution of this problem in the view point of hardware
is the usage of the PC and the off-the-shelf products. On the other hand for the application
developments we use the Labview environment, because a few number of staff have to
develop the control applications with in-house efforts toward variety of demands from the
construction period to the use operation period. Other reasons of using Labview and its
merits are discussed in chapter 5.
exception is synchronous operation for power supplies for a quick energy ramping in the
storage ring. In this case a PLC with preloaded ramping pattern is available. Hence, we have
designed a MS-Windows PC-based control system, which uses the EPICS channel access
(CA) only for the purpose of utilization of the general EPICS utility code, and off-the-shelf
I/O devices. There are several manners to communicate with server PCs and client PCs. The
DataSocket, Shared Variables, which in built–in protocol in the Labview system, are one of
the methods for this purposes. But we use not only Labview, but also other programming
tools for accelerator control system such as Delphi. ActiveX CA can be used under the any
developing environment of MS-Windows OS. Thus we decide to use ActiveX CA as
communication protocol for accelerator control system. There are several excellent works to
develop CA components for the MS-Windows environment. ActiveX CA (Kay-Uwe
Kasemir, 2000) is one of such component. The PC running the ActiveX CA server with I/O
devices works as a standalone PC I/O controller which can communicate with the EPICS
CA through the Labview interface.
Figure 2 shows the schematic view of the architecture of the SAGA-LS accelerator control
system including beam line and office LAN. In figure 2, the RF powe supplies of linac,
electron gun and the many kinds of beam diagnostic equipments are omitted.
WAN
Groupware
DMZ
Router Of f ice LAN
I ntra-Web Server
Facility LAN Accelerator Status FireWall
Linac Magnet
CA Server Database CA Client CA Client CA Client
Accelerator LAN ActiveXCA Ring I nsertion
Ring Magnet Vacuum&BPM Ring RF Device
CA Server CA Server CA Server CA Server
Linac
Vacuum&LCW
CA Server
PLC PLC PLC
FA-M3 FP-1601 FA-M3 FA-M3 FP-1601 FP-1601 Stepping Motor PLC
Controller FA-M3
Linac Magnet Linac Vacuum LCW Ring Magnet Ring Vacuum Ring RF I nsertion
/BPM Device
Fig. 2. Schematic view of the architecture for SAGA-LS accelerator control system.
The accelerator, beam line and office LAN are separated by firewalls to secure the
accelerator cotrol network. To control the insertion devices from the beam line users, for
instance the operation of undulators, an exception of security policy is added in accelerator
firewall. Simple TCP/IP protocol is used for control method of insertion devices from the
beam line users. An intra-web server is placed in middle zone of facility LAN to deliver the
machine parameter in any location of the SAGA-LS facility. The intra-web server delivers
the status of the accelerator for the beam line users. The details of web system and E-mail
system are described in section 5.7.
24 Modelling, Programming and Simulations Using LabVIEW™ Software
3. System Implementation
3.1 Console PC
The machine commissioning of SAGA-LS accelerator was begun on 2004, and we selected
Window 2000 as operating system of server and client PCs because of its stability, and MS-
Windows OS is familiar environment for the facility staff. The cost performance of Windows
PC is one of the reasons for the choice. At the present stage the higher version of MS-
Windows OS, i.e., Windows XP, Windows Vista and Windows 7 is also used for new control
components of the accelerator.
Console applications are developed using Labview with ActiveX CA. The client PC
communicates with not only one server PC but also several servers for the purposes of cross
sectional applications: COD correction program, measurement of response matrix (R-
matrix), beam based BPM calibration and so on. A few example of console programs will be
described in section 5.2, 5.3 and 5.4.
The data archive system (Database; MySQL), which records accelerator parameters is
installed in the system. The logger programs and the trend viewers are constructed using
Delphi and Labview respectively. ODBC is used for connecting MySQL with Labview.
3.2 PC-IOC
Recent industrial IO devices are reliable and high-speed access via built-in Ethernet modules
can be available. Thus we construct the IOC only with such off-the-shelf industrial I/O
devices. We put PCs between the console computers and the I/O devices, because:
I. Industrial I/O device itself cannot directly communicate with consol PC with ActiveX
CA.
II. Server PC can be used as a local controller during installation and maintenance.
III. Server PC works as IOC for GPIB and non-Ethernet devices such as digital voltage
meter.
IV. The device LAN should be separated from the facility LAN to secure the network.
FieldPoints are a candidate for the I/O devices, because of its reliability and hot plug and
play operation, and good connectivity to the software environment of Labview. FA-M3s
(Yokogawa; PLCs) are used for the I/O devices for magnet power supplies, cooling water
system and insertion devices. Digital voltage meter, which monitors the beam current in
electron storage ring, is connected to a beam current monitor PC with GPIB. As the PC-IOC
works as a local control machine for the maintenance, i.e. repairing or conditioning, the PC-
IOCs should be located close to their control objects.
There are over 10 Windows 2000 or Windows XP PCs for PC-IOC that equipped with
ActeveX CA servers. The server applications have been also developed with Labview.
Almost all of the control applications have been developed in the facility. The only
exception is PLC program for magnet power supplies those are developed by Techno-AP
(Ibaraki, Japan) at first stage of installation. The PLC program has been modified by the
facility staff.
3.3 Performance
The data communications between the PC-IOCs (servers) and the consol PCs (clients) are
done via 100 Mbps LAN, which is isolated from the facility LAN and from the beam-line
users by firewall.
In-House Control System for Medium Size Research Facility 25
As the ActiveX CA only supports the polling data transfer method, the communication rate
between client and server is mainly limited by number of the process variable (PV). Further
more, we must combat with the data-synchronous problem in the multi-client system. To
resolve the problem we use “SET VALUE” and “READBACK VALUE” for “CA put.” In
figure 3, the method using “SET VALUE” and “READBACK VALUE” is illustrated.
Nominal communication rate for 144 variables of magnet power supply for storage ring are
about 5 Hz in the present system. Further improvement in the communication rate can be
expected by using the block data transfer method in the ActiveX CA. Feasible studies on the
block data transfer to the magnet power supply in the storage ring shows that the
communication rate can be achieved 9.5 ms/144 data. However, the block data transfer
method looses simplicity and flexibility in the development of the client applications.
Therefore we use block data transfer method only for the client PC which is required for a
synchronous operation between many power supplies, such as COD correction client. The
Windows PCs and ActiveX CA satisfy our demand with the communication rate of 1 to 10
Hz. The details of design, implementation, performance of the control system of SAGA-LS
are summarized in references (Ohgaki et al., 2003), (Ohgaki et al., 2005).
To fulfil the requirement for the magnet power supply control sub-system, we adopted PLC
as a control device. PLC is used to guarantee the synchronous and rapid operation. The
synchronization accuracy of PLC is sufficient for our requirement (within 10ms
coincidence). For the energy ramping up, the ramping pattern whose step size are 10,000
points per each magnets are pre-loaded in the file registry of the PLC.
PC program, which is developed by Labivew, thus, have two main routines. One is for
connection to the PLC to control and to receive status from the power supplies. And the
other routine is to accept demands from the external client PC for the orbit correction, for
instance. As described before, the communication between server PC and client PC is done
by ActiveX CA. In Figure 4, front panel of control application for magnet power supply and
block diagram are shown.
Typical feature of this application program is that we use “Queue with Type Definition File”
so that many series of tasks are not conflicted each other. By using “Queue with Type
Definition File”, the drawn area of block diagram becomes to be compact compared to using
the other syntax. The scalability of “Queue” for new procedure is quite simple. Basically this
magnet program and ladder program of PLC is developed by Techno-AP (Ibaraki, Japan),
and modified by SAGA-LS staff for further development of machine operation. The
functions of the feed-forward control of power supply for insertion devices and feedback
control for stabilisation of power supply have implemented in the program as well. The
details of feed-forward and feedback system will be mentioned in section 5.5 and 5.6
respectively.
Fig. 4. Front panel and block diagram of the storage ring power supply control application.
We are sorry that some words are written in Japanese, because we use Japanese version of
Labview.
In-House Control System for Medium Size Research Facility 27
FP-1601
Gauge Conroller
Fig. 6. Front panel of vacuum monitoring system. The vacuum is indicated not only as digital
numbers but also trend graph. Vacuum levels of the ring are alarmed using colored indicator.
28 Modelling, Programming and Simulations Using LabVIEW™ Software
monitored from the control room and recorded into the database. Figure 5 shows the
schematic view of the vacuum monitoring system of SAGA-LS accelerator. The vacuum
server PC also serves the beam position to reduce the number of server PC. The trend of the
vacuum level is graphically indicated in the front panel of the client PC as illustrated in
figure 6. The easiness of construction of front panel and adequate graphical interfaces are
superior points of Labview environment.
Fig. 7. Front panel of COD correction program. Any BPM and steering magnet can be
selected (or masked) for the correction.
quadrupole magnet, the beam is kicked with the multipole magnetic field. Such multipole
field causes the orbit shift and decreases the dynamic aperture, which limits beam lifetime.
Thus the calibration of the BPM to the magnetic center of the quadrupole magnet is
significantly important.
The method of beam based BPM calibration is follows;
I. Generate bump orbit near the BPM to be calibrated.
II. Change the excited current of quadrupole magnet close to the calibrated BPM.
III. Measure the orbit shift by the other BPMs in the storage ring.
IV. If the beam passes though the center of quadrupole, might become to be zero.
On these procedures, the steering and quadrupole magnets are sequentially exited and
beam positions are measured. The BPM offset is analysed using Labview on line. In the
analysis linear fitting routine included in Labview mathematical library is used. The
application of the beam based BPM calibration automatically change the value of the
steering and the quadrupole magnets, and monitors the beam position. Such complex and
multi-task application is performed by networking and multi-client architecture with
ActiveX CA data communication. Figure 8 illustrates the method of BPM calibration. By
using the beam based BPM calibration, it was found that over 1mm offset in maximum are
existed in the SAGA-LS storage ring.
30 Modelling, Programming and Simulations Using LabVIEW™ Software
Calibrated B PM
ActiveXCA
I nsertion
Ring Main Undulator Device
Magnet Sidepole Magnet CA Server
CA Server CA Server
PLC PLC Stepping Motor
FA-M3 FA-M3 Controller PLC
Power Supply Room FA-M3
Power Supply&
Normal/Skew
Quadrupole Undulator APPLE-I I
SidePole Power
Supply&Magnet Storage Ring
Fig. 9. Feed-forward dipole, quadrupole, and skew quadrupole magnet against gap height
and phase position of the APPLE2.
In-House Control System for Medium Size Research Facility 31
0.1 0.1
0.08 0.08
)
)
0.06 0.06
σ_ CO D ( mm
σ_ CO D ( mm
0.04 20 0.04 20
)
mm
mm
0.02 0.02
0 0
se (
se (
0 0
Pha
Ph a
50 -20 50 -20
100 100
150 150
Gap ( 200 Gap ( 200
mm ) mm )
Fig. 10. Result of feed-forward dipole correction. The figure shows the horizontal COD:
before; right, after; left. The COD have been reduced less than 10 μm by feed-forward
correction system, and this result confirms the free operation of the undulator from the
beam line users.
quadrupole magnets. In that case, the magnet server PC acts as a client PC for undulators.
The magnet currents have been determined from the experimentally measured values.
However the experimental data are the discrete set against the gap and the phase, the feed-
forward correction application program calculates the exciting current with an arbitrary
point by the linear and the polynomial interpolation of the measured data. Figure 9 shows
the schematic view of the feed-forward system, and figure 10 is the correction result of the
horizontal orbit shift. Before the correction, the standard division of the COD against the
reference orbit is larger than 100 μm. After the correction it was reduced to be less than 10 μm.
Cont r ol Room
Client PC Client PC
I = I + ⊿I / 10.
Power Suppies
Cont r ol Ser ver
Labview+Act iveXCA
PLC Power Supply St at ion Field Point 1601
FA- M3 AI - 110 ( 16bit ADC)
Power Supplies
DCCT Cor e HI TEC STACC
HI TEC STACC
HI TEC STACC
HI TEC STACC
Fig. 11. Schematic view of slow feedback system of magnet power supplies. .
0.4
Feed-Back OFF Feed-Back ON
0.2
ΔI/I 0 ( % )
QFW
0
QDW
-0.2
Fig. 12. The trend graph of output current of magnet power supplies (QFW and QDW). With
the feedback system, the drifts of the power supplies are clearly reduced.
Developer Zone (National Instruments) and was modified for our demands. A lot of sample
programs are bundled in the Labview package and further sample programs are stored in
the NI Developer Zone where we can discuss about our problems in the Labview
developing environment and the development of applications.
Fig. 14. Block diagrams of the E-mail application and its sub VI.
The orbit response matrix is defined by a variation of COD, which results from unit kick by
a steering magnet. The matrix element Rij represents the orbit shift at the i-th BPM caused
by a unit kick from the j-th steering magnet. The subject is finding best-fit parameters of
which maximum likelihood reproduce the experimentally obtained data. Such parameters
could be found by minimizing the quantity χ 2 . In our problems χ 2 is defined as follows,
( R[model ]i , j − R[measu]i , j )2
χ2 ≡ ∑
i, j σ ij 2 (1)
i = 1, 2," , M , j = 1, 2," , N
where R[model ]i , j , R[measu]i , j and σ ij 2 are the calculated and the measured response matrix
elements and the standard deviation of the measurement errors in the beam position,
respectively. M and N denote the numbers of the BPMs and the steering magnets. In such
fitting problems the SVD method is a standard solving technique (William, et al.,). SVD is
also used to resolve the COD as already mentioned in section 5.3. Here, we will resolve 168
parameters with 1872 conditions.
Although it is not mathematically clear that the all parameters can be exactly resolved or have
unique solution in principle, because the response matrix is not a linear function of the
quadrupole strength. To confirm whether the fitting procedure could derive a unique solution
or not, and exactly reproduce the parameters under the condition of the SAGA-LS lattice
In-House Control System for Medium Size Research Facility 35
formation, firstly we simulated the ideal case in which the measurement errors are neglected.
At the simulation, we prepared the calculated response matrix with randomly distributed
parameter sets. Then we adopted the fitting to the calculated response matrix. Figure 15 shows
the result of the simulation of the fitting for the quadrupole strength of QF1. After 5 iterations
all parameters of QF1 was completely converged to originally setting values.
5.5
Initial Sets
5.4 Original Sets
K (m-2 )
1st Fitting
2nd Fitting
5.3 3rd Fitting
4th Fitting
5th Fitting
5.2
2 4 6 8 10 12 14 16
Number of QF1
Fig. 15. Fitting transition of the QF1 K-values. After 5th iteration the fitting procedure
completely reproduce the original set points.
Calc Beta X Measured (from Rmt) Beta X Measured (from Δtune) Beta X
After Q Correction Calc Beta Y Measured (from Rmt) Beta Y Measured (from Δtune) Beta Y
16 Calc 10×Eta X Measured 10×Eta
MACHINE FUNCTIONS ( m )
12
0
0 10 20 30 40 50 60 70
DISTANCE ( m )
Fig. 16. Calculated and measured twiss functions after the quadrupole correction.
Figure 16 is the correction result of twiss function after the parameter fitting. We confirmed
that there was no significant distortion in the twiss function in the storage ring and a good
periodicity in the twiss function was observed. This method is useful for the accelerator
diagnostic, because if one of the quadrupole magnet the irregularity of the twiss function is
observed, and this response matrix fitting procedure can indicate the wrong component.
6. Future plan
6.1 Present status of the control system and its problems
The in-house Labview based control system stably works. The communication speed of the
control parameter is about 10 Hz which is high enough for daily operation of the facility.
Almost all accelerator components are integrated into the present system except for timing
system which will be included in 2011.
36 Modelling, Programming and Simulations Using LabVIEW™ Software
Partially we use Labview8.5 running on Windows 7 and there is no problem between the
old version of Labview (7.1) and the Windows XP including ActiveX CA communication.
However, we still have problems, as;
1. client PCs for the data communication between the MySQL database and Labview
sometimes hung up.
2. AD conversion speed of the Fieldpoint 16-bit ADC (1 Hz) is the bottleneck of the system
performance of BPMs and vacuum monitor.
3. The number of the control PCs (server PCs and client PCs) are increased rapidly and
this causes heavy maintenance load for operator. This also causes human errors in
operation.
Therefore we are going to improve our system in the following cares.
I. Selection of database system including Labview DSC system
II. Replacement of the Fieldpoint to CompactRIO
III. Development of integrated client program
IV. Integration of server PCs to reduce the number of the control PC.
Fig. 17. Front panel of multi-purpose client PC. The program is running on Windows 7 and
touch panel display. User can access each button intuitively without using a mouse.
In-House Control System for Medium Size Research Facility 37
We are developing a multi-purpose client program to integrate the client PCs to avoid
human errors based on the operation complexity. The multi-purpose client program also
adopted sequential programming which automatically sets accelerator parameters. We
employed a touch panel display for an intuitive manipulation of operation of the accelerator
as well. Figure 17 is the front panel of the newly developed multi-purpose client PC running
on Windows 7. In this program “Tab button” is used for the individual programs. To reduce
the operation procedure, the radiation interlock system is also integrated into this system.
Although some parts of component concerning to the interlock system, such as master
trigger, is not included in the system at this stage, the operation is significantly improved.
After the all accelerator components are integrated into one, we expect that we can offer the
synchrotron light to beam line users with only one-touch. The shutdown process will be also
simplified. Sequential programming is done with Labview “stuck sequence structure” and
with local variables. The easiness of multi-threads programming and sequential
programming is also one of advantage of Labview.
7. Conclusion
We have been developed in-house PC based control system for the medium size accelerator
facility, SAGA-LS. The control program has been developed by Labview with ActiveX CA
for distributed client-server system. With the easiness and flexibility environment of PC-
Labview, daily control tools for the facility have been rapidly constructed by in-house
resources. The successful improvements of the Labview application programs are helped by
the sophisticated sample program bundled with Labview and also sample programs in the
NI Developer Zone. Multi-thread and sequentially procedure, mathematical library, report
generation library greatly reduces the development time. Multi-purpose CA client program
38 Modelling, Programming and Simulations Using LabVIEW™ Software
has been developed with touch panel display on Windows 7 to improve the user operation
interfaces. In the model calibration of the accelerator program the external code TRACY2 is
also implemented. We are intending to implement the accelerator code GOEMON, which is
the DLL version of TRACY2, to our control system.
8. References
Tomimasu, et al., (2003). The SAGA Synchrotron Light Source in 2003, Proceedings of particle
accelerator, pp. 902-904, Portlrand, May 2003.
Iwasaki, et al., (2003). Lattice Design of SAGA Synchrotron Light Source, Proceedings of
particle accelerator, pp. 3270-3272, Portlrand, May 2003.
Nishimura, (1988). TRACY, A Tool for Accelerator Design and Analysis, Proceedings of
European particle accelerator, pp. 803-805, 1988.
Kay-Uwe Kasemir, (2003). http://ics-web.sns.ornl.gov/kasemir/axca/index.html.
Ohgaki, et al., (2003). Design of Control System for SAGA Synchrotron Light Source,
Proceedings of particle accelerator, pp. 2387-2389, Portlrand, May 2003.
Ohgaki, et al., (2005). PC-LabView BASED CONTROL SYSTEM IN SAGA-LS, Proceedings of
particle accelerator, pp. 3976-3978, Knoxville, 2005.
William H. Press, Saul A. Teukolsky, William T. Vetterling, and Brian P. Flannery, Numerical
Recipes in C, The Art of Scientific Computing Second Edition, Cambridge University
Press, ISBN 0-521-43108-5, Cambridge.
Safranek, (1997). Experimental determination of storage ring optics using orbit response
measurements, Nucl. Instr. and Meth., Vol.A388, pp. 27-36 (1997).
NI Developer Zone. http://zone.ni.com/devzone/cda/tut/p/id/5053.
Nishimura, (2001). GOEMON, A C++ LIBRARY FOR ACCELERATOR MODELING AND
ANALYSIS, Proceedings of particle accelerator, pp. 3066-3068, Chicago, 2001.
ELEGANT, (2000). Borland, APS LS-287 (2000).
0
3
1. Introduction
We need to measure both electric and nonelectric quantities solving the series of problems
in power engineering. Graphical programming environment of the program LabVIEW seems
to be useful helper and provides good tool for measuring both an automatic independent
measurements of specific tasks, using measuring cards and instruments. The LabVIEW
belongs to widely used measuring tools at Department of Electrical Power Engineering,
Faculty of Electrical Engineering and Communication power engineering, Brno University of
Technology. Since the LabVIEW is used to solve a number of projects at our department and
there is only limited space in this article, we decided to mention only the most interesting
ones. The first project deals with measuring operating characteristics of the photovoltaic
cell. It consists of standard interconnection of measuring devices (producer Metex), which
measure data that are transferred by program LabVIEW to the computer. Next, the data
are mathematically and graphically processed. Different projects in LabVIEW offer a wide
spectrum of front panels in the framework of this program allowing to connect each
measuring device by its specific way. Some of them are listed here.
Another of the many tasks developed at our department is an autonomous measurement of
electric and non-electric quantities of photovoltaic and wind power installation. A specific part
of this project included the connection of meteorological station VIASALA which required
a particular set of control interfaces created by LabVIEW. The LabVIEW environment has
also created a comprehensive measurement system for detection of resistance of modern light
sources to interference in the voltage supply, as well as a system to test and develop devices
to measure the flickering of light sources. The system is implemented on the PXI platform.
First describes control of serial communication in LabVIEW software here, because serial
communication is a popular means of transmitting data between a computer and a peripheral
device such as a programmable instrument or even another computer. Serial communication
uses a transmitter to send data, one bit at a time, over a single communication line to a
receiver. You can use this method when data transfer rates are low or you must transfer
data over long distances. Serial communication is popular because most computers have
one or more serial ports, so no extra hardware is needed other than a cable to connect
your instrument to the computer (or two computers together). In many applications, the
electronics takes advantage of the LabVIEW program provides. It is mainly the fact that
LabVIEW is a graphical programming language that uses icons instead of lines of text to create
applications. In contrast to text-based programming languages, where instructions determine
40 Modelling, Programming and Simulations Using LabVIEW™ Software
program execution, LabVIEW uses dataflow programming, where the flow of data determines
execution. In LabVIEW, you build a user interface with a set of tools and objects. The user
interface is known as the front panel. You then add code using graphical representations of
functions to control the front panel objects. The block diagram contains this code. In some
ways, the block diagram resembles a flowchart.
set the parity bit in such a way as to make an odd number of 1’s among the data bits and the
parity bit. The transmission in the figure above uses odd parity. There are five 1’s among the
data bits, already an odd number, so the parity bit is set to 0.
The last part of a character frame consists of 1, 1.5, or 2 stop bits. These bits are always
represented by a negative voltage. If no further characters are transmitted, the line stays in the
negative (MARK) condition. The transmission of the next character frame, if any, is heralded
by a start bit of positive (SPACE) voltage.
(a) DB-9 connector and pinouts. (b) DB-25 connector and pinouts.
The 9 pin’s connector is occasionally found on smaller RS-232 lab equipment. It is compact,
yet has enough pins for the “core”set of serial pins (with one pin extra). Important: The DB-9
pin numbers for transmit and receive (3 and 2) are opposite of those on the DB-25 connector (2
and 3). Be careful of this difference when you are determining if a device is DTE or DCE. The
29 pin’s connector is “standard”RS-232 connector, with enough pins to cover all the signals
42 Modelling, Programming and Simulations Using LabVIEW™ Software
specified in the standard. The table shows only the “core”set of pins that are used for most
RS-232 interfaces Lab (2003).
The VISA Configure Serial Port VI initializes the port identified by VISA resource name to
the specified settings. Timeout sets the timeout value for the serial communication. Baud rate,
data bits, parity, and flow control specify those specific serial port parameters. The error in
and error out clusters maintain the error conditions for this VI Lab (2003).
The example above shows how to send the identification query command *IDN? to the
instrument connected to the COM2 serial port. The VISA Configure Serial Port VI opens
communication with COM2 and sets it to 9600 baud, 8 data bits, odd parity, one stop bit, and
XON/XOFF software handshaking. Then the VISAWrite function sends the command. The
VISA Read function reads back up to 200 bytes into the read buffer, and the error condition is
checked by the Simple Error Handler VI.
Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 43
– digitalization of measurement,
– automation of measurement,
– archiving of measured values,
– easy further processability of values,
– immediate graphic processing,
– speed of measurement,
– and others.
Another requirement for the programme function was to provide a option of saving or
exporting the measured data into a different programme. The measured data programme.
This is enabled by one block that asks the user to enter the file name and path to the file. The
data is saved in the way as shown in the table. The LabVIEW programme creates files with a
LVM suffix (LabVIEW Measurement), that can be opened in any text editor, e.g. NotePad, MS
Word.
After that we will use the WHILE cycle and repeatedly execute entering of the CD command
to the port and reading of the string (fourteen symbols for the Metex multimeters) from the
port. The Functions -> Instrument I/O -> VISA -> VISA Read node is used for reading and
the Functions -> Instrument I/O -> VISA -> VISA Write node for writing.
VISA Read (see Fig. 7) - the function is reading the prescribed number of bytes from the
designated device or interface.
46 Modelling, Programming and Simulations Using LabVIEW™ Software
When using the port is at an end, it should closed for other applications to be able to gain
access to it if they request to. The closing of the port is done through the Functions ->
Instrument I/O -> VISA ->VISA Advanced -> Visa Close node.
VISA Close (see Fig. 10) closes the specified session of the device or the resulting object. VISA
Close accepts all the available categories.
string of the necessary symbols. The resulting output is a match substring which only contains
digits and a sign.
In order to convert a string to a “double”data type used by all the computing blocks, we will
use the Fract!Exp String To Number block (see Fig. 13). We will send a string to the string input
and on the number output we will obtain a value of the measured quantity in the numerical
form that we can already use for calculations.
From the serial ports’ outputs we have obtained the Voltage U and Current I values, flowing
through the FV (photovoltaic) cell. We will calculate the Performance P value by using the
Multiply block (see Fig. 14) which can perform multiplication between the numbers brought
to the input x and y, and their product then appears on the output.
We will set the value of an impact performance Pdopad , to be calculated based on pyranometer
sensitivity and pyranometer output voltage, using the Numeric Control (see Fig. 15) block.
This we will find within Controls - Numeric Controls - Numeric Control on the Front Panel.
Similarly, we will also set the size of area S.
Before calculating efficiency a maximum performance Pmax of a FV cell yet needs to be
determined. We will obtain the maximum value by using a Max&Min block (see Fig. 16). The
Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 49
Fig. 15. Numeric Control on the Front Panel and Block Diagram.
Max&Min block downloads the values transferred to its inputs, which results in the value on
the Max output.
Using the Multiply block (see Fig. 14) we will determine the area capacity rating Pplon as the
product of a maximum performance Pmax and a cell area S.
The values Pdopad and Pplon are known to us, and using the Divide block we can determine
the efficiency of a FV cell. The Divide block (see Fig. 17) executes the quotient of two values
transferred to its inputs, and the output shows the quotient as the result. The quotient and
the product could also be determined using the Formula block, but the Multiply and Divide
blocks are sufficient for calculations this simple.
The immediate value of efficiency η, along with the values of Current I, Voltage U,
Performance P, Cell Area S and Impact Performance Pdopad can be displayed on the front panel
(see Fig. 18).
The front panel further consists of a table to which we enter the measured values. The block
for the table is placed in Controls -> Text indicators -> Table (see Fig. 19). In order to be able to
write at the same time the values of current, voltage and performance to the table, we need to
use the Merge Signals (see Fig. 19) block which will merge the signals into a single one which
we will bring to the single input of the table. We can set the number of columns and rows in
the table, in our case 3 columns and 20 rows. The options further provide for the display of
headings for columns and rows and of a scroll-bar.
50 Modelling, Programming and Simulations Using LabVIEW™ Software
Fig. 19. Table of values with Merge Signals block and tabs for entry and deletion.
On the front panel of the table we can see the values of current, voltage and performance in
the columns (see Fig. 20). We will enter values into the table by bringing Log 1 to the Enable
input, and perform the table deletion by bringing Log 1 to the Reset input. These operations
are executed by means of two tabs on the Front panel, to be found in the Controls -> Buttons
& Switches -> Text Button (see Fig. 20).
We can plot the measured values in charts; there were three dependence charts needed for
this task, specifically VA - characteristic U = f(I), Performance characteristic P = f(I) and
Performance as well as VA characteristics in a single chart U,P = f(I). To create the charts
we chose three Build XY Graph blocks (see Fig. 21), to be found in the Controls -> Graph
Indicators ->XY Graph. Each block of the chart has two inputs for the values x and y on the
axis and further inputs for enabling Entry and Deletion, that we will connect similarly as for
the block of the table, to the tabs ENTER and DELETE.
Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 51
Fig. 20. Table with measured values, tabs for entering values and deletion on the right.
Fig. 21. Build XY Graph block with entry and deletion tabs.
The window of the chart on the front panel is displayed as shown (see Fig. 22). In order to be
able to display multiple courses on the chart U,P = f(I), we need to again use the Merge Signals
block and select two axes and two courses in the chart setup. The chart options include the
setting of the cursor and further the setting of colours of the courses/curves and the cursor.
The chart can connect points (values) in several ways, though any connecting line of a trend
(linear, logarithmic) cannot unfortunately be used here, as provided e.g. within the MS Excel
programme.
After the measurement of data the next step involves its saving. The Write LabVIEW
Measurernent File block (see Fig. 23) was used to save the data in a file. This block is located
in the Function -> Output -> Write LabVIEW Measurement File in the Block diagram. I have
connected the writing to the table, to the charts and the file to a single tab, since these
operations should be started at the same point in time. The programme should save data
52 Modelling, Programming and Simulations Using LabVIEW™ Software
to a single file, give the user a possibility of choosing a path to the file and the file name, and
that is why I have chosen to use t’Action -> Save to one file -> Ask user to choose file -> Ask
only onet’ in the block setting. During the first measurement a dialog box appears to save a
file (see Fig. 23). Within the block setting you can further select display of a heading for a file
and time of measurement. To delete the content of a file we use the DELETE tab, which is
common for the table and the chart. The LabVIEW programme creates files with a LVM suffix
(LabVIEW Measurement), that can be opened in any text editor.
Overall view of the front panel and the block diagram is shown below.
Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 53
This is an example of a functioning virtual device which communicates through a serial line
with a real measuring device, visualizes the measured values and further processes them.
This is one of the basic uses of Lab VIEW for the construction of a practical application.
A device constructed in this way, or a source code, can be further compiled to form a separate
application independent of the LabVIEW programming environment.
The following picture is just a sample design of Metex, a simple virtual device communicating
through a serial port.
VISA configurator module is used again for communication via a serial port, which is,
however, part of a “sub vi”application. The other blocks are just the means to process, control
and display data. A detailed analysis of this application, however, is not the focus of this
paper.
3.1 Introduction
One of the major problems in regard to the quality of electric power involves quick changes
in the voltage, i.e. its fluctuation, causing flickering of the light flow from the light sources.
The light flow flickering may subsequently create an undesired perception of flickering which
adversely impacts visual performance. This is a subjective visual impression initiated by a
light stimuli, whose brightness or spectral distribution changes in time. The flickering of light
sources may cause mental or physical fatigue or major physiological discomfort in people.
Voltage fluctuation may be caused by interference during the generation, transmission,
distribution and consumption of electricity. The voltage fluctuation in the grid may be due
especially to the fluctuation of active and reactive power of some appliances.
In order to measure the degree of perception of flickering was developed a UIE/IEC
flickermeter which based on the measurement of voltage fluctuations evaluates the
corresponding level of perception of flickering. The flickermeter models the transmission
56 Modelling, Programming and Simulations Using LabVIEW™ Software
function of the light source and eye and the memory effect on the brain. The function of
flickermeter is based on two critical activities: simulation of the light source - eye - brain chain
and the statistical analysis of the output signal in real time. The light source modelled within
the construction of flickermeter is a light bulb with a 60 W power and double coiled filament,
rated for 230 or 120 V voltages.
The flickermeter is typically implemented as a function in the measuring devices designed for
monitoring of the quality of electricity in the electrical networks. For the research purposes
regarding the development of new types of flickermeter, a standard flickermeter has been
implemented in the Labview environment at the Department of Electrical Power Engineering.
The meter is used as a reference instrument for the new development constructions of
flickermeter.
The flickermeter described in the standard is an analogue measuring device. The present-day
digital measuring devices use a modified version of the standard flickermeter. S-transmission
functions of analogue filters, used for describing the device in the standard, have been
transformed into a digital form using bilinear Z-transformation.
UIE / IEC flickering-meter model was constructed as a virtual device within LabView. It is
made up of the following basic blocks:
– voltage measurement,
– input signal normalization,
– filtration and weighting,
– statistical analysis.
The simulation of the light source -ėye - brain chain is performed as a cascade of filters. The
filters used in the flickermeter are designed as a cascade of digital filters. There is IIR Filter
used from the Signal Processing -> Filters -> Advanced IIR Filtering menu. The transmission
function of this filter is specified using Forward Coefficients and Reverse Coefficients in the
form of array of coefficients. The array is set up using the Build Array block.
A “TRUE”signal to the init/cont input is also transferred to the input of the TIR Filter block,
for the signal filtering to go on continually for the whole period of the programme run,
Hanzelka & Bien (2000).
The complete solution of one of the filters is shown in (see Fig. 29).
– starting the meter with counting-down the time-period for which it has to wait for the
initial transient performance to pass,
– “Wait”status when the flickermeter stands by and waits for the START button to be
pressed. This status takes place after the set time for the meter’s starting lapsed, or after
the STOP button is pressed,
– status of data accumulation for subsequent calculation of Pst value while counting down
the remaining time of accumulation. This state stays active after pressing the START button
until the STOP button is pressed, or the time of accumulation has lapsed, and the Pst
calculation is made. The Pst value will always be overriden with the latest value on the
display after the time of accumulation lapsed.
60 Modelling, Programming and Simulations Using LabVIEW™ Software
The general view of the user interface of the flickermeter is as shown on the following page.
The flickermeter has been verified by the tests required by the standard. Its response to the
test signals is fully compliant with its requirements and it now used within the development
of the new types of the meter.
Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 61
The described meter is now used as a reference device in the research of new constructional
solutions of the flickermeter and in the development of a generator of different kinds
of disturbance voltage fluctuations. It can be operated on any kind of computer with a
measurement card connected. It can be built into comprehensive systems focusing on the area
of electric power quality, based on virtual instrumentation.
Finally the communication of LabView and a Viasala WXT520 meteostation is described. The
meteostation is part of an extensive measurement system which on a long-term basis monitors
electrical and physical quantities of the system of solar panels. A picture of a meteostation is
shown in 33.
The meteostation delivery also included configuration software which, though, can only be
used for meteostation configuration and testing of meteostation. With regard to the needs of
the considered system of long-term online monitoring of data from solar panels the delivered
software was inadequate as it did not enable digital access to the measured data. It was
therefore needed to define and create our own application that would allow for integrating
the WXT52O meteostation into the measurement system.
The core of the problem thus was to create an application within LabVIEW, that would
be able to communicate with the meteostation using the RS-232 serial interface and would
transfer the measured data further on, making it available for further processes within
the measurement system that has also been programmed in the LabVIEW development
programme environment.
The unique feature of this application is that it enables connection of a device to LabVIEW
which does not have a primary support within LabVIEW in the form of measurement card,
proving universality of the LabVIEW software environment. The only supported common
communication standard is the serial port RS-232 interface.
The meteostation includes numerous detectors and sensors (see Fig. 33) measuring
temperature, pressure, speed of wind, rainfall etc.
where:
1 wind transducers (3 pcs)
2 precipitation sensos
3 pressure sensor inside PTU module
4 Humidity and temperature sensors inside the PTU module
The basis for the communication configuration is the table of wiring of screw terminal pins on
the meteostation terminal block, based on which the VISA block was set in the block diagram
of the measurement application.
62 Modelling, Programming and Simulations Using LabVIEW™ Software
Fig. 35. Connection of pins for different VIA communication interfaces VIA (2008).
As can be seen from the block diagram of the application (see Fig. 37), it was necessary to
configure a number of further variables to ensure the correct function, such as the following:
– channel selection,
– measurement interval,
– input port,
– communication protocol.
Subsequently the complete programme was created, whose user interface is shown below (see
Fig. 36). The logic of the programme is roughly outlined by the following:
– setting of inputs
– on/off measurements
– definition of channels, ports etc.
– definition and configuration of individual sensors,
– repeated reading of data from the meteo-station in set intervals,
– display and entry of values.
5. Conclusion
The paper describes a few examples of using LabVIEW for the measurement of electric
and non-electric quantities in electro-energy applications. The most frequently involved is
evidently the LabVIEW communication with a measuring device using a serial port, but
there are also applications putting it to good use, such as the described flickermeter which is
constructed directly on the NIPXI platform, distributed by the National Instruments company.
Through virtual instrumentation and launching of LabVIEW the simplification and greater
effectiveness of the design have been achieved, and the same has in turn been applied in the
construction of new laboratory tasks and research measurements. The described examples
64 Modelling, Programming and Simulations Using LabVIEW™ Software
6. Acknowledgment
This paper includes the results of research funded by the Ministry of Education, Youth and
Sports of the Czech Republic as part of project No.MSM 0021630516 and project No. CZ.1.05
/2.1.00/01.0014 Centre for Research and Utilization of Renewable Energy.
7. References
Hanzelka, Z. & Bien, A. (2000). Guide to quality of electrical supply for industrial installations,
part 5, flicker and voltage fluctuations, Technical report, Power Quality - Working
Group WG2, Tomsk.
Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 65
IEC (1997). 61000-4-15 - cem - part 4: Testing and measurement techniques - section 15:
Flickermeter - functional and design specifications, International Electrotechnical
Commission.
Lab (2003). LabVIEW User Manual, edition - part number 320999e-01 edn.
Lab (2006). LabVIEW™Basic I Introduction Course Manual, edition edn.
Slezingr, J., Drapela, J. & Tezky, J. (2009). Flickermeter implementation in labview, Proceedings
of the 15t h International Scientific and Practical Conference of Students, Post- graduates and
Young Scientists MODERN TECHNIQUE AND TECHNOLOGIES MTT 2009, Tomsk,
pp. 11–13.
VIA (2008). User’s Guide, edition - m210906en-a edn.
4
1. Introduction
Technological process supervision assumes acquisition, processing and returning the
commands for a big number of parameters. At the same time, it is necessary to monitor the
investigated parameters, because the history is needed in guaranteeing the performances,
but also establishing the causes which lead to malfunctions.
Communication technologies and we refer here to Internet, which is mainly spread, allow
data, acquired from long distances, to be concentrated in high performance servers. In the
same time, following the temporal evolution of acquired parameters can be done from any
computer, connected to Internet. This issue is suited both in technological processes, but also
in education process, where a laboratory with high performance acquisition equipments and
an Internet connection can be used by other laboratories less equipped. We have focused on
a solution of data acquisition/distribution, using Lab VIEW framework, designated for
remote process control and long distance learning.
The chapter is organised as follows: Section 2 presents arguments in favor of remote data
aquisition and ways it can benefit the industrial operator. Section 3 shows our general view
on such a system and a laboratory implementation of a simulation environment. Section 4 is
dedicated to the client applications, each running on a dedicated network-connected
workstation. Section 5 describes the main server application, the communication
technologies we have used and an analysis of network performance in the current scenario.
Section 6 presents the conclusion we can draw from our work, further developments and
improvements.
taking over of the data from more sensors connected to various industrial equipments and
also the transmission of the controls to them. The process can be developed from more than
one host in the same time. Thus, there can be a client host that commands through Internet
the parameters modification of an installation, relying on a pressure sensor, while another
client modifies the working characteristics of a thermal system, both sensors being
connected to the same server. To sum up, one can say that the advantages of control at a
distance of the industrial equipment, relying on the watch/control of the parameters are:
• people should not have to work in the risk areas;
• the possibility to control more than one equipment in the same time from different
hosts;
• the possibility to watch from a larger number of stations, without extra investments.. It
should be mentioned that the control of a sensor can be done by a single terminal, while
the watch can be developed from many such terminals;
• the possibility of making some statistics in real time of the functioning of the
equipment. This can be done even by the management department of a company.
Fig. 3. Block Diagram of the Multifunction Digital Analog I/O Board KPCI-3102
• CGL Reg., Channel Parameter Reg.: registries for external configuration;
• PCI Bus Interface: connection to the computer PCI Bus.
Connecting the workstation with the installed KPCI-3102 board to the physical process, a
wide ribbon cable is used 1:1 and a screw terminal board (see Figure 4).
Fig. 4. Connecting the Data Acquisition Boards through 1:1 Cable to the Screw Terminal
Finally, we use the MIB520CB USB Interface board for USB connectivity to the IRIS wireless
sensor network we have deployed throughout the laboratory. This provides communication
capabilities as well as in-system programming for the processor/radio boards of the nodes.
It is supplied with power via USB bus. Our model CB employs a female connector. The
board uses a FTDI FT2232C chip to use USB ports as virtual COM ports which are later used
for data acquisition. Therefore the appropiate drivers have to be installed on first use. It will
install two COM ports. The lower one is used for mote programming which we will not
handle in this paper and the higher number one for data communication via USB. A top
view photo of the MIB520CB is shown in Figure 5.
72 Modelling, Programming and Simulations Using LabVIEW™ Software
4. Client applications
4.1 Temperature monitoring and control
Many real applications, often encountered in process automation practice, require
maintaining the process variables between certain limits, realising therefore a bipositional
control of the investigated parameters. For example, an air conditioning unit for a HVAC
application should maintain room temperature around 24ºC ± 0.1ºC. This means that,
during winter, the heater is switched on until the room temperature reaches the upper limit
of 24.1ºC, turning it off until the temperature reaches the lower limit of 23.9ºC and repeating
the sequence. This happens also in summer conditions (heat) when the system controls the
cooling element of the unit. This simple example can be accompanied by many others such
as: keeping the liquid level in a tank between certaing values using level sensors,
mantaining the pressure in a container using pressostats, which prove the variety of
applications which employ bipositional control. Electronic control units can use signal from
analog transducers with unified current output (4mA ÷ 20mA) and there are also models
which allow connection directly to the sensitive element for the investigated variable.
The goal of this application is to demonstrate the usefullness of multifunction data
acquisition boards for monitoting and bipositional control. This is achieved by using the
LabVIEW environment to acquire and process signals, generating commands and
displaying the progress of the process variables to the user.
For the monitoring and bipositional temperature control, we employ the laboratory set-up
shown in Figure 6:
• Thermostatic Bath: metallic enclosure with lid, thermoresistance Pt100 and water
heater, filled with water;
• SA: power supply;
• ATr: Pt100 thermoresistance adapter, calibrated for the 0ºC ÷ 100ºC range;
• INTr: numeric measured temperature indicator (000 for 0ºC to 999 for 100ºC);
• Heater control unit (top-right corner): relay block, REED intermediate relay and power
relay type RI33, used for controlling the water heater element;
• Connector block: external connection terminal board CB-68LP shipped with the PCI-
6014 board;
• C: 220μF capacitor;
• K: single pole switch;
Distance Process Monitoring using LabVIEW Environment 73
Fig. 6. Laboratory Set-Up for Temperature Monitoring and Control Application using NI
PCI- 6014E Board
• PC: personal computer workstation with appropiate data aquisition board drivers for
the NI PCI-6014E and software for application development according to the
requirements: monitoiring and bipositional control of the temperature in a thermostatic
bath by aquiring the analog voltage value on a 250 Ω resistance inserted in the current
loop of a temperature transducer with thermoresistance and the numeric control of the
electric heater including the analysis of passive filtration (capacitive) and software
filtration on the quality of the control system.
Operating within the LabVIEW environment, we first have to install appropiate drivers for
the NI PCI-6014E board, following the procedure described by the user manual. This being
performed, we go on to the actual programming of the LabVIEW virtual instrument. This
application has been initially developed under LabVIEW 6.1 but has been kept up-to-date
and the current version is compatible with the LabVIEW 2009 version to accomodate the
reader with the benefits brought upon by newer versions of the software.
Figure 7 shows the block diagram and Figure 8 shows the front panel/user interface of the
monitoring and bipositional control application using the multifunction data aquisition
board NI PCI-6014E.
Before starting with deploying the LabVIEW code, the following clarfications have to be made:
• the top section of the block diagram implements the data acquisition on the ai0 analog
input channel, using DIFF configuration mode of the NI PCI-6014E board and generating
the digital command on the 0 digital output port; It should be mentioned that the newest
versions of the DAQmx drivers for National Instruments hardware components include a
configuration wizard which reduces the complexity of the written code to a single block,
however the configuration steps decribed at this stage remain valid.
74 Modelling, Programming and Simulations Using LabVIEW™ Software
Fig. 7. Block Diagram for Temperature Monitoring and Control Application using NI PCI-
6014E Board
• the acquired values represent voltage samples in the 1 ± 5 V range, considering the fact
that we are measuring the voltage on a 250Ω resistance in a 4mA ÷ 20mA current loop,
we show this values to the user as voltage and as degrees on the front panel;
• to better symbolize to the operator the state of the process (between or outside the
lower/upper limit interval) the dedicated temeperature indicator turns blue when the
temperature is between the limits and red when it is outside this interval; also when the
temperature value is detected to enter the interval a LED indicator signals the good
functioning of the installation;
Distance Process Monitoring using LabVIEW Environment 75
Fig. 8. Front Panel for Temperature Monitoring and Control Application using NI PCI-6014E
Board
• the limits, the current temperature value and the median temperature value are
illustrated on a Waveform Chart indicator; the median temperature value for the chart
representation is reduced by 2 units in order not to be overwritten on the current value
(the code implementing this is shown in the lower left corner of the block diagram);
• the While loop in the lower right corner of the block diagram plays a double role: it
implements a logical hysteresis comparator, that means a LED indicator changes value
76 Modelling, Programming and Simulations Using LabVIEW™ Software
when the temperature value is out of the interval set by the two limits, and calculates
the mean over the last 5 temperature values in a recursive way; the mean temperature
indicator will offer a correct reading only after the first 5 samples have been acquired.
In order to rapidly delpoy the block diagram and the front panel the user can reffer to
Figures 7 and 8 and also the LabVIEW User Manual can provide valuable references and
therefore we will not go into any more details.
The virtual instrument operates when pressing the Run control on the upper toolbar and the
application should be saved in the appropiate folder using a relevant name. The system
operation will be described next.
After deploying the laboratory set-up according to Figure 6, with the switch K opened, the
power supply SA is turned on and the heater control block is powered. We then launch the
application into execution by pressing the Run continuosly button on the toolbar. Correct
values for the lower and upper temperature limits should be entered on the front panel (with
regard to at least a 3°C difference between the two in order to insure a smooth operation of the
system) and the Waveform Chart indicator should be adapted to clearly notice the evolution of
the values on the chart. The sample rate and sample number should be set to a 1:1 relation. If
the Chart rate is too fast, the user should modify the Time scale of the chart.
Because, upon the first running of the application, the temperature in the thermostatic bath
is low (according to the room temperature), the ON/OFF and New State LEDs will be on
and the temperature color indicator will be red. Upon first reaching of the inferior
temperature value, the LED indicating the good operation of the system will be switched on,
the temperature indicator will become blue and the ON/OFF and New State LEDs will
continue to be on. They will switch off upon reaching the upper limit.
During the operation of the application, the influence on the reaching of the upper limit
with increasing temperature and on the reaching of the lower limit with decreasing
temperature of the time constant of the thermoresistance will be noticed. Also, when
modifiying the scale of the Y-Axis of theWaveform Chart in order to have a better view of
the signals, the user will be able to quantitatively determine the acquisition noise on the
analog channel and the impact of digital filtering through recursive software mediation.
While running the application, the K switch should be closed and one can notice the impact
of passive filtering on the analog signal. When the exepriments are over, the application is
stopped using the Abort Execution control on the toolbar.
acquisition. In conclusion, the data acquisition systems are realized in such way that they
allow the acquisition of binary logic voltages, compatible to the standardized voltage levels
type TTL or CMOS.
Our application aims at acquiring digital TTL signals coming from a reversible counter,
processing them internally in the PC and generating numeric signals which are displayed on
a 7-segment display using functionality offered by the LabVIEW environment.
The laboratory set-up is described in Figure 9 which includes the following components:
• GS: rectangular TTL signal generator;
• PCL: logic circuit board which includes the counter, decoder for the 7 segments and the
7 segments display;
• SA: power supply 5V, 1A;
• K: monopolar switch for applying the TTL input to ND (direct counter) or NI (reverse
counter);
• STP-68: external connector board, connected to the KPCI-3102 PCI Board through the
1:1 CAB-305 cable;
• PC: workstation with software suite installed.
The producer of the plug-in board provides appropiate drivers for the use with Windows
and LabVIEW and by installing the drivers a additional user library shows up in the
Functions palette of the LabVIEW interface. This allows the developers to access the specific
blocks for programming application with this data acquisition board. It includes blocks such
as analog input/output, digital input/output etc. We will assume that all the steps
necessary for installing of the Keithley board have been followed according to the user
manual provided by the manufacturer.
The first step to be taken before writing the application is the configuration of the board
through the DriverLINX Configuration Panel (Start>Programs>DriverLINX). Here the user
has to create a new device, Device 0, and using the configuration option setting port0 as
digital input and port1 and port2 as digital outputs. The first use case is acquiring digital
signals from the SN74190 reversible counter on port A (0) of the KPCI-3102.
Fig. 9. Set-Up for Digital TTL Signals Acquisition, Processing and Generation using KPCI-
3102 Board
78 Modelling, Programming and Simulations Using LabVIEW™ Software
Figure 10 shows the block diagram for the applicatin for direct/reverse counter and Figure
11 illustrates the front panel in the case of direct counting.
simulated display in LabVIEW and the real 7 segment display SN7545 is checked. The
switch is then moved to the Generator position with an amplitude of 8 and a frequency of
around 0.0020. That will result in an automatic operation of the counter in one second
increments. The Waveform Chart will show small disruptions of the waveform
corresponding to the modification of the values of the NB counter. The application can be
aborted by pressing the Stop button on the front panel toolbar.
Fig. 12. Block Diagram for Controlling the Numeric Display SN7545 thorugh Port B(1) of the
KPCI-3102 Board
Distance Process Monitoring using LabVIEW Environment 81
Fig. 13. Front Panel for Controlling the Numeric Display SN7545 thorugh Port B(1) of the
KPCI-3102 Board
5. Server application
5.1 Communication technologies
The applications described until now in this chapter were initially designed to function as
stand alone experiments on dedicated workstations. The main idea behind this chapter is to
link them together under the umbrella of a single network server which collects all the data.
The advantages of this distributed approach comes from the fact that the system can use
dedicated workstations, each with their on specific hardware and software which are
connected by a network. The server represents a more capable hardware configuration for
data processing, storage and can also act as a gateway between the process and the Internet.
The technology chosen to implement this concept of sharing data between tasks running on
different systems is that of LabVIEW Shared Variables. The shared variables are a feature
which appeared in LabVIEW since version 8 was released and have been steadily improving
since. The shared variable abstracts network communication from the LabVIEW block
diagram and makes it easy to share data between networked systems. The type of shared
variables we are using for our deployment is networked-published shared variables of
different types such as double, arrays of doubles, booleans or integers. After being added to
the project library of a certain LabVIEW application, the shared variables take the form of a
terminal which can be dropped onto the block diagram to be written or read from. They also
offer error input and output terminals to notify the user of communication errors and a
timestamp output that informs about when the value read was written. Behind all this is a
custom UDP protocol to send data to a server called the shared variable engine, which then
publishes the data to all clients on the network reading the shared variable. Because a
Distance Process Monitoring using LabVIEW Environment 85
publish-subscribe architecture is used to transfer data, many clients can read and write to
the same variable without writing additional code. An important feature is buffering, which
can be used for accounting for temporary fluctuations between read/write rates of a
variable. Readers that occasionally read a variable slower than the writer can miss some
updates. If the application can tolerate missing data points occasionally, the slower read rate
does not affect the application and you do not need to enable buffering. However, if the
reader must receive every update, enable buffering. The SVE (Shared Variable Engine) can
be hosted on Windows PCs and real time targets. In our practical experiments we found out
that the custom UDP protocol needed specific ports to be opened (depeding on the
implementation of the Logos architecture of LabVIEW) in order for the data to pass through
the Windows firewall.
For our system the following table for shared variables was employed. The three client
applications feed data into the network in the form of the shared variables. These are the
read by the server which displays them on a local monitoring panel. The server also
publishes its own shared variable, a boolean variable which controls the data acquisition
from the wireless sensor network connected to workstation 3.
5.2 Description
The remote monitoring server application is made up of the block diagram and the front
panel, like it can be seen in Figure 17 and Figure 18. The project for this application includes
86 Modelling, Programming and Simulations Using LabVIEW™ Software
the virtual instrumes and the library which contains references to all the shared variables
being read through the network. The values are being read in a while loop which ensures
continous operation fron the push of the Run button on the toolbar until the Stop button on
the front panel or the Abort execution button on the toolbar have been pressed. The loop is
timed at 200ms, a value which we considered insures maximum performance of the system
and doesn’t load the network with unnecessary samples. The shared variable read blocks
are wired to the corresponding indicators in order to show the data on the front panel. The
front panel represents the user interface and the most important part of this application. It is
divided into three parts, each corresponding to a certain application: temperature
monitoring and control, digital signal acqusition system and wireless sensor network
monitoring application. The operator can view the data in near real-time, control the
aqusition for the wireless sensor network through the switch button. The application can be
expanded by creating a local database to store the data, generate reports and also by linking
it to even more different systems. The server can also act, using the functionality provided
by the LabVIEW web server as a gateway between the local network and the internet.
6. Conclusion
The application was designed and developed to prove a couple of concepts about the data
acquisition in general and some notions about the possibility of adding remote
controlling/monitoring. This has a teaching purpose: it is being used for a series of
experiments between several laboratories, at the moment. From one point of view one can
process the experimental data gathered from a real process, but one can also see the result of
one remote command sent to industrial equipment in the real time. The main part is, as we
mentioned earlier, the server with the data acquisition board. The first application presented
in this paper handled the process of remote controlling of the temperature of a precinct, the
workstation can deal with more than one application in the same time. Thus it can monitor
parameters provided by 16 sensors and it can lead till four industrial equipments in the
same time, using the data acquisition board NI PCI 6014E.
The second application we have described concerns the handling of digital signals which
can be found in large numbers in today’s discrete automation systems. We have used a
Keithley Instruments KPCI-3102 PCI board to acquire, process and generate numeric signal
from/to the outside world. The integration with the LabVIEW environment has been done
through appropiate drivers offered by the manufacturer which appear under the form of
blocks in the instrument library, ready to be placed and wired on the block diagram.
The third application realised connectivity between the PC (with LabVIEW) and a wireless
sensor network gateway. The gateway received packets from all the nodes of the network
88 Modelling, Programming and Simulations Using LabVIEW™ Software
which included environmental data from integrated sensors such as temperature, humidity,
light, pressure. Our VI parsed the packets for useful data, displayed it locally and then
forwarded the information to the application server.
Finally, the application server is acting like a data sink in our scenario. It receives all the
process variables from the distributed system under the form of shared variables. The data
is displayed, process or stored all also through LabVIEW WebServer the possibility of
remote monitoring via the Internet.
Future developments will highlight the scalability of the system as we are able to add new
workstations handling various processes to the network. We will focus more on reaching the
communication limits of the network through a high number of shared variables with
higher sample rates. The results of the experiments should give insight concerning the
deployment of the LabVIEW Shared Variables for large industrial processes involving
hundreds or even thousands of such network values.
7. References
Vlad, M. S. & Sgârciu V. Distance Process Monitoring using LabVIEW Environment, In:
Proceedings of the IEEE AQTR 2006 Conference, Cluj-Napoca, Romania.
National Instruments LabVIEW 2009 User Manual, Available online at:
http://www.ni.com/pdf/manuals/371361f.zip, checked August 2010.
National Instruments Using the LabVIEW Shared Variable, Available online at:
http://zone.ni.com/devzone/cda/tut/p/id/4679, checked August 2010.
Garcia, G. Create Distributed Applications with LabVIEW Shared Variables, In: Q2 2006
issue of the Instrumentation Newsletter.
Luis Felipe Herrera-Quintero et al. Wireless Smart Sensors Networks, systems, trends and
its impact in environmental monitoring, In: Proceedings of the IEEE LATINCOM
2009 Conference, Medelin, Columbia.
Rancea I. & Sgârciu V. & Stamatescu G. Remote Acquisition Processing and Generation of
Digital Signals for a Reversible Counter through LabVIEW Environment, In:
Proceedings of the DAAAM 2009 Conference, Vienna, Austria.
Stamatescu G. & Sgârciu V. & Stamatescu S. PC-Based System for Level Transducer
Interfacing, In: Proceedings of the SENSORDEVICES 2010 Conference, Venice,
Italy.
Part 2
LabVIEW in Modeling
5
China
1. Introduction
Metallothioneins (MTs) are a family of low molecular weight, cysteine rich, metal binding
proteins, and exist in a variety of organisms ranging from bacteria to mammals (Moffatt &
Denizeau, 1997). MTs play significant roles in clearance of free radical against oxidative
damage (Masters et al., 1994), trace element metabolism and heavy metal detoxification
(Feldman & Cousins, 1976), cell metabolism (Cherian & Apostolova, 2000), disease processes
(Sens et al., 2001; Velázquez et al., 1999), rare metal accumulation (Nordberg, 1998), heavy
metal removal and environment protection et al. (Nordberg, 1998; Elinder et al., 1981). The
important applications stimulate the interest of large scale production of MT. Compared
with the conventional method by extraction from animal organs, MT production by using
recombinant E. coli has obvious advantages in reducing cost, increasing efficiency and
product quality. However, recombinant MT is easily hydrolyzed and unstable for the thiol
group of cysteine when produced by recombinant microorganism (Saito & Hunziker, 1996).
By integrating the MT gene with fusion tags, MT was successfully expressed in E. coli (Hong
et al., 2001; Yang et al., 2007). On the other hand, rapid measurement of MT production is
important for optimization of fermentation process. MT was reported to have light
absorption at the wave length of 250 nm after binding with Cd (Onosaka & Cherian, 1982),
which could be used for MT measurement. But, according to our experience, this method
has low accuracy and poor reproducibility. In order to detect MT production in an easy and
rapid way during fermentation process, in this study, MT gene is fused with red fluorescent
protein (RFP) gene and coexpressed in recombinant E. coli. Modeling and simulation is a
powerful tool for the analysis of the mechanism and dynamic responses of the fermentation
process, and for process optimization and automatic control. The production of recombinant
protein using recombinant E. coli involves the regulations of aimed gene transcription and
translation, which process can be well described by using the white box structured model
involing operon regulation and is done in this research. But, the structured model has the
disadvantage of extreme complex not suitable for the purpose of process optimization.
92 Modelling, Programming and Simulations Using LabVIEW™ Software
Therefore, a grey box unstructured model is also constructured, which model is simple
enough for process variable prediction in real applications but still sufficient for modeling
the major regulation effects on the aimed genes of the recombinant strain. LabView is a data
driven and graphical programming software tool, widely used in process simulation, data
acquisition and automatic control. The MT production mathematical model developed
using LabView is easily incorporated into the model based on-line optimization and
automatic control system of MT fermentation process developed using LabView in the
future. In this research, the structured and unstructured mathematical models and computer
simulation of MT production and RFP fluorescence are made. The final developed
mathematical model includes substrate consumption, the growth of the recombinant E. coli
cells, the repression and induction of the aimed genes, the production of the aimed protein,
and the maturation of the expressed RFP. The mathematical model consists of two levels:
the intracellular level for the expression and induction of the aimed genes and the reactor
level for the dynamic changes of substrate and cell concentrations as well as the
fluorescence. This research shows the advantages and the usefulness of the data driven and
graphical programming software of LabView in modeling and simulation of biological
phenomena.
unsuitable for online monitoring and optimization of MT fermentation process, but could be
used as the suboptimal indicator for termination of the MT fermentation process.
Fig. 2. The time courses of cell growth, MT fusion protein production and RFP fluorescence.
operator gene to transcribe the aimed gene. On the other hand, the operon is also controlled
by the mechanism of carbon catabolite repression. The binding of mRNA polymerase to the
promotor gene (at the -10 and -35 reagions) is loose, needs to be strengthened by the cAMP-
CAP complex. The catabolite activator (CAP) protein is activated when it binds to cAMP to
form the complex. When glucose concentration is high in the medium, the intracellular
cAMP concentration is low, as a result, the concentration of cAMP-CAP complex decreases,
and the binding of mRNA polymerase to the promotor becomes loose and the aimed gene is
untranscribed (Fig. 3).
Fig. 3. The structure and regulation mechanism of the operon of pGHM-RFP (adapted from
Abeles et al., 1992).
The induction and repression control mechanism of the operon ensures that the genes under
control will not be transcribed without induction by the inducers. The binding of the
repressor protein (lacI) to the inducer (lactose) or to the operator gene is described by Eqs.
(1-2). The binding of the inducer to the repressor-operator complex is described by Eq. (3).
k1
Xr + nSlac ↔Xr nSlac (1)
k−1
k2
X o + Xr ↔X o Xr (2)
k−2
k3 k4
X o Xr + nSlac ↔X o Xr nSlac → X o + Xr nSlac (3)
k −3
Modeling and Simulation of Production of Metallothionein and Red
Fluorescent Fusion Protein by Recombinant Escherichia Coli Using Graphical Programming 95
Where, Xr , the repressor protein; Slac , lactose; X o , the operator gene; n , the number of the
lactose binding sites of the repressor protein. Eq. (3) shows that the inducer-repressor
complex of Xr nSlac has low binding affinity to the operator X o , quickly falls off. Therefore,
⎣⎡ X o Xr nSlac ⎦⎤ can be neglected in the following balances. Balances for the repressor, operator,
and inducer are
⎡⎣ Xr ⎤⎦ t = ⎡⎣ Xr ⎤⎦ + ⎡⎣ Xr nSlac ⎤⎦ + ⎡⎣ X o Xr ⎤⎦ (4)
⎡⎣ X o ⎤⎦ t = ⎡⎣ X o ⎤⎦ + ⎡⎣ X o Xr ⎤⎦ (5)
Where, the index t refers to the total concentration. As there are more free lactose molecules
than that combined in the complex, the last term in Eq. (6) can be neglected:
dXr
= k−1 ⋅ Xr nSlac − k1 ⋅ Xr ⋅ nSlac − k2 ⋅ X o ⋅ Xr + k−2 ⋅ X o Xr (8)
dt
dXr nSlac
= k1 ⋅ Xr ⋅ nSlac − k−1 ⋅ Xr nSlac + k4 ⋅ X o Xr nSlac (9)
dt
dX o
= k−2 ⋅ X o Xr − k2 ⋅ X o ⋅ Xr + k4 ⋅ X o Xr nSlac (10)
dt
dX o Xr (11)
= k2 ⋅ X o ⋅ Xr − k−2 ⋅ X o Xr − k3 ⋅ X o Xr ⋅ nSlac + k−3 ⋅ X o Xr nSlac
dt
dX o Xr nSlac (12)
= k3 ⋅ X o Xr ⋅ nSlac − k−3 ⋅ X o Xr nSlac − k4 ⋅ X o Xr nSlac
dt
As there are more repressor molecules than there are operators, and in this case the last term
in Eqs. (4) and (8) can be neglected. The fraction of repressor-free operators,Q1, is obtained:
⎡X ⎤ Xo
Q1 = ⎣ o ⎦ = (13)
⎡⎣ X o ⎤⎦ t X o + Xr
The carbon catabolite repression control mechanism of the operon ensures that the genes
under control will not be transcribed when a preferred substrate is available, e.g., glucose.
The mechanism of operator activation by CAP-cAMP complex can be described by reactions
of (14) and (15):
k5
XCAP + mXcAMP ↔XCAP mXcAMP (14)
k −5
96 Modelling, Programming and Simulations Using LabVIEW™ Software
k6
X p + XCAP mXcAMP ↔X p XCAP mXcAMP (15)
k−6
⎡ ⎤
⎣⎡ XCAP ⎦⎤ t = ⎣⎡ XCAP ⎦⎤ + ⎣⎡ XCAP mXcAMP ⎦⎤ + ⎣ X p XCAP mXcAMP ⎦ (16)
dXCAP
= k−5 ⋅ XCAP mXcAMP − k5 ⋅ XCAP ⋅ mXcAMP (18)
dt
dXCAP mXcAMP
= k5 ⋅ XCAP ⋅ mXcAMP − k−5 ⋅ XCAP mXcAMP
dt
dX p
= k−6 ⋅ X p XCAP mXcAMP − k6 ⋅ X p ⋅ XCAP mXcAMP (20)
dt
dX p XCAP mXcAMP
= k6 ⋅ X p ⋅ XCAP mXcAMP − k−6 ⋅ X p XCAP mXcAMP (21)
dt
From the above equations, the fraction of promoters being activated can be obtained:
⎡ X p XCAP mXcAMP ⎤
Q2 = ⎣ ⎦ = X p XCAP mXcAMP (22)
⎡X p ⎤ X p + X p XCAP mXcAMP
⎣ ⎦t
The intracellular level of cAMP in Eq. (22) can be described by the empirical equation
correlating XcAMP and the extracellular concentration of the preferred energy source (S), eg.
glucose:
K
XcAMP = (23)
K +S
3.2 Modeling of plasmid copy number and mRNA polymerase limiting effect
The plasmid copy number (NP) in the host cell is variant, which is reversely corelated with
the specific growth rate (μ). The more plasmids it contains the slower it grows. The cell
grows fastest (μ =μmax) when it contains no plasmid. On the other hand, it is regarded that
when NP increases towards its maximum value of NP.max, the plasmid replication rate
decreases. Then, the plasmid replication rate can be described by Eq. (24), which is
decreased with the increases of the plasmid copy number and the specific growth rate.
Modeling and Simulation of Production of Metallothionein and Red
Fluorescent Fusion Protein by Recombinant Escherichia Coli Using Graphical Programming 97
⎛ NP ⎞ ⎛ μ ⎞
rP = kP.max ⋅ N P ⋅ ⎜⎜ 1 − ⎟⎟ ⋅ ⎜⎜ 1 − ⎟⎟ − μ ⋅ N P (24)
⎝ N P⋅ max ⎠ ⎝ μ max ⎠
Where, k P.max , the maximum plasmid replication rate; μ , the specific growth rate; μmax ,
the maximum specific growth rate.
In the recombinant srtain that contains multicopy plasmid, the promotors in the plasmids
and in the chromosome will compete for the mRNA polymerase. Therefore, the
transcription rate is not increased linearly with the increase of gene copy number but in a
decreased manner. The mRNA polymerase competing effect can be described by Eq. (25)
(Lee & Bailey, 1984).
α
⎛ NP ⎞
Q3 = ⎜⎜ 1 − ⎟⎟ (25)
⎝ N P.max ⎠
Where, XmRNA , the intracellular aimed mRNA; k+ mRNA , the constant for aimed mRNA
synthesis; k−mRNA , the constant for aimed mRNA degradation. The last term of Eq. (26)
describes the degradation and cell growth dilution effects on intracellular mRNA. Then, the
intracellular plasmid based MT fusion protein synthesis rate can be described by Eq. (27):
that it can describes the induction and repression effects on the aimed genes exerted by the
bioreactor level process variables of the concentrations of related substrates in the culture
medium.
In last section, the inducer and repressor control mechanism of the operon is summarized
into Q1, and the carbon catabolite repression control mechanism is summarized into Q2 by
using several intracellular reactions and signal transductions. Hear, unstructured model will
be constructed for Q1 and Q2. In the experiments described in section 2, IPTG is used in
replace of lactose as the inducer, which is unable to be degraded and has strong inducing
effect than lactose. Therefore, the induction effect exerted by IPTG is in the extremes, which
can be regarded as “1” or “yes” with IPTG induction, and “0” or “no” without IPTG
induction. In addition, the signal transduction of the induction and repression effects have a
time scale of several seconds from on-state to off-state or vise versa. Therefore, Q1 can be set
to “1” or “0” for the cases of IPTG addition or not described by Eq. (28), which is much
simpler than the development of Eq. (13).
⎧⎪0 no IPTG
Q1 = ⎨ (28)
⎪⎩1 IPTG
The carbon catabolite repression control mechanism is related with the concentration of
cAMP, which is an activator of CAP protein and is reversely correlated with the energy
charge of the cell. The relationships between substrate concentration and intracellular cAMP
concentration can be described by Eq. (23). Similar with Q1, Q2 has the activated or non-
activated states under high or low cAMP conditions. But, unlike IPTG which has an almost
constant concentration during the cultivation process, the intracellular cAMP concentration
is always changing with the changes of the substrate concentration resulted from the cell
consumption or the feeding of the substrate. Therefore, different from Q1 that has the
discrete states of “0” or “1”, Q2 is described using unstructured Hill equation for activator as
a function of intracellular cAMP concentration:
β ⋅ XcAMPγ
Q2 = (29)
kcAMPγ + XcAMPγ
Where, kcAMP , β and γ are the constants. Combining Eq. (23) and (29), Q2 becomes the
function of substrate concentration (S) of the cultivation medium. The sharpness of Q2
function can be adjusted by the parameters. With the consumption of substrate as shown in
Fig. 4A, Q2 increases from about 0.3 to 1. The intracellular plasmid replication rate is
described by Eq. (24). Combing with Eq. (24), the total plasmid copy number can be
described by Eq. (30).
d ⎣⎡N P ⎦⎤T
= rP ⋅⎡⎣X ⎦⎤T (30)
dt
Where, X, the cell concentration; the footnote “T” indicates the total concentration in the
fermentation broth. As discussed earlier, the transcription rate is not increased linearly with
the increase of plasmid copy number, as the promoters of the plasmid and the chromosome
compete for the mRNA polymerase. The effect of plasmid copy number on the transcription
Modeling and Simulation of Production of Metallothionein and Red
Fluorescent Fusion Protein by Recombinant Escherichia Coli Using Graphical Programming 99
rate is described by Q3 of Eq. (25). Then, combining with Eq. (26), the total mRNA can be
described by Eq. (31) using the unstructured model.
d ⎡⎣ XmRNA ⎤⎦T
= rmRNA ⋅⎡⎣X ⎦⎤T (31)
dt
Similarly, total MT production can be modelled by Eq. (32):
d ⎡⎣ X MT ⎤⎦T
= rMT ⋅⎡⎣X ⎤⎦T (32)
dt
The equations for the specific growth rate, cell growth, and substrate consumption are:
d ⎡⎣X ⎤⎦T
= μ ⋅⎡⎣X ⎤⎦T (34)
dt
Where, Xmax , the maximum cell concentration; km , the substrate affinity constant; S , the
substrate concentration; YX /S , the cell yield from the substrate; YMT /S , the product yield
from the substrate. The RFP fluorescence intensity curve is almost proportional to the MT
production curve except that a time delay for the maturation of RFP, which can be modelled
by Eq. (36):
Where, kF, the constant; tL, the time delay for the fluorescence. By using the unstructured
model constructed in this section and the experimental data of section 2, some of the model
parameters are calculated and the other unknown model parameters are optimized using
genetic algorithm (GA) by minimizing the aimed function calculated from errors between
model predictions and the measured data. The details of model parameter optimization
using GA is introduced in section 5. By using the unstructured model constructed in this
section and the model parameters, the production process of MT fusion protein is simulated,
and the results are shewn in Fig. 4.
From Fig. 4, it shows that the model fits the experimental data very well, and is suitable for
modelling the recombinant protein production. With the increase of cell concentration, the
substrate concentration decreases (Fig. 4A). During the simulation, the initial and the
maximum plasmid copy numbers are set to 10 and 30, respectively. The initial value for
aimed mRNA is set to 0 with the aimed gene under non-induced state. As shown in Fig. 4B,
the plasmid copy number decreases with the increase of cell growth before 5th h of
100 Modelling, Programming and Simulations Using LabVIEW™ Software
5 10
S A
4 8
Substrate (g/L)
OD600
OD600 (-) 3 6
2 4
1 2
0 0
0 2 4 6 8 10 12
Time (h)
15 7
Plasmid copy number (molecules/cell)
B
plasmid copy number 6
12
5
mRNA (molecules/cell)
9
4
mRNA
3
6
2
3
1
0 0
0 2 4 6 8 10 12
Time (h)
10 0.8
C
8
Fluorescence intensity ¡Á1000 (-)
0.6
MT
MT (mg/L)
6
0.4
4
0.2
2 fluorescence
0 0.0
0 2 4 6 8 10 12
Time (h)
Fig. 4. Simulation of the production process of MT fusion protein. Lines, model predictions;
dots, measured data.
Modeling and Simulation of Production of Metallothionein and Red
Fluorescent Fusion Protein by Recombinant Escherichia Coli Using Graphical Programming 101
cultivation (Fig. 4.A), which is modelled by Eq. (24). The number of intracellular aimed
mRNA molecules increases immediately after the addition of the inducer of IPTG at 3rd h of
the cultivation (Fig. 4B), modelled by Eq. (26). From Fig. 4, it shows that the aimed mRNA
time profile is not proportional to the time profile of plasmid copy number, resulted from
the effects of aimed gene regulation, mRNA polymerase competition, mRNA degradation et
al.. The MT fusion protein production and the RFP fluorescence time courses are shown in
Fig. 4C. MT production increases after addition of IPTG at 3rd h of cultivation and reaches
the maximum value at 7th h, then decreases because of degradation. The RFP fluorescence is
6 h delay than MT production (Fig. 4C). The reason for the time delay of RFP fluorescence
should be the time consumed for maturation of red chromophore which undergoes a time
period of oxidation (Verkhusha, 2004).
transform the binary number of each gene in the chromosome to a decimal system using the
following equation:
Bmn
Dmn = Dmin + ⋅ ( Dmax − Dmin ) (37)
2Z − 1
Where, m, the ordinal rank of the chromosome; n, the ordinal rank of the gene in the
chromosome; Z, the digits of the binary vector for one gene; B, the binary value coded by the
corresponding gene; D, the decimal value transformed from B; and Dmax and Dmin, the
decimal values of the maximum and minimum limits of the corresponding parameter.
Selection and reproduction are performed to select individuals (chromosomes) to create a
mating pool for reproducing offspring. The selection procedure is stochastic with the fitted
chromosomes, judged by fitness (or objective function J), indicating a better chance of being
selected. A low value of J is defined as a high fitness, with J defined as follows:
2
R K L ⎛ * ⎞
1 Y − Yrkl
J= ⋅ ∑∑∑ ⎜ rkl ⎟ (38)
R ⋅ K ⋅ L r k l ⎜⎝ Yrkl ⎟
⎠
Where, R, the number of experiments; K, the number of measured variables; L, the number
*
of measured points of one variable; Yrkl , the model output; and Yrkl , the measured value in
the experiments. In order to give each variable the same importance in the optimization, the
( *
relative error Yrkl )
− Yrkl / Yrkl is used so that J had no unit. Another advantage using the
(*
relative error instead of the absolute error Yrkl − Yrkl ) in calculating J is to enable the data
points of one variable at different sampling time have the same importance in the
optimization. A flow diagram of the GA used for the model parameter optimization is
Fig. 5. The structure of the chromosome and the m×10n array for m chromosomes of n
genes.
Modeling and Simulation of Production of Metallothionein and Red
Fluorescent Fusion Protein by Recombinant Escherichia Coli Using Graphical Programming 103
(A)
(B)
Fig. 7. (A) The VI of GA and (B) the VI image of 4th order Runge-Kutta method from the
manuals of LabView.
6. Conclusion
The production of MT fusion protein is modelled using structured and unstructured
models. The unstructured model developed in this research is suitable for bioprocess
prediction and optimization. The data driven and graphical programming software of
LabView has the advantages of high efficiency in programming, having many handy sub
VIs for various applications, and especially easy in constructing data acquitation and on-line
monitoring and control system. The mathematical models developed in LabView is easily
incorporated into the future developed on-line model based predictive control system.
Modeling and Simulation of Production of Metallothionein and Red
Fluorescent Fusion Protein by Recombinant Escherichia Coli Using Graphical Programming 105
7. References
Abeles, R.H.; Frey, P.A. & Jencks, W.P. (1992). Biochemistry. Jones & Bartlett Publishers,
Boston, Mass, p.383
Cherian, M. G. & Apostolova, M. D. (2000). Nuclear localization of metallothionein during
cell proliferation and differentiation. Cell Mol. Biol., 46, 347-356.
DE Boer, H.A.; Comstock, L. J. & Vasser, M. (1983). Proc Natl Acad Sci USA, 80:21-25.
Elinder, C. G.; Jönsson, L.; Piscator, M. & Rahnster B. (1981). Histopathological changes in
relation to cadmium concentration in horse kidneys. Environ. Res., 26, 1-21.
Feldman, S. L.& Cousins, R. J. (1976). Degradation of hepatic zinc-thionein after parenteral
zinc administration. Biochem. J., 160, 583-588.
Hong, S. H.; Toyama, M.; Maret, W. & Murooka, Y. (2001). High yield expression and single
step purification of human thionein/metallothionein. Protein Expr. Purif., 21, 243-
250.
Lee, S. B. & Bailey, J. E. (1984). Genetically structured models for lac promotor-operotor
function in the Escherichia coli chromosome and in multicopy plasmids: lac
promotor function, Biotechnol. Bioeng., 26,1381-1389.
Lin, J.; Lee, S. M. & Koo Y. M. (2004). Model development for lactic acid fermentation and
parameter optimization using genetic algorithm, J. Microbiol. Biotechnol., 14(6),
1163–1169.
Masters, B. A.; Kelly, E. J.; Quaife, C. J. ; Brinster, R. L. & Palmiter, R. D. (1994). Targeted
disruption of metallothionein I and II genes increases sensitivity to cadmium.
PANS, 91, 584-588.
Moore, J. H. (1995). Artificial intelligence programming with LabVIEW: genetic algorithms
for instrumentation control and optimization, Computer Methods and Programs in
Biomedicine., 47, 73-79.
Moffatt, M. and D. Denizeau (1997) Metallothionein in physiological and physiopathological
processes. Drug Metabolism Reviews 29: 261-307.
Nordberg, M. (1998). Metallothioneins: historical review and state of knowledge. Talanta, 46,
243-254.
Onosaka, S. & Cherian, M. G. (1982). Comparison of metallothionein determination by
polarographic and cadmium-saturation methods. Toxicol. Appl. Pharmacol., 63, 270-
274.
Saito, S. & Hunziker P. E. (1996). Differential sensitivity of metallothionein-1 and-2 in liver
of zinc-injected rat toward proteolysis. Biochim. Biophys. Acta, 1289, 65-70.
Sens, M. A.; Somji, S.; Garrett, S. H.; Beall, C. L. & Sens, D. A. (2001). Metallothionein
isoform 3 overexpression is associated with breast cancers having a poor prognosis.
Am. J. Pathology., 159, 21-26.
Su, Y.; Lin, J.; Lin, J. & Hao, D. (2009). Bioaccumulation of arsenic in recombinant Escherichia
coli expressing human metallothionein. Biotechnol. Bioprocess Eng., 14, 565-570.
Velázquez, R. A.; Cai, Y.; Shi, Q. & Larson, A. A. (1999). The distribution of zinc selenite
and expression of metallothionein-III mRNA in the spinal cord and dorsal root
ganglia of the rat suggest a role for zinc insensory transmission. J. Neurosci., 19,
2288-2300.
106 Modelling, Programming and Simulations Using LabVIEW™ Software
Hysteresis Modeling of
Soft Magnetic Materials using LabVIEW
Septimiu Motoasca
Transilvania University of Brasov
Romania
1. Introduction
This chapter deals with analytical modeling of hysteresis cycle using the powerful
mathematical tools from LabVIEW. For magnetic materials one of the most important
characteristics is the hysteresis cycle. In numerous technical applications it is necessary to
have a mathematical representation of magnetic characteristics in form M = f(H) or B = f(H)
in order to calculate magnetic field especially in various rotating machines or
electromagnetic apparatus.
There are many physical models used for modeling the hysteresis cycle. Many of them are
not so easy to implement, require too many data to be introduced or are time consuming.
Two models are most used in practice: Preisach model and Jiles-Atherton model. In this
chapter is presented the way to realize the program using LabVIEW VI’s for these two
models and comparison between the modeled data and measured ones.
A new simple analytical model using straight-line segments and arcs of circle to express the
hysteresis cycle is also presented. This program for modeling the hysteresis cycle having the
smallest amount of input data possible is suitable for soft magnetic materials. The easiness
of using this model consists in the fact that it uses only nine parameters as input data, is
very quick computed and give a good approximation of the measured hysteresis cycle.
There are two variants of the program used for this model one using the LabVIEW VI and
MatLab script block and other using only LabVIEW VI’s.
2. Preisach model
2.1 Theoretical aspects of classical Preisach model
In this model, the ferromagnetic material is considered a basic set of fields called elementary
dipoles, Preisach dipoles or Preisach operators. Each dipole is characterized by a rectangular
hysteresis cycle and asymmetric [30] (Figure 1).
Each dipole can be in any time in a positive saturation state (1) or negative saturation (-1).
Transition between states is determined by the magnetic field value H compared with
values hof = of, hb = b Field called critical or tipping.
If a state of saturation dipole is negative (-1) and the value of H increases above the H = ha =
a it toggles the state (1). To return to its original state, the field will be decreased to below
H = hb = b (b <a).
108 Modelling, Programming and Simulations Using LabVIEW™ Software
In this block , two cycles for was used to create space (ai,bj) , and in each element of the cell is
introduced an analytical value of the Preisach function.
The result of this block may be highlighted on a chart is shown in Figure 3.
This analytical model was made only as a demonstration but the analytical form which must
be inserted in each cell need much more calculations for real case tacking account of great
number of data needed as input which must be inserted manual in each cell.
In figure 3, it can be seen Preisach distribution weights for N=100 points and arrangement
according to two variables a andr b. It can be observed that is respected the principle of
symmetry that is set for the Preisach model.
Next step that should be done is tilted fields according to an incremental or decremented
change as a input function corresponding change in magnetic field strength H of a certain
shape.
This waveform obtained is used as input in a block, shown in Figure 5, which carries out
basic fields tilted to plus to minus and vice versa depending on the passage above a certain
value of H. Also on that block entry is placed the previously obtained Preisach triangle.
Fig. 6. Demagnetization triangle after having gone through the entire cycle.
In the first loop for was introduced a timer which makes the program to run in a given time
to be able to see in the graphs in front panel the application of tilted fields on Preisach
112 Modelling, Programming and Simulations Using LabVIEW™ Software
Triangle. Preisach triangle undergoes changes during each step and the final position can be
seen on a graph shown in Figure 6.
The other two loops for are used for the Preisach triangle decomposition in elements and the
value of each element is tilted from plus to minus or vice versa taking into account the
variation of input waveform.
Using the results obtained from this block and summing Preisach elements is obtained a
waveform for magnetic induction or magnetization. Introducing the waveform of Magnetic
field and obtained waveform for magnetic induction as input to a XYgraph is obtained the
hysteresis cycle shown in Figure 7.
By reversing these values are inserted upward branch of the same values and thus
succeeded in dividing each line (hb = ct.) component weights in their cells, taking into
account the ascending branch.
The block in Figure 10 is tilted out of the cells for varying Preisach triangle field obtained in
this case the measured values.
Fig. 10. Preisach triangle block tilting for varying magnetic field strength .
For example, were used as input values measured using the DC to determine first order
return curves . Figure 11a is shown as the variation of the magnetic field and in Figure 11b ,
is shown as the variation of magnetic induction measured .
Fig. 12. Cycle Preisach modeling method using the computer program presented
For better illustration, in Figure 13, 3D representation was achieved resulting Preisach
triangle.
This way of modeling is good for a fairly large number of entry points. This shortcoming
can be overcome using software interpolation between the points and we obtain the
descending branch.
Interpolation method also introduces its errors in the program. Very small variations around
a value, as is apparent in our case around positive saturation will stop all at the same point.
Full program in block diagram and the front panel results are presented in Annex 3.
wm = − μ0 mH = − μ0 mH cos Θ (2)
where: Θ is the angle made between vectors: magnetization and applied magnetic field
strength.
Langevin assumed that the atomic magnetic moments m in paramagnetic materials do not
interact. Using the classical Maxwell-Boltzmann statistical probability that an atom to have
energy wm has the expression:
wm
−
p ( wm ) = e kT
(3)
In the Jiles - Atherton model the magnetization is composed of two terms: reversible
magnetization and irreversible magnetization.
Energy density which is generated by the irreversible movement of domain walls can be
calculated using the formula:
dw = μ0 kdMirr (6)
where: k - is a pinning factor.
Ferromagnetic materials interact in neighboring areas, so it is introduced the concept of
effective magnetic fields acting on unit volume.
Consequently, the magnetization will be regarded as a function of magnetic field strength
actually considering moving energy loss generated by irreversible domain wall:
dMirr
dwbloh = μ0 kδ dH e (7)
dH e
where: δ = sign( dH e / dt ) .
Modification of irreversible magnetization can be obtained from the calculation of energy.
Energy consumed by the material is divided into two parts: the exchange energy and energy
loss through hysteresis.
dM
μ0 ∫ M an ( H )dH = μ0 ∫ M( H )dH + μ0 ∫ kδ dH (8)
dH
hence:
dM
M an ( H ) = M ( H ) + kδ (9)
dH
If during the process of magnetization, the anhisteretic magnetization has values lower than
this leads to a solution for irreversible magnetization physically impossible, as if the domain
walls can not move.
Solution of differential equation is:
⎧ 1
⎪ ( M an − Mirr )dH e if M an > Mirr
(10)
dM irr = ⎨ kδ
⎪ 0 if M an < Mirr
⎩
Reverse magnetization may be taken into account by introducing the coefficient c. which
defines the equation as:
M = cM an + (1 − c )Mirr (12)
⎧1 − c
⎪ ( M an − Mirr )dH e + cdM an if M an > Mirr
dM = ⎨ kδ (13)
⎪ cdM an if M an < Mirr
⎩
Each step can be determined from the previous value of the magnetization using formula:
⎧ 1
⎪ ( M an − M j )dH e + cdM an if M an > Mirr
(14)
dM j + 1 = ⎨ kδ
⎪ cdM an if M an < Mirr
⎩
This formula is used for numerical implementation of the model proposed by Jiles and
Atherton.
In the literature [56]-[59], [89], [93], are proposed several methods of identification of
parameters but it seems that no procedure is too easy, requiring input rather difficult and
experimental features. To determine the values of input parameters need to know more
points on the hysteresis cycles obtained by experimentally means:
- coercive magnetic field strength (Hc) ;
- remnant magnetization (Mr) ;
- saturation coordinates (Hs, Ms) ;
- susceptibility in coercitivity point
- susceptibility at point of remanance
- susceptibility at the saturation point
- anhisteretic susceptibility
- initial susceptibility
- maximum susceptibility
Parameter identification procedure based on these initial data is described in [15]. There is
an easy procedure and therefore no result is as expected, the cycle obtained with large
deviations from the shape obtained experimentally. For this reason we opted for a process
for identifying the parameters by calculating the error between the curves obtained
experimentally and modeled by the method of Jiles - Atherton.
Fig. 15. The front panel of LabVIEW program for modeling Jiles - Atherton .
In figure 15 are presented the waveforms for H and M and hysteresis cycle as a graphic
M(H).
To give validity to the model this was compared with measured data and a program to
minimize errors between modeled and measured cycle was proposed. This program is
presented in Annex 4.
4. Analytical-geometric model
4.1 Theoretical aspects of analytical-geometric modeling
According to the Nicolaide model presented in [68]-[70], the major hysteresis cycle can be
modeled using arcs of circle and straight-line segments in a satisfactory manner. To achieve
the design it must be made several simplifying assumptions on the hysteresis cycle like the
hysteresis cycle is considered symmetrical and centered at the origin.
In the present study taking into account the special characteristics of soft magnetic
materials, we have adapted the method from [68]-[70] to studied case and obtain a much
more simplified model requiring a small amount of input data.
Based on these simplifying assumptions one can construct a cycle branches, other details are
obtained automatically by reversing field and magnetic induction or magnetization values,
depending on the cycle shape.
As can be seen in Figure 16, for modeling downward branch is necessary to know some
reference points as follows:
1. saturation point in quadrant I, characterized by the magnetic field saturation value HS
and magnetic induction BS and slope tangent to the cycle at this point;
2. point 2 between two arcs , characterized by values H2 and B2;
122 Modelling, Programming and Simulations Using LabVIEW™ Software
B[T]
H[A/m]
obtained from point 6 which must be tangent to the slope in point 6 and to the straight line
determined by point 3 and 4. In the arc 6-7 is calculate the slope in point 6 as in case in
which is calculated in point 2. Coordinates of point 7 is obtained taking into account the
symmetry condition. Linking the arcs and straight-line segment we obtain the descending
branch and using an inversion technic taking into account the symmetry principle is btained
the ascending branch of hysteresis cycle.
Fig. 17. LabVIEW program wish to use analytical modeling by arcs and line segments .
To see how well the program approximates the experimental data was achieved overlap
values obtained by modeling with experimental values stored in text file in the location
given by the block "path". The result of this representation can be seen in Figure 18.
As can be seen in the window each spring MatLab script was treated separately and has
developed a sampling interval between two field values considered for early and late spring
using variable step introduced by the operator as input parameter.
Using this step each spring is obtained by a column matrix for magnetic field strength and
magnetic induction value. These matrices are concatenated, achieving one matrix with
different values of magnetic field strength magnetic flux density values. Using these two
matrix representation can be achieved descending branch of the hysteresis cycle.
124 Modelling, Programming and Simulations Using LabVIEW™ Software
To obtain the upward branch of the hysteresis cycle is made denying the two columns
values obtained previously, given the condition of symmetry and centering the zero major
hysteresis cycle. Resulting cycle is shown in Figure 18. For comparison, measured using a
cycle using the Epstein and installation of measurement in Brockhauss Messtechnik. This
measurement cycle was extracted from an excel file obtained by exporting data from MPG
program.
The program, using the call block file path and measured data are collected and induction
magnetic field strength values and shown on the same graph shown in Figure 51.
It should be noted that the two cycles overlap quite well in the saturation, with sharp
differences in the curves around May remanence. These errors can be minimized if they
choose the optimized values of point 2 and 6 but the difference would be too small to be seen.
Fig. 18. Comparison between modeled and the hysteresis curve obtained experimentally .
Improvements are possible by introducing a modeling program to calculate the error
function and place most convenient choice for points 2 and 6 so that the error between
modeled and actual cycle does not exceed a certain value.
To achieve the return cycle of orders 1 and 2 were used repezentare auxiliary functions.
Program used for these representations is given in Annex 5. It may be noted that the
program to achieve major hysteresis cycle remained the same.
In addition to this program were also made blocks MatLab script that calculates the return
of the first order curves upward and downward.
For easy use, I used buttons for choosing points that reversing the upward branch downward.
In this way can choose any point on these branches. In the event that they want certain points,
well defined, these buttons can be replaced by dialog boxes for entering a numerical exact
values. Full program and graphics on the front panel are presented in Annex 5.
5. Acknowledgement
This paper is supported by The National University Research Council of Romania (CNCSIS)
under the contract number 848/2009
Hysteresis Modeling of Soft Magnetic Materials using LabVIEW 125
6. References
[1] FMEA, A., M., Mirmiran, A., A New Model for Steel Members hysteresisInternational
Journal for Numerical Methods in Engineering , No. 45 , 1999 , pp 1007-1023 .
[2] Andrew, P., Stancu, A., Adedoyin, A., Modeling of Viscosity Phenomena in Models of
hysteresis With Local Memory, Journal of Optoelectronics and Advanced Materials
vol 8 , no. March , 2006 , pp 988-990 .
[3] Bennett , L. , H. , Vajda F , Atzmony , U. , Swartzendruber , L. J. Accommodation Study of
the Nanograin Iron PowderIEEE Transactions on Magnetics , 32 ( 5 ) , 1996 , pp 4493-
4495 .
[4] Bertotti , G. Dynamic generalization of the scalar Preisach model of hysteresis, IEEE Trans .
Magna . , No. 28 , 1992 , pp 2599-2601 .
[5] Bertotti , G. General Properties of Power Losses in Soft Ferromagnetic Materials, IEEE Trans .
Magna . , No. 24 , 1988 , pp 621-630 .
[6] Bertotti , G. Hysteresis in Magnetism. Academic Press , Inc. . , 1998 California, USA.
[7] Bertotti , G. , Basso , V. Pasquale , M. , Application of the Preisach Model to the Calculation of
Magnetization Curves and Power Losses in Ferromagnetic Materials, IEEE Trans . Magna
. , No. 30 , 1994 pp 1052-1057 .
[8] Bertotti , G. Fiorillo , F. , Pasquale , M. , Measurement and Prediction of Dynamic Loop Shapes
and Power Losses in Soft Magnetic Materials, IEEE Trans . Magna . , No. 29 , March ,
1993 , pp 3496-3498 .
[9] Biorci , G. Pescetti , D. Some Remarks on hysteresisJ. Appl . Phys . , No. 37 , 1966 , pp 1313-
1317 .
[10] Bossavit , A. Computational Electromagnetism, Academic Press , 1998 Boston.
[11] Bottauscio , O. , Chiampi , M. , Chiarabaglio , D. Advanced Model of Laminated Cores for
Two -Dimensional Magnetic Field Analysis, IEEE Trans . Magna . , No. 36 , 2000 , pp
561-573 .
[12] Bottauscio , O. , Chiampi , M. , Chiarabaglio , D. , Raguso , C. , Repeto , M. Ferromagnetic
hysteresis and Magnetic Field Analysis, ICS Newsletter , No. 6 , 1999 , pp 3-7 .
[13] Bottauscio , O. , Chiampi , M. , Chiarabaglio , D. , Repetto , M. , Preisach -type hysteresis
in Magnetic Field Computation Models, Physica B : Condensed Matter , No. 275 , 2000
, pp 34-39 .
[14] Bottauscio , O. , Chiampi , M. Laminated Core Modeling under Rotational Excitations
Including Eddy currents and hysteresisJ. Appl . Phys . , No. 89 , 2001 , pp 6728-6730 .
[15] Bottauscio , O. , Chiarabaglio , D. Chiampi , M. , Repetto , M. , A Periodic Magnetic Field
Solution Using Hysteretic Preisach Model and Fixed -Point Technique, IEEE Trans .
Magna . , No. 31 , 1995 , pp 3548-3550 .
[16] Bozorth , R. , M. Ferromagnetism. D. Van Nostrand Co. . Inc. . Princeton, 1951 New
Jersey.
[17] Burzo , E. Physics of Magnetic Phenomena, Romanian Academy Publishing House , Vol 1 ,
1979 , Bucharestknow .
[18] Cardelli , E. Della Torre , E. , Faba , A. Experimental Verification of the deletion and
Congruency Property in Si- Fe Magnetic Steels, Modeling hysteresis and
Micromagnetics 2009 , some , Gaithersburg , Maryland, USA
[19] Cardelli , E. Della Torre , E. , Faba , A. Properties of a Class of Vector HysteronsJournal of
Applied Physics , No. 103 , 2008 , 07D927 .
134 Modelling, Programming and Simulations Using LabVIEW™ Software
[20] Cardelli , E. , Faba , A. Vector hysteresis Measurements via Single Disk Tester, Physica B ,
No. 372 , 2006 , pp 143-146 .
[21] Cheng , K. , W. , E. Lu , Y. , Ho , S. , L. Hysteresis Modeling of Magnetic Devices Using
Dipole DistributionIEEE Transactions on Magnetics , Vol 41 , No. 5 , 2005 .
[22] Chiampi , M. , Chiarabaglio , D. , Repetto , M. , The Jiles - Atherton and Combined Fixed -
Point Technique for Time Periodic Magnetic Field Problems With hysteresis, IEEE Trans .
Magna . , No. 31 , 1995 , pp 4306-4311 .
[23] Del Moral Hernandez , E. Muranaka , C. , S. , Cardoso , J. , R. , Identification of the Jiles -
Atherton Model Parameters Using Random and deterministic Searches, Physica B 275 ,
2000 , pp 212-215 .
[24] Del Vecchio , R. , An Efficient Procedure without hysteresis Modeling Complex Processes in
Ferromagnetic Materials, IEEE Trans . Magna . , No. 16 , 1980 , pp 809-811 .
[25] Del Vecchio , R. , Computation of Losses in Electrical Steels Nonoriented From the Classical
ViewpointJ. Appl . Phys . , No. 53 , 1982 , pp 8281-8286 .
[26] Del Vecchio , R. , The Inclusion of hysteresis Processes in the Special Class of Electromagnetic
Finite element calculations, IEEE Trans . Magna . , No. 18 , ( 1982c ) , pp 275-284 .
[27] Della Torre , E. A Preisach Model for Accommodation, IEEE Trans . Magna . , No. 30 , 1994 ,
pp 2701-2707 .
[28] Della Torre , E. A Simplified Vector Preisach Model, IEEE Trans . Magna., No. 34 , 1998 , pp
495-501 .
[29] Della Torre , E. Hysteresis Modeling II : Accommodation, IEEE Trans . Magna . , No. 23 ,
1987 , pp 2823-2827 .
[30] Della Torre , E. Magnetic hysteresis, IEEE Press, New York , 1999
[31] Della Torre , E. , Pinzaglia , E. Cardelli , E. Vector Modeling - Part I : Generalized hysteresis
model, Physica B , Vol 372 , 2006 , pp 111-114 .
[32] Della Torre , E. , Pinzaglia , E. Cardelli , E. Vector Modeling - Part II: Ellipsoidal vector
hysteresis model . Numerical Application to the 2 - D Houses, Physica Male , Vol 372 ,
2006 , pp 115-119 .
[33] Dlala , E. Arkkio , A. Measurement and Analysis of hysteresis of High-Speed Torque on
Induction Machine, Electric Power Applications, EIT , Vol 1 , No. 5 , 2007 , pp 737-
742 .
[34] Dlala , E. Belahcen , A. , Arkkio , A. Vector Model of Ferromagnetic hysteresis
Magnetodynamic Steel Laminations, Physica B : Condensed Matter , Vol 403 , No. 2-3 ,
2008 , pp 428-432 .
[35] Dlala , E. , Saitz , J. , Arkkio , A. Inverted and Forward Preisach Models for Numerical
Analysis of Electromagnetic Field ProblemsIEEE Transactions on Magnetics , Vol 42 ,
No. 8 , 2006 , pp 1963-1973 .
[36] Dlala , E. , Saitz , J. , Arkkio , A. Modeling Based on Symmetric hysteresis Minor LoopsIEEE
Transactions on Magnetics , Vol 41 , No. 8 , 2005 , pp 2343-2348 .
[37] Doong , T. , Mayergoyz , I. , D. Implementation of hysteresis on Numerical ModelsIEEE
Transactions on Magnetics , Vol 21 , No. 5 , 1985 , pp.1853 - 1855 .
[38] Fuzi , J. Depends hysteresis model computationally Efficient Rate, COMPEL , No. 18 , 1999 ,
pp 445-457 .
[39] Fuzi , J. , Helerea , E. Iványi , A. Experimental Construction of Preisach Models for
Ferromagnetic Cores, PCIM / PQ , Nuremberg , 1998 .
Hysteresis Modeling of Soft Magnetic Materials using LabVIEW 135
[40] Fuzi , J. Ivanyi , A. Two features of hysteresis Rate - Dependent Models, Physica B : Condensed
Matter, No. 306 , 2001 , pp 278-280 .
[41] Fuzi , J. , Kadar , G. Frequency Dependence in the Product Preisach ModelJ. Magna . Magna .
Mater . , No. 254-255 , 2003 , p. 278-280 .
[42] Fuzi , J. Type Vector Preisach hysteresis Two Models, Physica B , No. 343 , 2004 , pp 159-163
.
[43] Hantila , F. A Method of Solving Stationary Magnetic Field in Non - Linear Media, rev. Roum
. Sci . Techn. - Electrotechn . et Go. , No. 20 , 1975 , pp 397-407 .
[44] Hantila , F. Mathematical Models of the Relation Between B and H for non-linear media, rev.
Roum . Sci . Techn. - Electrotechn . et Go. , No. 19 , 1974 , pp 429-448 .
[45] Hantila , F. , Preda , G. , Vasiliu , M. Polarization Method for Static Fields, IEEE Trans .
Magna . , No. 36 , 2000 , pp 672-675 .
[46] Helerea , E. , electrical materialsà and electronics , Ed MatrixRom , Bucharest , 2003
[47] Henze , O. , Rucker , W. , M. Identification procedures of Preisach model, IEEE Transactions
on Magnetics , Vol 38 , No. 2 , 2002 , pp 833-836 .
[48] Henze , O. , Rucker , W. , M. , Jesenik , M. , Gorican , V. , Trlep , M. , Hamler , A. ,
Stumberger , B. , Hysteresis model and Examples of Ferromagnetic Material, IEEE Trans
. Magna . , Vol 39 , No. 3 , 2003 , pp 1151-1154 .
[49] Hutchinson , W. , B. , Swift , J. G. Anisotropy in Some Soft Magnetic MaterialsGordon and
Breach Science Publishers Ltd. , Texture , Vol 1 , 1972 , pp 117-123 , UK .
[50] Ionita , A. , D. Ionita , V. Software Tools for interoperable between Materials with
Electromagnetic Problems involving hysteresis, Proc . of twond Int . Conf on Advances
and Applications of GID , 2004 , pp.147 -150 .
[51] Ionita , V , Ionita , A. , D. Use of Magnetic Material Models in Electromagnetic CADJournal
of Optoelectronics and Advanced Materials Vol 6 , No. 3 , 2004 , pp 1013-1016 .
[52] Ionita , V. , Crânganu - Cretu , B. , John D. Quasi - Stationary Magnetic Field Computation
in Hysteretic Media, IEEE Trans . On Magnetics , Vol 32 , No. 3 , 1996 , pp 1128-1131 .
[53] Ionita , V. , Crânganu - Cretu , B. , Ionita , A. , D. Object- Oriented Software for Advanced
Characterization of Magnetic Materials, IEEE Trans . on Magnetics , Vol 38 , No. 2 ,
2002 , pp 1101-1104 .
[54] Iványi , A. Hysteresis Models in Electromagnetic Computation, Akademia Kiadó , Budapest
, 1997 .
[55] Jiles , D. C. A Generalized Self Consistent Model For The Calculation of Minor Loop in The
Theory of Hysterezis ExcursionIEEE Transaction on Magnetics , Vol 28 , 1992 , pp
2602-2604 .
[56] Jiles , D. , C. Atherton , D. L. Ferromagnetic HysterezisIEEE Transaction on Magnetics ,
Vol 19 , 1983 , pp 2183-2189 .
[57] Jiles , D. , C. Atherton , D. L. Theory of Ferromagnetic HysterezisJournal of Magnetism and
Magnetic Materials , Vol 61 , 1986 pp 48-60 .
[58] Jiles , D. , C. Thoelke , J. , B. , Devine , M. , Numerical Determination of hysteresis
Parameters for the Modeling of Magnetic Properties Using the Theory of Ferromagnetic
hysteresis, IEEE Trans on Magnetics , Vol 28 , No. 1 , 1992 , pp 27-35 .
[59] Jiles , D. , C. Thoelke , J. B. , Theory of Ferromagnetic Hysterezis : Determination of Model
Parameters from Experimental hysteresis Loops, IEEE Trans on Magneticws , vol 25 ,
no. May , 1989 , pp 3928-3930 .
136 Modelling, Programming and Simulations Using LabVIEW™ Software
[60] Kis , P. , Iványi , A. Parameter Identification of Jiles - Atherton Model With Non - Linear Least
-Square Method, Physica B , Vol 343 , 2004 , pp 59-64 .
[61] Kis , P. , Kuczmann , M. , Füzi , J. Iványi , A. Hysteresis Measurements in LabVIEW,
Physica B , Vol 343 , 2004 , pp 357-363 .
[62] Krejc , P. , Vector hysteresis Models, Eur . Jnl . Appl . Math . , Vol 2 , 1991 , pp 281-292 .
[63] Kuczmann , M. Scalar hysteresis Measurement Using FFTJournal of Optoelectronics and
Advanced Materials , Vol 10 , No. 7 , 2008 , pp 1828-1833 .
[64] Lavers , J. , D. , Biringer , P. , P. , Hollitscher , H. A Simple Method for Estimating the Minor
Loop hysteresis Loss in Thin Laminations, IEEE Trans . Magna ., vol 14 , 1978 , pp 386-
388 .
[65] Lavers , J. , D. , Biringer , P. , P. , Hollitscher , H. Estimation of Core Loss When the flow
waveform Contains the Essential Plus single Odd Harmonic Component, IEEE Trans .
Magna ., vol 13 .
[66] Lin , D. Zhou , P. , Badics , Z. , Fu , W. , N. , Chen , Q. , M. , Cendes , Z. , J. A New Model
for nonlinear anisotropic Soft Magnetic Materials, Proceedings of COMPUMAG ,
2005 , CSY0084 .
[67] Makaveev, D., Dupre, L., De Wulf, M., Melkebeek, J., Combined Preisach–Mayergoyz-
Neural-Network Vector Hysteresis Model for Electrical Steel Sheets, Journal of Applied
Physics, Vol. 93, No. 10, 2003, pp. 6738-6740.
[68] Nicolaide, A., Magnetism and Magnetic Materials, Transilvania University Press, Brasov,
Romania, 2001.
[69] Nicolaide, A., A New Approach of Mathematical Modelling of Hysteresis Curves of Magnetic
Materials, Rev. Roum. Sci. Techn. – Electrotechn. Et Energ., Vol. 48, No. 2-3, 2003,
pp. 221-233.
[70] Nicolaide, A., An Approach to the Mathematical Modelling of the Hysteresis Curves of
Magnetic Materials: The Mirror Curves, Rev. Roum. Sci. Techn. – Electrotechn. Et
Energ., Vol. 52, No. 3, 2007, pp. 301-310.
7
1. Introduction
The rapid pace of change in modern medicine makes training on simulation platforms an
absolute necessity. With the microprocessors the sophistication of simulators exploded.
More recently medicine has developed simulators that are becoming increasingly
sophisticated, especially in anesthesia training but also to train intensive care personnel.
This is an area that will rapidly advance in the future and will have great impact on medical
education medical. Unfortunately, the current state of development for simulated
procedural environments remains rather limited and the availability of validated metrics of
skills acquisition is just beginning. There are two impulse to push respiration simulation
forward, as list following.
use to make clinical diagnoses and to guide therapeutic interventions. As respiration is one
of the most important physiology, the MPS has a self-regulating spontaneous breathing
system that used pressurized gases in appropriate concentrations the enhance realism.
mechanical properties of the components alone. The lung model consists of three
components: the actual lung model, an electromechanical servo system and a computer
system to control the model.
Meka (2004) present a new bellow-less lung simulator utilizing a fixed-volume pressure
controller to simulate spontaneous breathing as an alternative to the traditional bellows-
driven mechanical lung system in the human patient simulator. The lung simulator
simulates carinal pressure, which allows for simulation of actively breathing or ventilated
patients. The bellow-less lung simulator drives up the precision of model because more
action must be calculated by software.
It is well known that the large airway resistance is a nonlinear function of flow, and that
total respiratory resistance depends on tidal volume, and is different on inspiration and
expiration, being a continuous function of time during the respiratory cycle. It is a nonlinear
phenomenon coupled with the airway collapse mechanism, seen as effort independence of
flow for driving pressure exceeding a threshold value. Bernhard Quatember (2003) creates a
mathematical nonlinear pressure-flow model with the following characteristic: avoid
oversimplification model, airway partition by dynamic relationship, some mechanic
parameters variation caused by pathology, and tries to model very precisely the
tracheobronchial tree. However, there are still some points should be added in his model:
first, airway collapse sometimes plays an important role; second, turbulent characteristic in
large bronchi can not be neglected; third, more comprehensive pathology should be taken
into account in modelling.
In 1998 Adam G. Polak (1998) has been constructed a complex, nonlinear forward model,
including exciting signal and static recoil pressure lung volume descriptions and 132
parameters. In this case, the structural complexity is achieved at the expense of model
linearization. It has been shown that lung heterogeneity plays an important role in
respiratory system pathology and influences results of lung examinations. Experimental and
model studies on the respiratory system demonstrate that heterogeneous constriction of
airways accompany asthma and can be a crucial determinant of hyper-responsiveness via an
increase in lung impedance.
In 2003 Adam G. Polak presented a computational model to predict maximal expiration
through a morphometry-based asymmetrical bronchial tree. A computational model with
the Horsfield-like geometry of the airway structure, including wave-speed flow limitation
and taking into consideration separate airflows from several independent alveolar
compartments has been derived. The airflow values are calculated for quasistatic conditions
by solving a system of nonlinear differential equations describing static pressure losses
along the airway branches. Then in 2006 he (Polak, 2006) use the nonlinear model to analyze
the characteristic of lung mechanical ventilation.
In 2008 Adam G. Polak again investigated a model-based method for flow limitation
analysis in the heterogeneous human lung. Flow limitation in the airways is a fundamental
process constituting the maximal expiratory flow-volume curve. Its location is referred to as
the choke point. In this work, expressions enabling the calculation of critical flows in the
case of wave-speed, turbulent or viscous limitation were derived. Then a computational
model for the forced expiration from the heterogeneous lung was used to analyse the regime
and degree of flow limitation as well as movement and arrangement of the choke points.
The conclusion is that flow limitation begins at similar time in every branch of the bronchial
tree developing a parallel arrangement of the choke points.
140 Modelling, Programming and Simulations Using LabVIEW™ Software
1 ∂p dux
X− + ν∇ 2 ux = (1)
ρ ∂x dt
where p is pressure, ux is velocity vector in x direction, x is body force, ρ is density, ν is
kinetic viscosity.
B. Bernoulli energy equation
From classic fluid mechanics we obtain the following energy equation for a respiratory
system in a closed loop pipe system with varying diameters
p u2
z+ + =C (2)
ρg 2g
Modeling in Respiratory Movement Using LabVIEW and Simulink 141
Compliance with mass conservation law requires that flow rate in parent vessel must equal
the total flow rate in children vessels on each branching level. Assuming that flow rate is
constant for individual airway the continuity equation is expressed by
Q0 = Q1 + Q2 (4)
At a lung bifurcation the flow in the parent vessel Q0 equals the sum of flow in two children
segments Q1 and Q2 respectively.
D. Poiseuille theorem
Laminar flow is smooth, with molecules moving in parallel, concentric streams without
eddies, and the molecules at the edge of the tube move more slowly than those in the
middle. Laminar flow in Newtonian fluids (fluids with constant viscosities) is governed by
Poiseuille’s law. Poiseuille’s law relates the air flow Q [ml/s] through airway with the
difference in airway segment pressure at the two ends of vessel segment Δp created by the
respiratory muscle, radius r, length L, and viscosity µ of the air:
8μL
R= (5)
π r4
The resistance of air through vessels is most strongly dependent on radius, with the fourth
power relationship. Because of fluid friction air flow velocity within vessel varies from none
in wall proximity to maximum value in the center of the vessel creating parabolic velocity
profile. Average velocity (with respect to cross-section) inside air vessel segment is
determined as:
Δp ∗ r 2
Um = (6)
8μ ∗ L
E. Rohrer’s equation
When flow rate through a tube reaches a critical velocity, turbulent flow occurs. In
turbulent flow, the molecules swirl in eddies and vortices rather than in an orderly way, so
that the molecules have a rotational as well as a linear velocity. Irregularities and corners in
the tube facilitate turbulence. Conversion from laminar flow to turbulent flow
approximately halves the flow for a given pressure drop.
If the flow is in high speed, the composition is altered, or if the internal part of the conduit is
modified, the flow will become turbulent, and the equation to describe this phenomenon
will be the following second–grad equation, as described by Rohrer (1915):
Δp = K 1 × Q + K 2 × Q 2 (7)
where K1 is the linear coefficient and K2 is the angular coefficient of the straight line.
142 Modelling, Programming and Simulations Using LabVIEW™ Software
dP − f (x) − f (x)
= = (8)
2
dx 1 − Sws (x) 1−
ρ q 2 ⎛ ∂A ⎞
⎜ ⎟
A3 ( x ) ⎝ ∂Ptm ⎠
Where dp/dx is the gradient of lateral pressure along the bronchus, Sws = u c is the local
speed index equal to the ratio between flow (u) and wave (c) speed, q is the volume flow in
the bronchus, ρ denotes gas density, A is the cross sectional area, and ∂A ∂Ptm is the
elementary compliance of the airway wall dependent on transmural pressure Ptm . The
elementary dissipative pressure loss f (pressure drop per unit distance) is described by the
following empirical formula (Renolds, D.B., 1982):
(
f ( x ) = a + bRN ( x ) ) A8πμ q
(9)
2
( )
x
Where a and b are scaling coefficients, RN the local Reynolds number and μ is gas viscosity.
4.2 Morphometric model of the lung and the corresponding fluid dynamic
1 2 3 4 5 6 7 8
0.0701 0.0732 0.0788 0.0856 0.0769 0.0620 0.0459 0.0360
9 10 11 12 13 14 15 16
0.0248 0.0161 0.0118 0.0074 0.0056 0.0037 0.0031 0.0025
17
0.0019
Table 1. Resistance for passage airway, same value with Fig. 1
The morphometric model used to describe the behavior of the respiratory system is based on
the symmetrical model proposed by Weibel (1963). In this model the tracheobronchial tree is
divided into 24 generations, where generation 0 is the trachea, generation 1 is extrapulmonary
bronchus, generations 2 to 6 are larger intrapulmonary bronchi with cartilage, generations 7 to
16 are bronchioles with smooth muscle, generations 17 to 22 are all respiratory bronchioles,
and generation 23 corresponds to alveolar sacs. The airways multiply by regular dichotomy.
Starting from the trachea, each branch of a given generation divides into two identical
daughters, therefore generation n has 2n branches. In a spontaneous breathing, normal person,
the medium-sized bronchi are the site of greatest resistance (Ball, Wilmot C., 1996), see the data
(table 1) and graph (figure 1) of airway resistance.
convective acceleration absorbs a part of potential energy (thus also of lateral pressure),
producing additional decrease of transmural pressure. It was theoretically discussed and
shown that these two processes can produce flow limitation themselves. Additionally,
when flow velocity approaches wave-speed of pressure disturbance propagation along the
airway wall, the loss of lateral pressure is strongly amplified, and the airway narrows much
quicker than in case of frictional or turbulent dissipation alone. In effect, increasing driving
pressure tries to develop faster airflow, but any growth of flow would have produced faster
airway collapsing, overcoming the expansion of pressure, and finally, flow remains
constant. The wave-speed theory predicts flow over most of vital capacity (VC, the maximal
volume of air that can be expired after deep inspiration), but the other mechanisms may
limit flow at low lung volumes.
The wave velocity in fluid-filled collapsible tube is the following equation:
12
⎛ A dp ⎞
c=⎜ ⎟ (10)
⎝ ρ dA ⎠
where A is the mean cross-sectional area of the tube, p is the transmural pressure in the tube
(the inner minus the outer pressure), and ρ the fluid density. The equation crops up in the
study of wave propagation in pulmonary passages.
The principal characteristic of pliable, collapsible tubes is that, as the pressure therein
changes, so does the cross sectional area. Similarity of Eq. (10) to that for propagation of
waves in a compressible gas is evident once it is realized that such waves involve variations
in density rather than the cross-sectional area; so, if A is replaced by r, this results in
c = ( dp d ρ )
12
An interesting phenomenon arising in collapsible tubes with internal flow is that of flow
limitation. As the upstream pressure p1 is increased relative to the downstream one p2, thus
as p1− 2 = p1 − p2 is increased, there exists a limit in the flow-rate Q; if p1− 2 is increased
further, no further increase in Q is possible. This, obviously, is very counter-intuitive from
the point of view of rigid-pipe hydraulics.
dQ A ⎛ U2 ⎞
= ⎜1 − 2 ⎟ (11)
dp ρU ⎜⎝ c ⎟
⎠
where Q is the volumetric flow-rate in the collapsible tube, p the transmural pressure, A the
cross-sectional area, U the flow velocity corresponding to any particular A (both A and U
vary along the tube), and c the wave speed as in Eq. (10).
It is obvious that as
U
→1
c
There is a discontinuity associated with a maximum flow rate in the collapsible tube. This is
also associated with so-called elastic jumps. Thus, in all this, the analogy to choked flow and
shock waves in gas dynamics is quite strong.
intrapleural and is expiration difficult. To show this different localization obstacle, we must
subdivide the upper airway into two segments: the extrapleural segment and intrapleural
segment which have different symptom in respiratory disorders.
For the purpose of modeling, the pulmonary system has to be simplified to elements which
represent specific physical features of the lung. The lung model was restricted to serial
inhomogeneity with respect to both resistance and elastic properties of the airways. The
currently prepared mathematical model is based on serial model consists of one alveolar
compartment connected to ambient air by a tube representing the airways. All alveoli were
lumped to one compartment VA, which was connected to ambient air by a tube representing
the lumped airways. This tube consisted of four parts in series: one for the small airways, a
compressible segment in between, one for the large airways intrapleural, and the last one for
large airways extrapleural. The alveolar compartment and the intrapulmonary airways were
influenced by the intrathoracic pressure, which was equal to pleural pressure Ppl. In
preliminary result, the serial model of lung can be schemed in figure 3.
pleura
alveolar
1
Δp = V + RQ (12)
C
Since the compliance and resistance of a single pathway are constants, the total pressure will
be determined at any instant by the volume of the unit and the rate and direction of flow at
that instant.
148 Modelling, Programming and Simulations Using LabVIEW™ Software
Recent studies have shown that this first-order model is, however, an oversimplified
representation of nonlinear, multicompartment respiratory mechanics. In fact, it is well
known that the large airway resistance is a nonlinear function of flow, and that total
respiratory resistance depends on tidal volume, and is different on inspiration and expiration,
being a continuous function of time during the respiratory cycle. Parameter estimates based
on the first-order model, therefore, do not depend solely on patient condition but also on
experimental condition, because the model involves linearization around the working point.
( ) ( )
Paw = K 1 + K 2 Q ( t ) Q ( t ) + E1 + E2V ( t ) V ( t ) + P0 (13)
where Paw(t) is the pressure measured at the airway opening at time t, Q(t) the flow, V(t)
the volume and P0the constant.
The basic model values used in this work ( E1 = 50cmH 2OL−1 , E2 = −80cmH 2OL−2 ,
K1 = 10cmH 2OL−1s , K 2 = 5cmH 2OL−2 s 2 ) lie within the range observed in data obtained from
animal experiments described elsewhere (Jandre et al., 2004). The negative E2 suggests
alveolar recruitment throughout the respiratory cycle.
Ru = K 1 + K 2 Q (14)
where the constant K1 represents resistive properties for laminar flow, and the constant
K2characterizes an additional resistive term, significant at higher flow rates when
turbulence may occur;
2. intermediate airway resistance Ri, depending on the airway compression due to
transmural pressure. This segment was modeled as a cylinder of constant length, the
radius and hence volume (vc) of which vary with transmural pressure. On the basis of
Poiseuille’s law, the corresponding resistance is described by
2
⎛v ⎞
Ri = K 3 ⎜⎜ c max ⎟⎟ (15)
⎝ vc ⎠
Modeling in Respiratory Movement Using LabVIEW and Simulink 149
where the constant K3 represents the value of Ri when airway volume reaches its
maximum admissible value vcmax; and
3. lower airway resistance Ri , depending on lung volume (v). Since Ri decreases with
increasing lung volume, it was described by the following relationship:
K4
Rl = (16)
v
Where K4 is a positive constant.
On the basis of experimental data the elastic characteristic of the intermediate airway
segment is approximated by the relationship:
vc 1
= (17)
vc max 1 + exp ⎡ − a ( ptm − b ) ⎤
⎣ ⎦
where a and b are constants and Ptm is the transmural pressure. Differentiating vc
with respect to ptm , we obtain the intermediate airway compliance C aw .
Finally, since this chapter is aimed at establishing respiratory model have the nonlinear
mechanical properties of the tracheobronchial airways, the alveolar space and chest wall
were assumed to have a constant, purely elastic behavior and were represented by the
constant elastance respectively.
6. Simulation method
6.1 General description
LabVIEW and Matlab are the two main programs used widely by engineer. LabVIEW is a
well opened virtual instruments platform and widely used in automatic control and
measuring technology. LabVIEW simplify development procedure of process control and
testing software. Now, LabVIEW has become the main trend of measuring and testing
technologies and instruments. With the strong hardware interface capability, LabVIEW can
communicate with other hardware and acquire data easily. But LabVIEW has limited
toolboxes which confine the using field to large application program, in the case of complex
applications having large data processing and complicate control algorithm, LabVIEW is not
competent. Conversely, Matlab has very strong computing functions and stable algorithm
library. Matlab provides precision and high efficiency toolboxes in almost all engineering
computing fields. But it is not proficiency for interface compile. And data input, net
communication, hardware control are also shortcoming of matlab. Because the two
languages have complimentary specialties, we can combine the advantage by mixture
programming. The data collected by LabVIEW can be sending to matlab for computing, and
then processed data transfer back to LabVIEW for output control and display. Calling
matlab in LabVIEW can control hardware easily and realize complex algorithm
concurrently.
The Simulation Interface Toolkit provides methods for creating a LabVIEW user interface
for a Simulink model, converting a Simulink model into a dynamic link library (DLL), and
running a simulation model on an RT target. By combining the capabilities of Simulink and
Real-Time Workshop with LabVIEW, the Simulation Interface Toolkit helps you import
simulation models into LabVIEW.
150 Modelling, Programming and Simulations Using LabVIEW™ Software
Pmus PA V V
C d/dt
0
0 0.5 1 1.5 2 2.5 3 3.5 4
respiratory time
Fig. 5. Pressure waveform generated by respiratory muscle
The simplest mathematical model of respiratory system is linear model:
1
Pmus = V (t ) + RV (t ) (12)
C
Which Pmus is respiratory pressure, generated by respiratory muscle, C is compliance, R is
airway resistance, V(t) is air volume breathed in lung, V (t ) is air flow of respiratory, being
the derivative of volume to time. In the model the compressibility of air is neglected as
usual. There are two basic parameters in describing the respiratory system: compliance C
and airway resistance R. Based on the linear model described above, the simplest
respiratory model we established is shown in figure 4. The merits of the model are listed on
Modeling in Respiratory Movement Using LabVIEW and Simulink 151
the following: (1) simple model, most details are neglected; (2) from distinct principle,
spontaneous respiratory can be concluded from the model; (3) extensive expansibility, every
component can be complicated if needed, so that complexity of model’s study can be
selected as requirement.
The parameters of R and C in model can be selected as normal human; while the respiratory
muscle pressure can be acquired precisely from the data of Jodat et al.(1966) image
processing, as shown in figure 5. In Simulink the muscle pressure used as input, the breath
mechanical parameters (R and C) is the linear response system, then the spontaneous
respiratory waveform can be computed.
rather sharp expiratory flow wave, but have the same volume in the two breath phase. The
expiratory flow is originate from the relax of breath muscle, together with the delay of
respiratory system to airflow. The two main facts make the expiratory flow being a sharp
flow at the beginning and then a long time without airflow. Change the parameters of
respiratory system, the shape of flow variate, and so is the frequency spectrum of flow
waveform, which is in accordance with Benchetrit’s (2000) conclusion. Because respiratory
pressure waveform is not single frequency sine wave, change the pressure waveform will
change the frequency spectrum of respiratory flow wave too, so pressure waveform
generated by respiratory muscle is an influence factor to flow frequency spectrum. The
frequency of the breath system can also be changed by variation of the mechanical
parameters, which is similar to one-order RC circuit. The linear system can not create the
non-existing frequency, however, the input (muscle pressure) of the linear system (breath
system) the muscle pressure contain abundant frequency, as a result the output (airflow)
also include harmonic frequency. Once the input and mechanical parameters do not change
abruptly, the output will remain a suitable stable frequency content.
adopted: structure of respiratory system is described by the simplest model, i.e., only lung
compliance (C) and airway resistance (R) are taken into consideration; respiratory muscle
pressure data is used as input of model into the linear system; transfer function is generated
by first-order RC circuits. With the above hypothesis, the constructed model can reflect the
basic characteristic in general. Then the output is calculated by linear system theory and
realized in LabVIEW by CD linear simulation.vi located in Control Design and Simulation
module. The final output represents the volume variation of every breath. After differentiate
the volume, respiratory flow is gained that can be traced by hardware.
The simplest mathematical model of respiratory system is linear model (Otis, 1956):
1
Pmus = V (t ) + RV (t ) (12)
C
Then the transfer function of volume of compliance can be calculated as
1
F (S ) = (18)
RCS + 1
Which Pmus is respiratory pressure, generated by respiratory muscle, C is compliance, R is
airway resistance, V(t) is air volume breathed in lung, V (t ) is air flow of respiratory, being the
derivative of volume to time. In the model the compressibility of air is neglected as usual.
Typical parameters of human respiratory system is used in simulation, parameters being
R=0.18kPa.s/L, C=1.84L/kPa (Tang, 1995). The related LabVIEW program is shown in
figure 8, and the simulation result shown in figure 9.
Compared with the respiratory flow given in (Bachy, 1986), it can be concluded that the two
flow waves are very similar. Change the parameters of respiratory system, the shape of flow
change, and so is the frequency spectrum of flow waveform, which is in accordance with
Benchetrit’s (2000) conclusion. Because respiratory pressure waveform is not simple sine
wave, changing the pressure waveform will change the frequency spectrum of respiratory
flow wave too, so pressure waveform generated by respiratory muscle is an influence factor
to flow frequency spectrum.
(a) (b)
Fig. 9. The simulation results calculated by transfer function of the respiratory
(a) flow waveform of one breath cycle (b) volume curve of one breath cycle
We used a fixed volume flow controller to generate the required airway flow. The flow
controller is based on the ideal gas law. Air compression is neglected in this model, which is
common practice. Flow is generated inside a fixed volume at a constant temperature by
adjustment of the orifice of proportional valves. In flow is generated when gas is pumped
into the fixed volume, and likewise out flow is generated when gas is removed from the
volume. The airway resistor was constructed in the direction of Mecklenburgh (1988). The
flow system consists of a fixed-volume vessel (FVV), a positive pressure source, a negative
pressure source, two proportional flow valves (PFV), a flow sensor, a computer with data
acquisition card. The entire setup is illustrated in Fig.10. The two pressure sources are
implemented by air pump and vacuum respectively.
The fixed-volume vessel is a cylindrical-shaped polyvinyl chloride (PVC) structure. The
cylindrical shape reduces turbulent gas flow inside the container, and the PVC material
allows for inexpensive, quick and easy assembly of the structure. The vessel has three
openings to allow the flow of gas in and out of the FVV to simulate ventilation. The outlet
also facilitates the fitting of standard clinical airway resistors. The vessel is sealed airtight
using PVC cement to prevent any air leaks from the container.
The volume of the FVV was determined experimentally by measuring the flow rate for
various vessel volumes. The size of the volume was chosen to balance time delay and
controllability. Time delay increases for larger vessels, because the vessel needs to fill
completely before the flow starts to rise. Controllability is affected mainly by the volume of
the vessel. It is easier to control the flow in a larger vessel, because compressibility of gas
increases the total vessel compliance. It is difficult to control the flow in a very stiff vessel,
because a small addition of volume increases the flow rapidly. With the available materials,
a volume of 0.64 l was realized.
Two proportional flow control valves (IQ valves co., P/N: 209090) were used for control
flow in and out of FVV. Pulse width modulated (PWM) solenoid valve drivers (Burr-Brown
Company, DRV101) were used to run the proportional flow valves. An added advantage of
the PWM waveform was that it reduced valve magnetic hysteresis and minimized power
loss and component overheating at high current levels. The duty cycle of the pulse width
determined the amount of power delivered to the valve. A 16-bit DAQ card (NI, PCI-6221M,
with 16 analog inputs and 2 analog outputs, all in 16-bits resolution) supplied the signal to
adjust the duty cycle of the pulse width.
Modeling in Respiratory Movement Using LabVIEW and Simulink 155
Pressurized Vacuum
air
Valve A Valve B
Proportional Proportional
valve driver A valve driver B
Flow
sensor
A/D
PCI-6221M
D/A D/A
(PC)
Fig. 10. Block diagram implementation of flow track design. Solid arrow lines illustrate
electrical signal, hollow arrow lines illustrate airflow
A flow sensor (Honeywell, AWM5104) that outputs an analogue signal proportionally
scaled to the applied flow was used to sample the flow of mouth. The analogue flow signal
is conditioned and low-pass filtered using a 2nd-order digital Butterworth filter with a 50
Hz cutoff frequency to remove high-frequency noise due to turbulent flow inside the FVV.
The analogue flow pressure signal was sampled with a 16-bit ADC, i.e., analog input in PCI-
6221M.
There are many methods for the PID adjusting. The PID parameters were selected based on
the extended step response curve methods. The steps for the PID parameters adjustment
were as following:
1. digital controller does not worked in system, the process variable of controlling object
was adjusted to the values near setpoint. The variable values were stabilized, and then
unit step response curve was measured.
2. a tangent at inflexion in response curve is located. Delayed time τ and time constant
Tm and ratio of the two parameters Tm τ were calculated.
3. controlling degree was selected.
4. parameters T, Kp, Ti and Td were calculated based on table (Gao, 2007).
The final parameters we selected were listed: P=3, I=0.8, D=0. The controller can be more
efficient if adaptive-tuning scheme based on adaptive signal processing techniques was
implemented to tune automatically.
Tracking result was shown in figure 11. It can be concluded that in the normal breath
pattern the practical flow was very much alike to the theoretical flow curve. More details
are to be exploited in future. And more pathology breath options should be studied to get a
more complicated understanding to the flow tracking method.
156 Modelling, Programming and Simulations Using LabVIEW™ Software
Fig. 11. Measured flow waveform by flow tracking algorithm using PID, which is very
similar to the calculated wave.
( )
P = K 1 + K 2 V ( t ) V ( t ) + E ⋅ V ( t ) (19)
The respiratory muscle pressure data from Jodat (1966) is used as input of model. We
construct the nonlinear model of breath system using simulink, the following block in Fig.
12 being the model, parameters were selected from Tang (1995). The LabVIEW 8.6 and SIT
5.0 is used in the main program, DAQ is configured to output signal with PCI-6221M card
equipped. The calculated flow wave is to be tracked by proportional flow valve. Fig.13 is
part of front panel when SIT is used interface with simulink. Fig.14 is the simulated flow
using the aforementioned simulation condition: respiratory muscle used as input, nonlinear
parameter of resistance that flow-dependent is used, and compliance is fix number.
Modeling in Respiratory Movement Using LabVIEW and Simulink 157
Compared with the flow wave generated with fixed resistance (He, 2009(b)), the inspiratory
flow part has little change, but the expiratory flow parts are smoother. In general, the flow is
more similar to the real curve. We have tried the two foregoing methods both respectively
(He, 2009(a, b)). But we can not realize the simulation construction and output simulated
result by one program. If the model is simple, the control design and simulation module in
LabVIEW can competent for the task, as we have done in previous work. With the
complicate of respiratory model, by practice, we conclude that the combination of simulink
and LabVIEW bridged by simulation interface toolkits is the optimum option.
There are three main key points in the chapter: (1) the respiratory muscle pressure is used as
system input, which is accorded with spontaneous breath principle; (2) respiratory model is
more complicated and precise with resistance flow-dependent parameterized, and the
computed flow is even similar to real breath; (3) LabVIEW is used as the main program to
interface with peripheral equipment, simulink is used as model construction program to
cope with model complication, SIT is used to bridge the two program efficiently. The
mentioned program method should be the optimum solution by our practice.
Fig. 12. Simulink model with muscle pressure as input and linear compliance nonlinear
resistance varied with flow
Fig. 13. Part of front panel of LabVIEW program when simulation interface toolkits are used
to embed simulink mode
158 Modelling, Programming and Simulations Using LabVIEW™ Software
Fig.14. Simulation result of flow using muscle pressure as input and nonlinear airway
resistance
7. Conclusion
In this chapter, respiratory model is studies including simple model and complicated
nonlinear model. The realize method is introduced that have can control output flow. Two
main simulate way, i.e., simulink and LabVIEW, are used to model the respiratory
movement. The combined method that can integrate the advantage of the two method is
illustrated for control aim. In general, this chapter provide a through introduction for
respiratory modelling and control design.
8. References
Bachy, Jean-pierre, Eberhard, A., Baconnier, P. and Benchetrit, G. (1986). A program for
cycle-by-cycle shape analysis of biological rhythms. Application to respiratory
rhythm. Computer methods and programs in biomedicine, Vol. 23, 297-307.
Ball, W. C. (1996). Interactive respiratory physiology, John Hopkins School of Medicine,
http://oac.med.jhmi.edu/res_phys/Encyclopedia/AirwayResistance/AirwayResi
stance.HTML
Barkalow, C. E., Morsley, K. C., (1974). Pneumatic lung analog. US Patent, 3808706.
Barkalow (1984). Pneumatic lung analog for simulation of spontaneous breathing and for
testing of ventilatory devices used with spontaneously breathing patients. US
Patent, 4430893.
Bayliss, L. and Robertson, G. (1939). The visco-elastic properties of the lungs. Quarterly
journal of experimental physiology. Vol. 29, 27-47.
Benchetrit, G. (2000). Breathing pattern in humans: diversity and individuality. Respiration
physiology, Vol. 122, 124-129.
Bertram, C.D. (1995). The dynamics of collapsible tubes. In: Ellington, C.P., Pedley, T.J.
(Eds.), Biological fluid dynamics, 253-264.
Gao, Jinyuan, Xia, Jie (2007). Computer control systems. Tsinghua university press, Beijing.
Grinnan, D. C. and Truwit, J. D. (2005). Clinical review: Respiratory mechanics in
spontaneous and assisted ventilation. Critical Care, Vol. 9, No.5, 472-484.
Modeling in Respiratory Movement Using LabVIEW and Simulink 159
Guyton, Authur C., Hall, John E. (2002). Textbook of medical physiology (tenth edition).
Beijing medical university press, Beijing.
He, Zhonghai (2009, a). Simulation study on human respiratory system based on muscle
pressure driven. International conference on engineering computation. Hong
Kong: IEEE computer society, 33-35.
He, Zhonghai, Shan, Fang, Sun, Meirong (2009, b). Adjustable parameters respiratory flow
generation simulation method realized by LabVIEW. Third international
symposium on intelligent information technology application, Nanchang, IEEE
computer society, 299-301.
Jandre, F. C., Carvalho, A. R. S., Pino, A. V., Antonio G. (2005). Effects of filtering and delays
on the estimates of a nonlinear respiratory mechanics model. Respiratory
Physiology & Neurobiology, Vol. 148, 309–314.
Jandre, F., Pino, A., Lacorte, I., Soares, J., Giannella-Neto, A. (2004). A closed-loop
mechanical ventilation controller with explicit objective functions. IEEE
transactions on biomedical engineering, Vol. 51, 823-831.
Jansen, J. R. C., Hoorn, E., Goudoever, J., and Versprille, A. (1989). A computerized
respiratory system including test functions of lung and circulation. Journal of
applied physiology, Vol. 67, No. 4, 1687-1691.
Jodat, R. W., Horgen, J. D., and Lange, R. L. (1966). Simulation of respiratory mechanics.
Biophysical journal, Vol. 6, 773-785.
Lambert, R. K., Wilson, T. A., Hyatt, R. E., and Rodarte, J. R. (1982). A computational model
for expiratory flow. Journal of applied physiology, Vol. 52, No. 1, 44-56.
Ma, Dayou, Shen, Hao (1983). Acoustics handbook. Beijing, China: Science press.
Mauroy, B., Filoche, M., Weibel, E. R., Sapoval, B. (2004). An optimal bronchial tree may be
dangerous. Nature, Vol. 427, 633-636.
Mecklenburgh, J. S. (1988). Construction of linear resistance units for a model lung. Medical
& Biological Engineering & Computing, Vol. 26, 552-554.
Meka, V. V., van Oostrom, J. H. (2004). Bellow-less lung system for the human patient
simulator. Medical & Biological engineering & computing, Vol. 42, 413-418.
Meyer, M. (1983). A versatile hydraulically operated respiratory servo system for ventilation
and lung function testing. Journal of applied physiology, Vol.55, 1023-1030.
Myojo, T. (1989). Breathing pattern simulation using slit/cam valve. American industrial
hygiene association journal, Vol.50, No.5, 240-244.
Otis, Arthur B., McKerrow, Colin B., Bartlett, Richard A., Mead, Jere et al. (1956). Mechanical
factors in distribution of pulmonary ventilation. Journal of applied physiology,
Vol.8, No. 4, 427-443.
Polak, Adam G. (1998). A forward model for maximum expiration [J]. Computers in biology
and medicine, Vol.28, 613-625.
Polak, Adam G. (2003). Computational model for forced expiration from asymmetric normal
lungs. Annals of biomedical engineering, Vol. 31, 891-907.
Polak, Adam G., Mroczka, J. (2006). Nonlinear model for mechanical ventilation of human
lungs. Computers in biology and medicine, Vol. 36, 41-58.
Polak, Adam G.. (2008). A model-based method for limitation analysis in the heterogeneous
human lung. Computer methods and programs in biomedicine, Vol. 89, 123-131.
Quatember, B. (2003). Human respiratory system: simulation of breathing mechanics and
gas mixing processes based on a non-linear mathematical model. International
160 Modelling, Programming and Simulations Using LabVIEW™ Software
1. Introduction
In recent years, the study of the effects of ionizing radiation in thin gate oxides has received
increasing attention. This is due not only to the appearance of new lithography tools for
ultra low scale integration (ULSI) technologies, that use X- rays or e-beams, but also for the
interest of space, medical, military or high-energy applications, where the complementary
metal-oxide-semiconductor (CMOS) read-out circuitry will be subjected to a very hostile
radiation environment.
A major concern in the reliability of metal-oxide-semiconductor field effect transistor
(MOSFET) devices is the formation of interface traps and near-interface oxide traps; called
also border traps; under hot carrier injection, irradiation and processing. Traps at or near the
semiconductor/gate dielectric interface can cause degraded transconductance (Doyle et al.,
1990), the shifting of threshold voltage (Tsuchiya et al., 1987) and may lead to dielectric
breakdown (Chen et al., 1985). In order to improve the resistance of MOSFET devices to
these effects, it is necessary to have a reliable method of determining the densities of both
interface traps and oxide traps (Djezzar et al., 2004).
The reliable test procedure to predict radiation response of integrated circuits (IC’s) from
standard test laboratory, for example in space, is very important and requires a
development of simple and rapid electrical characterization techniques easily mountable in
production line. Therefore, intensive works have been carried out on the electrical
characterization techniques for MOS gate oxide and Si/SiO2 interface degradation caused by
radiation (Schwank et al., 1993). The charge pumping (CP) technique (Groeseneken et al.,
1984) is a valuable tool for all kind of traps characterization.
In this article, we present an automatic measurement bench programmable by the IEEE-488
bus that permits to characterize MOSFET device degradation induced by gamma radiation
at low doses. This characterization permits to extract threshold voltage and flatband voltage
for virgin and irradiated samples. Moreover, the determination of the breakpoint frequency
that represents the limit between interface and border trap contributions to the charge trap
is automatically extracted. The measurement bench is managed by a program, written by a
graphical language LabVIEW. LabVIEW is a powerful, platform-independent, graphical
programming development system which is ideally suited for data acquisition, storage,
analysis, and presentation.
164 Modelling, Programming and Simulations Using LabVIEW™ Software
Sensor
Embedded
(FPGA)
Handheld
Wireless
Networked I/O
PC Boards
Workstation
All of the measurement parameters can be varied by manipulating a front panel (Fig. 2)
which is the graphical equivalent of the push buttons and knobs on a test set, allowing a
user who is not familiar with the programming to operate the setup easily
The Front Panel is used to interact with the user when the program is running. Users can
control the program, change inputs, and see data updated in real time. Stress that controls
are used for inputs- adjusting a slide control to set an alarm value, turning a switch on or
off, or stopping a program. Indicators are used as outputs. Thermometers, lights, and other
indicators indicate values from the program. These may include data, program states, and
other information.
On the front panel of a VI, we place the controls and data displays for our system by
selecting objects from the Controls palette, such as numeric displays, buttons, knobs,
switches, meters, gauges, thermometers, tanks, LEDs, tables, arrays, charts, and graphs.
When we complete and run the VI, we use the front panel to control our system whether we
move a slide, zoom in on a graph, or enter a value with the keyboard. The front panel also
serves to document the experiment; a hard copy yields results as well as all of the input
parameters on one sheet.
For all measurements, a reverse bias is applied to the source and the drain diodes. When the
gate is pulsed between inversion and accumulation conditions (from above the threshold
Frequencies Digital
Multimeter
Generator Oscilloscope
voltage to below the flatband voltage), trapping and recombination of carriers under these
non equilibrium conditions gives rise to a net DC current that can be measured at the
substrate. For relatively high frequency pulses (1 MHz), the CP current is proportional to the
average density of interface traps which are physically located within 1 nm of the
semiconductor –dielectric interface (Paulsen et al., 1992).
The test circuit chip within the probe station were isolated from vibration and enclosed in a
grounded faraday box to avoid both RF and light effects. A computer has been programmed
to control the measurement system, record the data, and extract the parameters. The control
of instruments has been realized by a program developed with the LabVIEW software via
the GPIB IEEE-488 bus.
Since the whole system is in this case based on computer (Fig. 5), the data is easily ported in
ASCII form to other programs or even shared via networking with other machines.
4. Theoretical background
A commonly used definition of threshold voltage is that gate voltage for which the surface
potential (φS) in the semiconductor below the gate oxide is given by:
φS = 2φF (1)
2 qε si N A ( 2φF ) Qtotal
Vth = φMS + 2φF + − (2)
C ox C ox
where,
q (C) is the electron charge,
εsi (F/cm) is the permittivity of silicon,
NA (cm-3) is the substrate doping,
COX (F/cm2) is the gate oxide capacitance per area unit,
φMS (V) is the metal-semiconductor work function difference,
QT (C/cm2) is the total charge density in SiO2/Si system.
According to the Deal nomenclature (Deal, 1980), there are four general types of charges
associated with the SiO2/Si system. Fleetwood (Fleetwood, 1992) has completed this picture
of charges by introducing a new charge type termed border trapped charge (QBT) as
illustrated in Fig. 6. Thus QT is given by (Djezzar et al., 2004):
Mobile charges
Poly-Si
Oxide charge
H+ Na+ K+
SiO2
Fixed charge
SiOX
Border charge
• • • • • • • Si
Interface charge
Fig. 6. Schematic illustration of different charges in MOS devices.
2qε Si N A ( 2φF )
VTH = φMS + 2φF +
COX (4)
1
− (QF + QM + QOT + QIT + QBT )
COX
When MOS transistors are exposed to various types of stress such as ionizing radiation, FN
injection, or hot carrier injection, the gate oxide and SiO2/Si interface are damaged. This
degradation is induced by the creation of oxide-trapped charge (ΔQOT) and interface trapped
charge (ΔQIT). The different charge increments are shown in fig. 2. Contrary to QOT, QIT, and
and QBT, QF and QM are not affected by these ionizing stresses. Consequently, the threshold
voltage shift caused by uniform stresses (FN stress or radiation effect) is given by:
where,
ΔQIT (C.cm-2) is the radiation-induced interface trapped charges,
ΔQBT (C.cm-2) is the radiation-induced border trapped charges,
ΔQOT (C.cm-2) is the radiation-induced oxide trapped charges.
Generally, the net radiation-induced oxide and border charges, ΔQOT and ΔQBT respectively,
are positive and induce a negative shift in VTH. However, ΔQIT can contribute either a net-
negative or net-positive charge, depending on the position of the Fermi level at the silicon
surface in inversion mode. Usually, the interface-trap is considered like an acceptor state for
NMOS transistor and like a donor state for PMOS transistor. Therefore, ΔQIT is negative for
n-channel (ΔQIT =-q ΔΝIT ) and positive for p-channel (ΔQIT = q ΔΝIT ) devices (Oldham,
1999). On the other hand, ΔQOT = q ΔΝOT and ΔQBT = q ΔΝBT. Where ΔΝIT, ΔΝOT, and ΔΝBT
are positive numbers per area unit.
So, ΔVTH reads:
where,
170 Modelling, Programming and Simulations Using LabVIEW™ Software
ΔVIT = -ΔQIT /COX = q ΔΝIT /COX (V) is the voltage shift caused by interface- trap increase,
ΔVOT = -ΔQOT /COX = -q NOT /COX (V) is the voltage shift caused by oxide-trap increase,
ΔVBT = -ΔQBT /COX = -q ΔNBT /COX (V) is the voltage shift caused by border- trap increase.
The Equation 6 is only true when applying a DC signal or a low frequencies (less than a few
kHz) AC signal train. Therefore, only ΔNOT and ΔNIT take part in standard charge pumping
current at high frequencies. Thus, Equation 6 can be written as:
Where, ΔVOT is now the voltage shift caused by the oxide-trap increase at high frequency
measurements.
After irradiation, ICP (VB) (where VB is the base voltage of the gate signal) curves are laterally
and vertically shifted. Figure 7 qualitatively illustrates the effect induced by ionizing
radiation on CP curves. The lateral shift indicates the introduction of radiation-induced
oxide- and interface-trap. However, the vertical one (increase of ICPM) is indicative of the
augmentation of interface-trap density, ΔNIT (numbre/cm2).
Fig. 7. Schematic illustration of standard charge pumping current curves. Solid line shows
CP current before irradiation and Dashed line shows CP current after irradiation.
The ICPM current is given by:
ICPM = q. f . AG .N IT (8)
Where,
Automated MOS Transistor gamma Degradation Measurements Based on LabVIEW Environment 171
ΔN IT ΔICPM
ΔVIT = q = (10)
COX COX . f .AG
Using Equations 8 and 12, and ΔVOT = -q ΔNOT/COX, we have expressed ΔNOT, at high
frequencies, as:
ΔICPM COX
ΔNOT = − ΔVTH (11)
q. f . AG q
5. Experiment
The ICP (VB) charge pumping measurements were made before and after each irradiation at
25°C. The irradiated NMOS devices were characterized after the latent interface-trap build-
up (106 s) (Schwank , 1992). In other words, we made a long delay between irradiation and
measurements. The ICP (VB) standard curves (Elliot curves) were extracted using a triangular
signal with an amplitude of 3V and a frequency of 100 kHz. The technique consists in
varying VB (signal base voltage) from -6V to 2V. The high frequency value (100 kHz) is
chosen basing on QCP (f) (charge recombined per cycle vs. frequency) measurements
performed on our devices. The QCP (f) characteristics have explicitly shown that the border-
traps contribution starts at 10 kHz as frequency as lowered. Consequently, 100 kHz are
largely sufficient to avoid their interference with interface-trap.
We expose the experimental results in Fig. 8. All degraded NMOS transistors exhibit the
same general features and behaviours as a function of total dose in charge pumping current
ICP(VB) measured by CP technique. When MOSFET transistors are exposed to uniform
degradation such as ionizing radiation, the threshold voltage is shifted. This shift is induced
by the creation of oxide-trapped charge (ΔQOT) in the dielectric and interface-trapped charge
(ΔQIT) in the Si/SiO2 system. After irradiation, the curves obtained from CP technique
(current measured (ICP) vs. the base voltage of the gate signal (VB)) are vertically and
laterally shifted. The vertical shift represented by the increase of the maximum CP
current, ICPM, indicates the augmentation of the interface trap density, ΔNIT (numbre/cm2)
(Fig. 8a).
172 Modelling, Programming and Simulations Using LabVIEW™ Software
(a)
(b)
Fig. 8. Radiation effects on CP curves at high frequencies for different total gamma ray
doses. (a) Standard CP current vs. VB. (b) Normalized CP current vs. VB.
Automated MOS Transistor gamma Degradation Measurements Based on LabVIEW Environment 173
However, the lateral one indicates the introduction of the radiation-induced oxide- and
interface-trap (Fig. 8b). Fig. 8b gives the ICP (VB) normalized curves to their respective ICPM,
in order to illustrate well the lateral shifts induced by irradiation. These quantities are
estimated, as shown in figure 8, from ICP (VB) curves at high frequencies.
Knowing ΔICPM and ΔVTH, we are able to calculate ΔNIT from equation 9 and also ΔNOT from
equation 11. This is very useful when we want to rapidly get information on the quality of
irradiated oxide and SiO2/Si interface and also if we intend to study the annealing of both
radiation-induced oxide- and interface-trap.
Equations 9 and 11 shows clearly that ΔNIT and ΔNOT are is just dependent on experimental
parameters ΔICPM and ΔVTH (Djezzar et al., 2004). These quantities are estimated from ICP
(VB) curves at high frequencies.
In Fig. 9, the front panel of the developed software loads two files, of virgin and irradiated
MOS devices, respectively and calculates the lateral shift of threshold and flatband voltage,
respectively caused by radiation-induced ΔNIT and ΔNOT (normalized charge pumping curves).
The software developed permits to extract the radiation-induced threshold voltage shift
(ΔVTH), the radiation-induced flatband voltage shift (ΔVFB), the radiation-induced oxide-trap
(ΔNOT), and radiation-induced interface-trap (ΔNIT) are extracted [Oussalah & Djezzar, 2007).
All of the relevant parameters are visible from this screen, as are the experimental results.
The program loads a file of a virgin MOS device and extracts the threshold voltage, the
flatband and other parameters.
In Fig. 9, we show the window front panel for the charge pumping base level sweep
measurement.
The input parameters are:
- file path,
- the signal level,
- the working frequency
- the percentage at the VTH is calculated
- the percentage at VFB is calculated
- process parameters, like, substrate doping (cm-3), oxide capacitor (F/cm²) and gate
oxide area (cm²).
The extracted parameters by the software are:
- threshold voltage, VTH (V),
- flatband voltage, VFB (V),
- maximum charge pumping current, ICPM (A),
- interface-trapped charge density, QIT (C/cm²),
- interface trap density, NIT (1/cm²),
- VIT (V),
- interface trap density, DIT (1/eV.cm²).
In Fig. 10, we show the window front panel for the charge pumping base level sweep
measurement for virgin and irradiated MOS transistor. The program loads two files for
virgin and irradiated MOS devices, and calculates the lateral shift of VTH and VFB,
respectively caused by radiation-induced ΔNIT and ΔNOT (normalized CP curves).
The input parameters in the program software are:
- file path of the virgin MOS transistor,
- file path of the irradiated MOS transistor,
- the signal level,
- the working frequency,
174 Modelling, Programming and Simulations Using LabVIEW™ Software
Fig. 9. LabVIEW front panel for the charge pumping base level sweep measurement.
Fig. 11. LabVIEW front panel for the radiation induced parameters of the virgin and
irradiated MOS transitor.
The extracted parameters by the program software are:
- threshold voltage shift, ΔVTH (V),
- flatband voltage shift, ΔVFB (V),
- oxide trapped charges density, ΔQot (C/cm²),
- Interface trapped charge density, ΔQit (C/cm²).
- Oxide trapped density, ΔΝot (1/cm²).
- Interface trapped density, ΔNit (1/cm²).
- Voltage shift caused by interface- trap increase, ΔVit (V).
- Voltage shift caused by oxide-trap increase, ΔVOT (V).
6. Conclusion
Experiments with LabVIEW software have been carried out to determine the effects of
gamma radiation at low doses on trap densities in MOSFET devices. The threshold and the
flatband voltages degradation due to the charge injection from gamma radiation effect at
low doses are characterized with the developed software. Since ΔICPM and ΔVTH are
measured, the program is able to extract ΔNIT and ΔNOT. This is very useful when we want
to rapidly get information on the quality of irradiated oxide and SiO2/Si interface and also if
we intend to study the annealing of both radiation-induced oxide- and interface-trap. This
makes it a powerful tool for rapid and routinely electrical characterization in hardness
assurance test of MOSFET’s device qualification for space and strategic applications.
176 Modelling, Programming and Simulations Using LabVIEW™ Software
7. References
Doyle, B. S.; Bourcerie, M.; Bergonzoni, C.; Benecchi, R.; Bravis, A.; Mistry, K.R.; & Boudou,
A. (1990). The generation and characterization of electron and hole traps created by
hole injection during low gate voltage hot-carrier stressing of n-MOS transistors.
IEEE Transactions on Electron Devices, Vol. 37, (August 1990) 1869-1876.
Tsuchiya, T.; Kobayashi, T.; & Nakajima, S. (1987). Hot carrier-injected oxide region and hot-
electron trapping as the main cause in Si nMOSFET degradation. IEEE Transactions
on Electron Devices, Vol. 34, (February 1987) 386-391.
Chen, I.C.; Holland, S.E. & Hu, C. (1985). Electrical breakdown of thin gate and tunneling
oxides. IEEE Journal of Solid-State Circuits, Vol. 20, (February 1985) 333-342.
Djezzar, B.; Oussalah, S. & Smatti, A. (2004). A new Oxide-Trap based on Charge Pumping
(OTCP) extraction method for irradiated MOSFET devices: part I (high
frequencies). IEEE Transactions on Nuclear Science. Vol. 51, (August 2004) 1724-1731.
Schwank, J. R.; Fleetwood, D. M.; Shaneyfelt, M. R. & Winokur, P. S. (1993). A critical
comparison of charge-pumping, dual-transistor, and midgap measurement
techniques. IEEE Transactions on Nuclear Science. Vol. 40, (December 1993) 1666-
1677.
Groeseneken, G.; Maes, H. E.; Beltran, N. & De Keermaecker, R. F. (1984). A reliable
approach to charge pumping measurement in MOS transistors. IEEE Transactions
on Electron Devices. Vol. 31, (January 1984) 42-53.
Paulsen, R.E.; Siergiej, R.R.; French, M.L. & White, M.H. (1992). Observation of Near-
Interface Oxide Traps with the Charge-Pumping Technique. IEEE Electron Device
Letters., Vol. 13, N°12, (December 1992) 627-629.
Schroder, D.K. (1998). Semiconductor Material and Device Characterization. John Wiley and
Sons, 2nd Edition, New York.
Deal, B.E. (1980). Standardized Terminology for Oxide Charges Associated with Thermally
Oxidized Silicon. Journal of the Electrochemical Society, Vol. 127, Issue 4, (April 1980)
979-981.
Fleetwood, D. M. (1992). Border Traps in MOS Devices. IEEE Transactions on Nuclear Science,
Vol. 39, (1992) 269-271.
Oldham, T.R. (1999). Ionizing Radiation Effects in MOS Oxides, World Scientific Publishing.
Schwank, J.R.; Fleetwood, D.M.; Shaneyfelt, M.R.; Winokur, P.S.; Axness, C.L. & Riewe, L.C.
(1992). Latent Interface-Trap Buildup and its Implications for Hardness Assurance,
IEEE Transactions on Nuclear Science, Vol. 39, (1992) 1953-1963.
Oussalah, S. & Djezzar, B. (2007). Automated MOS Transistor Degradation Measurements
Based on LabVIEW. Proceedings of the International Conference on design & Technology
of Integrated Systems in Nanoscale Era, Rabat (Morocco), pp. 217-220.
9
Time-Resolved Fluorescence
Spectroscopy with LabView
Edgard Moreno, Porfirio Reyes and José M. de la Rosa
Instituto Politécnico Nacional
México
1. Introduction
1.1 Fluorescence phenomenon
The absorption and subsequent emission of light by organic and inorganic specimens is
typically the result of physical phenomena known as luminescence, which occurs at
electronically excited states. Luminescence is formally divided into two categories:
fluorescence and phosphorescence, depending on the nature of the excited state.
Fluorescence occurs when a photon excites an electron from the ground-state to a higher
energy state, and the electron in the excited orbital is paired (of opposite spin) to the second
electron in the ground-state orbital. Return to the ground state is spin allowed and occurs
rapidly by emission of a photon producing fluorescence. The emission rate of fluorescence
(fluorescence lifetime) is of the order of nanoseconds to microseconds. The lifetime τ of a
fluorophore (fluorescence substance) is the average time between its excitation and its
return to the ground state. Phosphorescence is the light emission from excited states, in
which the electron in the excited orbital has the same spin orientation as the ground-state
electron. Transitions to the ground state are forbidden and the emission rates are slow, in
the order of millisecond to seconds (Lakowicz, 1991), (Lakowicz, 1999), (Gore, 2000),
(Valeur, 2002).
The processes which occur between the absorption and emission of light are usually
illustrated by a Jablonski diagram (figure 1). S0, S1 and S2 denote ground, first, and second
electronic states. At each of these electronic energy levels the electrons can exist in a number
of vibration energy levels denoted by 0, 1, 2, etc. The transitions between states are depicted
as vertical lines to illustrate the instantaneous nature of light absorption (10-15s). An electron
is usually excited to some higher vibration level of either S1 or S2 and rapidly relaxes (10-12
s–10-15 s) to the lowest vibration level of S1. Return from level S1 to the ground state S0
produces fluorescence emission. Examination of the Jablonski diagram revels that the
energy of emission is less than that of absorption. Hence, fluorescence occurs at lower
energies or longer wavelength (Stokes shift). The amount of Stokes shift is a measure of the
relaxation process occurring in the excited state, populated by absorption. Another property
of fluorescence is that the same fluorescence emission spectrum is generally observed
irrespective of the excitation wavelength. This is known as Kasha´s rule. Although
fluorescence measurements are more sophisticated than an absorption (transmission)
experiment, they provide a wealth of the information about the molecular structure,
interaction and dynamics of species.
178 Modelling, Programming and Simulations Using LabVIEW™ Software
S2
photon
S1
absorption
(10-15s) fluorescence
(10-9 – 10 -7 s)
2
1
S0 0
Γ (1)
Q=
Γ + knr
1
τ= (2)
Γ + knr
The population in excited state decays at rate Г+ knr according to equation (3), where n(t) is
the number of excited molecule. In fluorescence spectroscopy, instead of excited molecule
n(t), an equivalent quantity as irradiance I(t) is measured. The result is an exponential decay
of the irradiance as equation (4). The lifetime τ is the decay time from maximum value Io to
its fraction 1/e.
dn(t) 1 (3)
= n(t)
dt τ
I( t ) = Io exp(− t / τ) (4)
The intensity decay is recorded with a high speed detection system that allows the intensity
to be measured on a nanoseconds timescale. Figure 3 shows an example of time-domain
measurement of an excitation laser pulse and the fluorescent response pulse. Time-
dependent measurements resolve fluorescence intensity decays in terms of lifetimes, and
thus provide additional information about the intra and intermolecular dynamics of the
fluorophore (the fluorescent compound of the sample) under study (Lakowicz, 1991),
(Lakowics, 1999), (Gore, 2000).
steady-state
fluorescence
excitation fluorescence
laser response
pulse pulse
∞
Iss = ∫ Ioe−t/τdt = Ioτ (5)
0
Light Source
fluorescence λ Control
Monochromator FD Acquisition
sample
N2 pulsed laser
Digital Oscilloscope
elp
PD CH1 (trigger) GPIB LabVIEW
efp CH2
Optical
fiber PMT
RS-232
Monochromator λ
sample holder Control
discharge produces an ultraviolet light pulse (337. 1 nm) at chamber output. After discharge
the spark-gap is open, L behaves as a short-circuit, and capacitors voltage start to increase
again. The repetition rate of laser pulses is given by time constant RC (around 30 ms) and
the applied high voltage. With 10KV a frequency rate near 30 Hz is obtained.
NITROGEN
Discharge
chamber
Vacumm pump N2 laser
pulse
(337.1 nm)
High DC
R L
voltage
(0-15KV) SP C1 C2
2.2 Monochromator
A monochromator is an optical system which decomposes an input light in its different
wavelength components, and selects a single wavelength component at its output. Most of
monochromators used in fluorescence spectroscopy contains a diffraction grating as
dispersion element, since the inverse of the dispersion factor (D-1) is constant at all
wavelength. This parameter has nm/mm units and relates the effective wavelength
bandwidth which goes trough the monochromator input slit, it is a quality factor of the
monochromator (typical values: 2–8 nm/mm). The wavelength resolution is not important
since the fluorescent emission spectra are wider than 5 nm. Normally, monochromators
have input and output adjustable slits. The luminous intensity at any slit input is
approximately proportional to the square of the slit width. For wider slits more light goes
through the slit and then, the signal to noise ratio increases. A narrow slit improves the
resolution at intensity expenses (Lakowicz, 1991), (Lakowics, 1999), (Gore, 2000).
For our spectrofluorometer we use a monochromator from Acton Research Corp., model
SpectraPro 275, which is of the Czerny-Turner type with focal length of 275 mm. The
instrument contains three selectable gratings for three different wavelength intervals. We
use a grating with 2400 groves/mm for a 200 - 750 nm interval. The reciprocal linear
dispersion factor D-1 is 3 nm/mm. The equipment includes a microprocessor control with
menu driven software for scan control, grating selection, and change of scanning speed. All
scanning functions and control parameters are selected locally from a keypad and a LCD
display. Computer control is provided trough a standard RS-232 port.
2.3 Photodetectors
Perhaps the most used photodetector for time-resolved fluorescence spectroscopy is the
photomultiplier tube (PMT), because two relevant characteristics: its high gain with low
noise, which allows detecting weak fluorescence signals, and its fast response. A PMT
consists of a photocathode covered with an emitter surface and a chain of electrodes
(dynodes) which acts as amplification stages. The photocatode is supplied with a high
negative potential (-1 KV to -2 KV) and dynodes also are supplied with negative potentials,
Time-Resolved Fluorescence Spectroscopy with LabView 183
but less in magnitude for each dynode in the chain. The radiation reaching the photocatode
produces emission of some primary electrons which are accelerated to the first dynode.
When each one of these electrons hits the dynode several additionally electrons are emitted
by collisions, and accelerated to the next dynode. The amplification process is repeated
successively and the produced current is collected at the end of the chain (Lakowicz, 1999).
Other photodetector of growing use in steady-state fluorescence spectroscopy is the charge
coupled device (CCD). This device consists of a thin silicon substrate with thousands or
millions of small photodetectors elements, in one or two dimensional array. The substrate is
coupled to metallic electrodes by means of silicon dioxide, and each element of the array
functions as a MOS photodiode and capacitor (storage element). The charge related to the
light intensity detected by each image element (pixel), is acquired sequentially and then
converted into a digital format inside de same CCD (Spring, 2010).
An instrument with a single channel photodetecor like a PMT, produces a spectrum by
means of the diffraction grating. For each grating position, a single point of information is
registered. In contrast, a multichannel detector like CCD collects many points
simultaneously; this permits to acquire a complete spectrum data in a single exposition. The
acquisition speed of steady-state spectrum is much higher with a CCD (almost real time),
compared with the acquisition speed with PMT (point by point). The major disadvantage of
a CDD is its slow response time, or limited bandwidth, and then its application in time
resolved spectroscopy is limited.
Now days there are complete PMT modules which include: a cd-cd converter to supply the
high voltage required by the PMT, from a single +15 V supply, a cd voltage input to control
PMT gain, and an output reference voltage. We use the PMT module H7732P-11
manufactured by Hamamatsu. This module contains a high sensitivity photomultiplier tube
with 4x20 mm2 of effective area of detection, a peak radiant sensitivity of 80 mA/W at 430
nm, 2 ns characteristic rise-time, and a capacitance of 4 pF. The output current pulse
generated by the PMT is sent the oscilloscope through a coaxial cable. A voltage pulse is
produced through the input impedance of the oscilloscope analog input. This impedance
must be low enough to increase the bandwidth at the analog front end of the oscilloscope
(see section 2.4)
In figure 5 a fraction of the laser pulse is reflected by a beam divider toward a reference
photodiode. When the photodiode is negative biased, it produces an inverse current
proportional to the light intensity, detected by its active area at the junction. The photodiode
produces a current pulse similar to laser pulse which excites the sample. Also this reference
current pulse is converted to a voltage pulse trough the input impedance of the oscilloscope
analog input. This reference pulse is used as trigger signal to the oscilloscope to start the
acquisition process on both input channels. We use the fast photodiode MRD500 with a
response time of 1 ns on 50 Ω load, a sensitivity of 1 nA/mW/cm2 at 337.1 nm, and a
capacitance of 4 pF.
method has distinct advantages depending on the kind of measurements being made
(Lawton, 1986), (Nahman, 1978). Real-time methods require only a single occurrence of the
signal to acquire an entire waveform, and the sampler operates at maximum speed to
acquire as many points as possible in one sweep. Figure 7 shows the real-time sampling
process with a sample rate = 1/Ts.
Equivalent-time methods, on other hand, require multiple occurrences of the signal to
acquire the waveform. Samples are acquired over many repetitions of the signal, with one or
more samples taken on each repetition. The sequential equivalent-time technique includes a
trigger signal as figure 8 shows.
one sweep
t
Ts single ocurrence
of the signal
trigger n occurrences
of the signal
sample 1
t
1
sample 2
t
2
sample 3
t
3
sample n
t
n
∆t
T1 recovered
signal
t
0.35 (6)
BW =
tr
In our instrument the rise-time at analog front ends of the oscilloscope can be estimated
from the time constant introduced by photodetectors output capacitance, and the impedance
of the oscilloscope input channels. The rise-time for this RC circuit is given by tr = 2.2RC,
where the input impedance R must be low enough to decrees rise-time (or to increase the
bandwidth) at analog front end. The capacitance has a value of 4 pF for both photodetectors,
and the input impedance is programmed to be 50 Ω, thus the rise-time at analog front end of
both input channels is 0.44 ns or equivalently 800 MHz bandwidth according to equation (6).
Not only the rise-time of the analog front end at acquisition system input, but also rise-times
of oscilloscope and photodetectors contribute to slowing the input signal. The measured rise
time tr(m) can be estimated by using a sum-of-squares technique as equation (7), where
tr(exc) is the excitation pulse rise-time, and tr(eq) is the equipment characteristic rise-time
(Weller, 2002). The equipment square rise-time can be expressed as equation (8), where each
term in summation is the square rise-time of the k component in the measuring chain.
tr 2 (eq) = ∑ tr 2 ( k ) (8)
k
186 Modelling, Programming and Simulations Using LabVIEW™ Software
Figure 9 shows a diagram with the main components in our electronic instrumental, where
rise-times and bandwidths values are indicated for each component. Some of these values
are given by manufacturers and others are calculated from equation (6).
Fig. 9. Characteristic rise-times and bandwidths of each component of the measure chain
The laser pulse (lp) is detected by the photodiode (PD) and the fluorescence response pulse
(fp) is detected by the PMT. From values in figure 9 and equation (8) we calculate for PD:
tr(eq)PD = 1.59 ns, and for PMT: tr(eq)PMT = 2.35 ns. The laser pulse measured by the
oscilloscope (figure 19, section 3.3) has a rise-time tr(lpm) = 1.78 ns, thus we can estimate the
rise-time of the laser pulse as follows:
(
tr(lp) = tr 2 (lpm) − tr 2 (eq)PD )
1/ 2
= 0.821 ns (9)
If the sample does not emit fluorescence (distillated water, per example) the laser pulse
enters directly to monochromator, and then the measured signal corresponds to the system
response and we can write the following expression:
where tr(srm) is the rise-time of the system response pulse measured by the oscilloscope
(figure 19) with a value of 5.64 ns, and tr(eq)MC-PMT is the equipment rise-time including
monochromator rise-time. From values obtained we can assume tr2(srm)>>tr2(lp), and then
tr(eq)MC-PMT is approximately equal to tr(srm). This is the characteristic rise-time which
slowing the fluorescence response signal, and it is mainly caused by the monochromator
rise-time, for which we estimate tr(mc) = 5.13 ns. Other used form to quantified the slowing
of the input signal is by means of the system temporal resolution, which is expressed in
terms of pulse widths Δt as equation (11) (Lakowicz, 1991).
S0) Serial Port Init.vi, goto λ.vi (250nm), actualλ = 250 nm ; initiation, sequenceS0
S1) while (STOP=false) ; sequence S1
case (Tab Control)
Go To / Measure Noise ; wait for a sub function Go to λ or Measure Noise = on
Sweep ; wait for a sub function Start = on
Open Files ; wait for a sub function Time Domain or Spectrum = on
In sequence S0, the serial port is initialized and the monochromator is positioned at 250 nm
output wavelength, by means of the subvi “goto λ.vi”. Then in sequence S1) a while
sentence is executed for ever up to “STOP” control on the front panel (figure 16) is pressed.
The function to execute is selected by means of a “Tab Control”, for each function the panel
shows the proper controls to start a sub function execution. Before reviewing the objects on
the front panel we describe the program functions and developed subVI´s. Figure 10 shows
a simplified diagram of the control logic during initial while sentence, when function Go
To/Measure Noise is selected. For this function there are two sub function controls: if Measure
Noise=on (as in figure 10) the respective algorithm is executed, if Measure Noise=off, means
Go to λ=on, and then in the inner case structure, the “False” sentence executes the
correspondence algorithm.
a) Go To/Measure Noise
wait for (Go To λ or Measure Noise = on)
if Go To λ=on ; see diagram in figure 11
VER. Interval.vi ; verify valid values of λ, if not valid, do nothing and display an
error message
goto λ.vi (λ to go) ; sends a command via serial port to move the monochromator
from the actual value of λ (actualλ) to the destination value of λ (λ to go)
actualλ = λ to go
188 Modelling, Programming and Simulations Using LabVIEW™ Software
CH1
CH2
1
b) Sweep
wait for (Start =on)
VER. Interval.vi ; verify valid λ values
goto λ.vi (initialλ) ; move monochromator from actualλ to initialλ
actualλ = initialλ
while (finalλ > actualλ) ; sweep while
TM2440.vi (CH1, CH2, XInc)
lp(k) = CH1-noise1(k) ;laser pulse measurement with noise subtraction
fp(k) = CH2-noise2(k) ;fluorescence pulse measurement with noise subtraction
time(k) = k*XInc
graph lp(k) and fp(k) vs time(k) in XY Graph “temporal response”
nfp = max[fp(k)]/max[lp(k)] ; because de laser pulse amplitude is not constant, it is
necessary to normalize the fluorescence pulse
amplitude at maximum peak
save in file: time(k), lp(k), fp(k)
Figure 13 shows a sequence where the file with the time-domain information
is saved at locations given by the Path control and a string. This string is
formed with the Base Name control and the value of actualλ, thus the file
name contains the wavelength value at which the temporal data were
measured. In the diagram there is a boolean constant to avoid saving time-
domain data during the test procedures.
add element actualλ to array λ(j), and element nfp to array nfp(j) ; see figure 13
graph nfp(j) vs λ (j) in XY graph ”spectrum” ; see figure 13
goto λ.vi (λactualλ + Δ λ)
actualλ = actualλ + Δ λ
save spectrum λ(j), nfp(j) ?; when sweep loop ends the complete spectrum can be saved
Fig. 13. A sequence of Sweep function to save time-domain data measured in a file with a
name containing actual λ value
190 Modelling, Programming and Simulations Using LabVIEW™ Software
c) Open Files
wait for (Time Domain=on or Spectrum=on)
if Time Domain =on
open temps.vi ; this subVi can open several files with time-domain data and
graph these in its own XY Graph. Each time that a new file is opened the graph is
actualized. Because the subVi keeps in loop waiting for a new file to open, the
information of this graph is transferred to the main panel XY Grap called
“tempResponses”, by means of “control references”, as figure 14 shows.
if Spectrum=on
open spectra.vi ; this subVi performs similar to the previous one, but it opens
spectra data. Also uses “control references”
SubVi: goto λ.vi (λ to go)
Fig. 16. Frontal Panel when Sweep function is selected and stopped at 560nm.
of 16 consecutive pulses computed by the oscilloscope before transfer to the computer. After
receiving time-domain data from oscilloscope, the computer graphs the average time-
resolved pulses on “temporal response” graph in figure 16, calculates the normalized peak
fluorescence, and graphs this value on “spectrum” graph. The computer shifts the
monochromator output wavelength by 5 nm and reset the oscilloscope for the next
measurement. The sweep loop ends when final λ value is reached or Stop control is pressed
(bottom-left corner). In figure 16 de sweep was stopped by “Stop” control, when
monochromator was moving from 560nm to 565nm. The panels for other two functions
show only their respective controls and indicators, similar to those in figure 16.
3.3 Measurements
Using the described spectrofluorometer and LabView program, we measured the
fluorescence emitted by 3 substances with well known fluorescence life-times; these are
fluoresceine, rhodamine 6G and rhodamine B. Their properties vary according to the used
solvent. For distillated water as solvent, the life-time and wavelength at maximum emission
of the fluorophores are: fluoresceine (4.03 ns, 517 nm), rhodamine 6G (4.08 ns, 555 nm) and
rhodamine B (1.68 ns, 583 nm). Also we measured the fluorescence emitted by 3 mixtures of
two fluorophores. For each fluorophore and mixture, were performed 6 wavelength sweeps
192 Modelling, Programming and Simulations Using LabVIEW™ Software
from 400nm to 700nm with 5nm increments. The average spectra obtained for individual
fluorophores are shown in figure 17, where λ value at maximum emission is indicated for
each substance. Figure 18 shows the average spectra obtained for 3 mixtures of two
components (50% each): fluoresceine–rhodamine 6G (f-r6G), fluoresceine–rhodamine
B (f-rB) and rhodamine 6G–rhodamine B (r6G-rB).
Fig. 19. Average time-resolved laser pulse and system response pulse
The impulse response function h(t), represents the undistorted decay law of the sample
which we want to estimate. If the excitation is an ideal δ function, the observed
fluorescence y(t) is equal to the impulse response. In practice, the excitation light pulse is
not a δ function, and then this pulse must be deconvolved from observed fluorescence
intensity pulse to obtain h(t) (Lakowicz, 1999). As we mentioned, the inclusion of the
instrumental to measure the florescence emitted by the sample, introduces distortions in
the measured signal. To consider this, the data acquisition process can be represented as
figure 22, where f(t) represents the excitation optical pulse, h(t) represents the
fluorescence decay of the sample, y(t) is a signal with fluorescence information, s(t)
represents the spectrometer response, and m(t) is the signal measured. The convolution of
the complete system is given by equation (13).
Fig. 22. Inclusion of the spectrometer response s(t) to measure the y(t)
N -1
y( t n ) = T ∑ h( t m ) f( t m - t n ) (15)
m =0
As first approach we use the Fourier transform deconvolution method, which transforms
the convolution in time-domain to a product in frequency-domain (O´Connor, 1979), i.e:
where cj are the unknown Laguerre expansion coefficients, which are to be estimated from
input data; b α (t n ) denotes the j´th order discrete time LF; and L is the number of LFs used to
j
model h(tn). The LF basis is defined as equation (18), where the Laguerre parameter (0<α<1)
determines the rate of exponential decline of the LF (Maarek et all, 2000) (Jo et all, 2004).
Inserting equation (17) into equation (15), the convolution becomes as equation (19).
j
k =0
( k ) ( kj )α
b αj (t n ) = α ( n −1) / 2 (1 − α)1/ 2 ∑ (−1) k n k n ( j− k )
(1 − α) k (18)
L−1
y(t n ) = ∑ c j υ j(t n ) (19)
j=0
k-1
υ j(t n ) = T ∑ bαj (t m ) f(t n - t m ) (20)
m =0
In equation (20) υj(tn) are the discrete time convolutions of the instrumental response with
the LF. The unknown expansion coefficients can be estimated by generalized linear squares
fitting of equation (19), using the measured discrete signals y(tn) and f(tn). This procedure
involves the solution of a system of j equations. The optimal number of LFs and the value of
the parameter α can be determined by minimizing the weighted sum of residuals:
196 Modelling, Programming and Simulations Using LabVIEW™ Software
N -1
Φ = ∑ w n [y0 ( t n ) − yC ( t n )] (21)
2
n =0
where wn is a weighting factor, yo(tn) is the measured fluorescence, and yc(tn) is the
fluorescence computed by equation (15). Equation (15) is the convolution of the Laguerre
expansion h(tn) of equation (17) with instrumental response f(tn). The iterative process ends
when Φ reaches a minimum given value. The florescence decay lifetimes can by found by
approximating the Laguerre expansion obtained to a multiexponential expansion.
4.4 Results
The performance of both deconvolution techniques FFT and LF is tested by means of the
relative error (re), between reference value and the estimated lifetime, and the normalized
mean square error (nmse). Table I summarizes the results obtained for each fluorophore at
maximum emission peak wavelength, and table II summarizes the results for the mixtures,
also at maximum emission peak wavelength. In tables refv is reference value from
literauture, and estv is estimated value. From values in table I we observed that Laguerre
expansion produces the best approximation for all fluorophores, with relative errors < -1%,
and nmse values < 0.4%. Also, for mixtures in table 2 the best approximation is produced by
FFT Laguerre
refv estv re nmse estv re nmse
(ns) (ns) (%) (%) (ns) (%) (%)
Fluoresceíne 4.01 4.12 2.23 1.15 3.99 -0.49 0.39
Rhodamine 6G 4.08 4.24 3.92 0.11 4.05 -0.73 0.09
Rhodamine B 1.68 1.59 -5.35 0.80 1.67 -0.12 0.24
Table 1. Results obtained for each fluorophore
FFT Laguerre
estv (ns) re (%) nmse estv (ns) re (%) nmse
τ1 τ2 τ1 τ2 (%) τ1 τ2 τ1 τ2 (%)
f-r6G 3.92 4.17 -2.24 2.2 1.68 3.96 3.98 -1.25 -2.45 0.42
f-rB 4.03 1.49 0.49 -11.3 4.66 4.02 1.58 0.25 -5.95 0.86
r6G-rB 4.21 1.56 3.18 -7.14 2.56 4.08 1.71 0.12 1.78 0.82
Table 2. Results obtained for each mixture
Time-Resolved Fluorescence Spectroscopy with LabView 199
Laguerre deconvolution technique, with relative errors < -1.25% for τ1 and < -6% for τ2. The
nmse values are < 1%.
5. Conclusions
In this work we developed an automated spectrofluorometer prototype, which is able to
perform time-resolved fluorescence measurements. The pulsed light source is a home made
nitrogen laser, which generates UV pulses (337.1 nm) at 30 Hz rates, with FWHM = 2.75 ns.
We use a monochromator from Acton Research Corp., model SpectraPro 275 which includes
a microprocessor control to receive commands from a computer via a serial RS-232 port for
scan control. To detect the fluorescence emitted by the sample, we use the PMT module
H7732P-11 manufactured by Hamamatsu, which contains a high sensitivity photomultiplier
tube with a peak radiant sensitivity of 80 mA/W at 430 nm, and 2 ns characteristic rise-time.
To detect the laser pulse we use the fast photodiode MRD500 with a response time of 1 ns
on 50 Ω load, and a sensitivity of 1 nA/mW/cm2 at 337.1 nm.
To measure the excitation pulse laser and the fluorescent response pulse, we use a digital
oscilloscope model 2440 from Tektronix®. This oscilloscope has 300 MHz analog input
bandwidth and 1 MΩ input impedance. This impedance can be programmed to be 50 Ω, as it is
needed to measure the current signals coming from the photodetectors. The oscilloscope
operation is programmed from a computer via its GPIB port. We use the interface board GPIB-
USB-HS from National Instruments, which is directly connected to the oscilloscope and
communicates with a computer via USB interface. For the complete spectrometer, we
determine the characteristic rise-time of the instrumental (5.647 ns) and its temporal resolution
(FWHM = 13.28 ns). This slowing of the input signal is mainly caused by the monochromator.
A control and acquisition program was developed in the graphical language G of LabVIEW
7.1 environment. This program controls the monochromator to generate a wavelength (λ)
sweep, and reads the information of the time-resolved signals (excitation and response)
measured by the oscilloscope in each λ value. The program was designed to execute one of
three main functions: GoTo/Measure Noise, Sweep, and Open Files. With this program we
measured the fluorescence emitted by 3 substances with well known fluorescence life-times:
fluoresceine, rhodamine 6G and rhodamine B. Also we measured the fluorescence emitted
by 3 mixtures of two fluorophores. For each fluorophore and mixture, were performed 6
wavelength sweeps from 400nm to 700nm with 5nm increments.
A data analysis program was developed in LabVIEW 7.1 to estimate the intrinsic fluorescence
decay from deconvolution of measured signals. The program applies two deconvolution
techniques: Fast Fourier transform and Laguerre expansion. The intrinsic fluorescence
obtained with both methods is fitted to a simple exponential for a single fluorophore, or to
double exponential for two compounds mixtures. From fitting results we can estimate the
fluorescence lifetimes τ of the samples. LabVIEW provides an easy access to cursor resources.
When these cursor facilities are used inside a while loop, it is possible to observe graphically
the process results for different positions of the cursors. While the cursors in a graph are
displaced, in other graph the process results are shown continuously. We used this while loop
with dynamic cursors inside, to perform filtering, shifting, and cutting of signals.
From data analysis results, deconvolution by Laguerre expansion provides a good
approximation with nmse values < 0.4% for single fluorophore and < 1% for mixtures. The
Laguerre functions have been suggested as an appropriate orthonormal basis owing to their
buil-in exponential term that makes them suitable for physical systems with asymptotically
exponential relaxation dynamics (Jo et all, 2004). Because the Laguerre basis is a complete
200 Modelling, Programming and Simulations Using LabVIEW™ Software
orthonomal set of functions, a unique characteristic of this approach is that it can reconstruct
a fluorescenece response of arbitrary form. Laguerre deconvolution technique is a suitable
approach for the analysis of time-domain fluorescence data of complex systems, since this
technique has the ability to expand intrinsic fluorescence of any form, without any a priori
assumption of its functional form.
6. References
Anderson, J.; Fischer, R.; Smith, C.; Webb, S. & Dennis, J. (2003). In situ detection of pathogen
indicators using laser-induced fluorescence, Proccedings of 2003 UCOWR Annual
Conference “Water Security in the 21st Century”, http://ucowr.siu.edu/proc/W1C.pdf.
Ardizzoni, J. (2007). High-Speed Time-Domain Measurements – Practical Tips for
Improvement, Analog Dialogue, March 2007, 41-03.
Geddes, Ch. D. & Lakowicz, J. R. (2004). Lakowicz, Reviews in Fluorescence 2004, Kluwer
Academic/Plenum Publishers, 0-306-48672-5 (eBook), New York, USA.
Gore, M.G. (2000). Spectrophotometry and Spectrofluorimetry, Oxford University Press, 2nd
Edition, 0-19963812-8, New York, USA.
Jo, J.; Fang, Q.; Papaioannou, T. & Marcu, L. (2004). Fast model–free deconvolution of
fluorescence decay for analysis of biological systems, Journal of Biomedical Optics,
9(4), 743 – 752.
Lakowicz, J. R. (1991). Topics in Fluorescence Spectroscopy, Volume 1: Techniques, Plenum Press,
0-3064-3874-7, New York, USA.
Lakowicz, J. R. (1999). Principles of Fluorescence Spectroscopy, Klumer Academic/Plenum
Publishers, 2nd Edition, 0-306-46093-9, New York, USA.
Lawton, R.; Riad, S. & Andrews, J. (1986). Pulse and Time- Domain Measurements,. Proc.
IEEE, Vol.74, Jan. 1986, 77-81.
Maarek, J-M.I.; Marcu, L.; Snyder, W.J. & Grundfest, W.S. (2000). Time-resolved
Fluorescence Spectra of Arterial Fluorescent Compounds: Reconstruction with the
Laguerre Expansion Techique, Photochemistry and Photobiology, 71, 178-187.
Moller, C. & Mortensen, G. (2008). Fluorescence spectroscopy; a rapid tool for analyzing
dairy products, J. Agric. Food Chem., 56, 720-729.
Nahman, N.S. (1978). Picosecond-Domain Waveform Measurements, Proceedings of IEEE,
Vol. 66, No.4, April 1978, 441-454.
Nesterenko, T.V.; Tikhomirov, A.A. & Shikhov, V.N. (2007). Chlorophyll fluorescence induction
and estimation on plant resistance to stress factors, Zh. Obshch Biol., 68, 444-458.
O´Connor, D.V. & Ware, W.R. (1979). Deconvolution of fluorescente decay curves. A critical
comparison of techniques, The Journal of Physical Chemistry, 83, 1333-1343.
Paras, N. P. (2003). Introduction to Biophotonics, Jhon Wiley&Sons, Inc., 0-471-28770-9, New
Jersey.
Poulli, K.I.; Mousdis, G.A. & Georgiou, C.A. (2007). Rapid synchronous fluorescence
method for virgin olive oil adulteration assessment, Food Chemistr, 105, 369-375.
Spring, K.R.; Fellers T.J. & and Davidson, M.W. (2010). Introduction to Charge-Coupled
Devices (CCDs), Nikon Microscopy Fundamentals of Digital Imaging
http://www.microscopyu.com/articles/digitalimaging/ccdintro.html
Valeur, B. (2002). Molecular Fluorescence: Principles and Applications, Wiley-BCH-Verlag, 3-
527-29919-X, Federal Republic of Germany.
Vo-Dinh, T. (2003). Biomedical Photonics Handbook, CRC Press, 0-8493-1116-0, Florida, USA
Weller, D. (2002). Relating wideband DSO rise time to bandwidth: Lose the 0.35, EDN, Dec.
12, 2002, 89-94.
10
1. Introduction
For the past 20 years, intensive researches in the fields of optoelectronics and fiber optic
communications have resulted in the invention of new devices that revolutionized our life.
The optoelectronics devices such as compact disc players, laser printers, bar code scanners,
and laser pointers are some of the examples [1]. In fiber optic communications, revolution in
the telecommunications system has been initiated by the introduction of higher bandwidth,
more reliable telecommunication links with lower bandwidth cost [2]. Recently, fiber optic
sensor technology has gained interest from the research community. Optical fiber sensors
offer a number of advantages over conventional electrical sensing technologies, which make
them attractive for a wide range of application areas. These advantages include intrinsic
safety in chemically hostile or explosive environments, low susceptibility to electromagnetic
interference, electrically passive operation and high sensitivity, compatible with composites,
light weight and geometrical versatility [3]. Improvement in fiber optic technology creates a
necessity for a virtual instrumentation system. A virtual instrumentation system is software
used for developing a computerized test system, a measurement system, a calibration
system, a control system for an external measurement hardware device and a display
system for test or measurement data [4]. The best virtual instrumentation system that has
been developed so far is LabVIEW. LabVIEW is an application development program that
was developed by National Instruments in 1986 to integrate science and engineering tasks
by interfacing computers with instruments for collecting, storing, analyzing, and
transmitting data while, at the same time, providing an effective user interface. Different
from other development software such as C/C++, FORTRAN, Basic, etc., LabVIEW utilizes
its own integrated programming language known as the Graphical Programming Language,
which uses graphics as code sequences in the application being developed, making the
software development process significantly easier [5]. LabVIEW is powerful programming
software that can interface with over 7,000 instruments to provide data acquisition,
industrial measurement, automated testing, and instrument control. Integrated through
LabVIEW, instruments such as sensors, optical time domain reflectometer (OTDR),
oscilloscopes, optical spectrum analyzer (OSA) and RF generators can work alongside the
GPIB hardware application software that makes fiber optic communication system research
activities significantly easier [6].
202 Modelling, Programming and Simulations Using LabVIEW™ Software
Light Modulator
Environment Signal
Fig. 1. Extrinsic sensor
Environment Signal
Fiber Optic
Different types of fiber optic sensors are designed based on the characteristics of light
modulated by the environmental effects. One of the most popular fiber optic sensors is the
intensity based fiber sensor. Intensity-based fiber optic sensors depend on the principle that
light can be modulated in intensity by an environmental effect. Multimode fiber reflective
sensor and bending the fiber are two examples of fiber optic sensors. Figure 3 shows a
displacement sensor using a multimode fiber. In this sensor, a light leaves the fiber end in a
cone pattern, and strikes a movable reflector as shown in Figure 3. The intensity of reflected
light is related to the distance of the fiber-reflector from the fiber’s end [9].
Light
Mirror
Displacement
Fiber Optic
Deformer
PXI and others, which the choice is mainly based on the applications. Two most common
instrument communication methods are GPIB and serial port communication. In 1965,
Hewlett-Packard designed the Hewlett-Packard Interface Bus (HP-IB) to connect their line
of programmable instruments to their computers. Because of its high transfer rates
(nominally 1 MB/s), this interface bus quickly gained popularity. It was later accepted as
IEEE Standard 488-1975. Today, the General Purpose Interface Bus (GPIB) is more widely
used than the HP-IB. This is due to its ability to connect to different devices to the same
GPIB bus. Any devices must have a unique GPIB address between 0 and 30, so that the data
source and destinations can be specified by this number. Address 0 is assigned to the GPIB
interface board. The GPIB has one Controller, usually a computer that controls the bus
management functions. The LabVIEW GPIB VI automatically handles the addressing and
most other bus management functions, saving user from the hassle of low-level
programming. To use GPIB as part of in any virtual instrumentation systems, the GPIB
driver software is required and can be installed in our computer according to the directions
that accompany LabVIEW or the board. Installing a GPIB board is usually easy [14].
To configure the GPIB, serial interface or any communication method, NI Measurement &
Automation Explorer (NI-MAX) simulation software can be used. The GPIB boards can be
integrated with the NI-MAX so that it can be configured under the Devices and Interfaces tree
easily. For the other GPIB devices, their installation procedures are described in the manual
that comes with the GPIB board. Figure 6 illustrates the MAX windows which shows the GPIB
interface number as 0. It is followed by an instrument with the primary address 2.
popular because most industrial computers have at least one serial port available. However,
for laptops and smaller desktops that do not have a built-in serial port, an inexpensive USB-
to-RS-232 adaptor can also be used. Serial communication requires that you specify four
parameters: the baud rate of the transmission, the number of data bits encoding a character,
the sense of the optional parity bit, and the number of stop bits. The requirements for port
setting features are shown in the Ports (serial and parallel) menu in Figure 7. For the port
binding, it is used for specifying the port to be used for the serial/parallel device. An
alternative port can be selected to link to the ASRL resource, this setting does not change the
logical port number (COMx) of the physical serial port, it only changes which COM port this
VISA resource is binding to. After that, click the “Validate” button to test whether NI-VISA
can access the resource with the specified configuration. The result shown on Figure 8
should pop up.
the command at Hyper Terminal has been inserted, the “ENTER” key must be pressed to
start the communication with the equipment such as OTDR.
the input signal power, whereas the noise figure is calculated from the gain, amplified
spontaneous emission (ASE), and resolution of the optical spectrum analyzer (OSA). The
accurate ASE level is measured using the interpolation technique, and thus, even a slight
error in the initial measurement of the input power level will cause a cascading effect that
will render the final ASE measurement invalid. In addition, the accuracy of the gain value is
also dependent on the accuracy of the input measurement [5]. This makes the current
manual measurement techniques not suitable for gain value measurement as even the
slightest deviation in the initial input measurement will result in inaccurate gain values. As
such, using manual measurement techniques for EDFA experiments could lead to inaccurate
results and long experiment times. EDFAs are typically characterized using OSAs, tunable
laser sources (TLSs), optical attenuators, laser diode controllers, and optical power meters.
From experience, EDFA research with manual control of these instruments will lead to
delays and inaccuracies in research due to the large number of values that have to be taken
and recalibrated for each parameter. To cope with this problem, a self-calibrating automated
measurement system for EDFAs has been developed based on the LabVIEW program and
GPIB hardware.
The basic architecture of a standard EDFA is depicted in Figure 11. The setup consists of a
piece of EDF, a wavelength division multiplexing (WDM) coupler, a pump laser and two
isolators. In this work, a depressed cladding EDF (DC-EDF) with Erbium ion concentration
of approximately 500 ppm is used as gain medium for amplification in S-band region. The
EDF is pumped by a 980 nm laser diode to generate population inversion for amplification.
A WDM coupler is used to combine the pump light with the input signal. Optical isolators
are used to ensure unidirectional operation of the optical amplifier [15].
power of −30 dBm. The OSA measures the output data and gives the necessary feedback to
both the TLS and the attenuator, and the process repeats until the desired wavelength
values and corresponding attenuation values are obtained.
Fig. 12. The automation system user interface for input signal measurement
The automated measurement system is able to obtain a highly accurate input value by using
a “while loop” subroutine that is contained within the application. The “while loop” will
require the system to first obtain a rough attenuation value by adjusting the attenuation
value so that the OSA is able to obtain a reading that is within ±0.9 dBm range of the
LabVIEW Applications for Optical Amplifier Automated Measurements,
Fiber-Optic Remote Test and Fiber Sensor Systems 211
required −30dBm value, as per the requirement of the multiwavelength menus or as per the
required power as determined by the user in the multipower menu. Once the rough
attenuation of the value has been determined, the system will then adjust the attenuation
value based on the OSA readings to obtain the exact attenuation value required for the
subsequent experiment. The “while” loop is illustrated in Figure 13. The submenu
“Multiwavelength/Power 0 dBm” gathers data at a constant 0 dBm input power at different
wavelengths. With regard to wavelength, the software is programmed for the S-band
wavelength region from 1480 to 1530 nm. The “Multipower” submenu obtains the input
power for a constant center wavelength, but at different input powers, which has been
programmed from −40 to 5 dBm. All submenu functions are automatic, and the software
records all required data on either diskette or hard disk.
TLS ON
ATTN 0dB
No 39.1>M>40.9
Yes
M=40 dBm
For EDFA gain and noise figure measurements, the apparatus is set up as shown in Figure
14. The EDFA is placed between TLS and OSA, with the laser diode controller pumping the
EDF (the pump power value must first be determined). The EDFA software “Output” menu
is designed to automate this setup, as shown in Figure 15. Under the “Output” menu, there
are two submenus, i.e., “Multiwavelength” and “Multipower.” The “Multiwavelength”
submenu obtains such output data as the gain, noise figure, ASE, peak power, and peak
wavelength, and the obtained data are compared with the input data taken from the
“Multiwavelength −30 dBm” or “Multiwavelength 0 dBm” submenu first. This comparison
of input and output data is done to obtain the gain and noise figure values using
interpolation techniques.
Fig. 14. The automation system for output gain and noise figure measurements
Fig. 15. The automation system user interface for gain and noise figure measurement
LabVIEW Applications for Optical Amplifier Automated Measurements,
Fiber-Optic Remote Test and Fiber Sensor Systems 213
The “Multipower” submenu obtains output data at a center wavelength of 1500 nm but at
different input powers. As with the “Multiwavelength” submenu, all data obtained from the
“output” menu “Multipower” submenu are compared with data obtained from the “input”
menu “Multipower” submenu to obtain values such as gain, noise figures, etc. All the
“output” submenus plot graphs after one experiment cycle is complete, as shown in Figure 16,
saving time for data analysis. In addition, the obtained data can also be stored in Word,
Powerpoint, Excel, and other formats for further analysis. Figure 17 shows the flowchart for
the automation system. The basic software design methodology possesses the required
characteristics of being time efficient and the ability to accurately and consistently gather data
while simultaneously reducing the uncertainty value, as these characteristics are very
important in ensuring that the software can be utilized to gather data. The EDFA automation
system is tested based on the aforementioned characteristics. The software is proven to reduce
the EDFA testing time by more than 80%, as compared to manual EDFA testing methods.
Start
Select
Input Menu Output
Multi Power
Start Automatic
Measurement
Stop
Fig. 18. Automate and manual EDFA’s gain versus input signal power
LabVIEW Applications for Optical Amplifier Automated Measurements,
Fiber-Optic Remote Test and Fiber Sensor Systems 215
Fig. 19. Automate and manual EDFA’s gain versus input signal wavelength
4.2 Remote fiber test system using Optical Time Domain Reflectometer (OTDR)
DWDM has increased fiber traffic capacity and thus it is important to proactively monitor
and maintain the fiber networks. Due to huge penalties specified in Service Level
Agreements (SLAs) and Quality of Service (QoS) commitments, carriers are keen to take
measures in maintaining their fiber network. Optical Time Domain Reflectometer is a well-
known optoelectronic instrument used for testing a fiber optic cable assembly in optical
network [18]. An OTDR emits a pulsed ray into the fiber under test and acquired reflected
ray. The strength of the return pulses is measured and integrated as a function of time, and
is plotted as a function of fiber length. The plot can be used to analyse the optical fiber and
detect the approximate location of the fault event that occurred. Different pulse widths in
OTDR will affect the distance resolution and dynamic range. A longer laser pulse width will
improve dynamic range and attenuation measurement resolution at the expense of distance
resolution. This is useful for getting the overall characterization of a link, but is weak when
trying to locate faults. A short pulse width will improve distance resolution of optical
events, but will also reduce measuring range and attenuation measurement resolution [19].
Theoretically, OTDR has good distance measuring accuracy since it is software based and
with its crystal clock possesses an inherent accuracy of better than 0.01%. Further calibration
process is not needed since the practical cable length measuring accuracy is typically limited
to about 1% [20].
Figure 20 shows the block diagram of an OTDR where a laser diode is driven by an electrical
pulse generator that produces a train of short optical pulses. The backscattered optical
power from the fiber through a directional coupler is detected by photodiode (PD). The
detected waveform is amplified by an amplifier and converted to digital signal through the
analog to digital converter (ADC) and then processed by the digital signal processing (DSP)
unit. The timing of the DSP is synchronized with the source of the optical pulses so that
delay in the propagation of each scattered pulse can be precisely calculated. Figure 21 is a
typical commercial OTDR trace, showing among other things, the fiber attenuation. This
figure shows that different losses will have different shapes in the trace. Hence, the analysis
of the trace can be done to estimate the cause of a fault event [21].
216 Modelling, Programming and Simulations Using LabVIEW™ Software
Laser Diode
Generator
ADC
Digital Signal
Processing
Timing OTDR
Display
A B E
D
Fig. 22. Front panel of the automation program
640km. The pulse width is from 0ns to 20us as provided by the manufacturer. The possible
attenuation settings are from 0dB to 26.25dB according to the AQ7260 OTDR user manual.
Finally, the group index with is varying from 1.00000 to 1.99999. Next is the measurement
conditions output given in Section C. The blank space will display the output of the “fiber
type with wavelength, distance range, pulse width, attenuation and resolution of the
measurement”. The byte count1 value is set to more than the possible return count1 to
prevent any loss of data. Users can enable or disable this function by clicking the “Save to
USB” button. Finally, section E provides the measurement results. The measurement results
in term of “event number, distance, splice loss, return loss, cumulative loss, dB/km, event
type, and total span ORL” are shown in the blank area after the completed run of the
program. For the event number, it will show “END” if the event is at end of the fiber, else it
will show “1”, “2” and so on according to the number of the detected event. Some of the
measurement results will be neglected if they are not detected by the OTDR measurement,
and the only display values are for those detected by the OTDR. The whole program
consists of 6 main stacked sequences and 20 sub stacked sequences.
Figure 23 depicts the configuration for the distance range setting for the second main
stacked sequence or the sub stacked sequence. VISA Write is used to write the data from
write buffer to the device. The command for distance range is Rm\r\n, where “m” depends
on the distance range chosen by the user. Figure 24 shows the configuration for pulse width
programming. In the second sub stacked sequence, the command needed for the pulse
width is PWm\r\n.
The configuration for the programming of group index is shown in Figure 25. The command
needed is IORm\r\n, in this case, the “m” is the range from 1.00000 to 1.99999 depending
on the value needed for the user. The “concatenate strings” function will combine the two
constants (IOR and \r\n) and the control (value of group index) in the arrangement from
top to bottom to form IORm\r\n. Thereafter, the concatenate output string will pass to
218 Modelling, Programming and Simulations Using LabVIEW™ Software
VISA
write
Concatenate
string
Number to decimal strings
Concatenate
strings
Sequence local
Concatenate strings
VISA write
VISA write
which sets the drive used to save data to USB drive. While, “p” indicates any file name that
the user wishes to save. The strings will be combined into a single output by the
“concatenate strings” function and act as the input to the VISA Write. A delay is
implemented to reduce the traffic to the OTDR to prevent the occurrence of a hang situation.
Fig. 28. Programming for true (save enable) case, drive setting and file name to save
Figure 29 shows the configuration to set the file type of the measurement trace. Examples of
the possible file types are BMP, SOR (Telcordia) and so on. The command used here is
FF7\r\n, which will set the file type to be saved in the SOR format. This file format will
assist the user when analyzing or modifying the measurement trace by using Yokogawa
OTDR Viewer software. Again, a delay is applied to reduce the traffic to the OTDR to
prevent hang up. Finally the “data save” command is used to save the data. Figure 30 shows
that the command FST\r\n is sent to the input of the VISA Write. Then, the measurement
trace or data will be completely saved into the device (pen drive or thumb drive) plugged
into the USB port of the OTDR device. A delay of few seconds is needed for the
measurement trace or data to be successfully saved into the pendrive or thumbdrive.
LabVIEW Applications for Optical Amplifier Automated Measurements,
Fiber-Optic Remote Test and Fiber Sensor Systems 221
VISA write
VISA close
it is concluded that the automation program is very reliable and the results obtained from
automation program are exactly the same as those obtained from the manually measured
data from the OTDR device.
incorporates a Boolean logic function that allows the phase level measurement to be
determined accurately and also without any overlay in data. Figure 39 shows the flowchart
for the operation of the program, while Figure 40 below shows the Boolean logic circuit. To
detect three possible indications of the phase level, the Boolean logic function is designed to
accommodate up to eight sensor probes. The three possible results are one-quarter water
three-quarters air, three-quarters water one-quarter air and full water. Visual representation
of the phase level is the result of the outputs of the logic circuit which is connected to the
indicators. Each sensor probe is connected to an OR gate. In order to allow the logic
functions to operate with only one input, OR gates are used. The OR gate allows the
deployment of either four sensor probes or eight sensor probes. The program will refresh
the phase fraction levels every 1 second, which is the scan time of the OSA [25].
Start
The reflectivity of the probes as a function of time when the water level in the flow system is
at one-quarter is shown in Figure 41. As depicted, the reflectivity of probe 3 in water is
shown to be 0.032 by the software, while the reflectivity’s of probes 1, 2 and 4 is shown to be
0.002. To determine the phase level of the system, the Boolean logic function is done
automatically and immediately. When digital “1” signal is generated by probe 3, it
immediately passes through the respective logic gates to determine the phase level. Once
this has been done, the system will represent the phase level using a diagram as shown in
Figure 42. When the flow system is half-full, the reflectivity of probes 2, 3 and 4 is 0.0316,
while the reflectivity of probe 1 remains at 0.002. Figure 43 shows the reflectivity of the four
probes against time.
Fig. 41. Reflected power (dBm) of sensor probe vs. time for one-quarter full flow system
Fig. 42. LabVIEW phase level representation for one-quarter full flow system
Similarly, the Boolean logic gate function will determine the phase level of the system as
shown in Figure 44. When all four probes detect water, the reflectivity of all four probes is
0.002, as shown in Figure 45. The Boolean logic system will then determine the phase level
of the system to be fully water, and will indicate the condition of the system as shown in
Figure 46.
LabVIEW Applications for Optical Amplifier Automated Measurements,
Fiber-Optic Remote Test and Fiber Sensor Systems 227
Fig. 43. Sensor probe reflectivity of vs. time for half-full flow system
Fig. 44. LabVIEW phase level representation for half-quarter full flow system.
Fig. 45. Sensor probe reflectivity of vs. time for full flow system
228 Modelling, Programming and Simulations Using LabVIEW™ Software
Fig. 46. LabVIEW phase level representation for full flow system
perturbation, once pressure is applied to the transducer an optical power other than zero is
obtained at the receiver [27].
Plexiglass
Laser Diode
Pressure
Receiver
In-line Polarizer Optical Coiled Fiber
(a) (b)
(c) (d)
(e)
Fig. 49. Figure 49 (a) shows the dependence of the sensor output on time in the absence of
deformation, Figures 49 (b), (d) and (e): show the output normalized voltage (dB) at constant
pressure. Figure 49 (c): presents the output normalized tension for different values of the
pressure. Figure 49(f): show the dependence of the sensor output on weight.
LabVIEW Applications for Optical Amplifier Automated Measurements,
Fiber-Optic Remote Test and Fiber Sensor Systems 231
output normalized voltage (dB) at constant pressure is shown in Figures. 5 (b), (d) and (e).
The normalized value is calculated by [27]
Vout − Vinf
Vnorm =
Vout(0) − Vinf
Where Vnorm represents the output normalized voltage, Vout is the value of the acquired
voltage, Vinf=− 0.5V is the lower limit of the output voltage and out (0) V is the output
voltage in the absence of deformation.
instructions from LabVIEW to perform a scan, it will instruct the DAC to send out a whole
range of voltage from 0 to 10V. At each change of DAC output, the FPGA will read from the
8 ADCs simultaneously and store the raw data onto the onboard memory. Once completed,
data in the memory will be digitally filtered using the LabVIEW program.
The main software filters the noise from the data that is caused by both optical and electrical
disturbance. Since the tunable filter is sensitive to temperature, the characteristic of the filter
tends to drift over time. This drift will cause an error in the measurement. Thus, the
software will automatically lock onto a reference FBG to obtain an accurate reading. The
software front panel consists of two tabs. Figure 51 shows the sensor view tab. As shown in
Figure 50, every peak in the FBG sensors is represented by the strain, pressure or
temperature gauge. Any shift in wavelength of the FBG sensors will cause the measurement
gauge to respond.
FBG
Sensor
User Configurable
FPGA PD
AD FBG
C Sensor
8 Channels
Onboard Fiber Optic
Memory x8 Configuration
PD x8
AD
C
0-10V DA
C
FBG
Sensor
Tunable
filter
5. Conclusion
The techniques and capabilities of LabVIEW development applied in fiber optic science are
demonstrated. The application of LabVIEW in self-calibration and automatic measurement
system, fiber remote test system and optical sensor are explained. The self-calibrating
automated EDFA characterization system using the LabVIEW software and GPIB hardware
is a more effective solution to testing. The overall experiment time is reduced by more than
80%, whereas data acquisition is more accurate and consistent with a low uncertainty value
of ±0.012 dB. The automation program for remote fiber test systems using the optical time
domain reflectometer (OTDR) is also presented. Polarimetric fiber-optic pressure sensor and
multiphase dynamic fluid differentiation measurement are two examples of fiber optic
sensors which are discussed. A low cost multi-channel interrogating system is developed
with the NI PCI-7831R Module. This minimizes the electronic hardware configuration,
simplifies and reduces the time required in the development process. The use of virtual
instrumentation has not only provided a modern and interesting way for users to perform
experiments but also reduced the amount of time necessary to make connections. The real-
time display of quantities, such as gain, spectrum, temperature, strain power, and so on has
made a great improvement in the users’ ability to visualize these quantities and understand
their relation to one another.
6. References
[1] B.E.A. Saleh and M.C. Teich, "Fundamentals of Photonics", Wiley, 1991
[2] Gred, Keiser "Optical Fiber Communications" Singapore: McGraw-HILL, 2000
[3] J. Chen, W. J. Bock, "A Novel Fiber-Optic Pressure Sensor Operated at 1300-nm
Wavelength" IEEE Transactions on Instrumentation and Measurement 53(1), 10
[4] D. Derickson, "Fiber Optic Test and Measurement. Upper Saddle River," NJ: Prentice-
Hall, 1998.
[5] R. A. Sherry and S. M. Lord, "LabVIEW as an Effective Enhancement to an
Optoelectronic Laboratory Experiment", In Process Frontier Conference, pp. 897–
900. 1997
[6] M.Z. Zulkifli, S.W. Harun, K. Thambiratnam and H. Ahmad, "Self-Calibrating
Automated Characterization System for Depressed Cladding EDFA Applications
using LabVIEW Software with GPIB", IEEE Transaction on Instrumentation and
Measurement, vol. 57, no. 11, November 2008.
[7] A. W. Domanski, A. Gorecki and M. Swillo, "Dynamic Strain Measurements by Use of
the Polarimetric Fiber Optic Sensors", IEEE Journal of Quantum Electronics, 31(8),
816 (1995).
[8] D. A. Krohn, "Fiber Optic Sensors: Fundamental and Applications", Instrument Society of
America, Research Triangle Park, North Carolina, 1988.
[9] N. Lagokos, L. Litovitz, P. Macedo, and R. Mohr, "Multimode Optical Fiber Displacement
Sensor", Applied Optic, Vol. 20, p. 167, 1981
[10] S. K. Yao and C. K. Asawa, "Fiber Optical Intensity Sensors", IEEE Journal of Selective
Areas in Communication, SAC-1(3), 1983.
LabVIEW Applications for Optical Amplifier Automated Measurements,
Fiber-Optic Remote Test and Fiber Sensor Systems 235
[11] Kreso Zmak, Zvonimir Sipus and Petar Basic, "A New Approach to Remote Fiber
Testing in Optical Networks", 17th International Conference on Applied
Electromagnettics and Communications, Croatia, 2003.
[12] U. Hilbk, M.Burmeister, B.Hoen, T.Hermes, and J.Saniter, " Selective OTDR
Measurements at The Central Office of Individual Fiber Links in A PON", in Proc.
Optical Fiber Communication Conference, Dallas, TX, Feb 1997, pp. 54-55, Paper
TuK3.
[13] F.A Maier, H.Seeger, "Automation of Optical Time Domain Reflectometry
Measurements", Hewlett Packard Journal, 46(1), pp 57-62, 1995.
[14] "GPIB Instrument Control Tutorial". National Instruments. August 2009.
[15] S. W. Harun, K. Dimyati, K. K. Jayapalan, and H. Ahmad, "An Overview on S-band
Erbium-Doped Fiber Amplifiers," Laser Physics Letter, vol. 4, no. 1, pp. 10–15, 2007.
[16] S. W. Harun, F. Abd Rahman, K. Dimyati, and H. Ahmad, "An efficient gain-flattened
C-band erbium-doped fiber amplifier," Laser Physics Letter, vol. 3, no. 11, pp. 536–
538, 2006.
[17] N.M. Samsuri, S.W. Harun, and H. Ahmad, "Comparison of Performances between
Partial double-Pass and Full Double-Pass Systems in Two-Stage L-Band EDFA,"
Laser Physics Letter, vol. 1, no. 12, pp. 610–612, 2004.
[18] Ozawa, K; Hishikawa,Y; Watanabe,K and Maki,H, "Remote Fiber Test System with
Network Element Database and Geographic Information System", IEEE
communication, vol. 2, page 1204-1207, 1999.
[19] R. Ramaswami, K.N.Sivarajan, "Optical Networks: A Practical Perspective" Morgan
Kauffman Publishers, Los Altos, CA 1998.
[20] I. Yamashita, "The Latest FTTH Technologies for Full Service Access Networks",
Proceedings of the IEEE, November 1996 Korea.
[21] D. N. Harres, B. Company, St.Louis, "Built-In Test for Fiber Optic Networks Enabled by
OTDR”, IEEE communication, 2006.
[22] C.P. Lenn, F.J. Kuchuk, J.Rounce and P. Hook, "Horizontal Well Performance
Evaluation and Fluid Entry Mechanisms", Process of Social Petrol Engineering.
Conferance and Exhibition, New Orleans, LA, SPE preprint 49089,. 1998.
[23] R.T. Tamos and E.J. Fordham, "Oblique-Tip Fiber-Optic Sensors for Multiphase Fluid
Discrimination", Journal of Lightwave Technology, Vol. 17, No. 8, August 1999.
[24] R.T. Ramos, A. Holmes, X. Wu and E. Dussan, "A Local Optical Probe using
Fluorescence and Reflectance for Measurement of Volume Fractions in Multi-Phase
Flows", Meas. Sci. Technol., 12 (2001) 871-876.
[25] Kavintheran, Thambiratnam "Automated Fiber Optic Multiphase Dynamic Fluid
Differentiation Measurement using LabVIEW Software with a Boolean Logic
Function", ASEAN Virtual Instrumentation Applications Contest Submission, 2007.
[26] A. W. Domanski, A. Gorecki and M. Swillo. "Dynamic strain measurements by use of
the polarimetric fiber optic sensors", IEEE Journal of Quantum Electronics QE-31(8),
816 (1995).
[27] G. C. Contantin, G. Perrone, S. Abrate, N. N. Puscaz "Fabrication and Characterization
of Low-cost Polarimetric Fiber-Optic Pressure Sensor" Journal of Optoelectronics
and Materials Vol. 8, No. 4, August 2006.
236 Modelling, Programming and Simulations Using LabVIEW™ Software
[28] Z. Zhou, T.W. Graver, L. Hsu, J. Ou, "Techniques of Advanced FBG Sensors:
Fabrication, Demodulation, Encapsulation and Their Application in the Structural
Health Monitoring of Bridges" Pacific Science Review, vol. 5, 2003
[29] Khing, T. Y.; Teck, P. K.; Voon L. K., Ee; L. T. & Wan, L. Y. (2005). Development of a
Low Cost Fiber Bragg Grating (FBG) Sensor Interrogation System, ASEAN Virtual
Instrumentation Applications Contest Submission.
11
1. Introduction
Bedsore is a very common disease for long-term bedridden patients, and its main cause is
that the human skins have been pressed too long in part areas, blood circulation obstruction
lead to tissue necrosis. The conventional prevention measures include turning the body over
at regular intervals by medical care personnel, using mattress and so on. Manpower nursing
will increase the working strength of medical care personnel, and the common mattress only
can be set to run periodically, it can not estimate the practical pressures of the different
human body parts, as a result, if the time interval is set too long, maybe some parts can not
be treated in time, and if the time interval is set too short, it will affect the rest of patient. A
new method is put forward to improve the conventional bedsore prevention mattress, and
the mattress is divided into areas to be controlled respectively. Several groups of stress
sensor are used to measure the pressures signals in each area, and then the pressure signals
are sampled to the computer. The LabVIEW virtual instrument is designed to analyze the
measure pressure data, and estimate the state of every parts of the human body that have
been continuously pressed. For the parts warned by the system, the LabVIEW instrument
will send control signals to the corresponding pumps of the mattress.
Stress Sensor
A/D Control
Signal Pumps
(four)
Stress Conditioning
Sensor Circuit
3. Hard design
3.1 Pressure signal conditioning
3.1.1 Stress sensor selection
MPX2100 semiconductor pressure sensor manufactured by Motorola can convert pressure
into a millivolt-level differential-mode voltage signal, the pressure sensor has good linearity,
and the output voltage has a precise direct proportion with the pressure (Zhou, 2009). In
addition, MPX2100 the compensation characteristics with temperature overcome the
problem of the temperature drift of semiconductor pressure-sensitive semiconductor
devices. So the system uses the MPX2100 pressure sensor, which can meet the system
Development of an Intelligent Bedsore Prevention System 239
requirement. The physical map and pins map are shown in Fig.3 and Fig.4. MPX2100 has
the following characteristics:
• As using a laser trimming technology to make the output of the bridge zero drift
become small, generally less than ± 1mV;
• Having high sensitivity: 40mV± 1.5mV;
• Thermosensitive sensor compose of a temperature compensation network, in the range
of -40 °C and +125 °C having a good temperature compensation effect, thereby
enhancing the accuracy of the sensor;
• A better linearity (±0.25% F.S);
• A wide temperature range (-40 °C ~ +125 °C);
• Allowable large overload (400%).
ΔR = KP (1)
The bridge output voltage is:
240 Modelling, Programming and Simulations Using LabVIEW™ Software
R1 = R3 (3)
R4 = R5 (4)
R6 = R7 (5)
+ R4 R6
I1
-
A1 R1
A3
+ O
R2
-
A2 R3
-
+
I2
R5 R7
According to the basic analysis method of operation circuit, the available output voltage is:
R6 R (6)
Uo = - (1 + 2 1 )(U I1 - U I2 )
R4 R2
To facilitate adjustment, the circuit increase a part of percentage of amplifier. At the same
time, making the the output signal of the instrument amplifier circuit reverse, which is
shown in Fig.7. RW is zero adjustment resistance.
R2
R1 A
I
+ O
R3
E1 E2
R4 R5
RW
R1 C3 +12V
20k
10nF VD1
R17 1.5k D1N4148
7
U15
3 RW2
+
V+
R3 5.1k
6 R18 5.1k 10K
VS OUT
2
7
- 4 OP-07C/301/TI R11 U18 R19 1.5k
V- 10k 3
V+
U14 +
7
+VO U17 OUT VD2
R8 3 OP-07C/301/TI 2 D1N4148
V+
RW1 10k + - 4 OP-07C/301/TI
-VO VS
GND
6 V-
MPX2100/MC 10K OUT R20 2k C5 10nF
4
1
2
R10 - 4 R13
10k V- R12 51.1k R14 20k IN1
R4
4.7k 10k
R9 20k
-12V
4
2 OP-07C/301/TI
V-
-
6
OUT
R6 5.1k 3
+ 7
U16 V+
10nF
R5
20k C4
Modelling, Programming and Simulations Using LabVIEW™ Software
Development of an Intelligent Bedsore Prevention System 243
RS-232-C standard: RS-232-C standard make a regulation for two aspects, that is signal level
standard and control signal standard. RS-232-C use the logic level of negative logic
regulation, signal level is not compatible with the normal TTL level. RS-232-C standard use
EIA level, in which the high level is +3V to +15V and the low level is -3V to -15V. But the
high level of the standard TTL level is +2.4V to +5V and the low level is 0 to 0.4V. If
transforming the two levels, the specialized level conversion chip is needed. At present,
MAX3232 is usually used as level conversion chip. The main function parameter is as
follows:
• 3.0~5.5V power supply;
• 300μA low supply current;
• Only connect 0.1μF capacitance
MCS_51 microcontroller has a full duplex serial port. Full duplex serial communication only
need a output line TXD and a input line RXD. Serial communication mainly has two
technical problems. The one is data transmission, the other is data conversion. Data
transmission mainly solves some problems about standard, format and working mode in the
transmission. Data conversion is the purpose to complete the conversion of string and
parallel. MCS-51 serial port reception and sending both can work in the query or interrupt
way with the use of very flexible. 51 microcontroller serial programming involved some
major special function register, which is serial data buffer SBUF, serial port control register
SCON, special function register PCON and interrupt allowable register IE.
2SMOD ⋅ S
B= (7)
32
fo
S= (8)
12(2 n − X )
Where X is the calculation initial value of timer T1, n is the number bits of the timer T1
(select working mode 2, n=8), the value of serial baud rate multiplier bit SMOD is 0. In this
design, we should select the right size of the crystal oscillator to make the baud rate of
system the same with the baud rate of setting in the PC. The baud rate generated by
microcontroller is equal to 9600, so we select the 14.7456MHz crystal oscillator as the
microcontroller crystal oscillator.
Where X is the calculation of initial value of timer T1, n the number of bits for the timer T1
(timer selection work 2, n = 8), the serial baud rate multiplier bit SMOD values to 0. We
should choose the right size for the single chip crystal oscillator, the baud rate generated by
Development of an Intelligent Bedsore Prevention System 245
the system and set the baud rate the same PC. This article hopes generated baud rate is
equal to 9600 MCU, so select the 14.7456MHz crystal oscillator as a single chip.
Start
AD Conversion
Delay
3 11
X A 10
IN9 13 B 9
IN10 14 X0 C +5V
IN11 15 X1 6
IN12 12 X2 EN
IN13 1 X3 16 R22
IN14 5 X4 VDD 7 1k
IN15 2 X5 VEE 8052
2
4 X6 C14 22uF
X7 U12A 9 C10 30pF
4051 74LS04 RST 31
EA/VP
4051 29 18 Y1
IN8 4 30 PSEN X2 19 COM1
1
X7 ALE/P X1 14.7456MHZ
IN7 2
IN6 5 X6 7 28 16 C13 30pF 5
X5 VEE P2.7
2 6 C6
ANAIN SDO
1nF 0.1uF 0.1uF
U9
Modelling, Programming and Simulations Using LabVIEW™ Software
Development of an Intelligent Bedsore Prevention System 247
if(dout==1)
{rice=(rice<<1)|0x0001;}
else
rice=rice<<1;
}
cs=1;}
}
word1[4]=(cha/10)+48;
word1[5]=(cha%10)+48;
rice1=(float)rice*1.220703125;//(2.5*rice*1000)/0xfff;
rice=(uint)rice1;
word1[11]=(rice%10000)/1000+48;
word1[12]='.';
word1[13]=(rice%1000)/100+48;
word1[14]=(rice%100)/10+48;
word1[15]=rice%10+48;
}
248 Modelling, Programming and Simulations Using LabVIEW™ Software
read_flag= 1 ;
P0=ch;
delay1ms(1000);
}
}
/************************Main function ***************************/
void main()
{
UART_init(); // Serial port initialization
do
{
P2=cha;
adconversion();
delay1ms(100);
putstring("\r\n") ;
Serialsent();
delay1ms(50);
cha++ ;
}
while(cha<15);
putstring("\r\n");
putstring("-----------\r\n");
delay1ms(1000);
if (RI) // If have received interrupt, get results and send it to P0
{ RI=0;
ch=SBUF;
read_flag= 1 ;
P0=ch;
delay1ms(1000);
}
}
+12V
1
6
+
U29B MG2
12CW A
MOTOR SERVO
5
-
2
U28A
Q3
OUT1 1 2 IRF840
74LS04
1
fc = ≈ 400 Hz (9)
2π L1 ⋅ C 2
Digital voltage filters high frequency noise by the LC filter, which can be used as analog
power VCC. +5 V digital power supply followed by a three-terminal regulator RT9163 of
3.3V output is shown in Fig.14(b) and available +3.3 V digital power supply can be got.
Development of an Intelligent Bedsore Prevention System 251
VDD5P VCC5P
VDD7.5P
RT9163-5
3 1
IN OUT L2 330uF C23
VDD5P VDD33P
C25 4 2 C24 +
GND GND
+ C26 RT9163-3.3
+ R23 0.1uF 10uF 3 1
10uF R IN OUT C20
10uF
C19 4 2 + C21
D1 GND GND
LED 100nF 10uF 100nF
GNDA
GNDD GNDD
GNDD
GND
2
1 3 1 3
VIN VOUT VIN VOUT -5V
2200uF
AC -12V
Start
No
Start button is pressed down?
Yes
Receives the pressure signal data
send by the RS232 serial port
Pressure analysis
Output control
signals
No No
Stop button is pressed down ?
Yes
Stop
4. Data filtering: data transmission errors and data loss is likely to occur during the RS232
serial communications, so the data need to be filtered. The main thought of data
filtering is: LabVIEW virtual instrument recieves a group of data which sent by the
RS232 serial port every 10 seconds, so it will receive 6 groups of data in a minute.
Removing the maximum and minimum values of the 6 groups, the average value of the
remaining 4 groups is thought as the pressure data in one minute, its block diagram is
shown in Fig.20.
3. Edit icon and connector. Double click the icon in the upper right corner and edit it, right-
click the icon pane in the front panel and choose “Show Connector” in the shortcut menu.
And then connect the controls in the front panel with the terminal of the connector. One
input terminal should be connected to the array which needs to be saved, the other input
terminal should be connected to the file name which wants to be saved.
4. Save this VI file, so we can use it next time.
The point under the biggest pressure in the certain area of mattress can be got by comparing
the corresponding data in this area. The maximum value in a row is the maximal pressure of
the area at the certain time and the position of the maximal value can show the sensor which
is under the maximal pressure. If the point bearing the most in certain part does not change
during the set time, the system will recognize that the skin in this part has been pressed for a
long time and need to be massaged. Otherwise, the system will recognize that the main
bearing point in this area has been changed and this area do not need to be massage during
the time (Zhou, 2008).
The maximum duration under pressure in each part of human body is different, because the
maximum pressure in each part is different. In addition, the weight of patient is always
different, thus the maximum duration should be set according to the characteristic of the
patient and the specific part. If the sensor signals are set to be sampled every 10 seconds and
stored every 1 minute, the maximum duration is set to be x hours. Then when the maximum
values in all the seriate 60x rows are in the same column, it can be concluded that there is no
move in this area during the x hours. The LabVIEW instrument send relevant signals to the
microcontroller according to the analysis result, then the pump of certain area will be
controlled to run (Yang, 2007).
Concrete steps are as follows:
1. Build a new program in the project, and name it with “pressure analysis.vi”.
2. Data read: its block diagram is shown in Fig.24. Read From Spreadsheet File VI is used
to read the saved pressure data files, and then output a double-precision two dimension
array, the file path is ”d:\file\(time)(file name).xls”.
5. Conclusion
By analyzing the multi-channel sensor signals, the human body areas that need to be
massaged can be recognized automatically. The system is designed considering the
practicality, and it can make the patients having a better rest, so that the purpose of the
bedsore prevention has been achieved. For the function of LabVIEW virtual instrument is
easy to extend, we can perfect the system gradually in the clinic experiments.
Development of an Intelligent Bedsore Prevention System 261
(a) Head area pressure waveform (b) Back area pressure waveform
(c) Buttocs area pressure waveform (d) Crus area pressure waveform
Fig. 30. Waveform chart of pressure signals in each area
6. References
Chen Xihui. & Zhang Yinhong. (2007). LabVIEW 8.20 Programming Design from Introduction to
Master, Tsinghua University Press, 978-7-302-15230-9, Beijing
Hu Hancai. (2003). Microcontroller Theory and Interface Technology, Tsinghua University Press,
7-302-07737-1, Beijing
Yang Leping et al. (2007). LabVIEW Advanced Programming Design, Tsinghua University
Press, 978-7-302-15674-1, Beijing
Zhou Runjing & Hao Xiaoxia. (2008). Multisim&LabVIEW Virtual Instrument Design
Technology, Buaapress, 978-7-81124-319-2, Beijing
Zhou Runjing & Hao Xiaoxia. (2009). Sensor and Detection Technology, Publishing House of
Electronics Industry, 978-7-121-08530-7, Beijing
Part 4
1. Introduction
Engineering education has a big importance in development of technologies. For this
purpose, various methods have been developed to improve learning processes. The
technological researches and developments provide new concepts in education [5].
Especially internet facilities present new approaches and methods to design virtual and real
time laboratory applications for education purposes. Laboratory work is an important part
of the engineering course, in which the students can make practice of what they learned in
the classes, which helps them to reinforce the learning of the concepts [10].
Facilities of the laboratories in educational institutions are generally insufficient when the
number of students is considered. Implementation of a laboratory to meet the requirements
has a very high price.
Because of using intensively software and minimum hardware, virtual laboratories (VL) that
can be controlled remotely as a real time have become alternative to the traditional
laboratories. In these laboratories, students can access to the experiments without time and
ocation limitations [6]. In the virtual laboratory, students can set up parameters of
experiments from a remote location and repeat the experiments, as they need.
LabVIEW program is one of the high level programming languages that is preferred in this
study to perform VL applications. LabVIEW software provides an active and controllable
interface for test, measurement, instrument control, data processing and data analysis
applications [3]. By using LabVIEW program, both virtual instruments can be designed and
the devices can be controlled via GPIB, RS232 or VXI interface and web based applications
that users can access via internet can be performed. On the basis of LabVIEW program
properties, a VL has been setup to provide an environment for both physical experiments
and simulations [4].
There are many web based virtual laboratory examples in the literature and some of them
can be found on the following. In [2], power electronics experiment is programmed in a
remotely controlled laboratory. It is a real power electronics experiment conducted in the
laboratory but remotely control and monitoring by web based tools. In [1], it presents a new
web based virtual laboratory on a frequency modulation experiment for the teaching of an
undergraduate course on communication principles in the National University of Singapore
(NUS). It enables students to have a natural hands-on experience of using an expensive
266 Modelling, Programming and Simulations Using LabVIEW™ Software
spectrum analyzer on a one-to-one basis and provides a solution for distant engineering
education. In [7], a virtual laboratory that offers different aspects of instruments and circuits
is described for Electrical and Electronics teaching. This laboratory is based upon the use of
LabVIEW program. In [8], a web based platform for distance learning is performed. The
platform is used in the course “Electrical Measurements” at Faculty of Electrical Engineering
in Zagreb, Croatia. In [9], a web-based laboratory in a distance course on automatic control
in the Department of Computer Sciences and Automatic Control of the Spanish University
of Distance Learning (UNED) is described.
This study describes a web based real time virtual laboratory that its purpose is to provide a
tool to be used as a teaching aid in analog and digital communications course. We present a
web based VL on Amplitude Modulation (AM, with carried, double side and signal side
band), Pulse Code Modulation (PCM), and base band digital modulation techniques such as
Amplitude Shift Keying (ASK), Frequency Shift Keying (FSK) and Phase Shift Keying (PSK)
experiments are designed. For performing the above experiments in an efficient way,
theoretical concepts and the procedures of real time and virtual applications related to
experiments are given on the web page that is designed by using Microsoft Visual Studio
2005 and also to conduct and perform the experiments; the user only needs to install
LabVIEW Run Time Engine that is placed on the user input page. In our virtual laboratory,
HP 3632A DC Power supply and HP 34970A Digital Multimeter devices are controlled via
GPIB interface.
In Section II, the typical user interfaces including web site of the study and LabVIEW control
panels that have been installed into the web site are described. Section III describes the
hardware and software system architecture and finally, conclusions are drawn in Section IV.
2. User interface
2.1 Control panels
In this virtual laboratory, both computer–simulated and real time applications have been
performed but only the front panels of real time applications have been presented in this
paper. In Figure 1, Q=32 a=1 PCM front panel is shown. Similarly, in Figure 2, AM front
panel and in Figure 3, FSK front panel is shown. The front panels are called user interfaces
and they have been designed as realistic as possible. The front panels of these applications
that contain two sections such as control buttons on the left and input-output waveforms of
the experiments on the right are designed in a simple and intelligible structure.
In these applications, the frequency of sample impulses (PCM) and carrier frequencies (ASK,
FSK, PSK, AM) is changed as virtual and the frequency of message signals is changed as real
time by using control buttons. So students can change the message signals in real time via
voltage controlled circuit (VCO) by controlling the connected devices (HP 3632 A DC Power
Supply). Also in the front panels, there are five types of signals such as sinusoidal, square,
triangle, saw tooth and random on the message signal part. In addition to this, the front
panels display message signal, sample impulses, carrier signals as input and AM modulated
signal, PCM code sequence, ASK, FSK, PSK signals as output. The experiments can be
stopped at any time by pressing stop button located at the bottom of the left side of the front
panel. In order to start up the application, these graphs and control buttons must be
connected in the proper form in the block diagram. These diagrams will be explained in the
hardware and software section.
Web Based Real Time Laboratory Applications of Analog
and Digital Communication Courses with LabVIEW Access 267
deactivated by the system manager (generally teacher), nobody can access the experiments.
If somebody wants to access the experiments at this time, “Because of deactivating the
system, you can not access the experiments” message is shown. When the system is
deactivated, the student can only access the other pages such as LabVIEW information,
experiment menus.
3. System architecture
3.1 Hardware system
The hardware system and its components of the real time Analog and Digital
Communication experiments are shown in Figure 7.
In this hardware structure, HP3632A DC power supply and HP 34970A digital multimeter
devices have GPIB card and are connected to server PC through GPIB card and cables.
LabVIEW is adopted to implement local instrument control. On the basis of the GPIB
address assigned to the instrument, the commands are transferred through the GPIB card
and cable to the corresponding instrument which implements the commands and executes
the actions. Laboratory PC which includes GPIB and Ethernet interfaces is called as a
server PC and communicate as a full duplex form with digital multimeter and DC power
supply.
By using Voltage Controlled Oscillator (VCO) as shown in Figure 8, message signal has been
obtained for experiments. The input signal of VCO is controlled by the HP3632A DC power
supply with GPIB and the output signal of VCO circuit is measured with HP 34970A digital
multimeter and then sent back to the Laboratory PC through the GPIB. This measured
signal is applied to the system as a message frequency.
VCO circuit converts the voltage between 3,5 to 5,5V to the frequency between 1,6 to 11 kHz.
With the designed VCO circuit, the message signal of real time PCM experiment and carrier
signals of ASK, PSK and FSK experiments are get. In Figure 9, the set of the instrument
located in a standard laboratory is shown.
is written in Formula Node to select sample values In the third section, in Formula node, a
program is developed to allocate levels to the infinite range of amplitude of sample values
of the analog signal using uniform quantization operator. This program is carried out by
using quantization parameters (quantization step size a=1 and a=0,5, the quantization levels
Q=8, 16, 32).
4. Conclusion
In this study, for supporting laboratory applications of students, a general methodology has
been presented to create real time and virtual experiments of Analog and Digital
Communication courses. And also this study supports effective and complete learning and
provides a solution for distant technical engineering education. The aim of these
experiments is to study the frequency spectra of AM, DSB, SSB modulated signals and time
spectra of PCM, ASK, FSK, PSK signal forms according to input parameters. These
experiments are designed based on theoretical knowledge.
Various experiments corresponding to modulation techniques have been designed under
LabVIEW program to real time and virtual applications. Hereafter, it is planned on to
develop the demodulation applications of these experiments. This methodology can also be
extended to other communication system techniques. Users can access the virtual laboratory
in Marmara University campus.
5. References
Ko, C.C.; Chen, B.M.; Han, J.; Hu, S.; Ramakrishnan, V.; Cheng, C.D.; Zhuang, Y.& Chen, J.
(2001).A Web-Based Virtual Laboratory on a Frequency Modulation Experiment.
IEEE Transactions on Systems Man.and Cybernetics, pp 295-303,
Cheng, K.W.E.; Chan, C.L.; Cheung, N.C.; Sutanto, D.(2002).Virtual Laboratory
Development for Teaching Power Electronics. Institute of Electrical and Electronics
Engineers, pp. 461-466,
Higa, M.L.; Tawy, D.M.; Lord,S.M.;(2002). An Introduction to Labview Exercise for An
Electronics Class. 32nd ASEE/IEEE Frontiers in Education Conference
LabVIEW Manual , National Instruments, 2005
Basher, H. A.; Isa, S. A.;(2006). On – campus an Online Virtual Laboratory Experiments with
LabVIEW. Southeast Conference, pp. 325-330,
274 Modelling, Programming and Simulations Using LabVIEW™ Software
Basher, H. A.; Isa, S. A.; Henini, M. A.; (2004). Virtual Laboratory for Electrical Circuit
Course. IEEE Southeast on 2004 Conference, pp. 330-334,2004
Xiaoyan, C.; Xiaodong, Z.& Xi, C.; (2005). A Virtual Laboratory for Electrical and
Electronics Teaching. IEEE International Symposium on Microwave, Antenna, Propagation and
EMC Technologies for Wireless Communications Proceedings, pp. 491-495, 2004
Jurèeviæ, M.; Malariæ, R.& Šala, A.; (2006). Web Based Platform for Distance Training On
Electrical Measurements Course. Measurement Science Review, pp.36-39,
Dormido, S.; Vargas, H.; Sánchez, J.; Duro, N.; Dormido, R.; Canto, S.D.& Esquembre, F.;
(2007). Using Web based laboratories for Control Engineering Education.
International Conference on Engineering Education
Salzmann, Ch.; Gillet, D.&Huguenin, P.; (2000). Introduction to Realtime Control using
LabVIEW with an Application to Distance Learning, International Journal of
Engineering Education ,pp. 255- 272,
National Instruments. (2002) Distance- Learning Remote Laboratories using LabVIEW.
Available:http:///one.ni.com/devzone/conceptd.nsf/webmain/7BD0B01FCF3CF
61A86256B510059F0FB/$File/WP223 .pdf
13
1. Introduction
LabVIEW is a quite interesting programming language, and despite its odd first impression
is very powerful. We remember when we started to use it for the first time it was somehow
strange to me, we thought what this, a graphical programming language? For the first
contact whit this language, LabVIEW somehow hides its power, this could be due to fact
that for the first contact everyone tries the simulation part. A usual first application would
be to generate a sine wave to a graph. Unfortunately, this won’t really impress a user.
All LabVIEW field engineers nightmare is to know that the users think that LabVIEW is a
simulation environment. Their main job is to erase that from the users mind. Of course it has
a very strong simulation part, but the main target is the real hardware controlling.
If we think put of the box a little, we will realize that if LabVIEW hides its power, that means is
very simple to use, but if we think about the big amount of software and hardware National
instruments make, we will see that it’s quite an extraordinary programming language.
To make a short count, we can see that only LabVIEW 2009 with Modules, Toolkits and
Device Drivers are 3 DVDs in compressed kit version. If we consider that in other hand we
have NI Multisim circuit design suite, LabWindows/CVI C programming language for
instruments and Measurement Studio LabVIEW style buttons add-on for Microsoft Visual
Studio, then we can imagine that engineers National Instruments create a lot of software.
In hardware area we can just say that they have a lot of stuff, and if they don’t have am
equipment, then another company has it and LabVIEW has the driver for that equipment.
Sometimes the diver is made by the National Instruments engineers, sometimes is made by
third party vendors, but my only concern is to work, and they mostly do. A useful section in
the www.ni.com webpage is the IDNET (Instrument Driver Network), where you can find
the LabVIEW and LabWindows/CVI drivers for almost any equipment. You just have to
search here: www.ni.com/devzone/idnet. A good instruments vendor would be Agilent
Technologies; we can say that it’s very hard to find equipments from Agilent without
LabVIEW or LabWindows/CVI driver.
This way we can easily say that LabVIEW it’s much more than MATLAB Simulink in color.
LabVIEW has a strong programming part, despite its simple appearance, if we go deeply in
some specific area, like NI Vision or CompactRIO, then things will start to get quite complex
and complicated. But knowing that this is complicated in LabVIEW, if we think to do the
same thing without LabVIEW, in another programming language, it could be almost
impossible, for a reduced number of engineers, in a short amount of time.
In LabVIEW it’s possible, almost everything is possible.
276 Modelling, Programming and Simulations Using LabVIEW™ Software
We would like to correct the sentence above; some things are possible only indirectly. Some
extra programming in needed, but after all an engineer can do what he planned.
numbers (8 bits). The first Shift Register with 0 initialization will always increase the
fragmentation index with 2, this way we will reach at the end minus 2 (n-2) of the HEX
word. There is a condition too, if we reach at the end of the HEX string to exist the While
loop. From String Subset we convert the HEX string to number, the number is converted to
ASCII with the Type Cast VI. For some strange reason the Type Cast VI puts an ASCII space
before the converted ASCII character, this space is a \00 type space, so this will have to be
deleted, it’s deleted with the Match Pattern VI using the ^[\00]* command and wired to the
after substring output (after the \00), and we will obtain the good converted ASCII value.
This value will be concatenated with the following strings using the second Shift Register
with the empty string initialization.
signal was the trapezoidal signal, which is mostly used when controlling motors. Nobody
wants a square pattern for the motors acceleration. In cars, in lifts the motor usually
accelerates in a trapezoidal pattern.
As we can see in Fig. 9., the program is working. The hardest part is configuring the
parameters. The parameters are configured using equation (1).
⎧⎪ N p ⋅ Uminr = A − U0
⎨ (1)
⎪⎩N p ⋅ Uminf = A − U0
Where Np is the number of points; Uminr,Uminf are the minimal voltages for rise and fall; A is
the amplitude of the signal; U0 is the start voltage. In our case it will be: 0,0003 * 10000 = 5 –
2, this way we created the trapezoidal signal.
In Fig. 12. We can see the experimental setup of the NAND gate on a PCB with protection
and connectors for accessing. The used NAND gate is integrated in a 74ACT00 IC.
The used NI equipment for this experiment was the NI PXI-4110 power supply and the NI
PXI-4072 digital multimeter.
t pHL + t pLH
tp = (3)
2
In the standard TTL gate’s case tpLH = 12 ns and tpHL = 8 ns, so tp = 10 ns.
The experimental setup can be seen on Fig. 12. The setup is on the same PCB as for the
transfer characteristic.
The used NI equipments are NI PXI-4110 power supply, the NI PXI-5112 oscilloscope and
the NI PXI-5412 signal generator.
In Fig. 16. we can see the Front Panel of the experiment.
As we can see we have the configuration of the oscilloscope, the power supply and the
function generator.
The oscilloscope has a configured resource ID and the Time/div setting. It has also both
channels activated with 0 V offset for channel 0 and 3 V offset for channel 1 and Volts/div
(Vertical Range) dial. It also has some triggering configurations like slope on positive, DC
coupling and 1 V level. We have the both graphs (input and output of the NAND gate) on
the waveform graph and cursors to measure the propagation time.
The power supply has a basic configuration just for supplying current to the IC. It has
resource ID, current limit to 100 mA, 5 V voltage level, output enabled indicator, an
indicator showing 0 as the selected channel, and a measurement of the output of the
activated channel.
The function generator has resource indicator, the settings for output mode, which is on
standard, square waveform type, and the setting for amplitude, which is at 5 V and the
setting for frequency, which is at 1 MHz.
In Fig. 17. we can see the Block Diagram of the program.
As we can see we have the initialization for the function generator, the setting of the output
mode, the amplitude and frequency setting, the enabling of the output and the starting of
the generation.
The oscilloscope is initialized and has standard initialization.
Finally the power supply is initialized.
We enter in the While loop. We configure the voltage and the current of the power supply;
we enable its output and measure the output voltage.
We continue to the oscilloscope, we configure the trigger settings, the timing settings. After
we make the settings for the vertical range and start the readings of the values for
representing on the graph both of the channels (0 and 1). We unite the two channels with a
Build Array and output it on a Waveform Graph.
For the function generator we can control the frequency and amplitude during the program
execution, this way we have it inside the loop too.
When we exit the loop we disabled the output, we stopped the generation we resettled the
device. Finally we close the function generator, the oscilloscope, we reset and close the
power supply and end the whole execution with a simple error handler to have the error
messages in case if something goes wrong.
and at the end we close the signal generator. Finally the logic analyzer is closed too, and the
program is ended with a simple error handler.
channel and the sampling divisor is 5. We have also indicators for frequency and RPM. We
have also a median filter which can be deactivated with a button and we have a slot setting
dial, which must be set to be equal with the number of slots of the disk present on the
motor. This should be correctly set to calculate the RPM.
In Fig. 25. we can see the Block Diagram of the program. We have two parallel while loops.
The first loop is for the trapezoidal signal generation. We have first the creation of the channel,
after we have the start of the generation process. Next we enter the While loop, we have here
the trapezoidal signal creation similar to paragraph 2.5. This is the method how a signal is
generated by a DAQ board; we provide the numbers (samples) of the signal and the use the
write signal VI, which has the icon with the pencil. After we exit the loop with closing the
instrument (delete task) and we finish the program with the simple error handler.
The second loop is for the counter configuration. We have channel creation for the counter,
the timing settings (sample configuration), the start of the execution continues, followed by
the signal reading, which is filtered and with a specific formula we calculate the RPM and
represent it on a Waveform Graph.
Equation (4) shows how to calculate the RPM from the frequency.
f
RPM = N ⋅ 60s (4)
s
Finally we close the instrument and we handle errors. We put everything in the loop to be
controllable during execution.
In Fig. 31. we have the Front Panel of the Agilent 33250A signal generator. As we can see we
have resource ID, the waveform type is sine wave, the frequency 100 kHz, the offset is 0 V
and the amplitude is 5 V.
Fig. 31. Front Panel for the Agilent 33250A Function / Arbitrary Waveform Generator.
In Fig. 32. we can see the Front Panel of the oscilloscope application. We can see the resource
ID of the oscilloscope and the horizontal adjust dial. We have two channels activated with
two graphs and two vertical adjust dials. The first graph represents the input AC signal and
the second graph represents the output DC signal. From this graphs we ca see that the
power supply works correctly and we have an AC – DC power supply.
Fig. 32. Font Panel for the Power Supply Testing with Oscilloscope.
LabVIEW Remote Lab 295
In Fig. 33. we have the 33250A Agilent signal generator programming. We have between the
initialization and closing a While loop. In the loop we have the waveform configuration VI
and the output enable VI.
Fig. 33. Block Diagram for the Agilent 33250A Function / Arbitrary Waveform Generator.
In Fig. 34. we have the Block Diagram of the oscilloscope application.
We start with the channel creation. We enter in the while loop. We have some timing
settings for the horizontal adjust and the vertical adjust and readings for the both activated
channels (channel 0 and channel 1). We put a Bessel filter to the output signal of the voltage
supply. When we exit from the while loop we close the instrument and handle errors.
global variables communicates not only between different VIs on the same computer, but
between VIs on different computers, connected via networks cables if they are in the same
subnet.
will have indicator and vice-versa. We can imagine an invisible line, connection between
these global variables. These lines transport the data between the two VIs via Ethernet. The
data is sent from the networked real-time host, but there is also feedback from the Widows
host.
5. Conclusion
LabVIEW is a very complete programming language. We could say that if assembly is a first
level programming language and C is a second level programming language, than
LabVIEW should be a third level programming language. LabVIEW is graphical and has a
lot of implemented blocks, as they say; you don't have to invent the wheel again. This
concept makes programming really fast and could reduce very much an engineer's work.
As we could see in paragraph 2., LabVIEW has a lot of block, but not enough. It hasn't got
everything that is needed. In paragraph 2. we presented only 7 programming tricks that we
made and we thought that should be important to know. We are sure that are much more
tricks in this programming language. We encountered and solved much more programming
problems, but we decided not to present those tricks, because, they are not so general. After
all LabVIEW is a very complex programming language, but there is place for more.
After the tricks we presented 6 applications made with the PXI industrial system and 2
applications made with CompactRIO. They have similarities; some of them are made with
both of the PXI and ComapctRIO platforms. The applications were made for didactical
purposes and for publishing them on the LabVIEW Remote Lab. All the applications are
published and accessible from the http://plst.etc.upt.ro address with a user name and
password.
6. References
Antonovičs U. & Priednieks Ē. (2006). Interactive Learning Tools for Electrical Engineering
and Electronics Course, Electronics and Electrical Engineering, ISSN 1392-1215 –
Kaunas Technologija, No. 7(71), pp. 29–34, 2006.
Auer, M.E. & Gallent, W. (2000) The Remote Electronic Lab as a Part of the Telelearning
Concept at the Carinthia Tech Institute, Proceedings of the ICL2000, Villach/Austria,
2000.
LabVIEW Remote Lab 305
Garbus, R.U.; Aguirre, I.J.O.; Sanchez, R.C. & Pureco, O.R. (2006). Virtual Remote Lab for
Control Practic, Electronics, Robotics and Automotive Mechanics Conference, vol. 2, pp.
361-366, 2006.
Gontean, A.; Lie, I. & Szabó, R. (2009 a). LabVIEW powered remote lab, Design and
Technology of Electronics Packages, (SIITME) 2009 15th International Symposium, pp.
335-340, Gyula, Hungary, September , 2009.
Gontean, A.; Lie, I. & Szabó, R. (2009 b). Using a Low Cost Programmable Power Supply for
Automated Testing, Design and Technology of Electronics Packages, (SIITME) 2009 15th
International Symposium, pp. 341-346, Gyula, Hungary, September , 2009.
Gontean A. & Szabó R. (2009 a). Remote temperature measurement with and without FPGA,
TELFOR 2009 – 17th Telecommunications Forum, pp. 775-778, Belgrade, Serbia,
November, 2009.
Gontean A. & Szabó R. (2009 b). Comparison between PIC and CompactRIO remote motor
control, TELFOR 2009 – 17th Telecommunications Forum, pp. 747-750, Belgrade,
Serbia, November, 2009.
Grober, S.; Vetter, M.; Eckert, B. & Jodl, H.-J. (2007). Experimenting from a distance –
remotely controlled laboratory, Eur. J. Phys., vol. 28, pp. 127-141, 2007.
Hercog, D.; Gergic, B. & Matko, V. (2005). Remote Lab for Electric Drives, Industrial
Electronics – ISIE 2005 Proceedings of the IEEE International Symposium, vol. 4. pp.
1685-1690, 2005.
Khalil, A.; Hasna, M.; Benammar, M.; Chaabane, M. & Ben Amar, C. (2009). Development of
a remote lab for electrical engineering program, Signals, Circuits and Systems (SCS) –
3rd International Conference, pp. 1-5, 2009.
Mihela Lascu (2007). Advanced programming techniques in LabVIEW, Politehnica Publishing
House, Timişoara, 2007.
*** National Instruments (2008). LabVIEW™ Data Acquisition and Signal Conditioning
Exercises, 2008.
*** National Instruments (2008). Data Acquisition and Signal Conditioning – Course Manual,
2008.
*** National Instruments (2007). LabVIEW™ Basics II: Development – Course Manual, 2007.
*** National Instruments (2007). LabVIEW™ Basics I: Introduction – Course Manual, 2007.
*** National Instruments (2008). CompactRIO™ and LabVIEW™ Development Fundamentals –
Course Manual, 2008.
Paladini, S.; da Silva, J.B.; Alves, G.R.; Fischer, B.R. & da Mota Alves, J.B. (2008). Using
Remote Lab Networks to Provide Support to Public Secondary School Education
Level, Computational Science and Engineering Workshops – CSEWORKSHOPS '08 11th
IEEE International Conference, pp. 275-280, 2008.
Szabó, R.; Gontean, A. & Lie, I. (2010). Sound Based Coin Recognition and Clapper,
MENDEL '10 – 16th International Conference on Soft Computing, pp. 509-516, Brno,
Czech Republic, June, 2010.
Szabó, R.; Gontean, A.; Lie, I. & Băbăiţă, M. (2009). Oscilloscope Control with PC, NAUN
2010 – International Journal of Computers and Communications, pp. 33-40, Issue 3,
Volume 3, September, 2010.
306 Modelling, Programming and Simulations Using LabVIEW™ Software
Uran, S.; Hercog, D. & Jezernik; K., (2006). Remote Lab Experiment RC Oscillator for
Learning of Control, International Journal of Online Engineering, vol. 2, no. 4, pp. 1-8,
2006.