-
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
Addition of the Wattmeter and Ohmmeter Modules #682
Conversation
I reckon that you pushed correctly :-) |
Just a few comments, I promise I'll do some more revision later:
[1] https://en.wikipedia.org/wiki/Power_factor#Definition_and_calculation |
Just to mention that this a cleanup of #546. |
@gildias concerning your questions: Yes your PR is fine. You can amend your commit message and push the branch once again. Something like:
This will force update your fork/branch and this PR. Indeed if you branch from You could branch from the previous module for each new modules ( Perhaps is easier for you and for the review if you try to make one commit per module in this PR. So, I suggest you keep working on your Please prepare a few example or test schematics for each module so we can add later to the test suite. |
Maybe I'm just nitpicking, but I think you can calculate the power factor as follows (PF = P/|S|): setOperatingPoint ("FP", Wr/std::sqrt(WrWr+VAiVAi)); that way you can avoid the std::cos() and std::atan() functions Notice that |S| = std::sqrt(Wr * Wr+VAi * VAi) = std::sqrt(P^2 + Q^2) and P = Wr (real power), Q = VAi (reactive power) |
Thank you for all the precious information you provided. I would appreciate some clarification on the subject of the test suite. I have the circuit schematics where the wattmeter was tested (as seen on the pdf file), and will add new examples as I progress through other modules, should i add these to the commit on a particular folder (qucs-test)?. I would also like to know how I should approach adding a new commit to this pull request, If I follow the same process i did initially, am I given the option of creating a new commit instead of editing this one? Maybe that is the default behaviour and there is nothing to worry about, but I would welcome some confirmation. Thank you for your time and consideration. |
Pursuing the objective of helping students or beginners interested in electronics, I have now added the second commit, the Ohmmeter Module. It calculates the equivalent impedance in a given circuit. |
d95c74f
to
efd54df
Compare
Resistance examples.pdf |
You're welcome 😃 |
ff8914e
to
28edf66
Compare
Added the phasorial and temporal digrams. |
Hello, I probably won't be adding any other extensive commits to this pull request. |
Hello, I apologise for insisting on this subject, but with the presentation date for my project getting closer, I would really appreciate some feedback from the QUCS team. |
Hello @gildias, |
I completely understand, if you have any questions or need any more files, such as test schematics to simplify the process for you, I'll make sure to help however I can. You can contact me through this thread or my email 1120196@isep.ipp.pt . |
Hello @gildias , I've been doing some checking stuff here and I've found the following:
here we understand what Riv and Rii mean, but it may be not so clear for a random user. From my point of view, the description should explicitly describe what the parameter is. I mean, for example, the description of the 'Riv' parameter should be something like "Voltage probe internal resistor". I also think that is not necessary to clarify that 0 Ohm is the ideal behavior.
The terminal output shows the following message:
This stuff is related to this 2e9f7d1#commitcomment-21969888 A fix for that was made by @in3otd. Actually, this fix is already merged on the develop branch (deb4663), but your wattmeter branch seems to be behind develop. That is, your branch and develop have diverged since the day you've cloned your branch because people have merged stuff in develop and you've been working on your branch. So you have to bring these new changes from develop to your branch. In order to do this, you have to rebase your branch against develop:
You may find a number of conflicts that cannot be solved automatically, so you'll have to solve them by hand... I usually do that using program called meld Once you fix a conflict, you have to mark it as resolved and do:
... and you have to repeat this step until you solved all conflitct. Then, you have to commit the changes and push as usual. Apart from these issues, I consider the code is mergable and adds value to the AC simulation. Well done! |
So, the people form ISEP want this code merged and hopefully released soon. |
From my point of view, the code is worthwhile merging since it adds new capabilities to the AC analysis. |
Wattmeter Module, modified the code as advised. Changed the Power Triangle notations to their universal usage and the Power Factor calculation. Thanks for all the precious information.
This probe should perhaps be called "Impedance Meter" instead, since it measures the impedance, with its angular component and not only the resistance, I kept it for simplicity and so it would fit on the menus but maybe something to look into in the future. The working loop is farly simple, it will act as a voltmeter on a first instance, if it doesn't detect any other source it will then act as an ohmmeter. By setting a current of 1A on its branch, and by following ohm's law, it will then read the voltage differential between its two nodes since if V=1*R,V=R, thus determining the impedance. Hoping this doesn't update the previous commit and instead adds to the already open Pull Request. Updated the Wprobe.png and its cpp in an attempt to streamline it with the other components. Will add a simple pdf with working examples of the ohmmeter on a comment. Thanks for the attention.
Added the option of adding an internal resistance to both voltage sources, ac and dc, which would equal a resistor in series with them. The same applies to Iprobe. The default values for these components are 0 Ohms. In the voltmeter, another series resistance is applied, but the default value is 1e12, I can change this if another value is prefered. The Wattmeter also has internal resistance, both for the voltage and the current part, the same principals were applied, as they were to their Probes. Regarding the current sources, the internal resistor will result in a paralel with the component, and the default value was set to 1e12ohms as well. I will add some working examples in a pdf. Thanks to andresmmera for all his help and patience on this topic. Edit:Fixed the default values of some components Edit2:Added message, an Ri of 0 disables the parameter
In this commit, I've added both the phasorial and temporal diagrams. The phasorial diagram represents any complex value, and displays a line which is oriented towards the angle, its size is determined by the real component of that value. It tracks the apparent power(S), Impedance(ohm), Current(I) and Voltage (V). The temporal diagram resembles an oscilloscope, drawing a wave according to its expected value across a certain time. This means that it is now possible to analyse values that would otherwise need a transient simulation to observe. It can track both current and voltage values. Both of these diagrams, due to their functionalities, are limited to AC Simulations. As always, I will attach a PDF on a comment with working examples, I'm keeping my test schematics hoping they will be helpful in the future. Waiting for information on how I should add them to the test suite. Thank you for your time and attention.
The aspect ratio of the two new diagrams is now changeable. Added some more clarity to the internal resistance parameter. Deleted a lot of unused variables and functions. Changed names of the diagrams and one variable to better follow convention. Added components and diagrams to CMakelists. Most of this was achieved under the guidance on Andrés Mera, I thank him for all his help.
Fix CMake and various warnings after merging #682
Most of their possible functions are displayed
Hello, my name is Alberto Silva and I'll be continuing the module development started by previous students from my institution (ISEP, Portugal).
This commit is related to the watt probe. Since this is my first interaction with github, I'd appreciate some information on whether I did the pull process correctly, and if not, what needs to be changed.
I'll likely be sending some more modules over the next weeks so I would like to know if I should keep developing over my existing files ( with the wattmeter in them ) or if I should start over for each module.
This is important since some modules will share modified files, with the obvious example of a makefile.
I have also added a simple pdf with 3 examples of the wattmeter working, hope it was attached correctly.
Thank you for your time.
Edit: I did not know you would receive the comment I made when i originally pushed to my git branch, thought this was the commit message, sorry about that.
Wattmeter examples.pdf