Sei sulla pagina 1di 16

CHAPTER 1

CHAPTER 1 CHAPTER 1

Digital sampling and z-Transforms


Digital computer and its components, Sampling

BKF 3863 ADVANCED PROCESS CONTROL

continuous signals, Reconstruction of continuous signals from their discrete-time values, Analog to digital converters, Digital to analog converters, multiplexer, Discrete time model of a first-order and second-order processes, z Transform analysis for digital control

Semester I 2011/2012

BKC3863 Advanced Process Control

BKC3863 Advanced Process Control

Control Diagram of a Typical Control Loop (Blending Process)


CHAPTER 1 CHAPTER 1
Actuator System

DIGITAL COMPUTER

F1 T1

F2 T2
Sensor System

Controller

TC TT

T F

BKC3863 Advanced Process Control

BKC3863 Advanced Process Control

BASIC CONCEPTS OF COMPUTER HARDWARE


Primary Memory

BASIC CONCEPTS OF COMPUTER HARDWARE


Input/Output (I/O): Refers to the process of getting information into and out of the computer. Input: Those parts of the computer receiving information to programs. Output: Those parts of the computer that provide results of computation to the person using the computer.

CHAPTER 1

Input Units

CPU (Central Processing Unit)

Output Units

Programs and data are stored in the same memory: primary memory. The computer can only perform one instruction at a time.

BKC3863 Advanced Process Control

CHAPTER 1

BKC3863 Advanced Process Control

SOURCES OF DATA FOR THE COMPUTER

INPUT DEVICES
Two categories of input hardware: Those that deal with original data. Those that handle previously stored data. Input hardware: Those that deal with original data. Keyboard Mouse Voice recognition hardware Scanner Digital camera Digitizing: The process of taking a visual image, or audio recording and converting it to a binary form for the computer. Used as data for programs to display, play or manipulate the digitized data.
BKC3863 Advanced Process Control

Two types of data stored within a computer: Original data or information: Data being introduced to a computing system for the first time. Computers can deal directly with printed text, pictures, sound, and other common types of information. Previously stored data or information: Data that has already been processed by a computer and is being stored for later use. These are forms of binary data useful only to the computer. Examples: Floppy disks, DVD disks, and music CDs.
BKC3863 Advanced Process Control

CHAPTER 1

CHAPTER 1

INPUT DEVICES
Connecting Hardware to the computer: Hardware needs access through some general input/output connection.

INPUT DEVICES
Connecting Hardware to the computer: (continued) Hardware needs software on the computer that can service the device. Device driver: Software addition to the operating system that will allow the computer to communicate with a particular device. Common Basic Technologies for Storing Binary Information: Electronic Magnetic Optical
BKC3863 Advanced Process Control

CHAPTER 1

Port: The pathway for data to go into and out of the computer from external devices such as keyboards. There are many standard ports as well as custom electronic ports designed for special purposes. Ports follow standards that define their use. SCSI, USB: Multiple peripheral devices (chain). RS-232, IDE: Individual peripheral devices. Peripheral device: A piece of hardware like a printer or disk drive, that is outside the main computer.

BKC3863 Advanced Process Control

INPUT DEVICES

CHAPTER 1

INPUT DEVICES
Magnetic Technology Two parts to most of the magnetic forms of information storage: The medium that stores the magnetic information. Example: Floppy disk. Tiny spots on the disk are magnetized to represent 0s and 1s. The device that can read that information from the medium. The drive spins the disk. It has a magnetic sensing arm that moves over the disk. Performs nondestructive reading.

Electronic Circuits Most expensive of the three forms for storing binary information. A flip-flop circuit has either one electronic status or the other. It is said to flip-flop from one to the other. Electronic circuits come in two forms: Permanent Non-permanent

BKC3863 Advanced Process Control

CHAPTER 1

CHAPTER 1

BKC3863 Advanced Process Control

INPUT DEVICES
Optical Uses lasers to read the binary information from the medium, usually a disc. Millions of tiny holes are burned into the surface of the disc. The holes are interpreted as 1s. The absence of holes are interpreted as 0s.

INPUT DEVICES
Secondary Memory Input Devices These input devices are used by a computer to store information and then to retrieve that information as needed. External to the computer. Commonly consists of floppy disks, hard disk drives, or CD-ROMs. Secondary memory uses binary. The usual measurement is the byte. A byte consists of 8 binary digits (bits). The byte is a standard unit.

CHAPTER 1

BKC3863 Advanced Process Control

CHAPTER 1

BKC3863 Advanced Process Control

INPUT DEVICES
Capacity - The amount of information that can be stored on the medium.
Unit 1 bit 1 nibble 1 byte 1 kilobyte 1 megabyte 1 gigabyte 1 terabyte Description 1 binary digit 4 bits 8 bits 1,024 bytes 1,048,576 bytes 1 million bytes 1,073,741,824 bytes 1 billion bytes 1 trillion bytes Approximate Size

INPUT DEVICES Type of Access


Sequential - Obtained by proceeding through the storage medium from the beginning until the designated area is reached (as in magnetic tape). Random Access - Direct access (as in floppy and hard disks).

CHAPTER 1

1 character 1/2 page, double spaced 500,000 pages 5 million pages 5 billion pages

BKC3863 Advanced Process Control

CHAPTER 1

BKC3863 Advanced Process Control

PRIMARY MEMORY
Primary storage or memory: Is where the data and program that are currently in operation or being accessed are stored during use. Consists of electronic circuits: Extremely fast and expensive. Two types: RAM (non-permanent) Programs and data can be stored here for the computers use. Volatile: All information will be lost once the computer shuts down. ROM (permanent) Contents do not change.
BKC3863 Advanced Process Control

THE CENTRAL PROCESSING UNIT


The Central Processing Unit ( CPU) Often referred to as the brain of the computer. Responsible for controlling all activities of the computer system. The three major components of the CPU are: 1. Arithmetic Unit (Computations performed) Accumulator (Results of computations kept here) 2. Control Unit (Has two locations where numbers are kept) Instruction Register (Instruction placed here for analysis) Program Counter (Which instruction will be performed next?) 3. Instruction Decoding Unit (Decodes the instruction) Motherboard: The place where most of the electronics including the CPU are mounted.

CHAPTER 1

CHAPTER 1

BKC3863 Advanced Process Control

OUTPUT DEVICES
Output units store and display information (calculated

OUTPUT DEVICES
Audio Output Devices Windows machines need special audio card for audio output. Macintosh has audio playback built in. Audio output is useful for: Music CD player is a computer. Most personal computers have CD players that can access both music CDs and CD-ROMs. Voice synthesis (becoming more human sounding.) Multimedia Specialized tasks (i.e.: elevators floor announcements)

CHAPTER 1

results and other messages) for us to see and use. Floppy disk drives and Hard disk drives. Display monitors: Hi-resolution monitors come in two types: Cathode ray tube (CRT) - Streams of electrons make phosphors glow on a large vacuum tube. Liquid crystal display (LCD) - A flat panel display that uses crystals to let varying amounts of different colored light to pass through it. Developed primarily for portable computers.
BKC3863 Advanced Process Control

CHAPTER 1

BKC3863 Advanced Process Control

OUTPUT DEVICES
Optical Disks: CD-ROM and DVD CD-ROM (Compact Disk - Read Only Memory) By its definition, CD-ROM is Read Only. Special CD drives burn information into blank CDs. Burn: A laser is used to burn craters into the surface to represent a binary 1. Two main types of CDs: CD-R (Compact Disk - Recordable) CD-WR (Compact Disk - ReWritable) It takes longer to write to a CD-R than a hard drive. Special software is needed to record.
BKC3863 Advanced Process Control

Additional Hardware for Process Control Computer


Hardware Floating Point Processor Performs with

CHAPTER 1

CHAPTER 1

very high speed floating-point arithmetic operations Real Time Clock Every digital computer used for process control must have a real time clock. Uninterrupted Power Supply (UPS) In the event of power failure this device will run the computer Watchdog Timer If the control program hung-up in a never ending loop then this device will alert the operator and control engineer that the computer lost control of the process
BKC3863 Advanced Process Control

22

Components and Signals of a Typical Control Loop


CHAPTER 1 CHAPTER 1

DIGITAL COMPUTER CONTROL

BKC3863 Advanced Process Control

BKC3863 Advanced Process Control

MULTIPLEXER
It quite often happens, in the design of large-scale digital systems, that a single line is required to carry two or more different digital signals. Of course, only one signal at a time can be placed on the one line. What is required is a device that will allow us to select, at different instants, the signal we wish to place on this common line. Such a circuit is referred to as a Multiplexer. A multiplexer performs the function of selecting the input on any one of 'n' input lines and feeding this input to one output line.

MULTIPLEXER
Multiplexers are used as one method of reducing the number of integrated circuit packages required by a particular circuit design. This in turn reduces the cost of the system. Assume that we have four lines, C0, C1, C2 and C3, which are to be multiplexed on a single line, Output (f). The four input lines are also known as the Data Inputs. Since there are four inputs, we will need two additional inputs to the multiplexer, known as the Select Inputs, to select which of the C inputs is to appear at the output. Lines A and B are called Select Inputs
BKC3863 Advanced Process Control

CHAPTER 1

BKC3863 Advanced Process Control

Sampler
CHAPTER 1 CHAPTER 1

CHAPTER 1

Sampler
Sampler is a switch, which closes every T seconds and remains closed for an infinitesimally short period of time. As the sampling period tends zero, the sampled representation comes closer to the continuous signal but requires an explosively large number of sampled values. On the other hand, as the sampling period increases, fewer sampled values are required, but the sampled representation of a continuous signal deteriorates, and the reconstruction of the original signal becomes poor or

Green Line Continuous Signal Blue Dots Discrete Signal

sample.

BKC3863 Advanced Process Control

27

BKC3863 Advanced Process Control

Sampler
CHAPTER 1 CHAPTER 1

Sampler
t 0 ___ 0 0.632 0.865 0.950 0.982 0.993

2 3 4 5

Response of first-order system to a step of magnitude, M


BKC3863 Advanced Process Control BKC3863 Advanced Process Control

Sampling of oscillating signal

Hold Element
CHAPTER 1

CHAPTER 1

Sampling an oscillating signal more than 2 times per cycle of oscillation; otherwise its impossible to reconstruct the original signals from its sampled values.
BKC3863 Advanced Process Control BKC3863 Advanced Process Control

First-order Hold Element


CHAPTER 1 CHAPTER 1

Comparison of Zero and First-order Hold Elements

BKC3863 Advanced Process Control

Slowly varying Signals

BKC3863 Advanced Process Control

Comparison of Zero and First-order Hold Elements

Analog-to-Digital Converter
CHAPTER 1

CHAPTER 1

03 07 10 14 09 02 00 04

Rapidly Changing Signals


BKC3863 Advanced Process Control

BKC3863 Advanced Process Control

Analog-to-Digital Converter
Resolution: Suppose a binary number with N bits is to represent an analog value ranging from 0 to A There are 2N possible numbers (including zero). Resolution = A / (2N 1) For example, consider a voltage range of 0 to 10V and 12 bit converter. The 12 bits define 4096 integer numbers, which in turn defines 4095 voltage intervals between 0 and 10. ADC used for process control allow 20,000 to 100,000 conversions per second
BKC3863 Advanced Process Control

Digital-to-analog converter
Digital-to-analog converter (DAC) function in the reverse manner to ADC. The 12 bits define 4096 integer numbers, which in turn defines 4095 voltage intervals between 0 and 10. Then the integer number 516 causes an analog output of (516/4095) X 10 = 1.26V

CHAPTER 1

CHAPTER 1

BKC3863 Advanced Process Control

Discrete-Time Model of a Digital PID Controller


The continuous analog action of a PID controller is given by

Discrete-Time Model of a Digital PID Controller


Then the discrete control action produced by proportional mode is

CHAPTER 1

t 1 d c(t ) = K c (t ) + (t )dt + D dt I 0

CHAPTER 1

K c (nT )

Then the discrete control action produced by integral mode is based on the integration of errors over a time period. Since the values of the errors are available on a discrete-time Basis, the integral can be approximated by a numerical Integration.

(t )dt T (kT )
0 k =0
BKC3863 Advanced Process Control BKC3863 Advanced Process Control

Discrete-Time Model of a Digital PID Controller

Discrete-Time Model of a Digital PID Controller

CHAPTER 1

K cT

(kT )
k =0
BKC3863 Advanced Process Control

BKC3863 Advanced Process Control

Discrete-Time Model of a Digital PID Controller

CHAPTER 1

Discrete-time Model of a First-order Process

CHAPTER 1

BKC3863 Advanced Process Control

CHAPTER 1

BKC3863 Advanced Process Control

Discrete-time Model of a First-order Process

Discrete-time Model of a Second-order Process

CHAPTER 1

BKC3863 Advanced Process Control

CHAPTER 1

BKC3863 Advanced Process Control

Discrete-time Model of a Second-order Process

Z-Transforms
The z-transform is the most general concept for the transformation of discrete-time series.

CHAPTER 1

T2

CHAPTER 1

( yn + 2 2 yn +1 + yn ) + 2

( yn +1 yn ) + yn = K p mn

The Laplace transform is the more general concept for the transformation of continuous time processes. For example, the Laplace transform allows you to transform a differential equation, and its corresponding initial and boundary value problems, into a space in which the equation can be solved by ordinary algebra. The switching of spaces to transform calculus problems into algebraic operations on transforms is called operational calculus. The Laplace and z transforms are the most important methods for this purpose.

[OR]

yn + 2

T2 T T2 = 2(1 ) yn +1 2 2 + 1 yn + K p 2 mn T

BKC3863 Advanced Process Control

BKC3863 Advanced Process Control

Definition of Z-Transforms
Consider a continuous function (signal) y(t) sampled at uniform intervals of period T. Let the sequence of sampled values be y(o), y(T), y(2T),..

CHAPTER 1

BKC3863 Advanced Process Control

CHAPTER 1

BKC3863 Advanced Process Control

Z T ransform of Basic Functions


Unit Step Function:

Z T ransform of Basic Functions


Ramp Function:
Z [at ] = S = 0 + aT(z 1 ) + 2(aT)z 2 + 3(aT)z 3 + ...z 1S = aTz 2 + 2(aT)z 3 + L (1 z 1 ) S = 0 + aT(z 1 ) + (aT)z 2 + (aT)z 3 + ... = aTz 1 1 z 1

CHAPTER 1

Exponential Function:
Ze
-at

Z[u(t)] = 1 + 1 z 1 + 1 z 2 + 1 z 3 + ...... 1 z = = 1 z 1 z-1

[ ]= e
n=0

anT

= , =e
n n=0

-aT

CHAPTER 1

1 = 1 1 = -aT 1 1-e z z = z-e -aT e -aT z 1 < 1 for convergence


BKC3863 Advanced Process Control

Trigonometric Functions:
zsinwT z 2 2zcoswT + 1 z 2 zcoswT Z[coswt ] = 2 z 2zcoswT + 1 Z[sinwt ] =
BKC3863 Advanced Process Control

Properties of Z- Transforms
1. Linearity

CHAPTER 1

CHAPTER 1

Z a f +a f = a f (z)+ a f (z)
1 1 2 2 1 1 2 2

2. Final Value Theorem

lim y(t) = lim (1-z )y(z) t z 1


-1

3. Initial Value Theorem:

lim y(t) = lim y(z) t 0 z


BKC3863 Advanced Process Control BKC3863 Advanced Process Control

Inversion of z-Transforms
Using the inversion of z-transform the values of a function at the sampling instant can be calculated. The inverse of z-transform can be symbolized as follows.

Inversion of z-Transforms
Two methods used to determine inverse z-transform:

CHAPTER 1

CHAPTER 1

1. 2.

Partial Fraction Expansion Long division of two polynomials

z 1 y ( z ) = {y (0), y (T ), y (2T ), y (3T ),....}

The inverse Z-transform yields the values of a function at the sampling instants only and not the continuous function itself. The inverse Z-transform does not even help us to determine the sampling Period T for the computed sampled values: y(0), y(T), y(2T), The inverse transform of a function unique Continuous function y(t).
BKC3863 Advanced Process Control

1.Partial fraction expansion

y(z) =

cn Q ( z 1 ) c1 c2 = + + ... + n ( z 1 ) P ( z 1 ) 1 ( z 1 ) 2 ( z 1 )

y (z )does not necessarily yield a

1, 2, n are low-order polynomials in z-1 compute c1,c2,cn. Invert each part separately.
BKC3863 Advanced Process Control

Partial Fraction Expansion


z z 1 = y(z) = 2 z 4 z + 3 1 4 z 1 + 3 z 2 z 1 c1 c2 = = + (1 z 1 )( 1 3 z 1 ) 1 z 1 1 3 z 1 c2 = c1 = z 1 1 3 z 1
1

Partial Fraction Expansion


CHAPTER 1

CHAPTER 1

z 1 =1

1 2

z 1 1 = 1 z 1 z =1 3 2 1 2 1 2 y(z) = + 1 z 1 1 3 z 1

BKC3863 Advanced Process Control

BKC3863 Advanced Process Control

Long Division Method


CHAPTER 1 CHAPTER 1

Long Division Method

BKC3863 Advanced Process Control

BKC3863 Advanced Process Control

Long Division Method


CHAPTER 1
Tutorial: Find the inverse z-transform using long division method

y( z) =

4 + 2.67 z 1 + 1.56 z 2 1.42 z 3 1 0.36 z 1 + 0.19 z 2 1.03 z 3 + 0.2 z 4


BKC3863 Advanced Process Control

Potrebbero piacerti anche