Repository navigation
Conversation
parse_extra_parameters now accepts response_transformation and reference_transformation, each a path to a .npy file or a .npz file holding a single array (2D broadband or 3D frequency dependent). RandomControlSourcePathReceiver loads them into the transformation arrays and sets use_transformation when either is given; a missing one is filled with an identity sized from the transfer function in system_id_update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lets the Rattlesnake SPR random control law (
RandomControlSourcePathReceiver) use forcefinder's response and reference transformations, supplied as files through the Rattlesnake control-parameters box:parse_extra_parametersaccepts the two new keys. Each is a path to a.npyfile or a.npzfile containing a single array; the array can be 2D (broadband) or 3D (frequency dependent, frequency on the first axis).__init__loads the arrays into_response_transformation_array_/_reference_transformation_array_and setsuse_transformationwhen either is supplied. The private arrays are written directly because the public setters need SDynPyMatrixobjects with coordinates, which aren't available inside Rattlesnake.system_id_updatefills the other with an identity sized from the transfer function (the number of drives isn't known until then).use_transformation=self.use_transformationinstead ofFalse. Existing parameter strings without the new keys behave exactly as before.When these are used, the specification and FRFs Rattlesnake passes in should be in physical coordinates (no Rattlesnake-side transformation), otherwise the transformation is applied twice.
Testing
Closed-loop simulations of a plate (24 triaxial control channels, 12 drives,
manual_inverse,inverse_method = standard), run headlessly on both Rattlesnakemain(the class loaded natively as a Type 2 control law, SDynPy system virtual hardware) anddev(SDynPy FRF virtual hardware). A diagonal response transformation weighting one node's three channels by 2 (an importance weighting in the least-squares inverse) reduced that node's Z-channel control error from 11.4 dB to 4.4 dB RMS onmain(5.5 to 3.3 dB ondev), with the unweighted channels' average error also slightly lower. A reference-transformation-only case was checked offline for the identity fill-in.🤖 Generated with Claude Code