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

Power combining #346

Closed
wants to merge 3 commits into from
Closed

Conversation

andresmmera
Copy link
Contributor

This is a tool for synthesizing power combining networks. It has some basic structures (Wilkinson, branchline, Gysel, travelling wave,... ), but I hope to extend it in the future.

@andresmmera
Copy link
Contributor Author

Travis-CI crashes but AppVeyor doesn't. Apparently, Travis-CI uses gcc, but I wrote the code using Linux (=> gcc) and here it compiles fine. I've also inspected the log of Travis-CI, but it isn't clear at all... I have no clue about what's going on. Any guess?

The final lines are:
The command "if [[ $LINUX && $CLANG && $MASTER ]]; then TOP=pwd;
cd qucs/contrib/doxygen/; VERSION=$(cat ../../VERSION); sed "s/0..18/${VERSION}/g" doxygen.cfg > temp; mv temp doxygen.cfg; doxygen doxygen.cfg; cd ${TOP};
cd qucs-doc; ./autogen.sh; cd doxygen; make doxygen; cd ${TOP}; fi" exited with 0.�[0m

Done. Your build exited with 1.

@guitorri
Copy link
Member

guitorri commented Sep 1, 2015

All three Travis workers use Autotools for the build. There is some issue with your Makefile.am.

Try to download the Travis log and search for 'error'. You will find something like:

 Making all in qucs-powercombining
make[2]: Entering directory `/home/travis/build/Qucs/qucs/qucs/qucs-powercombining'
make[2]: *** No rule to make target `all'.  Stop.
make[2]: Leaving directory `/home/travis/build/Qucs/qucs/qucs/qucs-powercombining'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/travis/build/Qucs/qucs/qucs'
make: *** [all] Error 2

@@ -0,0 +1,54 @@
## Process this file with automake to produce Makefile.in
#
# qucs-attenuator/Makefile.am
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update.

@guitorri
Copy link
Member

guitorri commented Sep 1, 2015

I am sorry, I have not tried to run your code yet. Have you tried to build it with Autotools? Autotools is still the 'official' build system.

You might have noticed that the UI builder is not used anywhere else in the project (except for one dialog that was made as a test).

For consistency, I believe we should keep using hand-coded UI. I am not sure what others think about this.

Don't get me wrong, I see the benefits of Qt Designer UI builder in some situations, but we should decide together before we start mixing oranges and apples.

@andresmmera
Copy link
Contributor Author

@guitorri
Yes, I noticed that, but I used the QtDesigner because I found it quite simpler :-) Anyway, I see your point and I'll try to rewrite the interface soon.

On the other hand, I use the 'make install' command to build the whole project and it seems to work as expected.

Thank you for your help :-)

@ra3xdh
Copy link
Contributor

ra3xdh commented Sep 2, 2015

@andresmmera I have downloaded and tested your code. This tool will be useful for Qucs and could be merged after 0.0.19 release.

Yes, I also recommend you to rewrite the code to remove forms. You should avoid to use forms in future. We need to keep uniformity of Qucs code. Also I prefer to use hand-writed GUI initialization. It's quite simple and more flexible than *.ui forms.

There are some issues with this new tool:

@andresmmera
Copy link
Contributor Author

@ra3xdh I reckon that rewriting the code should also solve the problem with the layouts. Unfortunately, I couldn't notice that issue since my Linux distro seems to hide it (see screenshot below). I hope to fix the code soon.

screenshot from 2015-09-02 14 32 48

@andresmmera
Copy link
Contributor Author

@ra3xdh The user interface has been already rewritten (by hand) and it seems that the layout is no longer broken. (See the screenshot below). On the other hand, Travis CI keeps crashing. As suggested by Guilherme, the compilation log gives this:

Making all in qucs-powercombining
make[2]: Entering directory /home/travis/build/Qucs/qucs/qucs/qucs-powercombining' make[2]: *** No rule to make targetall'. Stop.
make[2]: Leaving directory `/home/travis/build/Qucs/qucs/qucs/qucs-powercombining'
make[1]: *** [all-recursive] Error 1

what lead me to think that something is wrong with 'Makefile.am'. However, as you probably noticed, 'Makefile.am' was simply copied (and modified) from the qucs-attenuator folder.

In my computer, I do the following at the qucs directory:

./configure --enable-maintainer-mode
make clean
make
sudo make install

and everything goes fine.

screenshot _poweercomb

#
# Automake input file.
#
# Copyright (C) 2006 Stefan Jahn <stefan@lkcc.org>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add your name here

@ra3xdh
Copy link
Contributor

ra3xdh commented Sep 6, 2015

@andresmmera I have downloaded and tested your new code. Now GUI has no problems. I am wondering that your build attempt with autotools was successful. You was need to add your new subdirectory in qucs/configure.ac too. See andresmmera#2 for fix. Now it should be build correctly.

@andresmmera
Copy link
Contributor Author

@ra3xdh Ok, now it has already passed the Travis CI test.
Thank you a lot. I was a little bit lost

(Tree(Z0, Freq, N, SP_block, microcheck, Substrate)) ? err = 0: err=1;
break;
}
!err ? statusBar->showMessage(tr("Ready! Use CTRL+V to paste the schematic"), 2000):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[picky mode on]

why all these function() ? err = 0: err=1 ? You could have defined a variable bool result_valid and then used result_valid = function() for every case, checking if result_valid ... after the end of the switch.
Besides, I'm used to see (simple) functions returning 0 in case of success and a negative number in case of error, so you would have err = function() and a check if (!err) at the end.

[picky mode off]

@andresmmera
Copy link
Contributor Author

@in3otd Ok, the conditional operators were removed and the typo was corrected

This is a tool for automatically generating the schematics of the
most common planar structures for power combining and splitting.
It can generate them using ideal transmission lines as
well as microstrip lines.

So far, it is possible to synthesize the following structures:
Wilkinson, multistage Wilkinson, Tee splitter, branch-line hybrid,
double-box branch-line hydrid, Bagley and Gysel combiners/dividers.
Besides this, two corporate combiners were implemented: the Tree combiner and the Travelling wave combiner (both of them are based on single-stage Wilkinson combiners).
Power combining tool- Wilkinson and Tee splitters

This is a tool for the design of power combiners. So far, it can
synthesize Wilkinson and Tee dividers.

Added Gysel, branchline and Bagley combiners

Gysel, branchline and Bagley combiners were implemented.

Added tree and travelling wave combiners

Two corporate combiners, the tree combiner and the TW combiner were
added to the power combining tool. Both corporate combiners use
Wilkinson structures.

Microstrip implementation

The main window was modified so as to let the user to enter the
substrate properties. Every function was modified to convert ideal
transmission lines into microstrip lines

Trying to integrate this tool in Qucs

It was created a CMakelists.txt to generate a makefile for compiling
this tool. Furthermore, 'qucs.h', 'qucs_actions.cpp' and 'qucs_init.cpp'
were modified in order to connect Qucs with the power combining tool.

On the other hand, it has been corrected a bug in the microstrip
implementation feature, so now it seems to be fully working.

Added CMakeLists

This file was not included in the previous commit

Makefile.am and CMakeLists.txt updated

'Makefile.am' and 'CMakeLists.txt' were modified to include the 'Power
Combining Tool' to Qucs

ui_powercombiningwindow.h added

ui_powercombiningwindow.h is missing in previous commits

UI rewritten and building fixes

1) The UI was rewritten so as to avoid .ui files and the autogenerated
header. In favour of greater simplicity, the previous source files were
renamed.
2) The code building was checked with autotools. That's it:
./configure --enable-maintainter-mode
make
sudo make install
3) Makefile.am corrected (as suggested in the comments on this PR).
4) Apparently, the layout problems were solved.

Delete powercombiningwindow.cpp

Delete powercombiningwindow.h

Delete powercombiningwindow.ui

Delete qucs-powercombining.pro

Delete ui_powercombiningwindow.h

Corrected broken (event->action) connection

1) The connection between the 'click()' event and the expected action
was missing in the microstrip checkbox.
2) Corrected comment in 'Makefile.am'

Corrected Makefile.am

It was found an extra line as consequence of copying 'Makefile.am' from
qucs-attenuator

Removed 'noinst_HEADERS' variable

Fixed build issues:

1. Added qucs-powercombining entry in configure.ac
2. Updated .gitignore
3. Modified headers inclusion style in qucspowercombining.cpp

Double-box branchline added

1) It was added the double-box branchline topology.
Reference: Kumar, S.; Danshin, Tom, "A Multisection Broadband Impedance Transforming Branchline Quad Hybrid Suitable for MMIC Realization," in Microwave Conference, 1992. 22nd European , vol.2, no., pp.1301-1306, 5-9 Sept. 1992
2) Fixed the microstrip implementation of the travelling wave combiner.

Added GPL license

Several code fixes

1) Every synthesis function was modified so as to return 0 if it was
succeeded.
2) In 'qucspowercombiningtool.cpp', the topology selector (line 331 to
357) was modified in order to reduce the number of conditional
operators.
3) The typographical error:
MicrostripgroupBox  = new QGroupBox("Microstrip sustrate");
was corrected.

Multistage Wilkinson divider

Added attenuation coefficient to ideal lines

1) It was added an input box for setting the attenuation coefficient
(dB/m) when using ideal transmission lines.
2) It was fixed the calculation of the isolating resistors in the
multistage Wilkinson combiner
andresmmera added a commit to andresmmera/qucs that referenced this pull request Apr 16, 2016
@andresmmera
Copy link
Contributor Author

Moved to #509

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

Successfully merging this pull request may close these issues.

4 participants