Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

','

Signals and vectors

There is a perfect analogy between signals and vectors. A vector can be represented as a sum of its components in various ways. A signal can also be represented as a sum of its components in vanous ways.

Component of a vector

A vector can be specified by its magnitude and direction. For example, x is a vector with magnitude or length [x], Consider two vectors x and g as shown in Fig.2.1S. The component of g along x is ex. The component of g along x is the projection of g on x, as shown in Fig.2.1S.

ex x.

Figure 2,15 Component (projection) of a vector along another vector;

Please note that there is an infinite possible ways to express g in terms of x. Fig.2.16 shows two other possibilities.

(2.22)

(a)

(b)

x

L--------~ ...... x

SX

Figure 2.16 Approximation of a vector in terms of another vector.

From Fig.2.1S:

g = cx+e

(2.21)

Where e is called error vector.

If e 7 0, we can approximate g by ex as:

Page 1

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

, '

g~cx

(2.23)

From Eq.2.21, the error vector e = g - ex. To minimize e, the factor e must increase.

Let us define the dot (inner or scalar) product of two vectors g and x as:

g. x = jgllxl cos ()

(2.24)

Where e is the angle between vectors g and x.

The length of the component g along x is Igl cos 0, but remember that this also equals to e multiplied by the length ofx (i.e. elxl), so:

clx] = Igi cos ()

If we multiply both sides by [x], we have:

elxl2 = Igllxl cos () = g. x

From this equation, we can calculate e as:

1 c=-g·x fxl2

(2.26)

When g and x are perpendicular (orthogonal), then g has a zero component along x (i.e. e = 0). Thus, we say that g and x are orthogonal if the inner (scalar or dot) product of the two vectors is zero, or:

g.x=O

(2.27) ,

Component of a signal

The concepts of "vector component" and "orthogonally" can also be applied to signals. Consider the two signals get) and x(t) over the interval [th t2]. The signal get) can be expressed in terms of x(t) as:

get) = cx(t) + eft)

Where ex(t) is the component of get) along x(t), and the signal eft) is the error signal. The term cx(t) can also be considered as the approximation of get) by x(t).

get) ~ cx(t)

(2.28)

The error eft) in this approximation is:

Page 2

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

e(t) = { get) - q(t)

tl ~ t ~ t2 otherwise"

(2.29)

To minimize e(t), we minimize its energy as a suitable measure for the signal size. The energy of e(t), Ee, over the interval [th t2] is calculated as:

lt2

"2

E; = e (t) dt

t1

lt2 "

= " [get) -' cx(t)]2 dt

t1

Note that E; is a function of c (not t). To find the value of c that minimizes Ee, a necessary condition is:

(~.30)

or

!!_ [ r [get) _ ex(Of dt] = 0 de 111

1:l.

+ cl. [~f /(t:)clt-]

"'-c.

=0

t:\

f; ~51:

ter-M

~

t~ tl.

S' J Ct) x (_t:) 0\ t + a: c J ?-1 (c) ott-

::=.0

_ 2

-c\

1.

"t..(t:) ..At

t ..

:2 J jUc)-,«lc) d*"

t,

c

tl

J 3(t-);t [t)d t

~.

Page 3

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

, "

c

(:2-.31)

Comparing Eq.2.31 with Eq.2.26, we can conclude that: the inner product of two signals is the area under the product of the two signals.

So the energy of a signal is the inner product of the signal with itself.

Summary:

If a signal g(/) is approximated by another signal )((tJas:

get) :::: cx(t)

Then the optimum value of c to minimize the energy of the error signal is given by Eq.2.31.

If the component of a signal g(l) of the form x(l) is zero (c = 0), g(l) and xtt) are orthogonal over the interval [/b 12], or:

1t2

g(t)x(t) dt = 0

11

(2.32)

EXAMPLE 2.5 For the square signal get) shown in Fig. 2.17 find the component in get) of the form sin t. In other words, approximate g(t) in terms of sin t:

get) ~ c sin t

O~t~2:rr:

so that the energy of the error signal is minimum.

Figure 2.17 Approximation of a square signal in terms of a single sinusoid.

Page 4

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

Solution:

{

-I

.11l

S jet-) x (c) cH-

o

;2.1'\
J z, 21\ ,_-rr
Ex. - Sl'" -c d.~ _j_ J Jt- f
- :). - __L c.....,~ J..t: cit-
0 J..
0 0
Beco..v....se 0'~ _L [ 1- :< :lJ<.~
:2.. -;l
"t"tC
J 3(-~) -rr ;l_Tr
=9 C -'- S I '" -t .,.l_-l- _L J s:v- t- oll:- + ___L f (- 5~'" t-) .-!.t-
s: z:
1\ {\ 1\
0 '11
"'(\ C>
__ I [ea.5tJ _L [ z.~
- + uS tJ
n- rr
Cl IT _L [tJ

:l- ;:,

~') Ex: _

~ ( -L \ ) + __L C I +1) :L 2- _!t_
~
-K" IT + ::::
1\ 7T TI
~ 0C<cJ "" .s. s .. ~~
-rr _!:t_ 1.3 ->
j(J) TI -, _103

Page 5

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

Example I:

a) Are the signals cos t and sin t orthogonal over the interval [0, 271]?

b) Are the signals cos t and sin t orthogonal over the interval [0, z]?

c) Are the signals cos t and sin t orthogonal over the interval [0, 7ll2]?

Solution:

;l.1T

J Co .s t s i VI t ",l ~

iF

f l: e!f o:o; t _s S "j I'\~( J " S

o

G.s Cl s;V\ b =- ~ [.5i",(£\+6) _ 5; ..... (,,- b)]

0'1" S;v-.o... CoS b.::: _L [si ..... (4.+1) -t 5:", (a._b)]

L

.. ;) 5:"" 0... C:::.S Q x: ...L Siv..:l. o, L

"Z . .-n: "Z- '"l'
.. ~ j- Co~ t 5.· ..... t- d.\:-- _L J s:\o\ ,..1:: clt
- "L
D C>
;:Z_~
[ C~5 ;l "= J -_L ( 6,s 4-71 - Gs 0)
- it-
4- 0
- -' ((-I) 0
::: 4- -
=='? Yes I U.s t .\..~ s: '" t o..Ye <.If t-h.<:>Jc.'\a...\ the..
eve.,.
Pe.Y-:cd [ 01 :2.. nJ o

:2.,.--
J LI.. dLl...
{;,
=) d.u.._ - c... s t- ol~ Page 6

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

. '

c.

'2. L
.i., ( Si", .l.'IT s\'", 0) - o ~ '( e s .
2-
tr i'r
J L
lb) s,"' t Gt.S (- ,). \- _L [s;..., tJo
L-
0 "'I. "l
_L L s;"" " - s \ '" 0] 0
-
"L- (c_)

~ Ye J I ust-- o.......J .5 j' '" + ,~v-e (1Y"'&-'j"·,,a...1 o~e.v tke.
~ '" ~ey-.J ,,-I [ c/nJ
-rr/l- L "Y'1..
J SI\'\ t- u.s+- ,H- _I- e S'h t J
- 2-
o
0
"l '--
_L [ s\'" -rr- s;", OJ
-
'- z,
..L. [_ \ - 0 j -'-
- "L
- 1-
~ No / c.e s t- o....,..J s~"" t: o.-ce. v-.ot: avt--"'-~ c. ",-oj 0'-.1 e, Y'
tll!. ~ '" \--e V''' «, ~ [0/ §.]
1.- Page 7

· Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

Example II:

Given the following two signals: j(_~)

x(t)

-I

------~~------~-------,--~ t

Are g(t) and x(t) orthogonal over the given interval?

Solution:

x(t-) = _ 5\\1'\ t

:1."T\

J j(~) ,,(~) o\le

o

o

21\ ?-"t\ :2-'"('(
S J (_s~V\~) Jt J 'l
3L+)x(t-) Jt s \ ..... \:- 5,,,, ~ cH-
- -
0 0 0
21\ ;2.'f\
_L_ J cl~ + -' S ~S;l_t cH-
::. L
1.-
0 0
1-"R "L~
_ _L [ tJ + _L_ [5:"" 2t]
- L Lt-
c. 0
-_L. ( J-T') + _I- e Sl'Y't 41\ - 5:", 0)
:::- L 4- _ 'IT"

-+

_ T\

A reo._ (' 5 >\. =:J A h'" ~ ::: _-n.-

Page 8

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

Orthogonality in complex signals

To generalize the results in the previous section to complex functions of t, consider the signal get). Again, get) can be approximated by another signal x(t) over the interval (tl :s t :s t2):

get) ~ cx(t)

(2.35)

Where get) and x(t) are both complex functions of t.

Remember that the energy of x(t) is:

and the error signal e(t) is:

e(t) = g(t) - cx(t)

(2.36)

Where the coefficient c and the error signal e(t) are also complex.

For approximation, we need to choose c such that E, is minimum.

Ee· (2 Iget) - cx(t)12 dt i.

(2.37)

Recall that, in complex variables:

lu + vl2 = (u + v)(u· + u") = lul2 + Ivlz + u'» + uv*

(2.38)

Continuing with the derivation, the best value of c will be:

1 /12

C =·E g(t)x*(t) dt

x t1

(2.39)

Based on this, we can say that any two complex signals get) and x(t) are orthogonal over the interval (t1 :s t :s t2) if:

/t2

xl(t)xi(t) dt'. Y

t[

or

(2,40)

This means that the inner product of two complex signals is: the area under the product of one signal and the conjugate of the other signal.

Page 9

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

Energy of the sum of orthogonal signals

Going back to vectors, if vectors x and y are orthogonal, and ifz = x + y, then:

We know that Ixf in vectors corresponds to Ex in signals (where Ex is the energy of the signal x(t)).

Thus, if signals x(t) and yet) are orthogonal over the interval [tj, t2], and if z(t) = x(t) + y(t), then:

(2.41)

To prove this mathematically:

Fo" COh\fk"J( s~l)v--~\s ....
tl..
tt.- l 1.-
J 1- I )«(~) + ~ (~) \ ott
Ec = I r_(t) I Jt ~
i, -C,
t-l- t:l.- +1- +1..
J I x(l:) \L J~ J 1- S )(Lt) j (~) J_1c -t- J )( (031'(~) d~
+ \ jet) \ J.1c 4-
t, ·h -tl 1::, We. k"ow th.-aJ- ~-r cv- t-k.e j 0 h._cJ .s\j~o..l s ':. X"\(i) Q\O\c\ Xz.Ct-) ~
t .. -t-L
J x:7(t-) J x, Ct-) *
)(LU-)J~= x (t) cAt- = a
L
-t-, t:--,
'I---'s i-Y\.e.ttI'\S t~~ ·H ... e, (o...s~ two t-e. ""'" .s =r- t S "b~ +l.. tl..

"'" E" = J I ><ul J, + J ' j (~) I" J~

t-, t,

~

T~s e..1-lJ...co..h·o .... 5~Jl'\a.(j

Page 10

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

Signal comparison: correlation

Two vectors g and x are similar if g has a large component along x or - in other words - if the factor c is large (see Eq.2.26).

We need a quantitative measure of similarity between any two vectors g and x. the amount of similarity between g and x should be independent of the lengths of g and x. For example, if g and x are orthogonal, the similarity between the two vectors is zero regardless of the length of g and the length ofx.

The problem with c as a similarity factor is that it depends on the lengths of g and x. Remember that (from Eq.2.26):

This means if the length of g is doubled, c will be doubled. But if the length of x is doubled, c will be halved. So c cannot be used as a factor for similarity.

Instead, we can use cos 8 to quantify the similarity between vectors. As cos 8 increases, the similarity between the two vectors increases. A suitable measure would be en. which is given by:

g·x ell = cos e = Igll"l

(2.43)

en is known as the correlation coefficient, where

- 1 :5 en < 1 (2.44)

Note that:

• If the two vectors are aligned (8 = 0°), the similarity is maximum (en = 1).

• If the two vectors are aligned in opposite directions (8 = 180°), the dissimilarity is maximum (en = -1).

• If the two vectors are orthogonal (8 = 90°), the similarity is zero (en = 0).

Applying this concept to signals, let us consider the signals over the entire (whole) time interval from -00 to 00. The appropriate correlation coefficient en - which is independent of the energies (sizes) of the signals - is given by:

1 roo

en = r=-=- f-,- g(t)x(t) dt J EgE_t .-oc

(2.45)

Also here, the correlation coefficient en cannot be more than one or less than minus one, thus:

- 1 < en ~ 1

(2.46)

Page 11

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

To generalize this to complex signals, Eq.2.45 can be written as:

1 100

en =!"ill: g(t)x*(t) dt

. V EQE.c -00

(2.47)

ExAMPLE 2.6 Find the con-elation coefficient en between the pulse x(t) and the pulses gj (I), i = 1,2, 3, 4, 5, and 6, shown in Fig. 2.18.

x{l) g.(r) g/I) g.,{l)
O.S
I~
0 1-)0- .5 0 I~ 5: 0 t-)o- 5 0 5
(a) (b) (c) -1
(d)
g4(r) K3(t) g6(t)
-115
e i sin 211:(
e:' 4VWv%,-
0 1- 5 0 1- 5
(e) (t) (g)
Figure 2.18 Signals for Example 2.6. We shall compute en using Eq. (2.45) for each of the six cases. Let us first compute the energies of all the signals,

E,~ = t' x2(t) dt = r dr = 5

10 10

In the same way we find Eg, = 5, ERl = 1.25, and Eg] = 5. Also to determine EK4 and Egp we determine the energy E of e-a'u(l) over the interval t = 0 to T:

E =:: {T (e-at)2 dt = (T e-2a1 dt = _!__(l _ e-2aT)

10 10 2a

For g4(t), a = 1/5 and T = 5. Therefore, Eg4 = 2.1617. For 85(t), a = I and T = 00. Therefore, Eg5 = 0.5. The energy of Eg6 is given by

Egh = 15 sin2 27ft dt = 2.5

Using Eq. (2.25), the correlation coefficients for the six cases are found as

1 ·5 1 r~

(1) ~ Jo dt = 1 (2) ~)O (0.5) dt = 1

v55 vl.k~5

1 ~ 1 .5 j-

(3) ~5Jo(-1)dl=-1 (4) )ol·-t~dr=O.961

v~ ~ ..J2.16175

I r5•

(6) ~ )0 Sill 27ft dt = 0

...;2.55

(5) ~ J; e-r dt = 0.628

Page 12

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

,- 4-1 ~ S\'Mfll~j t:h~ fa\low~~

(a) Co::: ~) f;(f)

(. b) (j ~ +).. ) s (~ )

w + if

.

e, x f' v e s S I 0 \1\ 5 ~

(c) [e_-t Cc>S(3t--{'OO)] set) ld) r s;~~(t-_2) ] b(.f:-I)

l t-+'+ J

SO II .. ,J: to"'" '..

IN e. k~ w -Cha..t-

-0<)

(b)

j (t) := ( siV'lt )
+L-t-~
J(o) = ( 5\ .... 0 )=0
c +::l.
"-,(vl)=- ( jw+2. )
u'+'1
3(0) = ~o + 2- ) 2- ~ ~ b("')
-_
0-+9 '" _L

- L.

~ o . s ~ (t)

Page 13

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

_\ 5

~

_I ~

(e)

\

Page 14

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

"'""I VOl i M lA-"'" f (b) W ~o..l:: l S +ke.

-=

x(-l)

o

ttl..) le l:- u.._s de...f~",e 3(t) ""'-a. "H- .. e.v.-.o.. t "<-O...\\._J ~
j (t-) - t o ~t- ~ ,
A\ SO ! )((t) o ~t ~ \ FrlI~ Et-' '_.31 .. \

c.. = E..)(

I

J 8 (-I:) x. (t) d t

o

I
E,,=, Jx"l_Ct::)d._~ J olt-- [t ]g = ,
0 0
I I I
I J 3(t-) x..(~) J~ J t cU:- L ~L Jo -'
c =- - -
*"'-~s ~C) - 2
0 0
is E..l(
==3> J (i:) ~ .i, X (4:)
2. (b)

e..h (! \J j Q r- {-\.._~ ,

J e1Ct)cH-

I

~)

E e. =

i ..... -t'ke l",tO'-\IC\._~ ~ 0 ~ t ~ \

I , '

J /c' d~ + J (0. "J ole - 2.('.~ -Ie dt

Q 0

= [s;- J~ +(oz,»ltJ: -l~'l

o

o

o

J___ + _i_

3 't

.i, L

i2

f

--. -.

11.

Page 15

.,.

~ .

Signal Analysis (802321)

Note (8)

Dr. Mouaaz Nahas

t:'t. ;2 . 4-5 !

I

J J( (~) ,), (1c) die

o

,

Ex - J /(t:).:!.t

I

J s \ '" L lJ- IT U JJ- ~-t

I

S J. ~ - ~ J Co S (4 IT t- ) A

a

o

, _L ,_L_ [Slv\ C 4- rrt)]

"L I.fT< <>

,
EJ, J z J :2.
S l U-) c\t-- S l '" (4-1(t)J.~ -'
- L-
a
0
h <t
J r-""_' ~.
S~""~rr~) s; "" ( 4-n t) c~t
C", ';: ~ 0.5 X Q'S-
0 .i, [c.o s ( 0.. - b) - Co S (0.. + \,,) J t:

I Je.>\!. ret) .At]
=9 l J cp, (:>. -rr \c) "'-\0
cl<\:::: -
2.. ~ 0 S x o. s
o [S/"~o3
{~0"~: _j_
- :2 VO,S)(O,S ~T\
0
0
- o Page 16

You might also like