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

[Not yet finished] Fix wattmeter probe #946

Open
wants to merge 5 commits into
base: release-0.0.20
Choose a base branch
from

Conversation

in3otd
Copy link
Contributor

@in3otd in3otd commented Jan 4, 2020

Fix Qucs/qucsator#47 .

There where two main issues:

  • the formula used for computing the complex power was wrong:
    this was easy, just use the correct formula for the power
  • the voltage noise values from were wrong:
    this required changing the nodes order for the component in the netlist: the probes are a bit of a hack and currently require the voltage sensing to be on the first two nodes, while the wattmeter had the current sensing there.

I also couldn't resist changing a little the probe values output handling to make it feel a little less "hackish" (IMHO).

This goes together with the qucs-test update at Qucs/qucs-test#35 .

@in3otd
Copy link
Contributor Author

in3otd commented Jan 4, 2020

ah, the joys of CI...

any idea is appreciated...

@in3otd
Copy link
Contributor Author

in3otd commented Jan 5, 2020

uh, there's still something wrong: as described in the Qucs docs, "all voltages and currents are peak values" (see pag 13) so the AC power results should be divided by 2. But for DC simulations not.

So the results shown in Qucs/qucsator#47 are wrong, since the 120 V of the source is the peak value and not the RMS as intended in the linked document calculations.

@guitorri
Copy link
Member

Concerning CI. MSYS2 seem to have dropped Qt4. One option is to install the official Qt4 package (I used to to it long time ago, it should be on the .appveyor history)... another is to finish the port to Qt5 :). On Travis/OSX you can try to either disable ccache or add it to the brew install list.

@in3otd
Copy link
Contributor Author

in3otd commented Jan 13, 2020

MSYS2 seem to have dropped Qt4

uh, the world is coming to an end 😁
Finishing the Qt5 port would of course be the best solution but, alas, I cannot help much there.

The OSX build log says

Tapped 0 formulae (189 files, 264KB)
Error: Your Homebrew is outdated (need >=2.1.0, found 1.3.5 at /usr/local).
Please run `brew update`.
Error: Kernel.exit

so I guess it's something more than ccache but I know nothing about OSX

@in3otd in3otd changed the title Fix wattmeter probe [Not yet finished] Fix wattmeter probe Feb 3, 2020
@guitorri guitorri mentioned this pull request Feb 3, 2020
15 tasks
@in3otd in3otd added this to the 0.0.20 milestone Feb 3, 2020
@guitorri
Copy link
Member

I will try to get Qt5 back on track.
In the mean time, can you rebase?

@in3otd
Copy link
Contributor Author

in3otd commented Feb 13, 2020

Thanks - Qt5 will obviously be the best solution.

As mentioned above, the fix here is not yet finished - I need to separate the DC and AC cases due to the fact that AC uses peak values. I'll rebase anyway in the meantime.

The complex power was wrongly computed as S = V I and by flipping
the sign of the reactive power instead of using S = V I*.
so that the voltage noise calculations are correct.
to avoid using calcOperatingPoints(), which should be reserved
for non-linear circuits.
to get updated wattmeter test.
@guitorri guitorri changed the base branch from develop to release-0.0.20 February 29, 2020 10:17
@felix-salfelder
Copy link
Member

This is listed as a blocker for 0.0.20. it changes the wattmeter symbol and looks like that will introduce a backwards incompatibility.

better defer to 0.0.21?

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.

Power probe AC results are wrong
3 participants