Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SPICE models for transmission lines devices #94

Closed
2 of 3 tasks
ra3xdh opened this issue Jul 1, 2022 · 20 comments
Closed
2 of 3 tasks

Add SPICE models for transmission lines devices #94

ra3xdh opened this issue Jul 1, 2022 · 20 comments

Comments

@ra3xdh
Copy link
Owner

ra3xdh commented Jul 1, 2022

The S-parameter simulation support for Ngspice and Xyce backends has been added in the 0.0.24 release. But the SPICE entries for transmission line devices including microstrip still be missing. These devices are unique for Qucsator and have no direct SPICE equivalent. It's need to provide a way to simulate old Qucs RF-circuits with new Ngspice supporting S-parameter analysis.

@ra3xdh ra3xdh added this to the 0.0.25 milestone Jul 1, 2022
@ra3xdh ra3xdh pinned this issue Aug 25, 2022
@ra3xdh ra3xdh modified the milestones: 1.0.0, 1.0.1 Oct 31, 2022
@ra3xdh ra3xdh modified the milestones: 1.0.1, 1.0.2 Feb 4, 2023
@ra3xdh ra3xdh modified the milestones: 1.0.2, 1.0.3 Apr 23, 2023
@ra3xdh ra3xdh modified the milestones: 1.0.3, 1.0.4 Jun 2, 2023
@wsteffe
Copy link

wsteffe commented Jun 25, 2023

From ngspice user manual (section 6.2.1 Lossy Transmission Line Model (LTRA)) I have seen that this simulator supports trnsmission lines and I have also seen that qucs-s provides a circuit element of this kind.

The only problem is that input data (O=LTRL specification) is not user friendly. I would expand it.
In example:

---Input data
Z=
epr_eff=
len=
alpha=(Nepers/length)

---- created ngspice model:
//RLC (uniform transmission line with series loss only):
G=0
Vp=c/sqrt(epsr_eff)=1/sqrt(LC)
C=Z/Vp
L=Z^2 C
R=2 alpha Z

@wsteffe
Copy link

wsteffe commented Jun 25, 2023

Even better:

--input:
alpha_dB=(dB/length) = conductorLoss/L computed in Tools/Line Calculator

---- created ngspice model:
R=2 (alpha_dB/20*ln(10)) Z

@wsteffe
Copy link

wsteffe commented Jun 26, 2023

May I ask to add also an ideal Coupled Transmission Line such as that one of ADS shown below?.
It should be very easy to implement it using ngspice Coupled Conductor Line Model (see at https://nmg.gitlab.io/ngspice-manual/transmissionlines/kspicelossytransmissionlines/coupledmulticonductorline_cpl.html)
ADS_CLIN

@ra3xdh ra3xdh modified the milestones: 2.0.0, 2.0.1 Aug 14, 2023
@tomhajjar
Copy link

Not sure you saw Holger's last ngspice update on 2023-08-04 that includes built in S-parameter file support.

https://sourceforge.net/p/ngspice/discussion/120973/thread/51228e0b01/?page=3

@ra3xdh
Copy link
Owner Author

ra3xdh commented Aug 15, 2023

Yes, I am aware that XFER device is accepted for Ngspice master branch. But I didn't start its implementation in Qucs-S yet. I decided to postpone the s2p files support to the next release. The upcoming v2.0.0 release will be dedicated to the quick switching of the simulation kernels feature #274

@ra3xdh
Copy link
Owner Author

ra3xdh commented Oct 28, 2023

Microstrip devices for Ngspice will be implemented as Verilog-A models. It's need to add the the support of system Verilog-A library first in order to resolve this issue. See #343

@ra3xdh ra3xdh removed this from the 24.1.0 milestone Jan 19, 2024
@ra3xdh ra3xdh added this to the 24.2.0 milestone Jan 19, 2024
@zergud zergud unpinned this issue Feb 2, 2024
@ra3xdh
Copy link
Owner Author

ra3xdh commented Feb 14, 2024

#564 adds support for RLCG device.

@ra3xdh ra3xdh pinned this issue Feb 14, 2024
@ra3xdh
Copy link
Owner Author

ra3xdh commented Feb 17, 2024

The development of OpenVAF compiler seems to be suspended: pascalkuthe/OpenVAF#111 (comment) It's need to find another way to implement microstrip devices models instead of Verilog-A.

@tomhajjar
Copy link

tomhajjar commented Feb 17, 2024

qucsator_rf will fill the gap. Most people using distributed matching elements are using active devices that only have s-parameters available.

I wouldn't want to design a narrow-band microwave filter using models based on Verilog-A models that have not been fully vetted by making and testing PCBs.

Has anyone actually made any of the microwave filter examples in Qucs and confirm accuracy?

@zergud
Copy link
Collaborator

zergud commented Feb 17, 2024

I think we should provide a convenient mechanism to use qucsator-rf subcircuits (such microstrip filters etc) in ngspice simulation through s-parameters

@ra3xdh
Copy link
Owner Author

ra3xdh commented Feb 17, 2024

@zergud I am not sure if hybrid simulation it is needed for Ngspice. And I still don't understand its advantage. Everything is clear with OpenEMS/Qucsator hybrid simulation when OpenEMS exports s2p data. Such simulation would be useful if implemented. But I suspect Qucsator/Ngspice hybrid simulation will bring nothing except convergence errors.

@ra3xdh
Copy link
Owner Author

ra3xdh commented Feb 17, 2024

I am more inclined to cancel the MS lines models task for Ngspice because OpenVAF is suspended and restrict MS simulation to Qucsator only.

@ra3xdh ra3xdh removed this from the 24.2.0 milestone Feb 17, 2024
@zergud
Copy link
Collaborator

zergud commented Feb 17, 2024

it will be useful for power amplifier, such https://www.researchgate.net/figure/The-FLK052WG-class-E-microstrip-power-amplifier-This-amplifier-delivers-061-W-into-50_fig6_3120466
input and output circuits are microstrip circuit

@zergud
Copy link
Collaborator

zergud commented Feb 17, 2024

IMHO, it’s too early to talk about suspending of OpenVAF
anyway, this issue can be closed

@tomhajjar
Copy link

Using Qucsator is a low risk solution. There are enough "Qucs" microstrip models to satisfy the average user. A large company is going to pay for ADS.

@zergud

In general you won't have Spice models for most of these RF devices. One can always use transmission Spice models

@zergud
Copy link
Collaborator

zergud commented Feb 17, 2024

In general you won't have Spice models for most of these RF devices. One can always use transmission Spice models

that's what I meant

@ra3xdh
Copy link
Owner Author

ra3xdh commented Feb 17, 2024

I suspect the UHF amplifier like shown below will not converge using the existing s2p device implementation and Ngspice. Need to export s2p data manually and test. This schematic is using only two types of microstrips except cross.

amp-ms.pdf

@ra3xdh
Copy link
Owner Author

ra3xdh commented Feb 17, 2024

I decided to cancel implementation of native microstrip models for Ngspice and close this issue. May be reopened if some new ideas will appear in the future. But let's concentrate now on reverting Qucsator in the Qucs-S distribution #370.

@ra3xdh ra3xdh closed this as completed Feb 17, 2024
@tomhajjar
Copy link

tomhajjar commented Feb 17, 2024

The cross is not needed and there is only one transmission line type used.

A simple Tline model that only uses Zo, length (deg) and F would work for most analysis.

Vipec is an ancient analysis program that did transmission lines. Source is available and attached below.

https://vipec.sourceforge.net/

2024-02-17_113529

2024-02-17_112422

ViPEC-3.2.0.zip

@tomhajjar
Copy link

See #601. I have an alternate way of replacing TLines in RF analysis.

@ra3xdh ra3xdh mentioned this issue Mar 10, 2024
2 tasks
@ra3xdh ra3xdh unpinned this issue Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants