Qucs / qucsator

Circuit simulator of the Qucs project
http://qucs.sourceforge.net
GNU General Public License v2.0
23 stars 10 forks source link

matrix math: fix twoport for S to T and T to S #27

Closed thliebig closed 3 months ago

thliebig commented 3 years ago

S_22 and T_22 are not set at all (looks like copy-paste error)

The correct formulas can be found at: http://qucs.sourceforge.net/tech/node98.html

Signed-off-by: Thorsten Liebig Thorsten.Liebig@gmx.de

felix-salfelder commented 3 years ago

On Wed, Mar 24, 2021 at 02:50:47AM -0700, Thorsten Liebig wrote:

S_22 and T_22 are not set at all (looks like copy-paste error)

Thanks for fixing Qucsator.

I agree with the "copy-paste". I wonder if the affected code is (was) used anywhere. Can you provide a minimal example or test?

(Currently, Qucsator is unmaintained, please be patient)

thliebig commented 3 years ago

StoT.zip In the attached a Qucs file in which the T matrix is calculated by equations and with the twoport function for comparison, both should give the same results. Without the patch T22 is always just zero and T12 is wrong as it is T22. I did not test the reverse, but it should be obvious. You may need to fix the path to the Line_1.s2p file component or copy it where qucs can finds it.

thliebig commented 3 years ago

BTW, are there any tips on how to compile qucsator on Windows? It was easy on Linux, but I was unable to compile for windows. Any help would be appreciated. Thanks