# Question about arg function

1. Feb 26, 2007

### pyro_dragun

Alright, after seeing it for a few time in my courses, I am still confused on how to actually calculate this function. I know that the arg function describes the phase of a signal, and that's all fine and dandy, but I would like some sort of mathematical equation to calculate it. I know it has something to do with an arctan.

For example, in my DSP book, these transfer functions are given:

H1(z) = (z+b)/(z+a) 0<|a|<1
H2(z) = (bz+1)/(z+a) 0<|b|<1

It then goes on to calculate the arg without showing any steps:

arg[H1(e^jw)] = arctan(sin w/(b+cos w)) - arctan(sin w/(a+cos w))

and

arg[H2(e^jw)] = arctan(b*sin w/(1+b*cos w)) - arctan(sin w/(a+cos w))

Could anyone explain to me how this is calculated?

Thanks.

2. Feb 26, 2007

### Gib Z

Draw a complex plane. Find an arbitrary point (a,b), which represents the value a+bi. Draw a line that connects point (a,b) to the origin. Then draw a line from (a,b) to (a,0), then another from (a,0) to the origin. The angle subtended from the origin to the point (a,b) is the argument of the number a+bi. As it can be seen, the length of the segment that connects (a,b) and (0,0) is the modulus of the number, or $\sqrt{a^2+b^2}$.

One can easily see that the line connecting (a,0) and (a,b) has length of b, and line connecting the origin to (a,0) has a length of a.

Simple Trig shows us that $\tan \theta = b/a[/tex]. I hope that answers your question. Edit: Note there are also more complex ways to calculate the argument, such as [itex]\arcsin (b/\sqrt{a^2+b^2})$, but that just makes things harder for us.

Last edited: Feb 26, 2007
3. Feb 26, 2007

### Gib Z

Ahh I just read your post properly and I just realised I didn't address it too well. All I can say is convert the $e^{jw}$ to $\cos w + j\sin w$ and try to see what that relates to what I told you. Use trig to find other expressions for the lengths of the sides.

Edit: Just asking, your studying this from a physics perspective yes? the use of j instead of i gives it away :)

4. Feb 26, 2007

### pyro_dragun

Studying it from an EE perspective ;). I'm learning about filter design modeled by simple transfer functions in the Z-domain right now. I think I managed to figure out how the formula was derived from the your first post though, so thanks. Pretty sure that $z = e^{jw}$ in that example from the book.

5. Feb 28, 2007

### uart

Hi Pyro, Have you looked at the frequency response of (linear) continuous time systems yet, or did you jump straight into discrete time systems first?

Continous time systems are the easiest to deal with in regard to frequency response. Here you only need to substitute $$s = j\omega$$ into the transfer function to evaluate the frequency response (magnitude and phase). In other words, the "s" variable of the continuous time system transfer function corresponds directly to the complex frequency variable.

For discete time systems it's a little different, as you have already obvserved. The variable "z" of the discrete time transfer function actually corresponds to a forward time shift of one sample period "T". You can show that a time shift of "T" has the effect of multplying the Fourier Transform by $$e^{j \omega T}$$. So the frequency response of the discrete time system is found by evaluating the "z" transfer function at,

$$z=e^{j \omega T}$$.

Note that,

$$T = \frac{2 \pi }{\omega_S} = \frac{\pi}{\omega_N}$$,

where $$\omega_S$$ is the sample frequency in radians/sec and $$\omega_N$$ is the Nyquist frequency in rad/sec.

So evaluating the TF at $$z=e^{j \omega T}$$ is the same as using $$z=e^{j \pi \frac{\omega}{\omega_N}}$$.

Thus if you simple substitute $$z=e^{j v}$$ then "digital frequency" variable $$v$$ has the interpretation that it is a linearly scaled frequency variable that ranges from zero to $$\pi$$ while the actual system frequency it represents ranges from zero to $$\omega_N$$.

Last edited: Feb 28, 2007
6. Mar 3, 2007

### pyro_dragun

I've seen continous time transforms before quite a few times, but they were in past classes. This class focuses more on discrete finite transforms, because those are used most often in practical applications.

Also, thanks for the explanation of the variable "z."

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook