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

Sine-Waves-Part I

Wireless Communications
June 20, 2010
(Wireless Communications) Sine-Waves-Part I June 20, 2010 1 / 45
Module 2: Sine Waves-Part I Sine and Cosine
Sine and Cosine
-1 0 1
-1
0
1

cos()
sin()
1
(Wireless Communications) Sine-Waves-Part I June 20, 2010 2 / 45
Module 2: Sine Waves-Part I Sine and Cosine
Radians versus Degrees

180

(Wireless Communications) Sine-Waves-Part I June 20, 2010 3 / 45


Module 2: Sine Waves-Part I Sine and Cosine
Radians versus Degrees
-1 0 1
-1
0
1
60

/3
cos(/3) =0.5
sin(/3) = 0.866
1
(Wireless Communications) Sine-Waves-Part I June 20, 2010 4 / 45
Module 2: Sine Waves-Part I Sine and Cosine
Radians versus Degrees
-1 0 1
-1
0
1
45

/4
cos(/4)
sin(/4)
1
(Wireless Communications) Sine-Waves-Part I June 20, 2010 5 / 45
Module 2: Sine Waves-Part I Sine and Cosine
Radians versus Degrees
-1 0 1
-1
0
1
135

3/4
cos(3/4)
sin(3/4)
(Wireless Communications) Sine-Waves-Part I June 20, 2010 6 / 45
Module 2: Sine Waves-Part I Sine and Cosine
Radians versus Degrees
-1 0 1
-1
0
1
315

7/4
cos(7/4)
sin(7/4)
(Wireless Communications) Sine-Waves-Part I June 20, 2010 7 / 45
Module 2: Sine Waves-Part I Sine and Cosine
Cosine
Plot cos() for = 0, /8, /4, 3/8, /2, ..., 2. Connect the dots.
/4 /2 3/4 5/4 3/2 7/4
2
0.2
0.4
0.6
0.8
1.0
-0.2
-0.4
-0.6
-0.8
-1.0

(Wireless Communications) Sine-Waves-Part I June 20, 2010 8 / 45


Module 2: Sine Waves-Part I Sine and Cosine
Sine and Cosine, frequency 1 Hz
1 0.5 0 0.5 1
1
0.5
0
0.5
1
Cosine(2 t)
S
i
n
e
(
2


t
)
0 1 2 3 4
1
0.5
0
0.5
1
time (s)
C
o
s
i
n
e
(
2


t
)
0 1 2 3 4
1
0.5
0
0.5
1
time (s)
S
i
n
e
(
2


t
)
0 1 2 3 4
0
1
2
3
4
5
time/Tb
p
h
a
s
e

(
d
e
g
r
e
e
s
)
/
(
3
6
0
)
(Wireless Communications) Sine-Waves-Part I June 20, 2010 9 / 45
Module 2: Sine Waves-Part I Sine and Cosine
Horizontal Translation Left=Advance
Consider a signal
x(t ) = cos(2t +/4)
x(t ) = cos(2t +2
1
8
)
= cos(2(t +1/8))
This is a horizontal translation left by 1/8. This is the same as an
advance by 1/8 because the time at which a peak occurs is ahead
by 1/8 of a second compared to the original.
The waveform cos(2(t +1/8)) leads the waveform cos(2t ) or
the waveform cos(2t ) lags the waveform cos(2(t +1/8)).
(Wireless Communications) Sine-Waves-Part I June 20, 2010 10 / 45
Module 2: Sine Waves-Part I Sine and Cosine
Advanced sine wave
0 0.5 1 1.5 2
1.5
1
0.5
0
0.5
1
1.5
time (s)
c
o
s
(
2


t
+

/
4
)
cos(2 t)
cos(2 t+/4)
1/8
(Wireless Communications) Sine-Waves-Part I June 20, 2010 11 / 45
Module 2: Sine Waves-Part I Sine and Cosine
Horizontal Translation Right=Delay
Consider a signal
x(t ) = cos(2t /4)
x(t ) = cos(2t 2
1
8
)
= cos(2(t 1/8))
This is a horizontal translation right by 1/8. This is the same as a
delay by 1/8. This is the same as a delay by 1/8 because the time
at which a peak occurs later by 1/8 of a second compared to the
original.
(Wireless Communications) Sine-Waves-Part I June 20, 2010 12 / 45
Module 2: Sine Waves-Part I Sine and Cosine
Delayed sine wave
0 0.5 1 1.5 2
1.5
1
0.5
0
0.5
1
1.5
time
c
o
s
(
2

/
4
)
cos(2 t/4)
cos(2 t)
1/8 (s)
(Wireless Communications) Sine-Waves-Part I June 20, 2010 13 / 45
Module 2: Sine Waves-Part I Sine and Cosine
1 0.5 0 0.5 1
1
0.5
0
0.5
1
Inphase
Q
u
a
d
r
a
t
u
r
e

p
h
a
s
e
1 0.5 0 0.5 1
1
0.5
0
0.5
1
Inphase
Q
u
a
d
r
a
t
u
r
e

p
h
a
s
e
0 0.5 1 1.5 2
1
0.5
0
0.5
1
time
I
n

p
h
a
s
e
cos(2 t)
0 0.5 1 1.5 2
1
0.5
0
0.5
1
time
I
n

p
h
a
s
e
cos(2 t/4)
(Wireless Communications) Sine-Waves-Part I June 20, 2010 14 / 45
Module 2: Sine Waves-Part I Sine and Cosine
1 0 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
Inphase
Q
u
a
d
r
a
t
u
r
e

p
h
a
s
e
0 1 2
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
time
I
n

p
h
a
s
e
cos(2 t)
0 1 2
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
time
I
n

p
h
a
s
e
cos(2 t/4)
(Wireless Communications) Sine-Waves-Part I June 20, 2010 15 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Decomposition into Sine and Cosine
Decomposition
cos(+) =cos()cos() sin()sin()
cos(2t +) = cos(2t )cos() sin(2t )sin()
= cos()cos(2t ) +sin()(sin(2t ))
(Wireless Communications) Sine-Waves-Part I June 20, 2010 16 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Decomposition into a cosine and sine wave
0 0.5 1 1.5 2
1.5
1
0.5
0
0.5
1
1.5
cos(/4) cos(2 t)
sin(/4) (sin(2 t))
cos(2 t+/4)
time
cos(2 t+/4)= sin(/4) (sin(2 t)) cos(/4) cos(2 t)+
(Wireless Communications) Sine-Waves-Part I June 20, 2010 17 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Proof: cos(+) = cos()cos() sin()sin()

+
A B C
D E
F
1 cos() =AC/AE
cos() =AE/AF
cos(+) =AB/AF
2 Angle AEF= 90 (by denition)
3 Angle AEC =90
4 Angle AED=
5 Angle DEF=90
6 Angle DFE=
7 AB =ACBC
BC =DE
8
cos(+) =
AB
AF
=
ACBC
AF
=
AC
AF

BC
AF
=
AC
AE
AE
AF

BC
EF
EF
AF
=
AC
AE
AE
AF

DE
EF
EF
AF
= cos() cos() sin() sin()
(Wireless Communications) Sine-Waves-Part I June 20, 2010 18 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Find the decomposition of cos(2t +3/4)
cos(2t +3/4) = cos(2t ) sin(2t )
(Wireless Communications) Sine-Waves-Part I June 20, 2010 19 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Signal Composition
Composition
acos(2t ) bsin(2t ) = c cos(2t +)
c =
_
a
2
+b
2
= tan
1
_
b
a
_

a
b
c
(Wireless Communications) Sine-Waves-Part I June 20, 2010 20 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Composition: Proof
Start with Right Hand Side
c cos(2t +) = (
_
a
2
+b
2
)cos(2t +)
=
_
a
2
+b
2
[cos()cos(2t ) sin()sin(2t )]
=
_
_
a
2
+b
2
cos()
_
cos(2t )

_
_
a
2
+b
2
sin()
_
sin(2t )
= acos(2t ) bsin(2t )
a =

a
2
+b
2
cos()
b =

a
2
+b
2
sin()

a
2
+b
2

(Wireless Communications) Sine-Waves-Part I June 20, 2010 21 / 45


Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Composition of sinusoids (3-4-5 Triangle)
0 0.5 1 1.5 2
6
4
2
0
2
4
6
3 cos(2 t)
4 sin(2 t)
5 cos(2 t+0.2952 )=
time
5

c
o
s
(
2


t
+

.
2
9
5
2

)
3 cos(2 t)4 sin(2 t)
3
4
5
Starting Point
(Wireless Communications) Sine-Waves-Part I June 20, 2010 22 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Composition of sinusoids (30-60-90 Triangle)
0 0.2 0.4 0.6 0.8 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
time
s(t)

3
2
cos(2t)
1
2
( sin(2t))
cos(2t + /3)
-1 0 1
-1
0
1

3
2
1
2
30
60
Starting Point
(Wireless Communications) Sine-Waves-Part I June 20, 2010 23 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Find the composition of sinusoids with coefcients
1/

2 and 1/

2
cos(2t + ) =
1

2
cos(2t )
1

2
(sin(2t ))
(Wireless Communications) Sine-Waves-Part I June 20, 2010 24 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Find the composition of sinusoids with coefcients
1/

2 and 1/

2
cos(2t + ) =
1

2
cos(2t ) (
1

2
)sin(2t )
(Wireless Communications) Sine-Waves-Part I June 20, 2010 25 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Simple Way to Do Composition
Plot the coefcient of cos(2t ) and the coefcient of sin(2t ) on
the x y-plane.
The composition is then a cosine function with the starting point at
the plotted point.
(Wireless Communications) Sine-Waves-Part I June 20, 2010 26 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Representation
For a sine/cosine wave we can represent it with an amplitude and
phase
s(t ) = c cos(2t +)
For a sine/cosine wave we can represent it with a component that
multiplies cos(2t ) and a component that multiplies sin(2t ).
s(t ) = acos(2t ) bsin(2t )
(Wireless Communications) Sine-Waves-Part I June 20, 2010 27 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Representation
The c, representation is often called polar coordinate
representation.
The a, b representation is often called rectangular coordinate
representation.
a = c cos(), b = c sin()
c =

a
2
+b
2
, = tan
1
(
b
a
)
a
b
c

(Wireless Communications) Sine-Waves-Part I June 20, 2010 28 / 45


Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Examples (ll in the blanks)
c a b
1 0
1
1 /2
1 /2
1 1
1 -1
We will use these values in the next section using MATLAB.
(Wireless Communications) Sine-Waves-Part I June 20, 2010 29 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Complex Number Representation
We can think of a and b as the real and imaginary part of a
complex number z = a+jb where j = i =

1.
The sum of two sinusoids of the same frequency but different
phases and amplitudes corresponds to the sum of the two pairs of
numbers. That is, if
s
1
(t ) = a
1
cos(2t ) b
1
sin(2t )
and
s
2
(t ) = a
2
cos(2t ) b
2
sin(2t )
then
s
1
(t ) +s
2
(t ) = (a
1
+a
2
)cos(2t ) (b
1
+b
2
)sin(2t )
(Wireless Communications) Sine-Waves-Part I June 20, 2010 30 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Complex Number Representation
So we can represent a sinusoid by a complex number (a+jb)
where the real part represents the in-phase (cosine) term and the
imaginary part represents the quadrature-phase (-sine) term.
Alternatively we can represent a sinusoid by a magnitude and
phase c.
The addition of two sinusoids of the same frequency corresponds
to the addition of the complex number representations.
When we use complex numbers to represent sinusoids we have to
keep in mind that it is a representation at a given frequency.
(Wireless Communications) Sine-Waves-Part I June 20, 2010 31 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Phase Shift
Suppose we have a sine wave with in-phase component a and
quadrature-phase component b.
Suppose we shift the phase by 90 degrees.
This corresponds to changing the in-phase and quadrature-phase
from (a, b) to (b, a).
If we write the I and Q values as a single complex number a+jb
then a 90 degree rotation corresponds to multiplying the complex
number a+jb by j . (a+jb)j =b +ja.
More conveniently we can use polar coordinates. If c and
represent the amplitude and phase and there is a phase shift by
then the amplitude remains the same but the phase has shifted by
.
(Wireless Communications) Sine-Waves-Part I June 20, 2010 32 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Phase Shift
(a, b)
(b, a)
90

(Wireless Communications) Sine-Waves-Part I June 20, 2010 33 / 45


Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Phase Shift
Suppose we have a sinusoid with parameters a
1
and b
1
and want to
determine the parameters for the sinusoid that is a phase shift of the
rst sinusoid.
s
1
(t ) = a
1
cos(2t ) b
1
sin(2t )
= c
1
cos(2t +
1
), c
1
=
_
a
2
1
+b
2
1
,
1
= tan
1
(b
1
/a
1
)
s
2
(t ) = c
1
cos(2t +
1
+)
= c
2
cos(2t +
2
)
c
2
= c
1

2
=
1
+
1
(Wireless Communications) Sine-Waves-Part I June 20, 2010 34 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Phase Shift
s
2
(t ) = c
1
cos(2t +
1
+)
s
2
(t ) = c
1
cos(
1
+)
. .
a
2
cos(2t ) c
1
sin(
1
+)
. .
b
2
sin(2t )
a
2
= c
1
cos(
1
+)
= c
1
cos(
1
)cos() c
1
sin(
1
)sin()
= a
1
cos() b
1
sin()
b
2
= c
1
sin(
1
+)
= c
1
sin(
1
)cos() +c
1
cos(
1
)sin()
= b
1
cos() +a
1
sin()
(Wireless Communications) Sine-Waves-Part I June 20, 2010 35 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Rotating a vector
a
1
b
1
a
2
b
2

sin()
cos()
cos()

(a
1
, b
1
) (a
2
, b
2
)
a
b
(Wireless Communications) Sine-Waves-Part I June 20, 2010 36 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Exercise:
Find the relation between (a
1
, b
1
) and (a
2
, b
2
) for several different
values of .
a
2
b
2
90 (/2) a
2
=b
1
b
2
= a
1
90 (/2) a
2
= b
2
=
180 ()
30 ()
(Wireless Communications) Sine-Waves-Part I June 20, 2010 37 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Representation of a Sinusoid with Known Frequency
Rectangular Representation
A sinusoid can be represented as a weighted sum of a cosine
(in-phase) term and a sine (quadrature-phase) term.
s(t ) = acos(2t ) bsin(2t )
Polar Representation
A sinusoid can be represented as a cos wave some phase and
amplitude.
s(t ) = c cos(2t +)
(Wireless Communications) Sine-Waves-Part I June 20, 2010 38 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Rotating Vectors
The horizontal and vertical components of a unit length rotating
vector sweeps out sinusoidal signals.
If the vector starts at the point (1,0) then the horizontal component
is cos(2t ).
If the vector starts at the point (1,0) then the vertical component is
sin(2t ).
We can think of the end point of the vector as a complex number
with the real part representing the horizontal component and the
imaginary part representing the vertical component.
In this case the point in the plane is cos(2t ) +j sin(2t ).
(Wireless Communications) Sine-Waves-Part I June 20, 2010 39 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Complex Exponential
1 0.5 0 0.5 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
exp(j 2t)
cos(2t)
sin(2t)
Real
I
m
a
g
(Wireless Communications) Sine-Waves-Part I June 20, 2010 40 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
For convenience we right this as e
(j 2t)
= cos(2t ) +j sin(2t ).
Also e
(j 2t)
= cos(2t ) +j sin(2t ) = cos(2t ) j sin(2t ).
Thus Real[exp(j 2t )] = cos(2t ) and Imag[exp(j 2t )] = sin(2t )
(Wireless Communications) Sine-Waves-Part I June 20, 2010 41 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Rotating Vectors
Notice that
cos(2t ) =
exp(j 2t ) +exp(j 2t )
2
sin(2t ) =
exp(j 2t ) exp(j 2t )
2j
(Wireless Communications) Sine-Waves-Part I June 20, 2010 42 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Rotating a vector
To rotate using complex exponentials
(a
2
+jb
2
) = (a
1
+jb
1
)exp(j )
= (a
1
+jb
1
)(cos() +j sin())
= (a
1
cos() b
1
sin()) +j (b
1
cos() +a
1
sin())
(Wireless Communications) Sine-Waves-Part I June 20, 2010 43 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
1 0.5 0 0.5 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
1
2
exp(j 2t)
1
2
exp(j 2t)
cos(2t) =
1
2
exp(j2t) +
1
2
exp(j2t)
Real
I
m
a
g
(Wireless Communications) Sine-Waves-Part I June 20, 2010 44 / 45
Module 2: Sine Waves-Part I Amplitude, Phase, In-Phase, Quadrature
Summary
A sine wave with a given frequency and some phase (delay) can
be represented by a in-phase component and an
quadrature-phase component.
A phase shift corresponds to rotating the in-phase component and
the quadrature phase component.
Phase shift (rotation) corresponds to multiplying the complex
representation by exp(j ).
(Wireless Communications) Sine-Waves-Part I June 20, 2010 45 / 45

You might also like