You are on page 1of 58

6.

0 Control system and


microprocessor

1. Input and output process and devices


2. Open and closed loop system
3. Modeling in frequency and time domain
1
Motivation

We have assumed that the control systems we


have studied operate in continuous time and that
the control law is implemented in analogue
fashion. Certainly in the early days of control, all
control systems were implemented via some form
of analogue equipment. Typically controllers were
implemented using one of the following formats:-
 hydraulic
 pneumatic
 analogue electronic
2
1.0 Microprocessors
 Microprocessor is technically defined as a single-chip
central processing unit (CPU) for a programmable
computer.
 Microprocessor (µP) is the “brain” of a computer that has
been implemented on one semiconductor chip.
 A CPU may be considered to be the “brain” of a computer
because it “understands” and “executes” the sequence of
binary instructions in a compiled computer program.
 Compared to the CPU, the other parts of a computer are
relatively “dumb” and
 require detailed attention from the CPU in order to
function properly in the computer system.

3
Microprocessors Related Terms
 A “microcomputer” is a computer system that has been built
around a microprocessor chip.
 A “microcontroller” is an integrated circuit that contains a
microprocessor as well as other useful support circuits,
such at timers, memory, input/output interface circuits, etc.
 The EE380 lab microcomputer system contains the
Motorola MC68332 microcontroller chip.
 A “digital signal processor” (DSP) is a specialized
microprocessor that has features (e.g. instructions,
registers, internal signal paths, arithmetic circuits) that make
it particularly efficient at performing the kinds of numerically
intensive calculations that are required in digital signal
processing (e.g. in modems and cell phones) 4
Applications of Microprocessors
 Microprocessors can be found just about everywhere:
 In general-purpose computers, like mainframes, personal
computers (PCs), and single-board computers (SBCs).
 In special-purpose computers, like calculators, personal
data assistants (PDAs), and game computers.
 In embedded computers that control automobiles,
appliances, instruments, communication systems, cell
phones, factories, assembly lines, refineries and etc.
 Ex. In a car: Microprocessors are used in the ignition
system, emission control system, anti-lock brakes,
dashboard display, entertainment system, navigation
system, etc. Modern cars often contain 20 or more
microprocessors.
5
Microprocessors History
 The microprocessor is made from advanced integrated
circuit technology where several thousand transistor
switches are integrated onto a single semiconductor
“chip”.
 The Intel 4004 (1971) was the first microprocessor:
 originally developed for a desktop calculator product
 contained 2300 transistors
 occupied a silicon area of 12 mm2
 implemented in 10 µm PMOS semiconductor technology
 data bus was 4 bits wide
 640 bytes of data could be addressed
 system clock run at a frequency of 108 KHz
 could perform roughly 60000 operations per second 6
Microprocessors History (cont.)

Intel 4004

Was Intel's first


microprocessor.
It contained 2,300
transistors and was built
using a 10 micron
process.
It had a total of 16 pins.

7
Typical Interface
FX1
FX2
+5V
XP1 IC1
1 1 28
NC SCL SCL
2 2 27
RXD SDA/IS0 SDA
3 3 26 J2
TXD/IS1 M2/A2
4 4 25 J3
FX1 M1/A1
J1 5 24 J4
FX2 M0/A0
6 23
ST1 MES/BS
C3 7 22
VCC GND
ZQ1 0.1 8 21
GND NC
20.0MHz 9 20
OSC1 VCC +5V
10 19
OSC2 SCK/N2
11 18
ST2 MISO/N1
C1 C2 12 17
CE2/BN MOSI/N0
20pF 20pF 13 16
SMPL SS/TEST TEST
14 15
CHRG CE1/BW

USTI

8
Microprocessors History (cont.)
 The Intel Itanium entered mass production in 2001:
 intended for high-end servers and workstations
 contains 25.4 million transistors
 silicon chip area exceeds 300 mm2
 180 nm CMOS semiconductor technology
 6 layers of metal interconnections
 1012 chip pad connections
 64-bit data bus; 64-bit address bus; 64-bit registers
 memory space of over 18 terabytes (264 = 18.45 x 1018).
 system clock frequency of at least 800 MHz
 peak performance of 3.2 billion instructions per second
 The pace of technological progress shows no signs of slowing
down in the immediate years ahead . . . 9
Microprocessors History (cont.)
Pentium 4

42 million transistors and


circuit lines of 0.18 microns.
Intel's first microprocessor,
the 4004, ran at 108
kilohertz (108,000 hertz),
compared to the Pentium 4
processor's initial speed of
1.5 gigahertz (1.5 billion
hertz).

10
Microprocessors Revolution
 The appearance of the microprocessor revolutionized digital
system design starting in the 1970s, and continuing on until
the present day.
In recent times, almost all analogue controllers have been replaced by
some form of computer control.
This is a very natural move since control can be conceived as the
process of making computations based on past observations of a
system’s behaviour so as to decide how one should change the
manipulated variables to cause the system to respond in a desirable
fashion.
The most natural way to make these computations is via some form of
computer.

11
Basic Microprocessors System
Central Processing Unit
Arithmetic-
Control
Logic
Unit
ProcessingUnit
Input Data into Output
Devices Information
Primary Storage Devices
Unit
Keyboard Monitor
Mouse Printer
Touch Screen
Voice...
Disks, Tapes, Optical Disks

Secondary Storage Devices 12


Basic Microprocessors System (cont.)
 Basic microprocessor system consists of the
microprocessor core, memory, input/output modules,
and a system bus connecting these modules.
 The memory system usually consists of Read Only
Memory (ROM) for boot information, and Random
Access Memory (RAM) organized in a hierarchy of main
memory and multilevel cache memory.
 Typically, the cache memory is implemented as level 1
cache closely coupled to the microprocessor core, and
level 2 cache accessible over the system bus.
 The main memory, typically DDR SDRAM, is accessible
over the system bus as well, but level 2 cache
(embedded SRAM) offers higher access speed. 13
Basic Microprocessors System (cont.)
 The microprocessor core contains a datapath section
(ALU and registers), a control section, and cache
memory.
 Memory access rate varies according to the memory
hierarchy from 1 cycle access rate to registers and level
1 cache, to 10 cycles access rate to level 2 cache, up to
50 cycles access rate to main memory.
 These are typical values and may vary from system to
system.

14
Type Of Microprocessors

 Computers based on a CPU with a complex


instruction set known as CISC (Complex Instruction
Set Computer) microprocessor
 Intel

 A RISC (Reduced Instruction Set Computer) has


limited set of instructions that it can perform quickly
 AMD

15
The Embedded Processor
 A programmable processor whose programming interface
is not accessible to the end-user of the product.
 The only user-interaction is through the actual application.
 Examples:
 Sharp PDA’s are encapsulated products with fixed
functionality.
 3COM Palm pilots were originally intended as
embedded systems. Opening up the programmers
interface turned them into more generic computer
systems.

16
Advantages of microprocessor:

 Programmability: Sophisticated functions can be provided


relatively easily in software.
 Performance: Advances in integrated circuit technology are
leading to faster and more “powerful” microprocessors.
 Cost-effectiveness: Microprocessors, because they are
multi-purpose, are manufactured in large quantities, which
tends to minimize their unit cost.
 Reliability: Integrated circuits are highly-reliable, solid state
devices. Microprocessors have no moving parts.
 Compactness: More and more functionality can be packed
onto a single microprocessor/microcontroller chip.

17
Disadvantages of Microprocessors
 Microprocessors have many complex features.
Numerous features are provided to satisfy a wide
variety of users.
 Microprocessors are completely unforgiving when
program errors are made. They will execute exactly
what is in the program, and have no “common sense”
or “intuition” about what the designer intended the
program to do.
 Debugging tools for microprocessor assembly
language programs are usually primitive compared to
the tools available for programs in high-level
languages.
18
Microprocessors Families
 Microprocessor manufacturers tend to release microprocessors in
families of increasing complexity and performance
 Intel Corp.:
 4004 (1971), 8008 (‘72), 8080 (‘74)
 x86 family: 8086 (‘78), 8088 (‘79), 80186 (‘82), 80286 (‘82), 80386
(‘85), 80486 (‘89), Pentium (‘93), Pentium II (‘97), Pentium III (‘99),
Pentium 4 (2000), Xeon (2001)
 IA-64 family: Itanium (2000),
 Motorola, Inc.:
 6800 family: 6800 (1974), 6809 (‘79), 68HC11 (‘84)
 M68000 family: 68000 (1979), 68010 (‘82), 68020 (‘84), 68030 (‘87),
68040 (‘89), 68332 (‘89), Power PC
 Microprocessor families make it easier to carry software over from
an older µP to the latest µP. “Upward compatibility” is an important
strategy for building customer loyalty. 19
6b.Open and closed loop system

20
Feedback and Control
Actuate Sense

Compute

 Control =
Sensing + Computation +Actuation

Feedback Principles
Robustness to Uncertainty
Design of Dynamics 21
What is Feedback?
 Miriam Webster:
the return to the input of a part of the
output of a machine, system, or
System 1
process (as for producing changes
in an electronic circuit that improve
performance or in an automatic
control device that provide self-
corrective action) [1920]
 Feedback = mutual interconnection of two System 2
(or more) systems
 System 1 affects system 2
 System 2 affects system 1
 Cause and effect is tricky; systems
are mutually dependent
System 1 System 2 Closed
 Feedback is ubiquitous in natural and Loop
engineered systems

Open
System 1 System 2 Loop

22
Magic of Feedback
 Feedback is used to regulate the value of a quantity in a system to a desired level, by measuring the error, i.e.,
difference between the desired value and the sensed value.

 Sometimes the decision is based on the instantaneous value of error, and sometimes is based on the history of
the error, and/or predictions on the future value of the error. Some times we use all three.

 The performance of a feedback system is measured based on the response to a “step” change in the reference, or
in tracking a sinusoid.

 Feedback regulation will work even when the “components” are uncertain.

 The down side of using feedback is that


 It can cause instability

 It makes the design more complicated

 The main components of a feedback loop are sensing, decision/computation, and actuation.
 We will use theory of differential equations, linear algebra and complex variables to analyze feedback systems.

23
Feedback (close-loop) Control

Controlled System
Controller
control manipulated
control Actuator
input variable
function

error
sample controlled
+ Monitor
- variable

reference

24
Control design methodology

Controller
Modeling Design
analytical Dynamic model Root-Locus PI
Control algorithm
system IDs Control

Satisfy

Requirement
Performance Specifications
Analysis

25
6c. Input and Output

26
Input/ Output Devices
 The input/output (I/O)  I/O devices are subclassified
devices of a computer are into the following categories;
not part of the CPU, but
are channels for  Secondary storage
communicating between devices: primarily disk
the external environment and tape drives
and the CPU.
 Input devices deliver  Peripheral devices: any
data and instructions input/output device that is
into the computer. attached to the computer
 Output devices provide
processing results.

27
Secondary Storage
 Secondary Storage is separate from primary storage and
the CPU, but directly connected to it. It provides the
computer with vastly increased space for storing and
processing large quantities of software and data.
 Secondary storage media include;
 Magnetic tape
 Magnetic disk
 Magnetic diskette
 Optical storage
 Digital videodisk (DVD)

28
Input Devices
Users can command the computer and communicate with it by
using one or more of the following input devices.
 Keyboard. The most common input device is the keyboard.
The keyboard is designed like a typewriter but with many
additional special keys.

 Mouse. The computer mouse is a hand-held device used to


point a cursor at a desired place on the screen.

 Touch Screen. The user activates an object on the screen


by touching it with his or her finger.

29
Input Devices (cont.)
 Touchpad. A touchpad or trackpad is a small, flat,
rectangular pointing device that is sensitive to pressure and
motion.

 Light Pen. A light pen is a special device with a light-


sensing mechanism, which is used to touch the screen.

 Joystick. Joysticks are used primarily at workstations that


can display dynamic graphics. They are also used in playing
video games. The joystick moves and positions the cursor at
the desired object on the screen.

30
Input Devices (cont.)
 Automated Teller Machines (ATMs). ATMs are interactive
input/output devices that enable people to obtain cash,
make deposits, transfer funds, and update their bank
accounts instantly from many locations.

 Electronic Form. In form interaction, the user enters data or


commands into predesignated spaces (fields) in a form. The
headings of the electronic form serve as a prompt for the
input.

 Whiteboard. A whiteboard is an area on a display screen


that multiple users can write or draw on.

31
Source Data Automation
 Source data automation captures data in computer-readable
form at the moment the data are created.

 Examples of Source Data Automation:


 Point-of-sale systems
 Optical bar-codes
 Code scanners
 Handwriting recognizers
 Voice recognizers
 Magnetic ink character readers (MICR)
 Digitizers
 Digital Cameras

32
Output Devices

33
Output Devices (cont.)
The output generated by a computer can be
transmitted
to the user via several devices and media.
 Monitors
 Impact

Printers
 Nonimpact

Printers
 Plotters

 Voice Output

34
6d. Modeling in frequency and time
domain

35
System Models
 Linear vs. non-linear (differential eqns)
 Deterministic vs. Stochastic
 Time-invariant vs. Time-varying
 Are coefficients functions of time?
 Continuous-time vs. Discrete-time
 System ID vs. First Principle

36
Dynamic Model
 Computer systems are dynamic
 Current output depends on “history”
 Characterize relationships among system variables
• Differential equations (time domain)

•• • •
a2 y (t ) + a1 y (t ) + a0 y (t ) = b1 u (t ) + b0u (t )
• Transfer functions (frequency domain)
Y(s) = G(s)U(s)
b1s + b0 c1 c2
G ( s) = = +
a2 s 2 + a1s + a0 s − p1 s − p2
• Block diagram (pictorial)

R(s) C(s) G(s) Y(s)


-
37
Model differential equation

• Error: E(t)=Us-U(t)
t

• Model (differential equation): U (t ) = ∫ ( R (τ ) − R (τ ))dτ


a c
τ =0

• Controller C? E(t)  Ra(t)

Ra(t)
- Us
C?
U(t)
CPU

Rc(t)
38
A Diverge to Math
System representations
 Three ways of system modeling

• Time domain: convolution; differential equations.


t

u(t) g(t) y(t) y (t ) = g (t ) * u (t ) = ∫ g (t − τ )u (τ )dτ


0

• s (frequency) domain: multiplication

U(s) G(s) Y(s) Y ( s ) = G ( s )U ( s )

• Block diagram: pictorial

s-domain is a simple & powerful “language” for control analysis


39
A Diverge to Math
Laplace transform
 Laplace transform of a signal f(t)

F ( s ) = L[ f (t )] = ∫ f (t )e − st
dt
0−

where s=+i is a complex variable.


• Laplace transform is a translation from time-
domain to
s-domain
• Differential
•• • equation  • Polynomial function
a2 y (t ) + a1 y (t ) + a0 y (t ) = b1 u (t ) + b0u (t )
b1s + b0
⇔Y ( s ) = •U ( s )
a2 s + a1s + a0
2
40
Laplace transform
 Basic translations
 Impulse function f(t)=(t)  F(s)=1
 Step signal f(t)=a•1(t)  F(s)=1/s
 Ramp signal f(t)=a•t  F(s)=a/s2
 Exp signal f(t)=eat F(s)=1/(s-a)
 Sinusoid signal f(t)=sin(at)  F(s)=a/(s2+a2)
 Composition rules
 Linearity L[af(t)+bg(t)] = aL[f(t)]+bL[g(t)]
 Differentiation L[df(t)/dt] = sF(s) – f(0-)
 Integration L[∫ tf(τ )dτ ] = F(s)/s

41
Transfer function

 Modeling a linear time-invariant (LTI) system


 G(s) = Y(s)/U(s)  Y(s) = G(s)U(s)

U(s) G(s) Y(s)

E.g., a second order system with poles p1 and


p2 b1s + b0 c1 c2
G(s) = = +
a2 s 2 + a1s + a0 s − p1 s − p2 42
Poles and Zeros
 The response of a linear time-invariant (LTI) system

bm s m + bm−1s m−1 + ... + b0


F ( s) =
an s n + an−1s n−1 + ... + a0
Πim=1 ( s − zi ) C1 C2 Cn
=K n = + + ... +
Πi =1 ( s − pi ) s − p1 s − p2 s − pn
n
⇒ f (t ) = ∑Ci e pit
i =1

{pi} are poles of the function and decide the system


behavior 43
Time response vs. pole location

Stable Unstable

•f’(t) = ept , p = a+bj


44
Block diagram

 A pictorial tool to represent a system based on transfer functions


and signal flows
 Represent a feedback control system

R(s) C(s) Go(s) Y(s)


-

C ( s )Go ( s )
Gc =
R(s) Gc(s) Y(s) 1 +C ( s )Go ( s )
Y ( s ) =Gc ( s ) R ( s )

45
Back to
Our utilization control example
• Error: E(t)=Us-U(t)
t

• Model (differential equation): U (t ) = ∫ ( R (τ ) − R (τ ))dτ


a c
τ =0

• Controller C? E(t) 
Ra(t)

Ra(t)
- Us
C?
U(t)
CPU

Rc(t)
46
Model
Transfer func. & block diag.
• CPU is modeled as an integrator
t
R ( s ) − Ra ( s ) 1
U (t ) = ∫ ( Ra (τ ) − Rc (τ ))dτ ⇔ U ( s ) = a ⇔ Go ( s ) =
τ =0 s s
 Inputs: reference Us(s) = Us/s; completion rate Rc(s)
 Close-loop system transfer functions
 Us(s) as input: G1(s) = C(s)Go(s)/(1+C(s)Go(s))
 Rc(s) as input: G2(s) = Go(s)/(1+C(s)Go(s))
 Output: U(s)=G1(s)Us/s+G2(s)Rc(s)

Rc(s)

Ra(s) Go
Us/s C(s) U(s)

47
Control design methodology

Controller
Modeling Design
analytical Dynamic model Root-Locus PI
Control algorithm
system IDs Control

Satisfy

Requirement
Performance Specifications
Analysis

48
A huge array of control orientated computers are available in the market
place.
A typical configuration includes:

 some form of central processing unit (to make the necessary computations)
 analogue to digital converters (to read the analogue process signals
into the computer).
(We call this the process of SAMPLING)
 digital to analogue converters (to take the desired control signals out
of the computer and present them in a form whereby they can be
applied back onto the physical process).
(We call this the process of SIGNAL RECONSTRUCTION)

49
What is frequency domain analysis ?

• Analyzes the signals in the frequency space.


• Primarily involves interpreting the spectrum.

50
Typical analysis device

51
Block diagram

52
Time and frequency domain
measurement

53
Measurement criteria

It is important to know your approximate device length and use this value
to set your timebase appropriately. In general more time points around your
device will help bring out small or closely spaced discontinuities and will
improve reciprocity and other factors relating to over all measurement quality. 54
 the most accurate measurement
is one with no variation and no
deviation (uncorrectable error)
from the PNA value. These two
components provide a framework
for discussing how normalizing at
various rise-times affect accuracy.

 The dramatic increase in peak-to-
peak variation in the figure is
mostly due to the fact that
averages have been set relatively
low at 16, at 1024 averages
(which would take significantly
longer for calibration &
measurement)
55
Types of Control Orientated Computer
Depending upon the application, one could use many different forms
of control computer. Typical control orientated computers are:
DCS (Distributed Control System) These are distributed computer
components aimed at controlling a large plant.
PLC (Programmable Logic Controller) These are special purpose
control computers aimed at simple control tasks - especially those
having many on-off type functions.
PC (Personal Computer) There is an increasing trend to simply use
standard PC’s for control. They offer many advantages including
minimal cost, flexibility and familiarity to users.
Embedded Controller. In special purpose applications, it is quite
common to use special computer hardware to execute the control
algorithm. Indeed, the reader will be aware that many commonly
used appliances (CD players, automobiles, motorbikes, etc.)
contain special microprocessors which enable various control 56
functions.
Questions ?

57
What is the next wave?

58

You might also like