topic plotting complex impedances in PTC Mathcad
https://community.ptc.com/t5/PTC-Mathcad/plotting-complex-impedances/m-p/686910#M191827
<P>How to plot complex impedances where it is a product of 2 complex functions</P>
<P> </P>
<P> Impedances of a capacitor Zc = 1/s*c(s) and the unit is Farad</P>
<P> where s is the Laplace Domain variable = 1j*w = 1j*2*pi*frequency</P>
<P> in my case, c(s) is the capacitance but is a function of s</P>
<P> </P>
<P>I want to plot the magnitude of Zc = {[Re(Zc)]^2+[I'm(Zc)]^2}^0.5 versus frequency</P>
<P> </P>
<P>If Zc is evaluated with "=", the result returns a scalar</P>
<P> </P>
<P>I asked PTC helps and they said it is because I have 2 vectors multiplied together, so it returns a scalar. They recommend to vectorize the Zc expression but if you do that, it return a complex impedances of 1000 frequencies (the # of points I have), and then find a way to convert the 1000 complex impedances into the magnitude of each of the 1000 complex impedances.</P>
<P> </P>
<P>My question is: Why do I have to vectorize the Zc expression? Is there another way to do it that does not need to vectorize Zc? I find it hard to believe when you want to plot out the magnitude or phase of a complex function that contains a product of more than 2 functions, you have to vectorize it. </P>
<P> </P>
<P>Please see attached file</P>
<P> </P>
<P>Thanks a lot for your helps</P>
<P>Rdliquid</P>
<P> </P>
<P>PS: I am using Mathcad Prime 6.0</P>Thu, 10 Sep 2020 18:00:10 GMTrdliquid2020-09-10T18:00:10Zplotting complex impedances
https://community.ptc.com/t5/PTC-Mathcad/plotting-complex-impedances/m-p/686910#M191827
<P>How to plot complex impedances where it is a product of 2 complex functions</P>
<P> </P>
<P> Impedances of a capacitor Zc = 1/s*c(s) and the unit is Farad</P>
<P> where s is the Laplace Domain variable = 1j*w = 1j*2*pi*frequency</P>
<P> in my case, c(s) is the capacitance but is a function of s</P>
<P> </P>
<P>I want to plot the magnitude of Zc = {[Re(Zc)]^2+[I'm(Zc)]^2}^0.5 versus frequency</P>
<P> </P>
<P>If Zc is evaluated with "=", the result returns a scalar</P>
<P> </P>
<P>I asked PTC helps and they said it is because I have 2 vectors multiplied together, so it returns a scalar. They recommend to vectorize the Zc expression but if you do that, it return a complex impedances of 1000 frequencies (the # of points I have), and then find a way to convert the 1000 complex impedances into the magnitude of each of the 1000 complex impedances.</P>
<P> </P>
<P>My question is: Why do I have to vectorize the Zc expression? Is there another way to do it that does not need to vectorize Zc? I find it hard to believe when you want to plot out the magnitude or phase of a complex function that contains a product of more than 2 functions, you have to vectorize it. </P>
<P> </P>
<P>Please see attached file</P>
<P> </P>
<P>Thanks a lot for your helps</P>
<P>Rdliquid</P>
<P> </P>
<P>PS: I am using Mathcad Prime 6.0</P>Thu, 10 Sep 2020 18:00:10 GMThttps://community.ptc.com/t5/PTC-Mathcad/plotting-complex-impedances/m-p/686910#M191827rdliquid2020-09-10T18:00:10ZRe: plotting complex impedances
https://community.ptc.com/t5/PTC-Mathcad/plotting-complex-impedances/m-p/686912#M191828
<P>The attached sheet should help and explains why vectorization is needed.</P>
<P> </P>Thu, 10 Sep 2020 18:35:43 GMThttps://community.ptc.com/t5/PTC-Mathcad/plotting-complex-impedances/m-p/686912#M191828Werner_E2020-09-10T18:35:43ZRe: plotting complex impedances
https://community.ptc.com/t5/PTC-Mathcad/plotting-complex-impedances/m-p/686925#M191829
<P>Hi Werner_E,</P>
<P> </P>
<P>Thanks a lot for your helps. You answered my questions. OK I will vectorize(---->) and absolute | | the expression from now on</P>
<P> </P>
<P>Rdliquid</P>Thu, 10 Sep 2020 19:20:17 GMThttps://community.ptc.com/t5/PTC-Mathcad/plotting-complex-impedances/m-p/686925#M191829rdliquid2020-09-10T19:20:17ZRe: plotting complex impedances
https://community.ptc.com/t5/PTC-Mathcad/plotting-complex-impedances/m-p/687129#M191861
<P>Hi </P>
<P> </P>
<P>I though I understand vectorization until I ran into this strange issue. Can you explain:</P>
<P> </P>
<P>H(s) is a complex function</P>
<P>G(s) is a vectorized of H(s)</P>
<P> </P>
<P>Each one returns a different result. Do you know why?</P>
<P> </P>
<P>Please see attached</P>
<P> </P>
<P>Thanks again,</P>
<P>Rdliquid</P>
<P> </P>Fri, 11 Sep 2020 23:11:46 GMThttps://community.ptc.com/t5/PTC-Mathcad/plotting-complex-impedances/m-p/687129#M191861rdliquid2020-09-11T23:11:46ZRe: plotting complex impedances
https://community.ptc.com/t5/PTC-Mathcad/plotting-complex-impedances/m-p/687132#M191862
<BLOCKQUOTE><HR /><LI-USER uid="308814"></LI-USER> wrote:<BR />
<P>Hi </P>
<P> </P>
<P>I though I understand vectorization until I ran into this strange issue. Can you explain:</P>
<P> </P>
<P>H(s) is a complex function</P>
<P>G(s) is a vectorized of H(s)</P>
<P> </P>
<P>Each one returns a different result. Do you know why?</P>
<P> </P>
<HR /></BLOCKQUOTE>
<P>Sure!</P>
<P>R.s/z.dsl and z.d5ls/R.l are both vectors and without vectorization the product is calculated as vector product which obviously is not what you intended.</P>
<P>If you want an expression containing vectors to be evaluated elementwise you should always use vectorization.</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_0-1599868263552.png" style="width: 400px;"><img src="https://community.ptc.com/t5/image/serverpage/image-id/31327i63A1E5147CB74496/image-size/medium?v=v2&px=400" role="button" title="Werner_E_0-1599868263552.png" alt="Werner_E_0-1599868263552.png" /></span></P>
<P> </P>Fri, 11 Sep 2020 23:51:13 GMThttps://community.ptc.com/t5/PTC-Mathcad/plotting-complex-impedances/m-p/687132#M191862Werner_E2020-09-11T23:51:13Z