finesse.analysis.actions.lti.FrequencyResponse
¶
Overview
- class finesse.analysis.actions.lti.FrequencyResponse(f, inputs, outputs, *, open_loop=False, name='frequency_response')[source]¶
Bases:
Action
Computes the frequency response of a signal injceted at various nodes to compute transfer functions to multiple output nodes. Inputs and outputs should be electrical or mechanical nodes. It does this in an efficient way by using the same model and solving for multiple RHS input vectors.
This action does not alter the model state. This action will ignore any currently definied signal generator elements in the model.
To inject into optical nodes please see
FrequencyResponse2
.- Parameters
- farray, double
Frequencies to compute the transfer functions over
- inputsiterable[str or Element]
Mechanical or electrical node to inject signal at
- outputsiterable[str or Element]
Mechanical or electrical nodes to measure output at
- open_loopbool, optional
Computes open loop transfer functions if the system has closed
- namestr, optional
Solution name
Examples
Here we measure a set of transfer functions from DARM and CARM to four readouts for a particular model,
>>> sol = model.run(FrequencyResponse(np.geomspace(0.1, 50000, 100), ... ('DARM', 'CARM'), ... ('AS.DC', 'AS45.I', 'AS45.Q', 'REFL9.I'), ... ))
Single inputs and outputs can also be specified
>>> model.run(FrequencyResponse(np.geomspace(0.1, 50000, 100), 'DARM', AS.DC'))
The transfer functions can then be accessed like a 2D array by name, the ordering of inputs to outputs does not matter.
>>> sol['DARM'] # DARM to all outputs >>> sol['DARM', 'AS.DC'] # DARM to AS.DC >>> sol['DARM', ('AS.DC', 'AS45.I')] >>> sol['AS.DC'] # All inputs to AS.DC readout