Beruflich Dokumente
Kultur Dokumente
Chapter
Signal Models . . . . . . . . . . . . . . . . . . . . . .
2-3
2.1.1
2-3
2.1.2
2-3
2.1.3
2-4
2.1.4
Singularity Functions . . . . . . . . . . . . . . .
2-7
2.2
2.3
2.4
2.5
2.4.1
2.4.2
2.4.3
2.4.4
2.4.5
2.4.6
2.4.7
2-23
2-1
2.6
2.7
2.5.2
2.5.3
2.5.4
2.5.5
2.5.6
2.5.7
2.6.2
2.6.3
Stability . . . . . . . . . . . . . . . . . . . . . . 2-76
2.7.2
2.7.3
Causality . . . . . . . . . . . . . . . . . . . . . 2-77
2.7.4
2.7.5
2.7.6
2.7.7
2.7.8
2.7.9
2.9
2-2
2.1
Signal Models
2.1.1
2.1.2
2-3
2.1.3
1<t <1
x.t / D Re x.t
Q /
D Re A cos.!0t C / C jA sin.!0t C /
D A cos.!0t C /
We can also turn this around using the inverse Euler formula
x.t / D A cos.!0t C /
1
1
D x.t
Q / C xQ .t /
2
2
j.!0 t C/
Ae
C Ae
D
2
j.!0 tC/
The frequency spectra of a real sinusoid is the line spectra plotted in terms of the amplitude and phase versus frequency
ECE 5625 Communication Systems I
2-5
=8/
=2/ D sin.!0t /, so
5=8/
Amplitude
12
2
f (Hz)
-100
-10
100
10
5/8
Phase
/3
f (Hz)
-/3
-5/8
2.1.4
Singularity Functions
.t
t0/ D 0; t t0
2-7
Properties:
1. .at / D .t /=jaj
2. . t / D .t /
3. Sifting property special cases
8
t1 < t0 < t2
Z t2
<x.t0/;
x.t /.t t0/ dt D 0;
otherwise
t1
:undefined; t0 D t1 or t0 D t2
4. Sampling property
x.t /.t
t0/ D x.t0/.t
t0/
d
x.t
/
D . 1/n
n
dt tDt0
jt j
otherwise
Test functions for the unit impulse .t/: (a) .t/, (b) 1 .t/
t <0
Z t
<0;
u.t /
. / d D 1;
t >0
:undefined; t D 0
also
.t / D
du.t /
dt
2-9
x.t / 0.t / dt
1
d .t /
D
.t C /
dt
2
.t
/
2-10
2.2
Signal Classifications
From circuits and systems we know that a real voltage or current waveform, e.t / or i.t / respectively, measured with respective a real resistance R, the instantaneous power is
P .t / D e.t /i.t / D i 2.t /R W
On a per-ohm basis, we obtain
p.t / D P .t /=R D i 2.t / W/ohm
The average energy and power can be obtain by integrating
over the interval jt j T with T ! 1
Z T
i 2.t / dt Joules/ohm
E D lim
T !1
T
Z T
1
P D lim
i 2.t / dt W/ohm
T !1 2T
T
In system engineering we take the above energy and power
definitions, and extend them to an arbitrary signal x.t /, possibly complex, and define the normalized energy (e.g. 1 ohm
system) as
E D lim
T
2
jx.t /j dt D
T !1
T
Z T
1
P D lim
jx.t /j2 dt
T !1 2T
T
jx.t /j2 dt
2-11
Signal Classes:
1. x.t / is an energy signal if and only if 0 < E < 1 so that
P D0
2. x.t / is a power signal if and only if 0 < P < 1 which
implies that E ! 1
Z 1
2 2t 1
A
e
2
ED
Ae t dt D
2 0
0
A2
D
2
For D 0 we just have x.t / D Au.t / and E ! 1
For < 0 we also have E ! 1
In summary, we conclude that x.t / is an energy signal for >
0
For > 0 the power is given by
1 A2
P D lim
1
T !1 2T 2
D0
For D 0 we have
1
A2
2
P D lim
A T D
T !1 2T
2
2-12
1<t <1
The signal energy is infinite since upon squaring, and integrating over one cycle, T0 D 2=!0, we obtain
Z N T0=2
A2 cos2.!0t C / dt
E D lim
N !1
D lim N
N !1
N T0 =2
Z T0=2
A2 cos2.!0t C / dt
T0 =2
2 Z T0 =2
A
1 C cos.2!0t C 2 / dt
N !1
2
T0 =2
A2
D lim N
T0 ! 1
N !1
2
D lim N
2-13
2.3
3
X
ci aEi
i D1
where
aEi AE
; i D 1; 2; 3
ci D
jE
ai j2
is the component of AE in the aEi direction
We now extend the above concepts to a set of orthogonal functions f1.t /; 2.t /; : : : ; N .t /g defined on to t t0 C T ,
where the dot product (inner product) associated with the ns
is
Z t0CT
m.t /; n.t / D
m.t /n.t / dt
t0
(
cn; n D m
D cnmn D
0; n m
The ns are thus orthogonal on the interval t0; t0 C T
Moving forward, let x.t / be an arbitrary function on t0; t0CT ,
and consider approximating x.t / with a linear combination of
ns, i.e.,
x.t / ' xa .t / D
N
X
Xnn.t /; t0 t t0 C T;
nD1
2-15
N D
x.t / xa .t / dt;
T
where
R
T
jx.t /j2 dt
N D
T
N
X
nD1
cn Xn
2
Z
N
X
1
.t
/
dt
x.t
/
n
c
n
T
nD1
2
Z
1
x.t /n .t / dt
cn T
Note that the first two terms are independent of the Xns
and the last term is nonnegative (missing steps are in text
homework problem 2.14)
We conclude that N is minimized for each n if each element
of the last term is made zero by setting
Z
1
Xn D
x.t /n.t / dt Fourier Coefficient
cn T
This also results in
N
2-16
min
Z
D
T
jx.t /j2 dt
N
X
cnjXnj2
nD1
N !1
for
R
T
1
X
Xnn.t /
nD1
Xn D
1
cn
Z
T
x.t /n.t / dt
nD1
2-17
1(t)
x(t)
0.75
0.75
0.5
0.5
0.25
0.25
0.2
0.4
0.6
0.8
-0.25
-0.25
-0.5
-0.5
-0.75
-0.75
-1
-1
2(t)
0.4
0.6
0.8
0.2
0.4
0.6
0.8
3(t)
0.75
0.75
0.5
0.5
0.25
0.25
0.2
0.2
0.4
0.6
0.8
-0.25
-0.25
-0.5
-0.5
-0.75
-0.75
-1
-1
D4
cos.2 t / dt D sin.2 t / D
0
Z0 3=4
3=4
1
2
X2 D 2
cos.2 t / dt D sin.2 t / D
1=4
1=4
Z 1
1
2
2
X3 D 4
cos.2 t / dt D sin.2 t / D
3=4
3=4
1
x(t)
0.75
2/
xa(t)
0.5
0.25
0.2
0.4
0.6
0.8
-0.25
-0.5
-2/
-0.75
-1
Functional approximation
ECE 5625 Communication Systems I
2-19
x.t /
N D
nD1
2
jx.t /j dt
T
1
D
2
1
D
2
2.4
Xnn.t / dt
3
X
cnjXnj2
nD1
1 2 2 1 2 2
4
2
2
2
D 0:0947
1 2 2
4
Fourier Series
2.4.1
proof of orthogonality
Z t0CT0
Z t0CT0
t
2 t
j m 2
j
n
j 2
.m n/t
T0
T0
m.t /; n.t / D
e
e
dt D
e T0
dt
t0
8t0R
t0 CT0
dt;
mDn
<Rt0
t0 CT0
D
cos2.m n/t =T0
t
0
1
X
Xne j n!0t ; t0 t t0 C T0
nD 1
1
where Xn D
T0
Z
x.t /e
j n!0 t
T0
2-21
<2;
Xn D 14 ;
:0;
nD0
n D 2
otherwise
hv.t /i D lim
v.t / dt
T !1 2T
T
Note that
hav1.t / C bv2.t /i D ahv1.t /i C bhv2.t /i;
where a and b are arbitrary constants
If v.t / is periodic, with period T0, then
Z
1
hv.t /i D
v.t / dt
T0 T 0
The Fourier coefficients can be viewed in terms of the time
average operator
Let v.t / D x.t /e
that
j n!0 t
using e
j
D cos
j sin , we find
2-22
2.4.2
2. jXnj D jX nj
3. Xn D
proof
Z
1
x.t /e j n!0t dt
Xn D
T0 T0
Z
1
D
x.t /e j. n/!0t dt D X
T0 T0
3. If x.t T0=2/ D
2-23
t0 DT0 =2
t0
1
x.t /e j n!0t dtC
T0
t0 CT0
j n!0 t 0
x.t 0/e
dt 0
t0 CT0 =2
x.t /e
j n!0 t
dt
t0
1
C
T0
D 1
t0 CT0 =2
tCT0 =2
x.t T0=2/ e
t0
dt
x.t/
j n!0 T0 =2
t0 CT0 =2
1 Z
T0
x.t /e
j n!0 t
dt
t0
j n
2;
n odd
0;
n even
We thus see that the even indexed Fourier coefficients are indeed zero under odd half-wave symmetry
2-24
2.4.3
Trigonometric Form
x.t / D
Xne j n!0t
nD 1
D X0 C
1
X
Xne j n!0t C X ne
j n!0 t
nD1
1
X
jXnje
nD1
1
X
D X0 C 2
j n!0 t CXn
C jXnje
j n!0 t CXn
nD1
since cos.x/ D .e jx C e
jx
/=2
1
X
nD1
An cos.n!0t / C
1
X
sin u sin v, it
Bn sin.n!0t /
nD1
where
An D 2hx.t / cos.n!0t /i
Bn D 2hx.t / sin.n!0t /i
ECE 5625 Communication Systems I
2-25
2.4.4
Parsevals Theorem
jx.t /j2 dt D
T0
D X02 C 2
1
X
jXnj2
nD 1
1
X
jXnj2
.W/
nD1
2.4.5
Line Spectra
X
Single-sided
() X0 C 2
jXnj cos2.nf0/t C Xn
mag. and phase
nD1
2-26
DoubleSided
f
-2f0
-2f0
f
2f0
2f0
SingleSided
f
2f0
f
2f0
2-27
...
t
-2T0
-T0
T0 T0 +
T0 0
T0
j 2.nf0/ 0
A 1 e j 2.nf0/
D
T0
j 2.nf0/
A e j.nf0/ e j.nf0/
D
e j.nf0/
T0
.2j /.nf0/
A sin.nf0/
D
e j.nf0/
T0
.nf0/
To simplify further we define
sinc.x/ D
2-28
sin.x/
x
ECE 5625 Communication Systems I
Finally,
Xn D
A
sinc.nf0 /e
T0
j.nf0 /
; n D 0; 1; 2; : : :
sinc.nfo / > 0
< .nf0/;
Xn D
.nf0/ C ; nf0 > 0 and sinc.nf0 / < 0
2-29
f0 = 1, t = 0.125
At f0 = 0.125
1 t =8
Phase slope = -p f t
= -0.125 p f
2.4.6
Numerical Calculation of Xn
Here we consider a purely numerical calculation of the Xk coefficients from a single period waveform description of x.t /
In particular, we will use MATLABs fast Fourier transform
(FFT) function to carry out the numerical integration
By definition
1
Xk D
T0
2-30
Z
x.t /e
j 2kf0 t
dt; k D 0; 1; 2; : : :
T0
ECE 5625 Communication Systems I
j k2.nf0 /T0 =N
T0
; k D 0; 1; 2; : : :
N
j 2k n
N
; k D 0; 1; 2; : : :
Note that the above must be evaluated for each Fourier coefficient of interest
Also note that the accuracy of the Xk values depends on the
value of N
For k small and x.t / smooth in the sense that the harmonics rolloff quickly, N on the order of 100 may be adequate
For k moderate, say 550, N will have to become increasingly larger to maintain precision in the numerical
integral
Calculation Using the FFT
The FFT is a powerful digital signal processing (DSP) function, which is a computationally efficient version of the discrete Fourier transfrom (DFT)
ECE 5625 Communication Systems I
2-31
N
X1
xne
j 2k n=N
; k D 0; 1; 2; : : : ; N
nD0
N
1
X k; k D 0; 1; : : : ;
N
2
N 1
1
1 X
x.nT /e
' X k D
N
N nD0
N 1
1 X
x.nT /e
D
N nD0
since e
j 2N n=N
De
j 2 n
j 2.N k/n
N
j 2. k/n
N
D X N
D1
In summary
(
Xk '
X k=N;
X N
k=N;
0 k N=2
N=2 k < 0
1/=N g
1/2
tr
+ tr
t
T0
Shown above is one period of a finite rise and fall time pulse
train
We will numerically compute the Fourier series coefficients of
this signal using the FFT
The Python function trap_pulse was written to generate one
period of the signal using N samples
def trap_pulse(N,tau,tr):
"""
xp = trap_pulse(N,tau,tr)
Mark Wickert, January 2015
"""
n = arange(0,N)
t = n/N
xp = zeros(len(t))
# Assume tr and tf are equal
T1 = tau + tr
# Create one period of the trapezoidal pulse waveform
for k in n:
if t[k] <= tr:
xp[k] = t[k]/tr
elif (t[k] > tr and t[k] <= tau):
ECE 5625 Communication Systems I
2-33
xp[k] = 1
elif (t[k] > tau and t[k] < T1):
xp[k] = -t[k]/tr + 1 + tau/tr;
else:
xp[k] = 0
return xp, t
We now plot the double-sided line spectra for D 1=8 and two
values of rise-time tr
1/20
1/8
Sidelobes smaller
than ideal pulse train
which has zero rise
time
1/ = 8
2-35
1/10
1/8
Sidelobes smaller
than with tr = 1/20
case
~10dB
1/ = 8
more
2-36
2.4.7
A C BX0;
nD0
BXn;
n0
proof:
Yn D hy.t /e
j 2.nf0 /t
j 2.nf0 /t
QED
Likewise if
y.t / D x.t
t0 /
it follows that
Yn D X n e
j 2.nf0 /t0
proof:
Yn D hx.t
Let D t
t0/e
j 2.nf0 /t
j 2.nf0 /.Ct0 /
j 2.nf0 /
ie
j 2.nf0 /t0
j 2.nf0 /t0
QED
ECE 5625 Communication Systems I
2-37
2.5
Fourier Transform
2.5.1
RefX.f /g D
1
1
ImfX.f /g D
2.5.2
Symmetry Properties
thus
jX. f /j D jX.f /j (even in frequency)
X. f / D X.f / (odd in frequency)
ECE 5625 Communication Systems I
2-39
Additionally,
1. For x. t / D x.t / (even function), ImfX.f /g D 0
2. For x. t / D
2.5.3
but
Z
x .t /e j 2f t dt D
Z
x.t /e
j 2f t
dt
D X .f /
Finally,
Z
ED
jx.t /j dt D
1
jX.f /j2 df
ED
G.f / df
1
x.t / D A
t0
FT is
Z
t0 C=2
X.f / D A
j 2f t
dt
t0 =2
t0C=2
DA
j 2f
t =2
jf 0 jf
e
e
D A
e
.j 2/f
D A sinc.f /e j 2f t0
j 2f t
A
t0
! Asinc.f /e
j 2f t0
j 2f t0
2-41
X(f) 3
Amplitude
Spectrum
|X(f)| 0.8
Phase
Spectrum
0.6
?3
0.4
-2/? 2
?2
-2/
?1
-1/
f
0
1/1
2
2/
?3
/2
? 1-1/
?1
/2
?2
t0 = /2
0.2
?3
11/
2/
2
slope = -f/2
(A)12
G(f) = |X(f)|2
Energy
Spectral
Density
0.8
0.6
0.4
0.2
?3
?2
-2/
?1
-1/
1/1
2
2/
2.5.4
Transform Theorems
Be familiar with the FT theorems found in the table of Appendix G.6 of the text
Superposition Theorem
a1x1.t / C a2x2.t /
! a1X1.f / C a2X2.f /
proof:
2-42
t0 /
! X.f /e
j 2f t0
proof:
j 2f t
! X.f
dt D
f0/
x.t /e
j 2.f f0 /t
dt
so
F x.t /e j 2f0t D X.f
f0 /
QED
Modulation Theorem
The modulation theorem is an extension of the frequency translation theorm
x.t / cos.2f0t /
ECE 5625 Communication Systems I
1
! X.f
2
1
f0/ C X.f C f0/
2
2-43
j 2f0 t
X(f)
signal
multiplier
A
x(t)
Y(f)
y(t)
A/2
f
0
-f0
cos(2f0t)
f
f0
A simple modulator
Duality Theorem
Note that
Z
FfX.t /g D
X.t /e
j 2f t
dt D
X.t /e j 2.
f /t
dt
2-44
! x. f /
-W
Differentiation Theorem
The general result is
d nx.t / F
! .j 2f /n X.f /
n
dt
proof: For n D 1 we start with the integration by parts formula,
R
R
u dv D uv
v du, and apply it to
Z 1
dx
dx j 2f t
F
D
e
dt
dt
1 dt
Z 1
1
X.f /
2-45
! j 2f X.f /
dx=dt
QED
Note that
1/
1/
-1/
2-46
-2/
2-47
x1()
No overlap for t +
/2 < -/2 or t <
t - /2
t + /2
/2
/2
D
d D
=2
=2
D t C =2 C =2 D C t
x2(t - )
x1()
Overlap begins when t
+ /2 = -/2 or t = -
0
/2
t + /2
2-48
/2
x2(t - )
x1()
Overlap lasts until t =
/2
/2
t - /2
t + /2
x1()
No overlap for t >
/2
/2
t - /2
t + /2
0;
t<
< C t;
t <0
x.t / D
t; 0 t <
:0;
t
(
jt j; jtj
D
0;
otherwise
ECE 5625 Communication Systems I
2-49
Final summary,
t
t
t
D
Convolution Theorem: We now consider x1.t /x2.t / in terms
of the FT
Z 1
x1. /x2.t / d
1Z
Z 1
1
D
x1. /
X2.f /e j 2f .t / df d
1
Z 11
Z 1
x1. /e j 2f d e j 2f t df
X2.f /
D
1
1
Z 1
D
X1.f /X2.f /e j 2f t df
1
! X1.f /X2.f /
2
F .t = / F .t = / D sinc.f /
We have also established the transform pair
t
F
2
2
2
! sinc .f / D sinc .f /
2-50
or
t
! sinc2.f /
Multiplication Theorem
Having already established the convolution theorem, it follows
from the duality theorem or direct evaluation, that
x1.t / x2.t /
2.5.5
! X1.f / X2.f /
2-51
Note that
F A.t =T / D AT sinc.f T /
Using the transform-in-the-limit approach we write
Ffx.t /g D lim AT sinc.f T /
T !1
?3
?2
?1
AT1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
? 0.2
3 ?3
?2
?1
AT2
T2 >> T1
? 0.2
Increasing T in AT sinc.f T /
8T
! A.f /
ECE 5625 Communication Systems I
As a further check
Z
F 1 A.f / D
A.f /e
j 2ff t
df D Ae
j 2f t
f D0
DA
Ae j 2f0t
! A.f f0/
A j
F
e .f f0/ C e
A cos.2f0t C / !
2
F
A.t t0/ ! Ae j 2f t0
j
.f C f0/
! A and A
A.t /
! A.f /
2.5.6
1
X
Xne j 2 nf0t
nD 1
ECE 5625 Communication Systems I
2-53
we can write
1
X
"
X.f / D F
#
Xne j 2 nf0t
nD 1
D
D
1
X
nD 1
1
X
n
o
j 2 nf0 t
XnF e
Xn.f
nf0/
nD 1
f0 /
Sum phasors
Convert to
time domain
Continuous
Spectra
Integrate impulses to
get phasors via the
inverse FT
ys .t / D
.t
mTs /
mD 1
Z
.t /e
j 2.nfs /t
dt D
Ts
1
D fs ; any n
Ts
1
X
1
X
j 2 nf /t
0
F e
D fs
.f
nD 1
nfs /
nD 1
Summary,
1
X
.t
mD 1
ECE 5625 Communication Systems I
mTs /
! fs
1
X
.f
nfs /
nD 1
2-55
ys(t)
...
...
-Ts
Ts
4Ts
Ys(f)
fs
...
...
f
-fs
fs
4fs
u.t /, > 0
No overlap
t
2-56
0
ECE 5625 Communication Systems I
Z
y.t / D
Ae
.t /
d
D Ae
D Ae
e t
0
e t 1
Summary,
y.t / D
A
1
u.t /
A/
y(t)
2-57
mD 1
)
mTs / P .f /
mD 1
1
X
D fs P .f /
.f
nfs /
nD 1
1
X
D fs
P .nfs /.f
nfs /
nD 1
where P .f / D Ffp.t /g
The FT transform pair just established is
1
X
mD 1
2-58
p.t
mTs /
1
X
fs P .nfs /.f
nfs /
nD 1
...
t
-2
-1
T0 = 10
2.5.7
j 2.nfs /t
by writing
( 1
X
1
F
fs P .nfs /.f
nD 1
ECE 5625 Communication Systems I
! .f
nfs /
1
X
nfs / D fs
P .nfs /e j 2.nfs /t
nD 1
2-59
p.t
also
mTs / D fs
mD 1
1
X
P .nfs /e j 2.nfs /t
nD 1
2.6
1
f0/ C A2.f C f0/
4
ECE 5625 Communication Systems I
To derive a general formula for the PSD we first need to consider the autocorrelation function
2.6.1
. / D F 1 G.f /
1
D F X.f /X .f /
1
1
D F X.f / F X .f /
F
but x. t /
or
Z
x.t /x.t C / d
. / D lim
T !1
Observe that
G.f / D F . /
The autocorrelation function (ACF) gives a measure of the
similarity of a signal at time t to that at time t C ; the coherence between the signal and the delayed signal
ECE 5625 Communication Systems I
2-61
X(f)
G(f) = |X(f)|2
x(t)
() =
2.6.2
Rx .0/ D hjx.t /j i D
Sx .f / df
1
2-62
! G.f /, a reasonable
! Sx .f /
x(t)
Rx()
Sx(f)
2.6.3
Properties of R. /
2-63
A2
F Rx . / D Sx .f / D
.f
4
f0/ C .f C f0/
const. terms
t0 /
2-65
Clock
Period = T
C
C
Q1
D1
D2
C
Q2
D3
x(t)
Q3
M = 23 - 1 = 7
x(t)
+A
t
-A
one period = MT
Rx()
A2
MT
...
-T
...
MT
-A2/M
nfs /
where Ts D M T
One period of Rx . / is a triangle pulse with a level shift
Suppose the logic levels are switched from A to positive levels of say v1 to v2
Using the additional autocorrelation function properties
this can be done
You need to know that a PN sequence contains one more
1 than 0
Python code for generating PN sequences from 2 to 12 stages
plus 16, is found ssd.py:
def PN_gen(N_bits,m=5):
"""
Maximal length sequence signal generator.
2-67
Generates a sequence 0/1 bits of N_bit duration. The bits themselves are obtained
from an m-sequence of length m. Available m-sequence (PN generators) include
m = 2,3,...,12, & 16.
Parameters
---------N_bits : the number of bits to generate
m : the number of shift registers. 2,3, .., 12, & 16
Returns
------PN : ndarray of the generator output over N_bits
Notes
----The sequence is periodic having period 2**m - 1 (2^m - 1).
Examples
------->>> # A 15 bit period signal nover 50 bits
>>> PN = PN_gen(50,4)
"""
c = m_seq(m)
Q = len(c)
max_periods = int(np.ceil(N_bits/float(Q)))
PN = np.zeros(max_periods*Q)
for k in range(max_periods):
PN[k*Q:(k+1)*Q] = c
PN = np.resize(PN, (1,N_bits))
return PN.flatten()
def m_seq(m):
"""
Generate an m-sequence ndarray using an all-ones initialization.
Available m-sequence (PN generators) include m = 2,3,...,12, & 16.
Parameters
---------m : the number of shift registers. 2,3, .., 12, & 16
Returns
------c : ndarray of one period of the m-sequence
Notes
----The sequence period is 2**m - 1 (2^m - 1).
Examples
------->>> c = m_seq(5)
"""
# Load shift register with all ones to start
sr = np.ones(m)
# M-squence length is:
Q = 2**m - 1
c = np.zeros(Q)
2-68
if m == 2:
taps = np.array([1, 1, 1])
elif m == 3:
taps = np.array([1, 0, 1, 1])
elif m == 4:
taps = np.array([1, 0, 0, 1, 1])
elif m == 5:
taps = np.array([1, 0, 0, 1, 0, 1])
elif m == 6:
taps = np.array([1, 0, 0, 0, 0, 1, 1])
elif m == 7:
taps = np.array([1, 0, 0, 0, 1, 0, 0, 1])
elif m == 8:
taps = np.array([1, 0, 0, 0, 1, 1, 1, 0, 1])
elif m == 9:
taps = np.array([1, 0, 0, 0, 0, 1, 0, 0, 0, 1])
elif m == 10:
taps = np.array([1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1])
elif m == 11:
taps = np.array([1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1])
elif m == 12:
taps = np.array([1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1])
elif m == 16:
taps = np.array([1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1])
else:
print 'Invalid length specified'
for n in range(Q):
tap_xor = 0
c[n] = sr[-1]
for k in range(1,m):
if taps[k] == 1:
tap_xor = np.bitwise_xor(tap_xor,np.bitwise_xor(int(sr[-1]),
int(sr[m-1-k])))
sr[1:] = sr[:-1]
sr[0] = tap_xor
return c
There is an interesting linkage between the Fourier series representation of a signal, the power spectrum, and then back to
the autocorrelation function
ECE 5625 Communication Systems I
2-69
Using the orthogonality properties of the Fourier series expansion we can write
* 1
!
!+
1
X
X
R. / D
Xne j 2.nf0/t
Xme j 2.mf0/.tC/
D
nD 1
1
1
X X
mD 1
XnXm
nD 1 mD 1
D
D
1
X
nD 1
1
X
jXnj2 e j 2.nf0/t e
j 2.nf0 /.tC/
jXnj2e j 2.nf0/
nD 1
The power spectral density can be obtained by Fourier transforming both sides of the above
S.f / D
1
X
jXnj2.f
nf0/
nD 1
2-71
15 bit
period
Line spacing =
1/(MT) = 1/15 Hz
2-72
...
...
MT = 15T = 15
-1 -1
=
M
15
1
http://en.wikipedia.org/wiki/Periodogram
2-73
2.7
y(t) =
operator
Definition
Linearity (superposition) holds, that is for input 1x1.t /C2x2.t /,
1 and 2 constants,
y.t / D H 1x1.t / C 2x2.t /
D 1H x1.t / C 2H x2.t /
D 1y1.t / C 2y2.t /
A system is time invariant (fixed) if for y.t / D Hx.t /, a
delayed input gives a correspondingly delayed output, i.e.,
y.t t0/ D H x.t t0/
Impulse Response and Superposition Integral
The impulse response of an LTI system is denoted
h.t / D H .t /
assuming the system is initially at rest
Suppose we can write x.t / as
x.t / D
N
X
n.t
tn /
nD1
2-74
y.t / D
nh.t
tn /
nD1
' lim
N !1
N
X
x.nt /.t
nt / t; for t 1
nD N
x(t)
...
...
2t
3t
4t
5t
6t
N
X
N !1
nD N
x./h.t
Z
nt / t
D
or
x.nt /h.t
/ d D x.t / h.t /
1
1
x.t
1
ECE 5625 Communication Systems I
2-75
2.7.1
Stability
In signals and systems the concept of bounded-input boundedoutput (BIBO) stability is introduced
Satisfying this definition requires that every bounded-input (jx.t /j <
1) produces a bounded output (jy.t /j < 1)
For LTI systems a fundamental theorem states that a system is
BIBO stable if and only if
Z 1
jh.t /j dt < 1
1
2.7.2
Transfer Function
! H.f /
and
1
y.t / D F X.f /H.f / D
1
2-76
2.7.3
Causality
j ln jH.f /jj
df < 1
2
1
C
f
1
2-77
2.7.4
Properties of H.f /
H.f /
why?
Input/output relationships for spectral densities are
Gy .f / D jY .f /j2 D jX.f /H.f /j2 D jH.f /j2Gx .f /
Sy .f / D jH.f /j2Sx .f / proof in text chap. 6
vc(t)
y(t)
ic(t)
Y(f )
h(t), H(f)
RC lowpass filter schematic
Y .f /
1
D
; where f3 D 1=.2RC /
X.f /
1 C jf =f3
ECE 5625 Communication Systems I
y.t /
dvc .t /
Dc
dt
dt
thus
RC
dy.t /
C y.t / D x.t /
dt
! j 2f X.f /
j 2f RC Y .f / C Y .f / D X.f /
so again
Y .f /
1
D
X.f /
1 C jf =f3
1
Dp
e j tan
1 C .f =f3/2
H.f / D
1 .f =f /
3
2-79
f3
-f3
/2
-/2
.t
T =2/
T
1
Y .f / D X.f /H.f / D AT sinc.f T /
e
1 C jf =fs
jf t
1
e
RC
t=.RC /
u.t /
A
1
u.t / D
u.t /
Note that
A
T =2
T
D Au.t /
u.t
T /
T/
RC =
|X(f)|, |H(f)|, |Y(f)|
T/1
0
T/
5
y(t)
0.8
T/
2
0.8
0.6
0.6
0.4
0.4
0.2
2T
0.2
0.5
1.5
2.5
t/T
-3
-2
-1
0.8
0.6
0.6
RC = T/2
0.4
0.2
-1
fT
0.4
-2
-3
RC = 2T
RC = T/10
0.2
1
fT
-3
-2
-1
fT
2-81
2.7.5
2.7.6
x.t / D
Xne j 2.nf0/t
nD 1
X.f / D
Xn.f
nf0/
nD 1
1
X
XnH.nf0/.f
nf0/
nD 1
2-82
and
y.t / D
D
1
X
nD 1
1
X
XnH.nf0/e j 2.nf0/t
jXnjjH.nf0je j 2.nf0/t CXnCH.nf0/
nD 1
2.7.7
Distortionless Transmission
2-83
2.7.8
1 d.f /
2 df
1 d
2 df
2f t0, so
2f t0 D t0 s;
Tp .f / D
The system output now is
Tp .f1//
1
. 2f t0/ D t0
2f
R0, vp
x(t)
RL = R0
y(t)
1
y.t / D x t
2
L
vp
2-85
Radians
1.5
H(f)
|H(f)|
1
1.5
0.5
1
-20
-10
10
20
f (Hz)
-0.5
0.5
-1
-20
-10
10
20
f (Hz)
-1.5
Time
Tg(f)
Time
Tp(f)
0.015
0.0125
0.015
0.01
0.014
0.0075
0.013
0.005
0.012
0.0025
-20
0.016
-10
0.011
f (Hz)
10
20
-20
-10
10
20
f (Hz)
2.7.9
Nonlinear Distortion
1
X
anx n.t /
nD0
Specifically consider
y.t / D a1x.t / C a2x 2.t /
Let
x.t / D A1 cos.!1t / C A2 cos.!2t /
Expanding the output we have
y.t / D a1 A1 cos.!1t / C A2 cos.!2t /
2
C a1 A1 cos.!1t / C A2 cos.!2t /
D a1 A1 cos.!1t / C A2 cos.!2t /
na
a2 2
o
2
2
2
2
A CA C
A cos.2!1t / C A2 cos.2!2t /
C
2 1 2
2 1
C a2A1A2 cos.!1 C !2/t C cos.!1 !2/t
The third line is the desired output
ECE 5625 Communication Systems I
2-87
Output
a1A1
a2A1
A1
NonLinear
0
f1
Input
f1
A2
2f1
a1A1A2
Output
NonLinear
A1
a2A1
a1a2A1
a2A1
a1A1
a1A2 2
a2(A1 + A2)
a2A2
2
0
f1
f2
0 f2-f1
f1
f2
2f1
2f2
f1+f2
In general if y.t / D a1x.t / C a2x 2.t / the multiplication theorem implies that
Y .f / D a1X.f / C a2X.f / X.f /
In particular if X.f / D A f =.2W /
f
Y .f / D a1A
2W
2-88
f
C a22WA2
2W
Y( f ) =
2Wa2A2
a 1A
-W
+
f
-2W
2W
a1A + 2Wa2A2
a1A + Wa2A2
Wa2A2
=
-2W -W
W 2W
2.7.10
Ideal Filters
1. Lowpass of bandwidth B
f
HLP.f / D H0
e
2B
|HLP(f)|
H0
-B
j 2f t0
slope =
-2t0
HLP(f)
f
-B
.f =.2B// e
slope =
-2t0
j 2f t0
HHP(f)
f
-B
2-89
3. Bandpass of bandwidth B
f0/ C Hl .f C f0/ e
HBP.f / D Hl .f
j 2f t0
|HBP(f)|
H0
B
slope = -2t0
HBP(f)
f
-f0
f
f0
-f0
f0
j 2f t0
t0/
hLP(t)
hBP(t)
2BH0
2BH0
t0
t0
t0 - 1
2B
t0 + 1
2B
t0 - 1
2B
t0 + 1
2B
2.7.11
Realizable Filters
.s
!cn
s1/.s s2/ .s
sn/
where
1 2k 1
sk D !c exp
C
; k D 1; 2; : : : ; n
2
2n
ECE 5625 Communication Systems I
2-91
1
1 C .f =fc /2n
Chebyshev
A Chebyshev type I filter (ripple in the passband), is is designed to maintain the maximum allowable attenuation in the
passband yet have maximum stopband attenuation
The amplitude response is given by
jHC.f /j D p
1
1 C 2Cn2.f /
where
(
Cn.f / D
2-92
0 jf j fc
jf j > fc
Bessel
A Bessel filter is designed to maintain linear phase in the passband at the expense of the amplitude response
HBE.f / D
Kn
Bn.f /
2-93
n D 3 Amplitude response
n D 3 Group delay
2-94
Unloaded
(typical
100
Filter Application
Audio, video,
IF and RF
200
100,000
IF
1,000
IF
variable
IF and RF
1,000
RF
10,000
RF
2-95
=
=
=
=
=
and when the phase jumps by +/-pi, which occurs when the
amplitude response changes sign. Since the amplitude response
is zero when the sign changes, the jumps do not alter the group
delay results.
"""
theta = np.unwrap(np.angle(H))
# Since theta for an FIR filter is likely to have many pi phase
# jumps too, we unwrap a second time 2*theta and divide by 2
theta2 = np.unwrap(2*theta)/2.
theta_dif = np.diff(theta2)
f_diff = np.diff(f)
Tg = -np.diff(theta2)/np.diff(w)
max_Tg = np.max(Tg)
#print(max_Tg)
if mode.lower() == 'groupdelay_t':
max_Tg /= fs
plt.plot(f[:-1]*fs,Tg/fs)
plt.ylim([0,1.2*max_Tg])
else:
plt.plot(f[:-1]*fs,Tg)
plt.ylim([0,1.2*max_Tg])
plt.xlabel('Frequency (Hz)')
if mode.lower() == 'groupdelay_t':
plt.ylabel('Group Delay (s)')
else:
plt.ylabel('Group Delay (samples)')
plt.title('Frequency Response - Group Delay')
else:
s1 = 'Error, mode must be "dB", "phase, '
s2 = '"groupdelay_s", or "groupdelay_t"'
print(s1 + s2)
def freqs_resp(b,a=[1],Dmin=1,Dmax=5,mode = 'dB',Npts = 1024,fsize=(6,4)):
"""
A method for displaying analog filter frequency response magnitude,
phase, and group delay. A plot is produced using matplotlib
freqs_resp(b,a=[1],Dmin=1,Dmax=5,mode='dB',Npts=1024,fsize=(6,4))
b
a
Dmin
Dmax
mode
=
=
=
=
=
2-97
2-98
5th-OrderCheby1 BPF
Digital
fs = 1000 Hz
Highly peaked
near the bandedge, even with
0.1 dB rippler
The Chebyshev in both analog and digital forms still has a large
peak in the group delay, even with a small ripple (here 0.1 dB)
2-99
Case 2: A 7th-order Bessel analog bandpass filter, having passband of 10; 50 MHz
7th-Order
Bessel BPF
Analog
The Bessel filter has a much lower and smoother group delay,
but the magnitude response is rather sloppy
The filter passband is far from being flat and the roll-off is
gradual considering the filter order is seven
2-100
2.7.12
Problem: Given a non-bandlimited signal, what is a reasonable estimate of the signals transmission bandwidth?
We would like to obtain a relationship to the signals time duration
Step 1: We first consider a time domain relationship by seeking
a constant T such that
Make areas
equal via T
T x.0/ D
x(0)
jx.t /j dt
|x(t)|
t
-T/2
Note that
Z 1
x.t / dt D
1
and
Z
x.t /e j 2f t dt
T/2
D X.0/
f D0
jx.t /j dt
1
x.t / dt
1
which implies
T x.0/ X.0/
Step 2: Find a constant W such that
ECE 5625 Communication Systems I
2-101
Make areas
equal via W
2W X.0/ D
X(0)
jX.f /j df
|X(f)|
f
-W
Note that
Z 1
X.f / df D
1
and
j 2f t
X.f /e
df
D x.0/
t D0
jX.f /j df
X.f / df
1
1
T
or
1
X.0/
T
W
1
2T
x(t)
-1
|X(f)|/T
-0.5
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0.5
t/T
-3
-2
-1
Lower
bound for
W
fT
f
-1/(2T) 1/(2T)
We see that for the case of the sinc. / function the bandwidth,
W , is clearly greater than the simple bound predicts
Risetime
There is also a relationship between the risetime of a pulse-like
signal and bandwidth
Definition: The risetime, TR , is the time required for the leading edge of a pulse to go from 10% to 90% of its final value
Given the impulse response h.t / for an LTI system, the step
response is just
Z 1
ys .t / D
h./u.t / d
Z t1
Z t
if causal
D
h./ d D
h./ d
1
ECE 5625 Communication Systems I
0
2-103
1
e
RC
t=.RC /
u.t /
t=.RC /
u.t /
t1 is the risetime
0:35
f3
0:44
B
Step Response of Ideal Lowpass
1
1
0.8
0.8
0.6
0.4
0.6
2.2
0.4
0.2
0.44
0.2
1
t RC
-2
-1
t/B
2-105
2.8
Sampling Theory
2.9
2.10
2-106
2-107