Signal & System
Signal & System
!"#$%&'()'*+"),%'*.+&/+0"/)+
-'1*0"(&+--1&+
2&'#"/)+".'%,3
/&,%/"$*/'",*
+3+%/&$%,3"-$4*,3
/),/".,&$+-"'.+&
/$#+5"!
11
(1.2)
1-2
(1.3)
where m and n takes on integer values, and ' ! and ' ) represent the horizontal and vertical sampling periods respectively
Mathematical Representation of Systems
In mathematical modeling terms a system is a function that
transforms or maps the input signal/sequence, to a new output signal/sequence
) " = &+ ^ ! " `
) > ' @ = &, ^ ! > ' @ `
(1.4)
Because we are at present viewing the system as a pure mathematical model, the notion of a system seems abstract and
distant
Consider the microphone as a system which converts sound
pressure from the vocal tract into an electrical signal
Once the speech waveform is in an electrical waveform format, we might want to form the square of the signal as a first
step in finding the energy of the signal, i.e.,
)" = >!"@
(1.5)
!"-61,&+&"-7-/+#
(1.6)
& ^ ((( `
)"
T"$-","4+*+&$%"-7-/+#
!"
(((
)"
80+,3
9:/':;
9'*.+&/+&
&%
15
A more complex system, depicted as a collection of subsystem blocks, is a system that records and then plays back an
audio source using a compact disk (CD) storage medium
16
Sinusoids
A general class of signals used for modeling the interaction of signals in systems, are based on the trigonometric functions sine and cosine
The general mathematical form of a single sinusoidal signal
is
x t = A cos Z 0 t + I
(2.1)
where A denotes the amplitude, Z 0 is the frequency in radians/s (radian frequency), and I is the phase in radians
The arguments of cos and sin are in radians
We will spend considerable time working with sinusoidal signals, and hopefully the various modeling applications presented in this course will make their usefulness clear
Example: x t = 10 cos > 2S 440 t 0.4S @
(2.2)
The function plots are identical in shape, with the sine plot
shifted to the right relative to the cosine plot by S e 2
This is expected since a well known trig identity states that
sin T = cos T S e 2
(2.3)
We also observe that both waveforms repeat every 2S radians; read period = 2S
Additionally the amplitude of each ranges from -1 and 1
A few key function properties and trigonometric identities
23
Property
Equation
Equivalence
sin T = cos T S e 2 or
cos T = sin T + S e 2
Periodicity
sin T = sin T
Number
Equation
sin T + cos T = 1
1
2
cos T = --- 1 + cos 2T
2
2
1
sin T = --- 1 cos 2T
2
(2.4)
This says that the slope at any point on the sine curve is the
cosine, and the slope at any point on the cosine curve is the
negative of the sine
Example: Prove Identity #6 Using Identities #1 and #2
If we add the left side of 1 to the right side of 2 we get
2
2cos T = 1 + cos 2T
1
2
or cos T = --- 1 + cos 2T
2
(2.5)
(2.6)
cos 9T + cos 7T
cos 8T = ------------------------------------2 cos T
(2.7)
or
25
1 u 1 = 1 j u j = 1
jT
= r T = z e j arg z
Example:: z = 2 + j5 , z = 4 j3 , z = 5 + j0 , z = 3 j3
27
28
z1 =
x 1 + y 1 (magnitude)
1
z 1 = tan y 1 e x 1 (angle)
z *1 = x 1 jy 1 (complex conjugate)
MATLAB is also consistent with all of the above, starting
with the fact that i and j are predefined to be 1
rectangular
polar
To convert from polar to rectangular we can use simple trigonometry to show that
x = r cos T
y = r sin T
(2.24)
x +y
1
(2.25)
Consider z 2 = 2 45q
In MATLAB we simply enter the numbers directly as a
complex exponential
>> z2 = 2*exp(j*45*pi/180)
z2 = 1.4142e+00 + 1.4142e+00i
210
Using the TI-89 we can directly enter the polar form using
the angle notation or using a complex exponential
211
Find z 1 z 2
>> z1*z2
ans = 5.9000e+01 - 3.7000e+01i
Find z 1 e z 2
>> z1/z2
ans =-6.9072e-01 - 1.9588e-01i
TI-89
Results
212
jT
= cos T + j sin T
(2.26)
Sinusoidal Signals
jT
jT
jT
e e +e
sin T = e--------------------and cos T = ---------------------2j
2
(2.27)
(2.28)
Sinusoidal Signals
A general sinusoidal function of time is written as
x t = A cos Z 0 t + I = A cos 2Sf 0 t + I
(2.29)
(2.30)
213
Sinusoidal Signals
1- = 0.025s
----40
= 25ms
Since this signal is periodic, the time interval between maxima, minima, and zero crossings, for example, are identical
Relation of Frequency to Period
A signal is periodic if we can write
x t + T0 = x t
(2.31)
(2.32)
cos Z 0 t + I + Z 0 T 0 = cos Z 0 t + I
From the periodicity property of cosine, equality is maintained if cos T r 2Sk = cos T , so we need to have
214
Sinusoidal Signals
2S
Z 0 T 0 = 2S T 0 = -----Z0
1or 2Sf 0 T 0 T 0 = --f0
(2.33)
215
Sinusoidal Signals
Period doubles as
frequency halves
A constant signal
as the oscillation
frequency is zero
216
Sinusoidal Signals
st =
s t
2t,
0dtd1e2
1-- 4 2t , 1 e 2 d t d 2
3
0,
otherwise
1
--- 4 2t
3
2t
-1
(2.34)
1--2
(2.35)
Sinusoidal Signals
x1 t =
2 t 2 ,
0 d t 2 d 1 e 2
1-- 4 2 t 2 , 1 e 2 d t 2 d 2
3
0,
otherwise
(2.36)
2t 4,
2dtd5e2
1-- 8 2t , 5 e 2 d t d 4
3
0,
otherwise
x1 t = s t 2
1
1
--- 8 2t
3
2t 2
5--2
-1
218
1
--2
Sinusoidal Signals
(2.37)
so
st + 1 =
2 t + 1 ,
0 d t + 1 d 1 e 2
1-- 4 2 t + 1 , 1 e 2 d t + 1 d 2
3
0,
otherwise
(2.38)
2t + 2,
1 d t d 1 e 2
1
--- 2 2t , 1 e 2 d t d 1
3
0,
otherwise
(2.39)
Sinusoidal Signals
x 0 t t 1 = A cos > Z 0 t t 1 @
= A cos > Z 0 t Z 0 t 1 @
(2.40)
(2.41)
I = 2Sf 0 t 1 = 2S ---- T 0
(2.42)
(2.43)
220
20
20 + 18
2
I = ------ S + 6S = ------------------ S = --- S = 0.6667S
3
3
3
(2.44)
Actual Delay of 10 ms
t (ms)
Blue = no delay
Red = 10 ms Delay
of
x t = A cos 2Sf 0 t + I
may be generated and plotted
This fact holds true whether we are using MATLAB, C, Mathematica, Excel, or any other computational tool
When t o nT s we need to realize that sample spacing needs
to be small enough relative to the frequency f 0 such that
when plotted by connecting the dots (linear interpolation),
the waveform picture is not too distorted
In Chapter 4 we will discuss sampling theory, which will
tell us the maximum sample spacing (minimum sampling
rate which is 1 e T s ), such that the sequence
x > n @ = x nT s can be used to perfectly reconstruct x t
from x > n @
For now we are more concerned with having a good plot
appearance relative to the expected sinusoidal shape
A reasonable plot can be created with about 10 samples per
period, that is with T s | 1 e 10f 0 = T 0 e 10
We will now consider several MATLAB example plots
>>
>>
>>
>>
>>
>>
>>
t = 0:1/(5*3):1; x = 15*cos(2*pi*3*t-.5*pi);
subplot(311)
plot(t,x,'.-'); grid
xlabel('Time in seconds')
ylabel('Amplitude')
t = 0:1/(10*3):1; x = 15*cos(2*pi*3*t-.5*pi);
subplot(312)
222
>>
>>
>>
>>
>>
>>
>>
>>
>>
plot(t,x,'.-'); grid
xlabel('Time in seconds')
ylabel('Amplitude')
t = 0:1/(50*3):1; x = 15*cos(2*pi*3*t-.5*pi);
subplot(313)
plot(t,x,'.-'); grid
xlabel('Time in seconds')
ylabel('Amplitude')
print -depsc -tiff sampled_cosine.eps
Amplitude
20
T
T s = -----05
10
0
5 Samples
10 per period
20
0.1
0.2
0.3
Amplitude
20
0.7
0.8
0.9
0.7
0.8
0.9
0.7
0.8
0.9
1T
T s = --------010
10
0
10
20
10 Samples
per period
0.1
0.2
0.3
20
Amplitude
0.4
0.5
0.6
Time in seconds
0.4
0.5
0.6
Time in seconds
T
T s = -----050
10
0
10 50 Samples
per period
20
0
0.1
0.2
223
0.3
0.4
0.5
0.6
Time in seconds
!"#$%&'()'$"*&*+,-%.(-*/(01-."2.
% Z! " + I
(2.44)
!
! " = #$
= # %&' Z ! " + I + %# '() Z ! " + I
(2.45)
3:3;
(2.46)
!"#$%&'()'$"*&*+,-%.(-*/(01-."2.
The result of (2.46) is what ultimately motivates us to consider the complex exponential signal
We can always write
& " = *+ ^ #$
% Z! " + I
` = # %&' Z ! " + I
(2.47)
!/
'0 $
%T 0
%T /
!. = '/ $
= '/ '0 $
!0
% T/ + T0
(2.48)
% Z! " + I
(2.49)
!"#$%&'()'$"*&*+,-%.(-*/(01-."2.
we can write
%I
! " = #$ $
where ( = #$
%Z ! "
= ($
%Z ! "
(2.50)
%I
%Z ! "
For positive frequency Z ! the rotation is counter clockwise, and for negative frequency the rotation is clockwise
#$
%&'()(*"
+,"-."/01
2"34)(*"
+,"-."/01
T"
!"
!"#$#%&'()*$+",+
3:34
T"
!"
T " = Z! " + I
!"#$%&'()'$"*&*+,-%.(-*/(01-."2.
3:3=
!"#$%&'()'$"*&*+,-%.(-*/(01-."2.
Time = 0.0000 s
Time = 0.1250 s
0
1
$
2
% S e 1
0
1
$
2
Time = 0.2500 s
1
0
1
%S e 1
Time = 0.7500 s
1
3:3>
Time = 0.8750 s
Time = 0.6250 s
Time = 0.3750 s
Time = 0.5000 s
%!
01-."2(?//,+,"*
% Z! " + I
$
+$
# %&' Z ! " + I = # -----------------------------------------------------
0
/ %Z ! " / 4 %Z! "
= --- ($
+ --- ( $
0
0
(2.51)
/
/ 4
= --- ! " + --- ! "
0
0
= *+ ^ ! " `
Phasor Addition
We often have to deal with multiple sinusoids. When the sinusoids are at the same frequency, we can derive a formula of the
form
-
(2.52)
,=/
At present we have only the trig identities to aid us, and this
approach becomes very messy for large N.
Phasor Addition Rule
We know that when complex numbers are added we must add
real and imaginary parts separately
Consider the sum
3:3@
01-."2(?//,+,"*
#, $
jI ,
( , { ( = #$
%I
(2.53)
,=/
,=/
The above is valid since the real and imaginary parts add
independently, that is
*+
,=/
(, =
*+ ^ (, `
(2.54)
,=/
% Z! " + I
(2.55)
Proof:
-
# , %&' Z ! " + I , =
,=/
+&55&6'78,&$79:;<4>
*+ ^ # , $
% Z! " + I,
,=/
%I , %Z ! "
= *+
#, $ $
, = /
%I
= *+ ^ #$ $
= *+ ^ #$
%Z ! "
% Z! " + I
= # %&' Z ! " + I
3:A6
01-."2(?//,+,"*
(2.56)
%.6S e /7!
%7!S e /7!
%.!S"
%.!S"
`
`
(2.57)
%.6S e /7!
( 0 = 950$
%7!S e /7!
(2.58)
(
I8()8#":(")'
so
( = ( / + ( 0 = 15;.<16 + %;5<9/9/
= /!57679$
3:A5
%<05;<!0S e /7!
(2.59)
01-."2(?//,+,"*
Finally,
& " = /!57< %&' .!S" + <05;<!0S e /7!
(2.60)
x1(t)
10
x2(t)
&"
x(t)
Amplitude
&/ "
0
B??;CD7$'
5
&0 "
10
0.06
0.04
0.02
0
0.02
Time in seconds
0.04
0.06
01-."2(?//,+,"*
(2.61)
%I ,
%I
(2.62)
and
-
&" =
#, %&' Z! " + I,
,=/
(2.63)
= # %&' Z ! " + I
Example:
& " = *+ .$
S
% 0S) ! " + ---
+ 6$
S
% 0S) ! " ---
+ . + %0 $
Find ( = ( / + ( 0 + ( .
From the given & " we observe that
S
% --0
( / = .$ ( 0 = 6$
3:AA
S
% --1
( . = . + %0
%0S) ! "
019.,B.("C(+1&(DE*,*8(F"2G
0
0
<56.66 + /51<16 "=") /51<16
---------------<56.66
%!500!1
019.,B.("C(+1&(DE*,*8(F"2G
When struck the vibration of the metal tine moves air molecules to produce a sound wave
Hookes law from physics (springs, etc.) says that the force to
restore the tine back to its original & = ! position is the same
as the original deformation (striking force), except for a sign
change,
. = ,&
(2.64)
019.,B.("C(+1&(DE*,*8(F"2G
1 &
. = /0 = / -------01"
(2.65)
1 &
/ -------0- = ,& "
1"
(2.66)
1
1 &"
--------------- = ----- Z ! '() Z ! "
0
1"
1"
0
= Z ! %&' Z ! "
We now plug this result into (2.66) to obtain
0
1 &
/ -------0- = ,& "
1"
(2.67)
/Z ! = ,
(2.68)
,
Z ! = r ---/
(2.69)
so it must be that
3:A4
019.,B.("C(+1&(DE*,*8(F"2G
(2.70)
Amplitude
1
0.5
0
0.5
1
Amplitude
H&&$7IJKJ;@:L7'
4
5
6
Time in seconds
10
0.5
0
0.5
1
3:A=
4.02
019.,B.("C(+1&(DE*,*8(F"2G
JJ@7MN78./O4$"/)457)./(/378&,G7P()0F
20
AA@7MN7'"0&/O7F4,$&/(0
Q)F",7F4,$&/(0'
20
40
60
R."7)&7')4,)B.P7),4/'("/)
80
3:A>
500
1000
1500
2000
2500
Frequency (Hz)
3000
3500
4000
019.,B.("C(+1&(DE*,*8(F"2G
EF"7F(3F",7F4,$&/(0'784O"7(/7)($"
Listening to Tones
To play the tuning fork sound on the PC speakers using Matlab we type
XX#%.30=AQ8H:::B
3:A@
D,#&(7,8*-%.H(I"2&(D1-*(F"2#E%-.
3:;6