Micro C
Micro C
Introduction
- In continuous time control systems, all the system variables are
continuous signals. Whether the system is linear or nonlinear, all
variables are continuously present and therefore known (available) at all
times.
- The error signal is discretized and fed to the computer by using an A/D
(analog to digital) converter.
- The controller output is again a discrete signal which is applied to the
plant after using a D/A (digital to analog) converter.
- Error signal e(t) is sampled at intervals of T. In the context of control
- However, digital control systems employ a computer as a and communication, sampling is a process by which a continuous time
fundamental component in the controller. signal is converted into a sequence of numbers at discrete time
- It can be viewed from different perspectives including control intervals.
algorithm, computer program, conversion between analog and - One of the most important aspects is the sampling process level.
digital domains, system performance etc. - It is a fundamental property of digital control systems because of the
- In a digital control system, the control algorithm is implemented in a discrete nature of operation of digital computer.
digital computer.
Analog to Digital converter (ADC)
- ADC is an electronic device that converts an input analog voltage (or
current) to a digital number proportional to the magnitude of the voltage
or current.
- With introduction of digital computers, the data or physical quantity
takenin analogue form must be converted to digital form in order to be
computed.
- In order to covert an analogue quantity to a digital number, three
processes takes place; sampling, quantization and binary encoding.
this comparison using the lower half of the input range. If the voltage
4
had been in the upper half, the first digit would have been 1.
2 - This dividing of the remaining fraction of the input range in half and
comparing to the input voltage continues until the specified number of
t bits of accuracy has been obtained. It is obviously important that the
T input signal does not change when the conversion process is underway.
8 Quantizing
Digital to analog conversion
6
- Today microcomputers are widely used for industrial control. The output
Amplitude
4
Microcontrollers
- Signal conditioning: Very often the signals presented to the inputs of - Manual Data Entry: Many data acquisition systems provide users with
the data acquisition system are not in a form appropriate for conversion, a way to tag the data they are accumulating, through some sort of
and so they must be preconditioned. The required signal conditioning manual data entry.
could consist of linear amplification, logarithmic amplification, filtering, - They may wish to note such things as the type of data, special
peak detection, or sample-and-hold. conditions surrounding the measurements, and / or the run number.
- Often more than one of these functions is required. For instance, it is - Such information is generally provided in a “header” that precedes the
not uncommon to combine amplification with filtering or to find a low- actual measurement data.
level amplifier before a sample-and-hold.
- Digital buffer: The ability to record discrete events is often a
requirement of a data acquisition system.
- Since these events are usually accompanied by the opening or closing
of a switch, they represent a digital input, out-of-tolerance conditions or
some other situations that might invalidate the data collection are most
often designated as “discrete events”.
- Output buffer: The output buffer acts as the data collector for the DAS./
In an ordered sequence, it gathers up such data as the multiplexer
channel number, the signal conditioner gain, A/D converter data,
manual data, clock information, and discrete events.
- The buffer combines the data with the proper format for entry into the
recording or processing system. It also provides the proper buffering
and control to interface with the recording or processing device.
- If the processing device were a minicomputer, the output buffer might
be called a “Peripheral controller”.
- Analog-to-Digital (A/D) Converter: The analog-to-digital converter - Recording / processing device: A number of different equipment
actually translates the analog signal into an encoded digital format. types can fill the role of the recording or processing device. Some of
- Of the numerous ways to perform this function, only about half dozen the equipment types commonly used are paper tape punches,
techniques have found wide acceptance. Most notable are the dual- teleprinters (TTY), magnetic tape units, line printers, cathode-ray tube
slope integrating and the successive approximation converters. displays, floppy disks, general-purpose digital computers, and special-
- A/D converters are often referred to by the number of output digits they purpose digital processors.
produce. In a binary system, the range is from 4 to 16 bits, while in a
binary-coded decimal system, 5 to 4 digits are normal. - In recent years, all these components of the data acquisition system
have become more automated; a typical block diagram can be found
- Digital clock: The digital clock provides the master timing for the data with the exception of manual entry, which is accomplished directly the
acquisition system. computer through the keyboard display.
- It may be as simple as a multiphased crystal controlled oscillator, or it - Clock Information is supplied by the computer, and timing is generated
may provide the user with a wide selection of multiplexer rates and in the input/output (I/O) controller.
modes of operation. Some systems also contain both time-of-day and - This system configuration has two distinct advantages: first, on-line
day-of-year clocks.
programmable processing is possible; and second, a host of storage
5
Microcontrollers
media is available. The rapid expansion of the data acquisition field is - The latest trend in test instrumentation is to embed a micro processor in
directly attributable to the advent of low-cost computer hardware, which the heart of the equipment. This places tremendous programming
makes systems like that of figure below a reality. power and flexibility in the hands of the user.
- Yet we should not overlook the dotted-line box in the lower right-hand - The data acquisition system potential uses are:-
corner of the figure. Software can easily become a more costly burden 1. Data logging
than the hardware. 2. Signal analysis
3. Automated factory testing, and
4. Process control
Data Logging
- The data logger is a data acquisition system that measures the analog
inputs, translates the results into the digital domain, and stores the data
for future processing or analysis.
- From the earliest days of recorded data, scientists have set up
experiments with appropriate analog measuring devices at critical points
in the operation.
- They have tabulated their data either by visual observation at set
intervals or by recording it on another analog device, such as a pen
recorder.
- In either case, they had to spend many hours analyzing the results.
The data logger provides an automated method of making the
measurements and recording the data.
- It can perform these functions at precise intervals and with a degree of
accuracy beyond any person’s physical capability.
- Because the data is store in digital format, the data analysis is easily
performed by an off-line computer.
- Since many data loggers are highly portable, data-taking can be
automated even in very remote locations.
Alarm System
- In industrial plants and installations, control systems are used to monitor
and control processes.
- Control Systems, whether a conventional Control Desk or a
Computer/PLCs System with SCADA or a Distributed Control System
(DCS), provides a man-machine-interface to monitor and control the
plant equipment and processes.
- Alarm Systems are an integral part of man-machine interface. An alarm
system consists of both hardware and software including; field signal
sensors, transmitters, alarm generators & handlers, alarm processors,
6
Microcontrollers
alarm displays, annunciator window panels, alarm recorders and - Each pushbutton would indicate the area from which the alarms
printers. originate and also when depressed would cause the appropriate
- Alarm systems indicate the abnormal conditions and problems of the schematic to appear on the operator display.
plant and equipment to the operators, enabling them to take corrective - There exist two types of alarms:
action and bring the plant/equipment back to normal conditions. o Real Time Alarms are the alarms that show the current alarms in
- Alarm systems give signals to the operators in the form of audible the system.
sound, visual indications in different colors and/or continuous blinking, o Historical alarms are simply the logging of real time alarms. This
text messages, etc. will give a historical of the alarms that will allow system engineers
- An alarm system brings the following to the notice of the operator: to prevent alarms.
problems that need operator attention - Only four alarm priorities should be implemented. These are:
process changes that require corrective action o High priority: Alarms that warn of dangerous conditions that
unsafe operating conditions before Emergency Shut-down of could cause a shutdown of a major activity.
the plant o Medium priority: Alarms that should be acted on as quickly as
possible; but will not cause a shutdown.
hazardous conditions
o Low priority: Alarms that should be dealt with when time permits.
deviations from desired/normal conditions o Event only: Statistical or technical information. No enunciator
sounds for these.
- The limiting of the number of types of alarms is to keep the system
straightforward and with easy interpretation of the alarms.
- Higher priority alarms should be louder; lower pitched and have a higher
pulse frequency than the lower priority alarms.
- Alarms are classified as unacknowledged (and flashing on the screen)
until the operator acknowledges them via the keyboard. They then
become an accepted alarm.
- One weakness in many alarm systems is the occurrence of trivial
alarms, which irritate and confuse the operator.
7
Microcontrollers
- Authorized operators can monitor detailed activities for many types of - The secondary level, which consists of a number of displays,
devices and send commands using standard faceplate command associated with that of the primary level. These should be able to be
windows and group displays. accessed directly from the primary level displays.
- Typical hardware that is provided is: - The tertiary level, which gives more details on certain secondary level,
o One or more operator displays (which may be of the touch displays.
type) - The various graphic screens that are available are:
o Industrial (or Mylar) type keyboards which have audible or o Free form graphic screens: This is where the screen format can
tactile feedback be created by the users, using whatever layout and symbols they
o Operator panels consisting of highlighted keys to bring up can create. These are best constructed by the operators (with
predefined graphic displays assistance from the engineer). They offer the designer complete
o Printers (one for alarms and one for reports) flexibility in the layout of the information.
o Alarm buzzers (or external sirens) o Operating group displays: Here a standard set of symbols is
- A useful addition although possibly expensive option is a video copier used to create displays as required. These provide the data in a
for reproducing the operator screens in color. standard presentation format.
o Trend displays: These displays occupy part or the entire screen
depending on the configuration. They provide trends on the data
of analog values.
o Alarm displays: These log the current alarms for the system.
- It has been shown that operators consult and use overview type
schematics at least ten times more often than secondary and tertiary
schematics.
- It is thus imperative that as much effort as possible goes into the correct
design of such displays.
- The operators should be consulted as much as possible in the design of
these screens to make them as useful as possible.
- Displays should appear within one second of the operator pressing the - Overview displays have to cover a large amount of the system and it is
appropriate display key(s) thus important to eliminate any part of the display, which does not
convey information to the operator.
Operator displays and graphics - This would mean that equipment outlines and flow lines are not put into
- The organization of displays should be done in a clear and logical way overview schematics.
to allow the operator to quickly and effectively identify the information of - Secondary and tertiary displays are consulted less and probably require
interest. more information than that of the live updates.
- The architecture of displays is to have a progressive decrease in scope - Outlines of equipment and text messages should be de-emphasized by
of the displays and a progressive increase in detail as the operator using low intensity colors.
looks for some specific information (and is proceeding down the - An icon should be designed to indicate clearly the area associated with
hierarchy of displays). a given schematic or operation.
- Displays should be organized into three layers: - This allows the operator to quickly work out which area the current
- The primary level which is an overview level and which should be display is referring to.
reached directly from the function keys on the keypad.
8
Microcontrollers