Skip to content

Commit

Permalink
Update complex convolution scaling following waveguide impedance test…
Browse files Browse the repository at this point in the history
…s. This does affect simulated cavity signal power, but since the cavity signals are not yet normalized, is probably OK.
  • Loading branch information
pslocum committed Aug 21, 2023
1 parent e9d8803 commit 2f88f03
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Source/Core/LMCHFSSResponseFileHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,18 @@ namespace locust
double complexPhase = atan(convolutionValueImag/convolutionValueReal);
double complexMag = pow(convolutionValueReal*convolutionValueReal + convolutionValueImag*convolutionValueImag, 0.5);

return std::make_pair(complexMag, complexPhase);
/* Note that the convolution above uses a real signal to drive both the real and
* imaginary filter components, without a phase shift. For sinusoidal signals, this
* seems like a reasonable approach. It also increases the effective gain of
* the complex filter, compared to a real filter. To align the complex gain with
* that of a real filter, a gain factor of 0.5x for sinusoidal drive signals is
* applied below. For non-sinusoidal drive signals, this scaling should not necessarily
* be applicable.
*/

double gainFactor = 0.5;

return std::make_pair(gainFactor*complexMag, complexPhase);
return complexConvolution;
}

Expand Down

0 comments on commit 2f88f03

Please sign in to comment.