8/9/2019 C6: Control System and Micro Microprocesor
1/58
1
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
8/9/2019 C6: Control System and Micro Microprocesor
2/58
8/9/2019 C6: Control System and Micro Microprocesor
3/58
3
1.0 Microprocessors
Microprocessor is technically defined as a single-chipcentral processing unit (CPU) for a programmablecomputer.
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 ofbinary instructions in a compiled computer program.
Compared to the CPU, the other parts of a computer arerelatively dumb and
require detailed attention from the CPU in order tofunction properly in the computer system.
8/9/2019 C6: Control System and Micro Microprocesor
4/58
4
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)
8/9/2019 C6: Control System and Micro Microprocesor
5/58
5
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 ignitionsystem, emission control system, anti-lock brakes,
dashboard display, entertainment system, navigation
system, etc. Modern cars often contain 20 or more
microprocessors.
8/9/2019 C6: Control System and Micro Microprocesor
6/58
6
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
8/9/2019 C6: Control System and Micro Microprocesor
7/58
7
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.
8/9/2019 C6: Control System and Micro Microprocesor
8/58
8
Typical Interface
+5V
FX1
J4
C220pF
J1
FX2
TEST
+5V
J2
J3
C120pF
SCL
0.1C3
1
2
3
4
XP1
20.0MHzZQ1
SDA
22GND
28SCL
21NC
20VCC
13 SMPL
10OSC2
7VCC
4FX1
1NC
11ST2
12CE2/BN
14CHRG
8GND
5 FX26
ST1
9OSC1
2RXD
3TXD/IS1
16SS/TEST
19SCK/N2
25M1/A1
15CE1/BW
17MOSI/N0
18MISO/N1
24M0/A023
MES/BS
27SDA/IS0
26M2/A2
USTI
IC1
8/9/2019 C6: Control System and Micro Microprocesor
9/58
9
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 . . .
8/9/2019 C6: Control System and Micro Microprocesor
10/58
10
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 of1.5 gigahertz (1.5 billion
hertz).
8/9/2019 C6: Control System and Micro Microprocesor
11/58
11
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 asystems behaviour so as to decide how one should change themanipulated variables to cause the system to respond in a desirablefashion.
The most natural way to make these computations is via some form ofcomputer.
8/9/2019 C6: Control System and Micro Microprocesor
12/58
12
Input
Devices
ProcessingData into
Information
Output
Devices
ControlControl
UnitUnit
Secondary Storage Devices
Arithmetic-Arithmetic-
LogicLogic
UnitUnit
Primary StoragePrimary Storage
UnitUnit
Central Processing Unit
Keyboard
MouseTouch Screen
Voice...
Monitor
Printer
Disks, Tapes, Optical Disks
Basic Microprocessors System
8/9/2019 C6: Control System and Micro Microprocesor
13/58
13
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 RandomAccess 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, andlevel 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.
8/9/2019 C6: Control System and Micro Microprocesor
14/58
14
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.
8/9/2019 C6: Control System and Micro Microprocesor
15/58
15
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
8/9/2019 C6: Control System and Micro Microprocesor
16/58
16
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 PDAs 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.
8/9/2019 C6: Control System and Micro Microprocesor
17/58
8/9/2019 C6: Control System and Micro Microprocesor
18/58
18
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.
8/9/2019 C6: Control System and Micro Microprocesor
19/58
19
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.
8/9/2019 C6: Control System and Micro Microprocesor
20/58
20
6b.Open and closed loop system
8/9/2019 C6: Control System and Micro Microprocesor
21/58
21
Feedback and Control
Sense
Compute
Actuate
Control =
Sensing + Computation +Actuation
Feedback Principles
Robustness to Uncertainty
Design of Dynamics
h i db k
8/9/2019 C6: Control System and Micro Microprocesor
22/58
22
What is Feedback? Miriam Webster:
the return to the input of a part of the
output of a machine, system, or
process (as for producing changesin an electronic circuit that improve
performance or in an automatic
control device that provide self-
corrective action) [1920]
Feedback = mutual interconnection of two
(or more) systems
System 1 affects system 2 System 2 affects system 1
Cause and effect is tricky; systems
are mutually dependent
Feedback is ubiquitous in natural and
engineered systems
System 2
System 1
System 2System 1
System 2System 1
Closed
Loop
Open
Loop
8/9/2019 C6: Control System and Micro Microprocesor
23/58
23
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 ofthe 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.
8/9/2019 C6: Control System and Micro Microprocesor
24/58
24
Feedback (close-loop) Control
Actuator
Monitor
reference
control
input
controlled
variable
manipulatedvariable
Controlled System
+
-
error
controlfunction
Controller
sample
8/9/2019 C6: Control System and Micro Microprocesor
25/58
25
Control design methodology
Controller
Design
Root-Locus PI
Control
RequirementAnalysis
Modeling
analyticalsystem IDs
Dynamic model Control algorithm
Performance Specifications
Satisfy
8/9/2019 C6: Control System and Micro Microprocesor
26/58
26
6c. Input and Output
8/9/2019 C6: Control System and Micro Microprocesor
27/58
27
Input/ Output Devices
The input/output (I/O)
devices of a computer are
not part of the CPU, but
are channels for
communicating between
the external environment
and the CPU.
Input devices deliver
data and instructions
into the computer.
Output devicesprovide
processing results.
I/O devices are subclassified
into the following categories;
Secondary storage
devices: primarily disk
and tape drives
Peripheral devices: any
input/output device that is
attached to the computer
8/9/2019 C6: Control System and Micro Microprocesor
28/58
28
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)
8/9/2019 C6: Control System and Micro Microprocesor
29/58
29
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 computermouse 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 screenby touching it with his or her finger.
8/9/2019 C6: Control System and Micro Microprocesor
30/58
30
Input Devices (cont.)
Touchpad.A touchpadortrackpadis 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 atthe desired object on the screen.
8/9/2019 C6: Control System and Micro Microprocesor
31/58
31
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 screenthat multiple users can write or draw on.
8/9/2019 C6: Control System and Micro Microprocesor
32/58
32
Source Data Automation
Source data automation captures data in computer-readableform 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
8/9/2019 C6: Control System and Micro Microprocesor
33/58
33
Output Devices
8/9/2019 C6: Control System and Micro Microprocesor
34/58
34
Output Devices (cont.)
Monitors
ImpactPrinters
Nonimpact
Printers Plotters
Voice Output
The output generated by a computer can betransmitted
to the user via several devices and media.
8/9/2019 C6: Control System and Micro Microprocesor
35/58
8/9/2019 C6: Control System and Micro Microprocesor
36/58
36
System Models
Linearvs. 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
8/9/2019 C6: Control System and Micro Microprocesor
37/58
37
Dynamic Model
Computer systems are dynamic Current output depends on history
Characterize relationships among system variables Differential equations (time domain)
)()()()()( 01012 tubtubtyatyatya +=++
Transfer functions (frequency domain)Y(s) = G(s)U(s)
2
2
1
1
01
2
2
01)(
ps
c
ps
c
asasa
bsbsG
+
=
++
+
=
Block diagram (pictorial)
C(s)R(s) Y(s)-
G(s)
8/9/2019 C6: Control System and Micro Microprocesor
38/58
38
Model differential equation
U(t)
Ra(t)
C?
Us-
CPU
Rc(t)
Model (differential equation): =
=t
ca dRRtU0
))()(()(
Error: E(t)=Us-U(t)
Controller C? E(t) Ra(t)
8/9/2019 C6: Control System and Micro Microprocesor
39/58
39
Three ways of system modeling
A Diverge to MathSystem representations
u(t) g(t) y(t) ==
t
dutgtutgty0
)()()(*)()(
Time domain: convolution; differential equations.
U(s) G(s) Y(s) )()()( sUsGsY =
s (frequency) domain: multiplication
s-domain is a simple & powerful language for control analysis
Block diagram: pictorial
8/9/2019 C6: Control System and Micro Microprocesor
40/58
40
Laplace transform of a signal f(t)
A Diverge to MathLaplace transform
==0
)()]([)( dtetftfLsF st
where s=+i is a complex variable. Laplace transform is a translation from time-domain to
s-domain Differential equation Polynomial function
)()()()()( 01012 tubtubtyatyatya +=++
)()(01
2
2
01sU
asasa
bsbsY
++
+
=
8/9/2019 C6: Control System and Micro Microprocesor
41/58
41
Basic translations
Impulse function f(t)=(t) F(s)=1 Step signal f(t)=a1(t) F(s)=1/s
Ramp signal f(t)=at F(s)=a/s2
Exp signal f(t)=eatF(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
Laplace transform
8/9/2019 C6: Control System and Micro Microprocesor
42/58
42
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)
2
2
1
1
01
2
2
01)(
ps
c
ps
c
asasa
bsbsG
+
=
++
+=
E.g., a second order system withpoles p1 and
p2
8/9/2019 C6: Control System and Micro Microprocesor
43/58
43
Poles and Zeros
The response of a linear time-invariant (LTI) system
=
=
=
=
++
+
=
=
+++
+++=
n
i
tp
i
n
n
i
n
i
i
m
i
n
n
n
n
m
m
m
m
i
eCtf
ps
C
ps
C
ps
C
ps
zsK
asasa
bsbsbsF
1
2
2
1
1
1
1
0
1
1
0
1
1
)(
...)(
)(
...
...)(
{pi} arepoles of the function and decide the system
behavior
8/9/2019 C6: Control System and Micro Microprocesor
44/58
44
Time response vs. pole location
f(t) = ept, p = a+bj
UnstableStable
8/9/2019 C6: Control System and Micro Microprocesor
45/58
45
Block diagram
A pictorial tool to represent a system based on transfer functions
and signal flows
Represent a feedback control system
C(s)R(s) Y(s)-
Go(s)
R(s) Y(s)Gc(s)
)()()(
)()(1
)()(
sRsGsY
sGsC
sGsC
G
c
o
o
c
=
+=
8/9/2019 C6: Control System and Micro Microprocesor
46/58
46
Back toOur utilization control example
U(t)
Ra(t)
C?
Us-
CPU
Rc(t)
Model (differential equation): =
=t
ca dRRtU0
))()(()(
Error: E(t)=Us-U(t)
Controller C? E(t) Ra(t)
8/9/2019 C6: Control System and Micro Microprocesor
47/58
47
ModelTransfer func. & block diag.
Inputs: reference Us(s) = U
s/s; completion rate R
c(s)
Close-loop system transfer functions U
s(s) as input: G
1(s) = C(s)G
o(s)/(1+C(s)G
o(s))
Rc(s) as input: G
2(s) = G
o(s)/(1+C(s)G
o(s))
Output: U(s)=G1(s)U
s/s+G
2(s)R
c(s)
ssG
s
sRsRsUdRRtU o
aa
t
ca
1)(
)()()())()(()(
0
=
== =
CPU is modeled as an integrator
Rc(s)
GoUs/sRa(s)
U(s)C(s)
8/9/2019 C6: Control System and Micro Microprocesor
48/58
8/9/2019 C6: Control System and Micro Microprocesor
49/58
49
A huge array of control orientated computers are available in the marketplace.
A typical configuration includes:
some form of central processing unit (to make the necessary computations)
analogue to digital converters (to read the analogue process signalsinto the computer).
(We call this the process ofSAMPLING)
digital to analogue converters (to take the desired control signals outof the computer and present them in a form whereby they can beapplied back onto the physical process).
(We call this the process ofSIGNAL RECONSTRUCTION)
8/9/2019 C6: Control System and Micro Microprocesor
50/58
50
What is frequency domain analysis ?
Analyzes the signals in the frequency space.
Primarily involves interpreting the spectrum.
8/9/2019 C6: Control System and Micro Microprocesor
51/58
51
Typical analysis device
8/9/2019 C6: Control System and Micro Microprocesor
52/58
52
Block diagram
i d f d i
8/9/2019 C6: Control System and Micro Microprocesor
53/58
53
Time and frequency domain
measurement
M t it i
8/9/2019 C6: Control System and Micro Microprocesor
54/58
54
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.
8/9/2019 C6: Control System and Micro Microprocesor
55/58
55
the most accurate measurementis one with no variation and nodeviation (uncorrectable error)from the PNA value. These twocomponents provide a frameworkfor discussing how normalizing atvarious rise-times affect accuracy.
The dramatic increase in peak-to-peak variation in the figure ismostly due to the fact that
averages have been set relativelylow at 16, at 1024 averages(which would take significantlylonger for calibration &measurement)
Types of Control Orientated Computer
8/9/2019 C6: Control System and Micro Microprocesor
56/58
56
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 thosehaving many on-off type functions.
PC (Personal Computer) There is an increasing trend to simply use
standard PCs 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
functions.
8/9/2019 C6: Control System and Micro Microprocesor
57/58
57
Questions ?Questions ?
Wh i h ?
8/9/2019 C6: Control System and Micro Microprocesor
58/58
58
What is the next wave?