From: Stefan Jahn <stefan@gr...>  20070314 20:18:21

Am Mi, 14.03.2007, 21:04, schrieb walter steffè: > Hi Stefan Hello Walter, >> The Sparameter port is different from what you used (you used a >> succircuit >> port). You need the "power source" from components/sources. In the >> properties there is a Z to define. > > Ok now I have used the power source > >> >> When you press F2 (simulate) then you will get the Sparameters of >> the circuit normalized to the ones which you specified. >> >> BTW: When you press in your schematic F2, then the simulator complains >> about a missing "Pac" which is the power source I mentioned. >> > > And finally I got the S parameter plot. > > But there are some things I would like to change. > > 1) First of all the S parameter is a complex number and I should be able > to > select between its amplitude and phase while it seems that qucs plots only > the amplitude. > > 2) Usually the amplitudes of S parameters are plotted in dB > (S_dB=20 log10(S). > The plot properties let me to specify a logaritmic scale which is not > exactly > the same as a dB scale and it seems that it does'nt work. Add equations: dB_S21=dB(mag(S[2,1])) ph_S21=phase(S[2,1]) Then you can plot dB_S21 and ph_S21... >> You don't need to renormalize, since Sparameter simulation can do >> it one its own. > > Great . Then the only thing I would like to have are two additional > parameters > in the power source. These parameter are the cut off frequency fc and a > flag that selects between TE and TM modes. The port impedance (used in > the > normalization) has to be redefined as: > > Zc(f) = Zinf f / sqrt(f^2fc^2) for TE ports > Zc(f) = Zinf sqrt(f^2fc^2) / f for TM ports > > You can easely see that Zinf is the limit of both expression when the freq > f > goes to the infinite. > > If you put fc=0 you can see that both expressions reduce to Zc(f)=Zinf > =cost > and this condition corresponds with the TEM case. Hm. Ok for this we would need 'frequency' in equations. I put it on the TODO list. With the new release you will be able to write: freq=1e9 fc=2e8 Zinf=75 Zc=Zinf * freq / sqrt(abs(freq^2  fc^2)) Then you can put Zc into the "Z" property of the power source. Also you will be able to define a subcircuit with freq, fc and Zinf as parameters... Cheers, Stefan. 