Professional Documents
Culture Documents
Controller and Communication PDF
Controller and Communication PDF
Controller and Communication PDF
BITS Pilani
Pilani Campus
Transfer function
An op amp amplifies as per its gain
If G= 10--- A 2mV i/p 20 mV
However, for many systems the relationship between the output and
the input is in the form of a differential equation
Solve
Differential Solve
Equations Algebraic
Equations
Inverse
Laplace
Transform
The Laplace Transform
The Laplace Transform of a function, f(t), is defined as;
L[ f (t )] F ( s) f (t )e dt st
Eq A
0
j
1
1
L [ F ( s )] f (t ) F ( s ) ts
e ds Eq B
2 j j
*notes
The Laplace Transform
Transform Pairs:
f(t) F(s)
(t ) 1
1
u( t ) ____________________________________
f (t ) F ( s)
s
st 1
e
sa
1
t
s2
n n!
t
s n 1
The Laplace Transform
Transform Pairs:
f(t) F(s)
at 1
te
s a 2
n at n!
t e
( s a )n 1
w
sin( wt )
s2 w2
s
cos( wt )
s2 w2
The Laplace Transform
Transform Pairs:
f(t) F(s)
at w
e sin(wt )
(s a)2 w 2
sa
e at cos(wt )
(s a) w
2 2
s sin w cos
sin(wt )
s2 w2
s cos w sin
cos(wt )
s w
2 2
The Laplace Transform
Common Transform Properties:
f(t) F(s)
t s
f (t t )u (t t ), t 0 e o F (s)
0 0 0
t s
f (t )u (t t ), t 0 e o L[ f (t t )
0 0
e at f (t ) F (s a)
d n f (t )
s n F ( s ) s n 1 f (0) s n 2 f ' (0) ... s 0 f n 1 f (0)
dt n
dF ( s )
tf (t )
ds
t
1
f ( )d s
F (s)
0
Example . A force in newtons (N) is
given below. Determine the Laplace
transform.
f (t ) 50u (t )
50
F (s)
s
11
Example . A voltage in volts (V) starting
at t = 0 is given below. Determine the
Laplace transform.
2 t
v(t ) 5e sin 4t
4
V ( s ) L[v(t )] 5
( s 2) (4)
2 2
20 20
2 2
s 4s 4 16 s 4s 20
12
Example . Determine the inverse
transform of the function below.
200
V (s) 2
s 100
10
V ( s ) 20 2 2
s (10)
v(t ) 20sin10t
13
Controls
• Open loop- either on or off
• Closed loop- run based on the error(desired-actual)
Control modes
• Two step mode
• Proportional mode (P)
• Derivative mode (D)
• Integral mode (I)
• Combination mode (PI, PD, PID)
To: Y(1)
0.6
Kp low is high steady state
K=300
error
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
0.9
0.8
0.7
0.6
Amplitude
To: Y(1)
0.5
0.4
K=100
0.3
0.2
0.1
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (sec.)
Derivative control
Derivative control
TF= KD s
Small Small
KD Change Decrease Decrease Change
44
Tips for Designing a PID Controller
Lastly, please keep in mind that you do not need to implement all three controllers
(proportional, derivative, and integral) into a single system, if not necessary. For
example, if a PI controller gives a good enough response (like the above
example), then you don't need to implement derivative controller to the system.
Keep the controller as simple as possible.
Digital controller
A digital controller working
1 Samples the measured value.
2 Compares it with the set value and establishes the error.
3 Carries out calculations based on. the error value and stored values of
previous inputs and outputs to obtain the output signal.
4 Sends the output signal to the DAC.
5 Waits until the next sample time before repeating the cycle.
Analog vs digital controller
• In digital
• KP, KD, KI can be altered in software
• And even when the process is going on
In analog-
Separate controllers are required for controlling each output
• Digital
The primary benefit of digital signals is that they can be handled by
simple, standardized receivers and transmitters, and the signal can be
then dealt with in software (which is comparatively cheap to change).
• Bit Rate: It is the number of bits that are transmitted (sent/received)
per unit time.
• Clock skew and cross talk
Factors Limiting Parallel Communication
• Speed: Superficially, the speed of a parallel link is equal to bit
rate*number of channels. In practice, clock skew reduces the speed of
every link to the slowest of all of the links.
• Cable length: Crosstalk creates interference between the parallel
lines, and the effect only magnifies with the length of the
communication link. This limits the length of the communication
cable that can be used.
•
Advantages of serial communication
• Clock skew between different channels is not an issue (for un-
clocked asynchronous serial communication links).
• A serial connection requires fewer interconnecting cables (e.g.
wires/fibers) and hence occupies less space. The extra space allows
for better isolation of the channel from its surroundings.
• Crosstalk is not a much significant issue, because there are fewer
conductors in proximity.
• Cost
How data is communicated in serial
• Parallel from microcontroller-> Buffer (stored in parallel)- (MSB first or
LSB first)-Buffer--- another microcontroller
•;
• Synchronus
• SPI – Serial Peripheral Interface (Full duplex)
• I2C – Inter-Integrated Circuit (Half duplex)
UART and USART
• UART
• stands for Universal Asynchronous Receiver Transmitter, whereas
• UART
• stands for Universal Synchronous Asynchronous Receiver Transmitter.
RS 232 cables
Another wiring
RS-232
• Standard for transfer of characters across copper wire
• Produced by EIA
• Full name is RS-232-C
• RS-232 defines serial, asynchronous communication
• Serial - bits are encoded and transmitted one at a time (as opposed to parallel
transmission)
• Asynchronous - characters can be sent at any time and bits are not
individually synchronized
Start, Stop Bits
•z
RS-232 transmission example
74
Synchronic serial transmission
• SPI
• I2C
Serial Peripheral Interface
• What is it?
• Basic SPI
• Capabilities
Serial Peripheral Interface
http://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/
SPI_single_slave.svg/350px-SPI_single_slave.svg.png
• Protocol
• Uses 76
What is SPI?
• Serial bus protocol
• Fast, easy to use, and simple
• Very widely used
• Not “standardized”
77
SPI Basics
• A 4-wire communications bus
• Typically communicate across short distances
• Supports
• Single master
• Multiple slaves
• Synchronized
• Communications are “clocked”
78
SPI signal functions
79
Two bus configuration models