lecture 1: signals & systems what is a signal? · pdf fileideal environment for...
TRANSCRIPT
15/03/1439
1
1/20
Lecture 1: Signals & Systems
(1) Systems, signals, mathematical models. Continuous-time and discrete-time signals and systems. Energy and power signals. Linear systems. Examples for use throughout the course, introduction to Matlab and Simulink tools
Specific Objectives:
• Begin our development of the analytical frame work for signalsand systems by introducing their mathematical description andrepresentation.
• Introduce, using examples, what is a signal and what is a system
• Why mathematical models are appropriate
• What are continuous-time and discrete-time representations and how are they related
• Brief introduction to Matlab and Simulink2/20
What is a Signal?
• A signal is a pattern of variation of some form to describe a
wide Varity of phenomena.
• Signals are variables that carry information
• Are functions of one or more independent variables.
Electrical signals
Voltages and currents in a circuit
Acoustic signals
Acoustic pressure (sound) over time
Mechanical signals
Velocity of a car over time
Video signals
Intensity level of a pixel (camera, video) over time
3/20
How is a Signal Represented?
Mathematically, signals are represented as a function of one or
more independent variables.
For instance a black & white video signal intensity is dependent
on x, y coordinates and time t f(x,y,t)
On this course, we shall be exclusively concerned with signals
that are a function of a single variable: time
t
f(t)
4/20
Example: Voltages and currents in RC circuit
A simple RC circuit with source voltage Vs and Capacitor voltage Vc
1)()()(
)(1
)(1)(
)()(
)()()(
RCtvtvdt
tdv
tvRC
tvRCdt
tdv
dt
tdvCti
R
tvtvti
scc
scc
c
cs
•The signals vc and vs are patterns of variation over time• Step (signal) vs at t=1
• RC = 1
• First order (exponential)
response for vc
vs,
vc
t
15/03/1439
2
5
Mathematical Representation
An Automobile responding to an applied force F(t) from
the engine and to the retarding frictional force *v(t).
F(t)
*v(t)
6/20
– Example: Velocity of a car over time
7/20
Example: Acoustic pressure (sound) over time
• Signal occurred by using microphone to sense variation in acoustic pressure as a function of time.
• Different sounds corresponding to different variation.
• “Should we chase”
8
Signal function of time (eg. Speech & dual-tone)
15/03/1439
3
9
t
X(t)
Discrete Signal
10/20
Example: Video Signals
• Brightness or light intensity as a function of spatial Parameters X and Y.
y
x
11
Picture (2-D Signal)
12/20
Continuous & Discrete-Time Signals
Continuous-Time Signals X(t) Independent variable is continuous (t) , t is real.
Most signals in the real world are continuous time, as the scale is infinitesimally fine. Eg. voltage, velocity,
Denote by x(t), where the time interval may be bounded (finite) or infinite
Discrete-Time Signals X[n] Independent variable is discrete (n) , n is an Integer.
Some real world and many digital signals are discrete time, as they are sampled
E.g. pixels, daily stock price (anything that a digital computer processes)
Denote by x[n] n is an integer value.
Sequence
Sampled continuous signal A very important class of signals can be obtained from sampling of
continuous signals.
x[n] =x(nk) where k is sample time
15/03/1439
4
13/20
Continuous & Discrete-Time Signals
14/20
Sampling
x[n] =x(nk) where k is sample time
X(t) has infinite number of values in the interval [0,1]
Such a signal cannot be stored in a finite digital
memory device such as a computer or CD-ROM.
to be stored, it must approximated by a signal with a
finite domain
A common way to approximate a function with a
continuous domain like Voice and Image by a
function with a finite domain is by uniformly
sampling its continuous domain.
15/20
Sampling
• a 2-second long domain of
Voice
• [-1,1], 10,000 times per
second (i.e. at a frequency of 10
kHz) sampling period
• Sampling frequency.
Transformation of Independent Variable.
the transformation of a signal is a
central concept in signal & system.
Aircraft control system:-
Input signal correspond to pilot action
These action are transformed by electrical & mechanical system
of the aircraft to changes to aircraft position control.
finally these changes affect the dynamics & kinematics such as
the aircraft velocity and heading.
High fidelity audio system
Input signal representing music recorded on cassette or CD.
This signal is modified or transformed to enhance the desirable
characteristics.
Such as, remove recording noise and to balance the several
components of the signal e.g. treble and bass.
15/03/1439
5
Transformation of Dependent variable Transformation of independent variable (time)
Time Shift Shifting right or lagging signal x(t)
15/03/1439
6
Time Reverse Time Reverse
Time ScaleTime scaling of continuous signal
•x(t)
•x(2t)
•x(t/2)
•t
•t
•t
•Compression a>1
•Linearly stretching a<1
15/03/1439
7
Time Scale
26
Linear Transformations
)()( batxty
27
Linear Transformations
)()( batxty Examples
x[n]
x[n-5]
15/03/1439
8
Examples
x[n]
x[n+5]
Examples
x[n]
x[-n+5]
31/25
“Electrical” Signal Energy & Power
It is often useful to characterise signals by measures such as
energy and power
The instantaneous power of a resistor is:
The total energy expanded over the interval [t1, t2] is:
and the average energy is:
How are these concepts defined for any continuous or discrete
time signal?
)(1
)()()( 2 tvR
titvtp
2
1
2
1
)(1
)( 2t
t
t
tdttv
Rdttp
2
1
2
1
)(11
)(1 2
1212
t
t
t
tdttv
Rttdttp
tt
32/25
Generic Signal Energy and Power
Total energy of a continuous signal x(t) over [t1, t2] is:
where |.| denote the magnitude of the (complex) number.
Similarly for a discrete time signal x[n] over [n1, n2]:
By dividing the quantities by (t2-t1) and (n2-n1+1),
respectively, gives the average power, P
Note that these are similar to the electrical analogies
(voltage), but they are different, both value and dimension.
2
1
2)(
t
tdttxE
2
1
2][
n
nnnxE
15/03/1439
9
33/25
Energy and Power over Infinite Time
For many signals, we’re interested in examining the power and energy over
an infinite time interval (-∞, ∞). These quantities are therefore defined by:
If the sums or integrals do not converge, the energy of such a signal is
infinite
Two important (sub)classes of signals
1. Finite total energy (and therefore zero average power)
2. Finite average power (and therefore infinite total energy)
Signal analysis over infinite time, all depends on the “tails” (limiting behaviour)
dttxdttxE
T
TT
22)()(lim
n
N
NnN nxnxE22
][][lim
T
TT dttx
TP
2)(
2
1lim
N
NnN nxN
P2
][12
1lim
Signals DTfor |][|
Signals CTfor |)(|
2
2
nx
dttx
E
Signals DTfor |][|12
1lim
Signals CTfor |)(|2
1lim
2
2
N
N
T
T
nxNN
dttxTT
P
34
Power vs. Energy Signals (2)
1. Energy Signals: have finite total energy for theentire duration of the signal. As a consequence, totalpower in an energy signal is 0.
2. Power Signals: have non-zero (Finite) power
over the entire duration of the signal. As a
consequence, the total energy in a power signal is
infinite.
0 PE
0 PE
Finite total energy signal.
-5 < n <+5, x[n] = 1otherwise x[n]=0. ENERGY =11.
02
lim,
TP
T
Finite average power
x[n] = 4, for all n.ENERGY =infinite, Power = 16
,0 P
15/03/1439
10
Neither power nor energy are finite
X[n]=0.5n, for all n.
,P
Periodic Signals
][][&)()( mNnxnxmTtxtx 2p 2p
Examples:
cos(t+2p) = cos(t) & sin(t+2p) = sin(t)
Are both periodic with period 2p
Signal is not changed after a time shift of T sec.
Ideal LC Circuit without resistance.
Ideal Mechanical system with out frictional loss.
39/25
Does x(t)=a is periodic and what is the fundamental period ?
40/25
15/03/1439
11
41/25
Even and Odd Signals
)()( txtx
)()( txtx
42/25
Odd and Even Signals
43/25
Right and left sided signals
EE-2027 SaS, L2 44/25
Introduction to Matlab
Simulink is a package that runs inside the Matlab environment.
Matlab (Matrix Laboratory) is a dynamic, interpreted, environment
for matrix/vector analysis
User can build programs (in .m files or at command line) C/Java-
like syntax
Ideal environment for programming and analysing discrete
(indexed) signals and systems
15/03/1439
12
EE-2027 SaS, L2 45/25
Basic Matlab Operations
>> % This is a comment, it starts with a “%”
>> y = 5*3 + 2^2; % simple arithmetic
>> x = [1 2 4 5 6]; % create the vector “x”
>> x1 = x.^2; % square each element in x
>> E = sum(abs(x).^2); % Calculate signal energy
>> P = E/length(x); % Calculate av signal power
>> x2 = x(1:3); % Select first 3 elements in x
>> z = 1+i; % Create a complex number
>> a = real(z); % Pick off real part
>> b = imag(z); % Pick off imaginary part
>> plot(x); % Plot the vector as a signal
>> t = 0:0.1:100; % Generate sampled time
>> x3=exp(-t).*cos(t); % Generate a discrete signal
>> plot(t, x3, ‘x’); % Plot points
EE-2027 SaS, L2 46/25
Other Matlab Programming Structures
Loops
for i=1:100
sum = sum+i;
end
Goes round the for loop 100 times, starting at i=1 and finishing at i=100
i=1;
while i<=100
sum = sum+i;
i = i+1;
end
Similar, but uses a while loop instead of a for loop
Decisions
if i==5
a = i*2;
else
a = i*4;
end
Executes whichever branch is appropriate depending on test
switch i
case 5
a = i*2;
otherwise
a = i*4;
end
Similar, but uses a switch
EE-2027 SaS, L2 47/25
Matlab Help!
These slides have provided a rapid introduction to Matlab
• Mastering Matlab 6, Prentice Hall,
• Introduction to Matlab (on-line)
Lots of help available
• Type help in the command window or help operator. This displays the help associated with the specified operator/function
• Type lookfor topic to search for Matlab commands that are related to the specified topic
• Type helpdesk in the command window or select help on the pull down menu. This allows you to access several, well-written programming tutorials.
• comp.soft-sys.matlab newsgroup
Learning to program (Matlab) is a “bums on seats” activity. There is no substitute for practice, making mistakes, understanding concepts