-
Notifications
You must be signed in to change notification settings - Fork 68
FXC-4570 feat(rf): Added symmetric_pseudo option for s_param_def
#3109
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
base: develop
Are you sure you want to change the base?
FXC-4570 feat(rf): Added symmetric_pseudo option for s_param_def
#3109
Conversation
symmetric_pseudo option for s_param_defsymmetric_pseudo option for s_param_def
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, 3 comments
Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changes
Summary
|
e1cf778 to
034206b
Compare
symmetric_pseudo option for s_param_defpseudo_symmetric option for s_param_def
8fb7784 to
b86eaec
Compare
|
@weiliangjin2021 @yuanshen-flexcompute Still can be modified if you want but I enabled this symmetric version of pseudo waves and tried to put all the relevant info in one place. I have another issue to track the docs PR for summarizing the various S parameter amplitude definitions and their properties. |
weiliangjin2021
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, except that it should be named as symmetric_pseudo
pseudo_symmetric option for s_param_defsymmetric_pseudo option for s_param_def
90fdead to
f4b6a8a
Compare
f4b6a8a to
f851621
Compare
Greptile Summary
This PR adds a new
symmetric_pseudooption fors_param_definTerminalComponentModeler, which provides an alternative S-parameter formulation equivalent to the "traveling wave" definition in scikit-rf. The implementation applies a different scaling factor (F = sqrt(1/(2*Z))) that ensures the resulting S-matrix is symmetric when port impedances differ.Key changes:
SParamDeftype to includesymmetric_pseudoas a valid literal valuecompute_F()to handle the new symmetric_pseudo scaling with proper mathematical documentationterminal_construct_smatrix()to routesymmetric_pseudorequests to pseudo wave matrices (reusing existing infrastructure)s_to_z()conversion logic to properly handle symmetric_pseudo (treating it like pseudo for conjugate handling)Issues found:
print()statements that should be removedConfidence Score: 4/5
Important Files Changed
compute_F()with proper documentation and error handlingterminal_construct_smatrix()with proper error handlingSequence Diagram
sequenceDiagram participant User participant ModelerData as TerminalComponentModelerData participant Constructor as terminal_construct_smatrix participant Utils as utils.compute_F participant S2Z as utils.s_to_z User->>ModelerData: smatrix(s_param_def="symmetric_pseudo") ModelerData->>Constructor: terminal_construct_smatrix(s_param_def="symmetric_pseudo") alt symmetric_pseudo Constructor->>ModelerData: get port_pseudo_wave_matrices Note over Constructor: Reuses pseudo wave matrices<br/>with different scaling else power Constructor->>ModelerData: get port_power_wave_matrices else pseudo Constructor->>ModelerData: get port_pseudo_wave_matrices end ModelerData-->>Constructor: a_matrix, b_matrix Constructor->>Constructor: compute S = b @ inv(a) Constructor-->>ModelerData: S-matrix ModelerData-->>User: MicrowaveSMatrixData opt Convert to Z-matrix User->>ModelerData: s_to_z(s_param_def="symmetric_pseudo") ModelerData->>S2Z: s_to_z(S, reference, s_param_def) S2Z->>Utils: compute_F(Z, "symmetric_pseudo") Utils-->>S2Z: F = sqrt(1/(2*Z)) Note over S2Z: Uses non-conjugate Zport<br/>(same as pseudo) S2Z->>S2Z: Z = solve(I - F^-1*S*F, ...) S2Z-->>ModelerData: Z-matrix ModelerData-->>User: Impedance matrix endContext used:
dashboard- Remove temporary debugging code (print() calls), commented-out code, and other workarounds before fi... (source)