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

XSPICEPS1S2 transformer issues #367

Closed
1 task done
tomhajjar opened this issue Nov 16, 2023 · 6 comments
Closed
1 task done

XSPICEPS1S2 transformer issues #367

tomhajjar opened this issue Nov 16, 2023 · 6 comments
Labels
Milestone

Comments

@tomhajjar
Copy link

tomhajjar commented Nov 16, 2023

I found more problems with XSPICEPS1S2 in Transformer.lib. I made three circuits comparing XSPICEPS1S2 and TransformerPS1S2 in Transformer.lib to Three Mutual Inductors in Components. Analysis of TransformerPS1S2 and Three Mutual Inductors generally agree but XSPICEPS1S2 is wrong and generates errors.

XSPICEPS1S2 has two issues:

  1. Rp, Rs1 and Rs2 generate warnings. Is there node naming issues like in TransformerPS1S2?
  2. The "Turns Ratio" is half what it should be. You can see the output voltages and currents in the plots are half compared to transformers TransformerPS1S2 and Three Mutual Inductors.

I recreated the subcircuit for XSPICEPS1S2 made by Mike Brinson. It can be modified to fix the "turns ratio" problem.

I also recreated the subcircuit for XSPICEPS1. It's "turns ratio" seems OK.

TODO

  • Replace models in Transformer.lib

2023-11-15_192246

2023-11-15_205939

2023-11-15_215510

Transformer_Lib_Test_prj.zip

@ra3xdh
Copy link
Owner

ra3xdh commented Nov 16, 2023

Rp, Rs1 and Rs2 generate warnings. Is there node naming issues like in TransformerPS1S2?

No, the variable should be wrapped in braces like {Rs1} Otherwise Ngspice may interpret it as the model.

@tomhajjar
Copy link
Author

Holger corrected the XSPICEPS1S2 subcircuit. AFAIK, the info in the online help is wrong.

I found another issue, Cores.lib uses the same data for every core so only one core is correct....

@ra3xdh
Copy link
Owner

ra3xdh commented Nov 16, 2023

Cores.lib uses the same data for every core so only one core is correct..

Yes, I have also noticed that the Cores.lib uses duplicate data. Unfortunately, I have no source data for this library and cannot provide the fix. The library was developed by @MikeBrinson around 2015. I cannot say where did he take the cores data.

@ra3xdh
Copy link
Owner

ra3xdh commented Nov 16, 2023

AFAIK, the info in the online help is wrong.

The help on readthedocs.io should be deprecated and replaced by the new tutorial. It contains a lot of outdated information. I have started to collect the new documentation here: https://github.com/ra3xdh/qucs_s_docs But this a slow process. Writing documentation requires much more time effort than writing a code.

@ra3xdh ra3xdh added the library label Nov 16, 2023
@tomhajjar
Copy link
Author

tomhajjar commented Nov 16, 2023

Here is the updated Transformers.lib. All identified errors have been fixed.

I left the "Cores" data in Transformers.lib and Cores.lib as it was. I could not find any info on the web. Looks like manually pulling data from B/H plots would be required. Majority of the core materials in Cores.lib are nothing a user would ever use to make a transformer.

I requested info from Mike Brinson...

Transformers.zip

@ra3xdh ra3xdh added this to the 24.1.0 milestone Nov 21, 2023
@ra3xdh ra3xdh mentioned this issue Nov 27, 2023
3 tasks
ra3xdh added a commit that referenced this issue Jan 9, 2024
@ra3xdh
Copy link
Owner

ra3xdh commented Jan 9, 2024

I have uploaded a new Transformer.lib library. Thanks for the contribution! Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants