You are on page 1of 4

Sinusoids

CMPT 318: Lecture 3


Sinusoids • “Sinusoids” is a collective term referring to both sine
Tamara Smyth, tamaras@cs.sfu.ca
and cosine functions.
School of Computing Science, • A sinusoid is a function of time having the following
Simon Fraser University
form:
January 16, 2006
x(t) = A sin(ωt + φ),
where x is the quantity which varies over time and
A , peak amplitude
ω , radian frequency (rad/sec) = 2πf
f , frequency (Hz)
t , time (seconds)
φ , initial phase (radians)
ωt + φ , instantaneous phase (radians)
Sinusoidal Signal
2

Amplitude
0

−1

−2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (s)

Figure 1: Sinusoid where A = 2, ω = 2π5, and φ = π/4.

1 CMPT 318: Fundamentals of Computerized Sound: Lecture 3 2

Amplitude and Magnitude. Phase and Period.

• The term peak amplitude, often shortened to • The initial phase φ, given in radians, tells us the
amplitude, is the nonnegative value of the position of the waveform cycle at t = 0. Also
waveform’s peak (either positive or negative). sometimes called:
• The instantaneous amplitude of x is the value of – phase offset
x(t) (either positive or negative) at time t. – phase shift
• The instantaneous magnitude, or simply – phase factor
magnitude, of x is nonnegative and is given by • One cycle of a sinusoid is 2π radians.
|x(t)|.
• The period T of a sinusoid is the time (in seconds) it
takes to complete one cycle.
• Since sinusoids are periodic with period 2π, an initial
phase of φ is indistinguishable from an initial phase of
φ ± 2π.
– We may therefore restrict the range of φ so that it
does not exceed 2π.
– Typically we choose the range
−π < φ < π,
but we many also encouter
0 < φ < 2π.
CMPT 318: Fundamentals of Computerized Sound: Lecture 3 3 CMPT 318: Fundamentals of Computerized Sound: Lecture 3 4
Frequency Sine and cosine functions.

• The sine and cosine function are very closely related


and can be made equivalent simply by adjusting their
• The frequency f of the waveform is given in cycles
initial phase:
per second or Hertz (Hz).
π π
• Frequency is equivalent to the inverse of the period T sin θ = cos(θ − ) or cos θ = sin(θ + ).
2 2
of the waveform,
1

f = 1/T Hz. 0.5

Amplitude
0
• The radian frequency ω, given in radians per second,
−0.5
is equivalent to the frequency in Hertz scaled by 2π, −1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (s)
ω = 2πf (rad/sec).
Figure 2: Phase relationship between cosine and sine functions.

• In calculus, the sine and cosine functions are


derivatives of one other. That is,
d sin θ d cos θ
= cos θ and = − sin θ.
dt dt

CMPT 318: Fundamentals of Computerized Sound: Lecture 3 5 CMPT 318: Fundamentals of Computerized Sound: Lecture 3 6

Time-shifting a signal. • Shifting the function by t1 = −1 seconds yields


y(t) = s(t + 1) = t + 1 0≤t+1≤1
• If a signal can be expressed in the form = t+1 − 1 ≤ t ≤ 0,

x(t) = s(t − t1), which is simply s(t) with its origin shifted to the left,
or advanced in time, by 1 seconds.
we say x(t) is a time-shifted version of s(t).

s(t) x(t) = s(t−2) y(t) = s(t+1)

A positive phase indicates a shift to


1 1 1
the left whereas a negative phase in-
dicates a shift to the right.
0 1 0 1 2 3 −1 0 1 2

Figure 3: Time-shifting a signal.

• Consider the simple function


s(t) = t 0 ≤ t ≤ 1.

• Shifting the function by t1 = 2 seconds yields


x(t) = s(t − 2) = t − 2 0≤t−2≤1
= t−2 2 ≤ t ≤ 3,
which is simply s(t) with its origin shifted to the
right, or delayed, by 2 seconds.
CMPT 318: Fundamentals of Computerized Sound: Lecture 3 7 CMPT 318: Fundamentals of Computerized Sound: Lecture 3 8
Sinusoidal and Circular Motion Sinusoidal and Circular Motion cont.

• Consider a vector of length one (1), rotating at a • The x- and y-axis are the horizontal and vertical lines
steady speed in a plane, the vector tracing a circle intersecting at the circle’s centre.
with a radius equal to its length. y-axis
(0, 1)


π/2 

( √12 , √12 )







π/4


(-1, 0)


θ 

(1, 0)
1
 

 

 

x-axis
π 2π
  

 





(0, -1)

3π/2 Figure 5: The vector coordinates are determined by projecting onto the x and y-axis.

Figure 4: A vector rotating along the unit circle.


• Projecting the vector onto the x- and y-axes allows us
• Each time the vector completes one rotation of the to determine its coordinates in the xy-plane.
circle, it has completed a cycle of 2π. • If the vector is rotated in a counterclockwise direction,
• The rate at which the vector completes one cycle is at angle θ from the positive x-axis, projecting onto
given by its frequency. both the x- and y-axes creates right angle triangles.

• The length of the vector is given by its amplitude • Trigonometric identities, with knowledge of θ and the
(which for simplicity, in this case, is one (1)). vector length, will help us determine the coordinates.
CMPT 318: Fundamentals of Computerized Sound: Lecture 3 9 CMPT 318: Fundamentals of Computerized Sound: Lecture 3 10

Sinusoids and Circular Motion cont. Adding two sinusoids of the same
frequency
• Projecting onto the x- and y-axis gives a sequence of
points that resemble a cosine and sine function • Adding two sinusoids of the same frequency but with
respectively. possibly different amplitudes and phases,
produces another sinusoid at that frequency.
amplitude −−−>

3
sin(4πt)
2 2sin(4πt + π/4)
Amplitude

sum
1

0
time −−−>
−1

−2

−3
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (s)
Figure 7: Adding two sinusoids of the same frequency.

amplitude −−−>
time −−−>

• Recalling the expression for sinusoidal motion and


trigonometric identities1 , we may see that
x = A sin(ω0t + φ) = A sin(φ + ω0t)
= [A sin φ] cos ω0t + [A cos φ] sin ω0t
= B cos ω0t + C sin ω0t,
Figure 6: Projecting onto the x and y axis.
1
sin(A + B) = sin(A) cos(B) + cos(A) sin(B)

CMPT 318: Fundamentals of Computerized Sound: Lecture 3 11 CMPT 318: Fundamentals of Computerized Sound: Lecture 3 12
where the amplitude A is given by Vector Addition

A = B 2 + C 2,
and the phase φ is given by • Since one vector represents one sinusoid, to add two
  sinusoids of the same frequency, we need only perform
−1 C
φ = tan . vector addition.
B

y−axis
V
Every sinusoid can be expressed as the sum U

of a sine and cosine function, or equivalently,


an “in-phase” and “phase-quadrature” com- U
V
ponent.
x−axis
Figure 8: Adding sinusoids using vector addition.

• Since the vectors have the same frequency, they will


rotate as a unit and their sum will have the same
frequency.
• The sum vector u + v in Figure 8 also has its own x
and y component (from projecting onto the x- and
y-axes) and therefore may have a different amplitude
and phase.
CMPT 318: Fundamentals of Computerized Sound: Lecture 3 13 CMPT 318: Fundamentals of Computerized Sound: Lecture 3 14

You might also like