# [TowerTalk] S21 to Rp & Cp - Equivalent Circuit

Thu Jan 11 13:48:05 EST 2018

```On 1/11/18 10:01 AM, Máximo EA1DDO_HK1H wrote:
> Hi Jim, Steve, all,
>
>
> Playing with those formulas I´ve got an inconsistency.
>
>
> To get R and jX from LogMag and Phase I can use two different formulas, one from Steve and one from Jim, but the results are not same, so I don´t know where the mistake is.
>
>
> Example from Excel;
>
>
> LogMag -29.601925
>
> Phase  -77.10851
>
>
> Steve´s formula:
>
> Rx = (100*10^(-LogMag/20))/(SQRT(1+(TAN(Phase/57.29578))^2))-100  =  573.916
>
> X = -(Rx+100)*TAN(Phase/57.29578)  =  2944.484
>
>
>
> Jim´s formula:
>
>
> R = COMPLEX(10^((LogMag/20)*(COS((Phase*PI())/180))),10^((LogMag/20)*(SIN((Phase*PI())/180))))
>
> then Rx+jX = IMPRODUCT(50,IMDIV(IMSUM(1,R),IMSUB(1,R)))  =  -49.930  +3.606
>
>
> As you can see, 573 is not same as -49 OHm
>
> And 2944 is not 3.606
>
>
> Anyone know where the error is?
>
>
> Thank you
>
>

I'll take a look later this afternoon..
It should just be algebra.

There's clearly an error in mine (negative resistance)

```