0% found this document useful (0 votes)
9 views

Micro C

The document discusses digital control systems and the principles of converting analog signals to digital signals for use in digital computers as controllers. It covers topics like sampling, quantization, analog to digital conversion, and the types of analog to digital converters.

Uploaded by

jeffnduki
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Micro C

The document discusses digital control systems and the principles of converting analog signals to digital signals for use in digital computers as controllers. It covers topics like sampling, quantization, analog to digital conversion, and the types of analog to digital converters.

Uploaded by

jeffnduki
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

TOPIC 4: DIGITAL CONTROL SYSTEM

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.

Analog Sampling Quantization Binary Digital


Input Encoding Output
Principles of operation
- The computer typically receives a measurement of the controlled
variable, also often receives the reference input, and produces its Sampling Quantization Binary
output using an algorithm. Period T Interval Q codebook
- This output is usually converted to an analog signal using a D/A
converter, and then amplified by a power amplifier to drive the plant.
Filtering: Quantization
- Before sampling, the analog input must be filtered with an anti-aliasing - This is the process of approximating a continuous range of values by
filter. relatively small set discrete symbols or integer values.
- The anti-aliasing filter is a low-pass filter that limits high frequencies in - To store or transmit the sampled values via a digital system, the sample
the input signal to only those that meet the requirements of the values are represented in numerical form.
sampling theorem. - This requires quantizing where each discrete sample value is rounded
- The filter eliminates frequencies that exceed a certain limit that is off to the closest numerical value in a set of digital words in use.
determined by the sampling rate. - Each sampled amplitude must be converted to one of a finite number of
Sampling possible values, or levels. For ease in conversion to binary form, the
- The first step in converting a signal to digital form is to use a sample- number of levels is usually a power of 2 depending on the degree of
and-hold circuit. precision required.
- This circuit samples the input signal at a rate determined by a clock - The quantized signal stays at the sample value until the next sampling
signal and holds the level on a capacitor until the next clock pulse. The instants. In this quantizing process the information in accurate signal
amplitude of an analog signal is first sampled. values is lost because of rounds off and the original signal cannot be
- The purpose of the sample and hold circuit is to take a sample of the reproduced exactly any more.
input signal (analog) and hold it essentially constant while the A/D - The quality of the coding depends on the number of quantum levels that
conversion is taking place. is defined to provide the required performance.
- This function is usually implemented with a switch and capacitor. The
switch connects the capacitor to the signal conditioning circuit once Binary encoding
every sample period. - In the next step in the digitization process, the output of the quantizer is
- The capacitor then holds the voltage value measured until a new mapped into a binary sequence.
sample is acquired. - It is apparent that 8 levels require three binary digits, or bits; 16 levels
- Many times, the sample and hold circuitry is incorporated into the same require four bits; and 256 levels require eight bits. In general 2n levels
integrated circuit package. require n bits.
- The more samples per second there are, the more representative of the - In order to use more levels, more binary samples would have to be
analog signal the set of samples will be. squeezed into the allotted time slot between successive signal samples.
- After sampling, the signal value is known only at discrete points in time,
called sampling instants. Types of ADC
- If there points have a sufficient close spacing, a smooth curve drawn - There are several types of analog to digital converter.
through them allows interpolating immediate values to any degree of o Successive approximation (Potentiometric) ADC
accuracy. o Ramp type ADC
- The number of samples per second is called the sampling frequency o Integrating Type ADC
or sampling rate, and it depends on the highest frequency component o Dual –slope integrating type
present in the analog signal.
- The relation of sampling rate end the highest frequency of the signal to
be sample is as follows:
- The sampling theorem states that if the highest frequency content in
the input signal is fh Hz, then input signal can be recovered without
distortion if it is sampled at a rate of at least 2fh samples/sec.
Microcontrollers
Analog Signal how long it takes for the capacitor to discharge. This length of time is
proportional to the input voltage.

Successive approximation A/Ds


- Successive approximation A/Ds allow much higher sampling rates (up
to a few hundred kHz with 12 bits is possible) while still being
reasonable in cost.
t - The conversion algorithm is similar to that of a binary search, where the
Sampling A/D starts by comparing the input with a voltage (generated by an
8
internal D/A converter), corresponding to half of the full-scale range.
6 - If the input is in the lower half, the first digit is zero and the A/D repeats
Amplitude

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 of the microcomputer is a digital quantity.


- In many applications the digital output of the microcomputer has to be
2 converted into analog quantity which is used for the control of relay,
small motor, actuator etc.
t - In communication system digital transmission is faster and convenient
encoding but the digital signals have to be converted back to analog signals at
the receiving terminal.
101 111 111 110 011 001 001 011110 111 111 110 011 001 001 011 - DAC converters are also used as a part of the circuitry of several ADC
converters.
- Thus, digital to analog converter is used to convert digital quantity into
analog quantity. DAC converter produces an output current of voltage
Integrating (or dual slope) A/Ds proportional to digital quantity (binary word) applied to its input.
- These are used for very low frequency applications (a few hundred - It functions as a zero-order hold, holding its output at a constant value
hertz maximum) and may have very high accuracy and precision (e.g. until it receives the next discrete input.
22 bit). - There are several ways of making a digital to analog converter. Some of
- They are found in thermocouple and RTD modules. Other advantages them are given as under.
include very low cost, noise and mains pickup tend to be reduced by the 1. Binary weighted resistor DAC
integrating and dual slope nature of the A/D converter. 2. R-2R Ladder network
- The A/D procedure essentially requires a capacitor to be charged with 3. Serial DAC converter
the input signal for a fixed time, and then uses a counter to calculate
3
Microcontrollers
Binary weighted Resistor DAC mode for the purpose of summing so that it performs as an excellent
- It consists of the following four major components. current to voltage converter.
1. n switches one for each bit applied to the input
2. a weighted resistor ladder network, where the resistance are The Data Acquisition System
inversely proportional to the numerical significance of the - This is electronic instrument, or group of interconnected electronic
corresponding binary digital hardware items, dedicated to the measurement and quantization of
3. a reference voltage Vref and analog signals for digital analysis or processing.
4. A summing amplifier that adds the current flowing in the resistive - Once the parameter to be measure is translated into the analog-
network to develop a signal that is proportional to the digital input. electrical domain, the DAS performs the translation to the digital-
electrical domain.
- In some cases the DAS simply records, or stores the digital data. While
more sophisticated systems may be capable of analysis or further
processing.
- For instance, a DAS may be as simple as a digital voltmeter (DVM)
which displays its output as a decimal readout, or it may be complex
enough to contain a large-scale computer as part of its hardware.

- The reference voltage source VR is considered to have zero internal


impedance.
- The resistor that are connected to the switches have value such as to
make the current flow proportion to the binary weight of the respective
input. Elements of DAS
- But the resistor in the MSB position has the value R, the next has the - Analog multiplexer: permits a number of original sources to be
value 2R etc. The resistor of the LSB has the value of (2n-1) R. automatically measure by the same data acquisition hardware.
- When all the bits of digital word have value of 1, then the output current - It consists of a series of switches whose inputs are tied to the various
of D/A converter is termed the full scale output current and is an analog signals and whole outputs are tied to a common measuring
important design parameter. point.
- On the other hand, if all switches are open i.e. all ai coefficients are - Each input is individually connected to the measuring point in a
zero, then the output voltage (current) is zero. predetermined sequence. The number of channels in a multiplexer may
- The maximum output voltage Vo = -RiI depends on the feedback resistor vary from two to several hundred.
Rf. As, the operational amplifier is operated in the negative feedback

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.

Human Machine interface (HMI)


- Human–Machine Interface or HMI is the apparatus or device which
presents processed data to a human operator, and through this, the
human operator monitors and controls the process.
- The HMI of a digital control system is where data is processed and
presented to be viewed and monitored by a human operator.
- This interface usually includes control where the individual can interface
with the control system
- It uses the project screens created during project development and
animates them based on real-time data received from field control units
- Another approach as opposed to the pure screen listing of alarms is to and field data servers.
have an associated enunciator panel (situated next to the operator
display) with illuminated pushbuttons.

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

You might also like