Hello Everyone,I have an equation which is the relationship between reflection coefficient and impedance
r=(ZL-ZS)/(ZL+ZS)
ZL and ZS are complex numbers. Typical ZS is always 50+j0.
At the moment I am doing the following for the calculation
ZL imaginary part
ENTER
ZL real part
ENTER
ZS imaginary part
ENTER
ZS real part
ENTER
COMPLEX
-Then this gives me the numerator, I write this down and then
ZL imaginary part
ENTER
ZL real part
ENTER
ZS imaginary part
ENTER
ZS real part
ENTER
COMPLEX
+To get the denominator and again write this down.
Finally I enter the complex numbers in again and / to get the reflection coefficient in rectangluar form and then finally convert it to polar.
I tried writing a program for this but the answer came out completely wrong, though if I do it by hand it's okay.
Anyone have any hints on how to start this?
Also anyone have any RF programs they would like to share?
Does the HP35s handle complex numbers better, so that I could use it as an excuse to buy one?Thanks,
Rav
Complex numbers HP32SII
|
01-09-2008, 04:59 PM
01-09-2008, 07:02 PM
Hi ravwalia, Can you please provide the values you are using? It seems like a simple error when I read your post: When you divide the two complex numbers (i.e. numerator and denominator) you must also press LEFT SHIFT CMPLX prior to executing the division. I also own the 35s and it does seems to have a much improved COMPLEX Operations implementation in that you can treat complex numbers as you do real numbers (without always pressing LEFT SHIFT CMPLX prior to executing the operation) and you actually enter the numbers in a more logical sequence - real part first, then imaginary part. The 35s has can also accommodate up to four separate complex numbers in the complex stack as opposed to only two as in the 32sii - that is a big selling point to me! This makes it 'almost' as good as the 15C in this regard. Verdict: If you do a lot of COMPLEX operations, you will like the 35S. I haven't figured out a way to directly enter a number like: 2-4*SQRT(5)i, as one can easily do with the famous 15C... Oh well. Jeff
01-09-2008, 08:25 PM
Are you sure the keystrokes given above will give the right answer? It looks to me like you have an extra ENTER in each sequence. The last ENTER before you do the complex operation would push the imaginary part of the first number off of the top of the stack and screw up the complex numbers that you are operating on. If your program somehow does this, that would explain why it gives incorrect answers. What is your program listing? I don't have a 32SII in front of me, but an off-the-cuff program to do want you want might be as follows: LABEL A Enter your ZL and ZS values as you described (without the last ENTER), press XEQ A and it will give you your answer in polar form without writng any intermediate answers down. As Jeff K stated, the 35s handles complex numbers in a much more natural way. The only thing worth mentioning is that it does not do Polar to Rectangular and Rectangular to Polar conversions in a manner comparable to the 32SII. It does however let you enter the numbers in either polar or rectangular form, operate on them, and change the display mode to either polar or rectangular. For example, for your problem you could put the calculator in polar display mode, enter your numbers in rectangular form, operate on them, and when complete the answer would be displayed in polar form. The complex number handling capabilities and polar to rectangular conversion capabilities of the 35s generated MUCH discussion last summer when the 35s was released. Search the archives for more information.
01-09-2008, 09:13 PM
Or the other famous 42S. tm
01-09-2008, 10:10 PM
Quote:how about: 5
I think the 15C would require the following: 5
And the 42S: 2
01-10-2008, 12:23 AM
Jeff --
Quote: That's a bit easier in Algebraic (ALG) mode:
MODE 4 Despite its lack of one-screen complex-number display, the HP-15C's complex-number handling is much better. The HP-42S is better yet. -- KS
01-10-2008, 02:40 AM
In the 35s you would enter R=(A-B)/(A+B) as an EQN equation just the way I wrote it down here. Then you display the equation list and solve for R (EQN Right-Shift R) and enter complex numbers A and B each once when prompted: real part followed by pressing i and then imaginary part and R/S. You can then read R from the display either in rectangular or in polar form, depending on how you've set the display mode. A matter of 10 seconds...
01-10-2008, 12:19 PM
Quote:
01-10-2008, 12:29 PM
This program did it very nicely. Thanks for this.
01-10-2008, 12:31 PM
Seems like a really nice and intuitive way to do it. I'm really tempted to get a HP35s now. Thanks, Rav. |
« Next Oldest | Next Newest »
|