DSP First - Chapter 4 - Sampling and Aliasing
Sinusoids, or sinusoidal signals, representing the cosine or sine signals/waves, are the most basic signals in the theory of signals and systems. This chapter introduces the basic sinusoid concepts and operations.
Review of sine and cosine functions
- Basic trigonometric functions.
Properties
- Equivalence: sinθ=cos(θ−π/2) or cosθ=sin(θ+π/2); the sine function is just a cosine function that is shifted to the right by π/2,
- Periodicity: cos(θ+2πk)=cosθ, where k∈Z,
- Evenness of cosine: cos(−θ)=cosθ,
- Oddness of sine: sin(−θ)=−sinθ,
- Zeros of sine: sin(πk)=0, for k∈Z,
- Ones of sine: cos(2πk)=1, for k∈Z,
- Minus ones of cosine: cos[2π(k+12)]=−1, for k∈Z,x
- Derivatives: dsinθdθ=cosθ and dcosθdθ=−sinθ.
Trigonometric identities
- sin2θ+cos2θ=1,
- cos2θ=cos2θ−sin2θ,
- sin2θ=2sinθcosθ,
- sin(α±β)=sinαcosβ±cosαsinβ,
- cos(α±β)=cosαcosβ∓sinαsinβ,
- cos2θ=12(1+cos2θ),
- sin2θ=12(1−cos2θ).
Sinusoidal signals
The general mathematical formula for a cosine signal is
x(t)=Acos(ω0t+ϕ)=Acos(2πf0t+ϕ), where - A is the amplitude, - ω0 is the radian frequency (rad/sec), - ϕ represents the radian phase-shift (rads), - f0=ω0/2π, the cyclic frequency (sec−1), represents the number of periods (cycles) per second, - T0=1f0=2πω0, the period (sec), is the one cycle length of the sinusoid in time.
Phase shift and time shift
- Having x1(t)=x(t−t1), we say x(t) is a time-shifted version of s(t)
- if t1>0 (positive), shifted to the right = delayed,
- if t1<0 (negative), shifted to the left = advanced.
- Taking the sinusoid as the form in Eq. (1),
- convert time shift to a phase shift: x(t−t1)=Acos(ω0(t−t1)+ϕ)=Acos(ω0t+ϕ+ϕ1), where ϕ1=−ω0t1 is the phase shift.
- t1=−ϕω0=−ϕ2πf0,
- ϕ1=−2πf0t1=−2πt1T0.
- Based on the definition of the time shift and the phase shift, they have the opposite direction, e.g., if the time shift is positive (delay), the phase shift would be negative.
- modulo reduction and principal value of the phase.
Sampling and plotting sinusoids
- Be careful of the use of n and t, meaning one can use either x(nTs) or x(t) but never x(tTs).
Complex exponentials and phasors
- Complex exponentials signals provide an alternative representation for the real cosine signal and might make some manipulation or analysis easier.
Review of complex numbers
- Real part and imaginary part.
- Cartesian form or polar form.
- Magnitude and argument
- Euler's formula: ejθ=cosθ+jsinθ
Complex exponentials signal
- ˉx(t)=Aej(ω0t+ϕ)
- x(t)=ℜ{Aej(ω0t+ϕ)}=Acos(ω0t+ϕ)
The rotating phasor interpretation
- The complex exponential signal could be expressed as ˉx(t)=Xejω0t, i.e., the product of the complex amplitude X=Aejϕ and the complex-valued function ejω0t.
- The complex amplitude X is also called the phasor (vs. vector) (相量 vs. 向量).
- ˉx(t)=Xejω0t=Aejθ(t), where θ(t)=ω0t+ϕ.
- In the complex plane, ˉx(t) is simply a rotating vector at a constant rate ω0 with initial phase ϕ (t=0). So a complex exponential signal is a rotating phasor.
- ω0>0: rotating counterclockwise,
- ω0<0: rotating clockwise.
Inverse Euler formulas
- Applying the inverse Euler's formula, the real cosine signal with radian frequency ω0 is composed of two conjugated complex exponential signals with frequencies of ω0 and −ω0, and also complex amplitudes of 12Aejϕ and −12Aejϕ, respectively. x(t)=Acos(ω0t+ϕ)=12ˉx(t)+12ˉx∗(t)=ℜ{ˉx(t)}
Phasor Addition
- Additions of sinusoids with the same frequency but different amplitudes and phases
Addition of complex numbers
- z1+z2=(x1+x2)+j(y1+y2).
Phasor addition rule
- The summation of sinusoids with the same frequency is a sinusoid with the identical frequency with the amplitude and phase of a certain phasor calculated by the summation of the phasors of each sinusoid.
- Summation of phasors is also a phasor: N∑k=1Akejϕk=Aejϕ
- Finally, lead us to: N∑k=1Akcos(ω0t+ϕk)=Acos(ω0t+ϕ) which could be proved either by
- trigonometric identities, or
- summation of phasors following the steps:
- Get the phasors Xk=Akejϕk of each individual cosine signals,
- Add phasors using Eq. (2), employing polar-to-Cartesian-to-polar conversion,
- Multiply the resulting phasor X=Aejϕ with the rotating function ejω0t and get ˉx(t),
- Take the real part and get x(t)=ˉx(t).
Tuning fork and its physics
- higher-frequency "ting" and the lower-frequency "hum", where the "ting" comes from the transient.