the Z domain
01/11/2012 § 1 Comment
Alrighty, we are getting closer to our first filter. Sit tight!
So what is this domain business by the way, you ask. Well, that’s just a ‘name’ for method of ‘representation’ of a signal. I’ll stick to discrete signal. When we say ‘time domain representation’ we are talking about varation of signal with respect to time. Simple, isn’t it ?
You might have guessed it by now – it’s the variation of energy of signal with respect to time. Why do we need it ? Well you might use this information to make you music ‘sound’ better – say, when you boost the Bass you are literally boosting signal energy in lower frequencies. Or let’s take other example, in communication systems often there is addition of narrow band noise (noise only in a given frequency range), engineers remove it by passing the signal through a notch filter which attenuates the unwanted frequency. This may be accompanied with loss of information. Besides, every filter you can think of does it’s work in freqecy domiain.
conversion from time domain to frequency domain
A long time ago, not so long, but quite long… there lived a mathematician in France, Joseph Fourier. He gave a way to see a given signal in ‘frequency domain‘. The way I see it, a generalized version maybe, any signal can be represented as sum of series of any other signal (I am yet to claim my patent). Fourier transform uses infinite series of sine/cosine to represnt a given signal in time domain and that’s how you can get a signal’s frequency response. I’ll not go deep into it, because will not quite use it. Btw, if you ever want to do Fourier transform don’t to wirte code, there are some excellent open source libraries available for it.
the Z domain
Like frequency and time domain, z domain is again a way of representing digital signal. You may find really good explanations if you search for it. But here are the key points:
- The horozontal line in z domain is real axis whereas the vertical line is imaginary axis.
- Frequencies of digital signal are mapped on upper half of unit circle.
- From previous point. A frequency f on unit circle will be represented as:
ω = 2 * ∏ * f / fs, fs is sampling frequency
- ω (omega) is called the ‘angular frequency’.
- Poles must be inside unit circle for system to be stable, that’s quite straightforward to notice. If pole will be out side unit circle the function in time domain will never converge.
- Complex poles/zeros must occur in complex conjugate pair otherwise signal won’t be a real signal.
- Zeros may occur outside unit circle.
- Poles boost a given frequency, i.e., the closer the pole to a given freqency on unit circle the more boost that frequency will have.
- Zeros attenuate a given frequency, i.e., the closer the zero to a given frequency on unit circle the more attenuation it will have.
- Engineers try to keep placement of poles and zeros in a manner that system remains stable, boosts a given set/range of frequencies and attenuate other.
Effect on phase response is not yet very clear to me. Once I understand it fully I’ll update this post.
- realliZation is a open source, lunch time project, which I am solely (so far at least) developing.
- It’s made on Qt/C++. Initial idea was to see Z domain to time domain conversion when user gives location of poles and zeros on Z plane’s GUI representation but later I decided to use this tool as a test bed for my DSP theories that I discover as I am on escapade with Sound Processing.
- Octave/Matlab are not enough when you want to see how to ‘actually’ implement a DSP algo and not just see if it works superficially.
- I can’t guarantee it’s behavior because its a tool that I developed for playing around wuth numbers – nothing serious.
- You are welcome to contribute/use/test. and if you need any help regarding code documentation or any thing just comment/email/ping me on Skype… whatever works for you.
I have covered most of the points. I might be still missing some. If so, please reply in comment.