-
Notifications
You must be signed in to change notification settings - Fork 215
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
#339 rebased (New matching techniques for the matching tool) #666
Conversation
@in3otd @guitorri I created a number of schematics for testing the new matching tool. |
There are a few LaTex errors like:
I think it always nice to have the examples. These will not test the matching tool itself, but will serve as a reference. |
BTW, it seems that |
About |
Try removing the extension as in:
|
omitting the extension is the Right Thing but when I build out of tree I get some error messages:
not sure that building the docs out of tree ever worked, actually. |
@andresmmera I see that if matching cannot be done (e.g. when getting the message It is not possible to match this load using the double stub method) pasting from the clipboard is activated anyway, so if the clipboard contained parts previously copied there they are proposed to be pasted on the schematic. What's the difference between
I have the impression they all do the same thing, they just pass the parameters to the appropriate ladder code building routine and then they all call |
Indeed they do basically the same... Surely the code ended up like this after moving code back and forth a year ago or so... I'll try to put that code in calcMatchingCircuit, where it should be. Thanks for the code review 👍 |
no problem, the code works, that's just to make it easier to read in the future 😁
|
I have just made a few changes so as to tackle the issues pointed out by @in3otd
Pending stuff:
|
600ea38
to
0ea2301
Compare
I've just used the 'clang-format' command to give a well defined coding style to matchdialog.cpp/h |
I couldn't work much on Qucs this week but, finally, I've updated the docs... |
yes, thanks, I did some testing last week and didn't see any issue. Building docs fails here now; AppVeyor complains about some |
Uhm... I'll take a look later |
I've just allowed resizing & push the commit. I've also checked that no weird effects happen after resizing (I mean, fields overlapping or stuff like that) |
aee709d
to
88d9bd3
Compare
I've just removed the unwanted commits and corrected a typo (\Ohm instead of \Omega) in the docs. |
Matching methods implemented: - Single stub and double stub (balanced and not balanced) - multistage lambda/4 - cascaded LC sections (for purely real loads) - lambda/8 with lambda/4 transformer (complex load to real source) All the methods above were implemented for one-port and two ports matching. The generated schematic can optionally include the S parameter simulation block. Added microstrip synthesis to the matching tool It was a added a new layout on the right of the matching tool window so as to define the substrate properties for microstrip synthesis. In this sense, now it is possible to generate microstrip matching networks by converting the ideal transmission lines to microstrip lines. This feature is much the same as the microstrip synthesis available on 'qucs-filter'. Indeed, I have literally copied the functions 'calcMicrostrip()' and 'getMicrostrip()' from there. Added documentation of the various matching methods to '/technical/synthesis.tex'. It was written a schematic generator so as to minimise code redundancy. This avoids to rewrite the same code twice (at single- port and at two-port matching functions). In other words, all schematic generation is done at "SchematicParser()" and all those "Create2Port_<matching method>" are no longer needed New function for creating schematics It was added a function for building a schematic from the components, wires and paintings strings. Add Precision parameter to num2str() to allow specifying the number of significant digits. Default is set at 6, as it was implicitly before.
a7b0961
to
d79b0ed
Compare
so that their values will be nicely formatted
since "1 m" is interpreted as "1 milli" when unit is "m" it should be left out unless a prefix is present.
d79b0ed
to
1f987be
Compare
I have rebased the PR again, I tried without squashing all the commits but there were too many conflicts. While testing I saw another issue, when the length of an element (stub, line, etc.) was in the meter range this was written as |
It was observed that the spar block was missing when selecting double stub matching
The impedance value at the load label was wrong when it was purely inductive or resistive
This looks really good to me. |
As for me, I'm not planning to do anything else here (at least in the short run :-) ) |
Very well. Thank you. Merged. |
here is #339 rebased to develop. As explained there, I had to squash all the commits to understand how to fix the conflicts. I also removed the whitespace changes done on existing code and undone moving some of the
#include
tomatchdialog.h
; my understanding is that we should try to have only forward declarations in the heders file when possible and including the definitions only in the.cpp
files.Did not yet check much, please check if it behaves as expected.
I saw anyway an error: by using the default values in the Matching Tool (just open it and press Create) the circuit created by the previous version and this one differs:
Previous version:

This PR version (was the same before rebasing):

If you define an Equation Defined RF device with some S-parameters to match you will see that this PR version of the matching tool draws the Port 2 circuit (on the right side) in the reversed order...
Besides, would be nice to keep the components values with units prefixes instead of the engineering notation and having the component text for vertical components positioned correctly.
Feel free to push corrections to this branch 😁