Euler's Identity: ej&omega = cos(&omega) + j sin(&omega)
Z = ej&omega
Making discretely sampled sine waves from Z:
let &omega = &pi/4
Successively raize Z to higher powers:
(successively multiply the prior sample result by Z):
Z0 | 1.0 | |
Z1 | 0.707 + 0.707j td> | |
Z2 | = ej&pi/2 = | j |
Z3 | -0.707 + 0.707j | |
Z4 | -1 | |
Z5 | -0.707 + -0.707j | |
Z6 = | -j | |
Z7 = | 0.707 - 0.707j | |
Z8 = | 1.0 | |
etc. | etc. | etc. |
So this complex "Phasor" generates a real cosine wave
and an imaginary sine wave at 1/8 the sample rate.
This is also called a "quadrature oscillator."
We can get the cosine by taking the real part:
cos(&omega t) = Re[e&omega t]
and the sine by taking the imaginary part:
sin(&omega t) = Im[e&omega t]
(1 + a1Z-1 + a2Z-2 + ... + aMZ
-M)
----------------------------------------------
(1 + b1Z-1 + b2Z-2 + ... + bMZ-M)
| H | = Sqrt[ Re(numerator)2 + Im(numerator)2 ] /
                     
Sqrt[ Re(denominator)2 + Im(denominator)2 ]
If we want the phase, we compute Arctan (Im/Re).
The phase angle of a ratio of phasors is the numerator
angle minus the denominator angle:
Arctan (Im(num.) / Re(num.)) - Arctan (Im(denom.) / Re(denom.))
Let's do a specific magnitude example:
Y(&omega) = X(&omega) + Y(&omega)Z-1
H(&omega) = Y/X(&omega) = 1 / (1 - cos(&omega) + jsin(&omega))
| H (&omega) | = 1 / sqrt[1-2cos(&omega)+cos2(&omega) + sin2(&o
mega)]
YAY!!
= 1 / sqrt(2-2cos(&omega)) = 1 / sqrt(sin2(2&omega)) = 1/sin(2&omega)