apc chapter 1

16
   C    H    A    P    T    E    R     1 BKC3863 Advanced Process Control BKF 3863 ADVANCED PROCESS CONTROL Semester I 2011/2012    C    H    A    P    T    E    R     1 BKC3863 Advanced Process Control 2 CHAPTER 1 Digital sampling and z-Transforms Digital computer and its components, Sampling 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    C    H    A    P    T    E    R     1 BKC3863 Advanced Process Control Control Diagram of a Typical Control Loop (Blending Process) Controller  F 1 T 1 T  F  F  2 T  2 TC Actuator System TT Sensor System    C    H    A    P    T    E    R     1 BKC3863 Advanced Process Control DIGITAL COMPUTER

Upload: nurulizzati

Post on 06-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 1/16

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

BKF 3863ADVANCED PROCESS CONTROL

Semester I 2011/2012

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control 2

CHAPTER 1

Digital sampling and z-Transforms

Digital computer and its components, Sampling

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

   C   H   A   P

   T   E   R    1

BKC3863 Advanced Process Control

Control Diagram of a Typical ControlLoop (Blending Process)

Controller

 F1

T 1

 F

 F 2

T  2

TC

Actuator

System

TT

Sensor

System    C   H   A   P

   T   E   R    1

BKC3863 Advanced Process Control

DIGITAL COMPUTER

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 2/16

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

BASIC CONCEPTS OF COMPUTERHARDWARE

 – Programs and data are stored in the same memory:primary memory.

 – The computer can only perform one instruction at a time.

CPU

(Central Processing Unit)

Input

Units

Output

Units

Primary Memory

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

BASIC CONCEPTS OF COMPUTERHARDWARE

• Input/Output (I/O): Refers to the process ofgetting information into and out of thecomputer.

 – Input: Those parts of the computerreceiving information to programs.

 – Output: Those parts of the computer that

provide results of computation to theperson using the computer.

   C   H   A   P

   T   E   R    1

BKC3863 Advanced Process Control

SOURCES OF DATA FOR THE COMPUTER

• Two types of data stored within a computer:

 –  Original data or information: Data beingintroduced to a computing system for the first time.

• Computers can deal directly with printed text,pictures, sound, and other common types ofinformation.

 –  Previously stored data or information: Data thathas already been processed by a computer and isbeing stored for later use.

• These are forms of binary data useful only to

the computer.

• Examples: Floppy disks, DVD disks, and musicCDs.

   C   H   A   P

   T   E   R    1

BKC3863 Advanced Process Control

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 forthe computer.

 – Used as data for programs to display, play ormanipulate the digitized data.

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 3/16

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

INPUT DEVICES• Connecting Hardware to the computer:

 – Hardware needs access through some general input/output

connection.

• 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.

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

INPUT DEVICES• Connecting Hardware to the computer:

(continued)

 – Hardware needs software on the computer thatcan service the device.

• Device driver: Software addition to theoperating system that will allow the computerto communicate with a particular device.

• Common Basic Technologies for StoringBinary Information:

 – Electronic

 – Magnetic

 – Optical

   C   H   A   P

   T   E   R    1

BKC3863 Advanced Process Control

INPUT DEVICES

• Electronic Circuits

 – Most expensive of the three forms forstoring binary information.

 – A flip-flop circuit has either one electronic

status or the other. It is said to flip-flop fromone to the other.

 – Electronic circuits come in two forms:

• Permanent

• Non-permanent

   C   H   A   P

   T   E   R    1

BKC3863 Advanced Process Control

INPUT DEVICES

• Magnetic Technology

 – Two parts to most of the magnetic forms of informationstorage:

• 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 overthe disk.

 – Performs nondestructive reading.

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 4/16

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

INPUT DEVICES

• Optical

 – Uses lasers to “read” the binary informationfrom the medium, usually a disc.

• Millions of tiny holes are “burned” intothe surface of the disc.

• The holes are interpreted as 1s. Theabsence of holes are interpreted as 0s.    C

   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

INPUT DEVICES

• Secondary Memory Input Devices

 – These input devices are used by a computer tostore information and then to retrieve thatinformation as needed.

• External to the computer.

• Commonly consists of floppy disks, hard diskdrives, or CD-ROMs.

 – Secondary memory uses binary.

• The usual measurement is the byte.

 – A byte consists of 8 binary digits (bits). Thebyte is a standard unit.

   C   H   A   P

   T   E   R    1

BKC3863 Advanced Process Control

INPUT DEVICES

• Capacity - The amount of informationthat can be stored on the medium.

Unit Description Approximate Size

1 bit 1 binary digit1 nibble 4 bits

1 byte 8 bits 1 character  

1 kilobyte 1,024 bytes ≈1/2 page, double spaced

1 megabyte 1,048,576 bytes ≈500,000 pages

1 million bytes

1 gigabyte 1,073,741,824 bytes ≈5 million pages

1 billion bytes

1 terabyte 1 trill ion bytes ≈5 billion pages

   C   H   A   P

   T   E   R    1

BKC3863 Advanced Process Control

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).

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 5/16

   C   H   A   P   T   E   R    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 forthe computer’s use.

 – Volatile: All information will be lost once the

computer shuts down.

• ROM (permanent)

 – Contents do not change.

   C   H   A   P   T   E   R    1

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.

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

OUTPUT DEVICES

• Output units store and display information (calculated

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.

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

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.: elevator’s floor announcements)

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 6/16

   C   H   A   P   T   E   R    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.

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control 22

Additional Hardware for ProcessControl Computer

Hardware Floating Point Processor – Performs with

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

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Components and Signals of aTypical Control Loop

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

DIGITAL COMPUTER CONTROL

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 7/16

   C   H   A   P   T   E   R    1

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.

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

MULTIPLEXERMultiplexers 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, C 0, C 1,

C 2 and C 3, 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

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control 27

Sampler

Green Line – Continuous Signal

Blue Dots – Discrete Signal

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

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

sample.

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 8/16

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Sampler

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Sampler

t ___  

0 0

0.632

0.865

0.9500.982

0.993

τ

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

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Sampling of oscillating signal

Sampling an oscillating signal more than 2 times per

cycle of oscillation; otherwise its impossible to

reconstruct the original signals from its sampled values.

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Hold Element

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 9/16

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

First-order Hold Element

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Comparison of Zero and First-order Hold

Elements

Slowly varying Signals

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Comparison of Zero and First-order HoldElements

Rapidly Changing Signals

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Analog-to-Digital Converter 

03 07 10 14 09 02 00 04

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 10/16

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Analog-to-Digital Converter Resolution:

Suppose a binary number with N bits is to represent ananalog 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 and12 bit converter. The 12 bits define 4096 integernumbers, which in turn defines 4095 voltage intervalsbetween 0 and 10.

ADC used for process control allow 20,000 to 100,000conversions per second

   C   H   A   P   T   E   R    1

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 voltageintervals between 0 and 10.

Then the integer number 516 causes an

analog output of(516/4095) X 10 = 1.26V

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Discrete-Time Model of a Digital PIDController

⎥⎦

⎤⎢⎣

⎡++= ∫ 

 D

 I 

cdt 

d dt t t  K t c

0

)(1

)()(ε 

τ ε τ 

ε 

The continuous analog action of a PID controller is given by

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Discrete-Time Model of a Digital PIDController

)(nT  K cε 

Then the discrete control action produced by proportional

mode is

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.

∑∫ =

≅n

kT T dt t 00

)()( ε ε 

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 11/16

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Discrete-Time Model of a Digital PIDController

∑=

n

k  I 

c kT T  K 

0

)(ε τ 

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Discrete-Time Model of a Digital PIDController

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Discrete-Time Model of a Digital PIDController

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Discrete-time Model of a First-orderProcess

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 12/16

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Discrete-time Model of a First-orderProcess

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Discrete-time Model of a Second-orderProcess

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Discrete-time Model of a Second-orderProcess

n pnnnnnn m K  y y yT 

 y y yT 

=+−++− +++ )(2)2(1122

2 τ ξ 

τ 

[OR]

n pnnn mT 

 K  yT T 

 yT 

 y2

2

2

2

12 12)1(2τ τ 

ξ τ τ 

ξ  +⎟⎟ ⎠

 ⎞⎜⎜⎝ 

⎛ +−−−= ++

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Z-Transforms

The z-transform is the most general concept for the

transformation of discrete-time series.

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.

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 13/16

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Definition of Z-TransformsConsider 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),…..

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

   C   H   A

   P   T   E   R    1

BKC3863 Advanced Process Control

Z- Transform of Basic Functions

Unit Step Function:

11

1

1111

1

321

 z-

 z  

...... z  z  z  Z[u(t)]

  =−

=

+⋅+⋅+⋅+=

−−−

[ ]

onvergencefor c z e 

 z-e

 z  

 z -e 

 λ 

 z e,  λ λ z ee Z  

-aT 

-aT 

-aT 

-aT 

n

nn

n

anT -at 

1

1

1

1

1

1

1

1

00

<

=

=

−=

===

−∞

=

−∞

=

− ∑∑Exponential Function:

   C   H   A

   P   T   E   R    1

BKC3863 Advanced Process Control

Z- Transform of Basic Functions

Ramp Function:

Trigonometric Functions:

[ ]

[ ]12zcoswTz

zcoswTzcoswtZ

12zcoswTz

zsinwTsinwtZ

2

2

2

+−

−=

+−=

[ ]

1

1

321

132

1321

1

0

)1(2

320

−−−

−−−

−−−−

−=

++++=

−++=

++++==

 z aTz 

...(aT)z (aT)z  )aT(z 

S  z (aT)z aTz 

S ...z (aT)z (aT)z  )aT(z S at  Z 

L

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 14/16

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Properties of Z- Transforms

 (z) y )-z (   y(t)t 

  -

⎥⎦⎤

⎢⎣⎡

→=

∞→ˆ1

1limlim 1

(z) f a(z) f a f a f a Z ∧

+∧

=+⎥⎦⎤

⎢⎣⎡

22112211

1. Linearity

2. Final Value Theorem

3. Initial Value Theorem:

 (z) y  y(t)t 

  ⎥⎦⎤

⎢⎣⎡

∞→=

→ˆlim

0lim

   C   H   A

   P   T   E   R    1

BKC3863 Advanced Process Control

Inversion of z-Transforms

{ }),....3(),2(),(),0()(1

T  yT  yT  y y z  y z  =⎥⎦⎤

⎢⎣⎡ ∧

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.

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 does not necessarily yield a

unique Continuous function y(t).

)( z  y∧

   C   H   A

   P   T   E   R    1

BKC3863 Advanced Process Control

Inversion of z-Transforms

Two methods used to determine inverse z-transform:

1. Partial Fraction Expansion

2. Long division of two polynomials

1.Partial fraction expansion

λ1, λ2,… λn are low-order polynomials in z-1 compute c1,c2,…cn.

Invert each part separately.

)(...

)()()(

)()(ˆ

11

2

2

1

1

1

1

1

−−−−

+++== z 

c

 z 

c

 z 

c

 z  P 

 z Q z  y

n

n

λ λ λ 

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 15/16

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

11

311

1

1

11

1

2

1

2

1

1

11

1

21

1

2

31

21

1

21)(ˆ

2

1

1

2

1

31

311)31)(1(

34134)(ˆ

1

1

−−

=−

=−

−−−−

−−

+

−=∴

=−

=

−=−

=

−+

−=

−−=

+−=

+−=

 z  y

 z 

 z c

 z 

 z c

 z 

c

 z 

c

 z  z 

 z 

 z  z 

 z 

 z  z 

 z  z  y

 z 

 z 

Partial Fraction Expansion

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Partial Fraction Expansion

   C   H   A

   P   T   E   R    1

BKC3863 Advanced Process Control

Long Division Method

   C   H   A

   P   T   E   R    1

BKC3863 Advanced Process Control

Long Division Method

8/2/2019 APC Chapter 1

http://slidepdf.com/reader/full/apc-chapter-1 16/16

   C   H   A   P   T   E   R    1

BKC3863 Advanced Process Control

Long Division Method

4321

321

2.003.119.036.01

42.156.167.24)(ˆ

−−−−

−−−

+−+−

−++=

 z  z  z  z 

 z  z  z  z  y

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