Qucs / qucsator

Circuit simulator of the Qucs project
http://qucs.sourceforge.net
GNU General Public License v2.0
23 stars 10 forks source link

Incorrect Correlated Voltage Noise Source Behavior #45

Open mbe9a opened 2 years ago

mbe9a commented 2 years ago

I'm trying to test a few circuits that can separate the real and imaginary parts of the cross-correlation of two noise sources. This can be accomplished with a 180degree hybrid (real part) and a 90degree hybrid (imaginary part). This technique was first published by Scott Wedge in the early 90's if you're interested. This may not be the most standard way to test the correlation, but it works. I tested with ADS and got the correct results. Anyway, I have a simple test set up where I have a correlated voltage noise sources object connected to ports 1 and 4 of a hybrid. I was hoping to see the change in output power (which is proportional to the real and imaginary parts of the cross-correlation) as I changed the normalized cross-correlation coefficient. The results are as-expected for the 180-degree hybrid, meaning that when I add a real number to the correlation coefficient, the noise sources behave correctly. Unfortunately, complex or purely imaginary correlation coefficients do not have the expected results. The imaginary portion as detected by the 90-degree hybrid is always zero no matter what coefficient I put in.

NOTE: This is a narrowband design, so it only REALLY works at the design frequency, which is 1.8GHz in this case. The following four images are: (1) setup showing 180-degree on left, 90-degree on right, 0 corr for both sources, (2) results, (3) setup with corr of 1 for 180-degree and +j for 90-degree, (4) results

image

image

image

image

Is this expected behavior? I have not looked "under the hood" at all, but I was hoping this would work without much debugging. Do the correlated noise sources not allow for complex correlation coefficients?

felix-salfelder commented 2 years ago

On Tue, Oct 26, 2021 at 09:59:18PM -0700, Michael Eller wrote:

Is this expected behavior? I have not looked "under the hood" at all, but I was hoping this would work without much debugging. Do the correlated noise sources not allow for complex correlation coefficients?

This appears to be an issue with Qucsator. Can you confirm this?

If so, please provide the relevant Qucsator input/output files, and reframe your question.

I can imagine that complex correlation coefficients are simply not implemented. It may be worth checking if there is an easy fix.

NB: Maybe related topic-wise to Qucsator/#24?