finesse.components.mechanical module

class finesse.components.mechanical.FreeMass(*args, **kwargs)[source]

Bases: MechanicalConnector

Simple free mass suspension of an object.

The object being suspended must have a mechanical port with nodes z, pitch, and yaw and forces F_z, F_pitch, and F_yaw.

property I_pitch

Moment of inertia (pitch)

property I_yaw

Moment of inertia (yaw)

fill(self, ws)[source]
property mass

Mass

class finesse.components.mechanical.FreeMassWorkspace[source]

Bases: ConnectorWorkspace

class finesse.components.mechanical.MIMOTFWorkspace(owner, sim, bool refill, unsigned int N_numerators)[source]

Bases: ConnectorWorkspace

Workspace that contains MIMO transfer functions stored in a numerator/denominator basis.

H(self, int numerator_idx) double complex
add_numerator(self, double[: :1] num)[source]
num_numerators[source]
set_denominator(self, double[: :1] denom)[source]
set_s(self, double complex s) void
class finesse.components.mechanical.Pendulum(*args, **kwargs)[source]

Bases: MechanicalConnector

Simple pendulum suspension of an object.

The object being suspended must have a mechanical port with nodes z, pitch, and yaw and forces F_z, F_pitch, and F_yaw.

property I_pitch

Moment of inertia (pitch)

property I_yaw

Moment of inertia (yaw)

property Qpitch
property Qyaw
property Qz
fill(self, ws)[source]
property fpitch
property fyaw
property fz
property mass

Mass

class finesse.components.mechanical.PendulumMassWorkspace[source]

Bases: ConnectorWorkspace

class finesse.components.mechanical.SuspensionTFPlant(*args, **kwargs)[source]

Bases: Connector

A customised suspension element that accepts arbitrary input and output nodes and a 2D array of control.TransferFunction objects that define a transfer function between each of them. See the Python Control package for more details on these.

  • Inputs and outputs must be named in the format port.name

  • Inputs must be unique to outputs

  • All plant transfer functions must have the same denominators

The mechanical port of other optical elements can be connected to this suspension by using the connections_to dictionary input. This takes the name of a port defined in this suspension and maps it to the mechanical port of another element.

The plant, inputs, and outputs cannot be changed once initialised. There is no KatScript interface for this component.

Parameters

namestr

Name of element

inputsarray_like, list

Sequence of inputs for this plant, should be strings of the format port.node

outputsarray_like, list

Sequence of outputs for this plant, should be strings of the format port.node

plantarray_like, list[list]

A 2D array of control.TransferFunction that describe the transfer function between each input to every output. Shape should be [len(outputs), len(inputs)]. Elements can also be None which means no coupling between each transfer function.

connections_todict[str: SignalNode], optional

Dict of port names at this suspension component and a mechanical port of some other element. Names of nodes at in each port should be identical. Keys of the dict should be in the format port.node. Values should be mechanical nodes of other elements.

bode(self, f, input_node, output_node, **kwargs)[source]

Make a bode plot for a particular node coupling for this suspension. See finesse.plotting.bode for the actual plotting method.

property connections_to[source]
property inputs[source]
property outputs[source]
property plant[source]
class finesse.components.mechanical.SuspensionZPK(*args, **kwargs)[source]

Bases: MechanicalConnector

A suspension that models multiple poles and zeros for the z, yaw, or pitch motion of an optic. The user must ensure that minus signs are correct for this transfer function as well as defining complex conjugae pairs for physically correct behaviour.

ZPK terms are in units of radians/s.

Parameters

namestr

Element name

connected_toElement or mechanical port

Mechanical port or element to attach this suspension to

zpk_plantdict

Dictionary of {(output, input):(z,p,k)}

Examples

>>> import matplotlib.pyplot as plt
>>> import finesse
>>> from finesse.components.mechanical import SuspensionZPK
>>>
>>> model = finesse.Model()
>>> model.fsig.f = 1
>>> model.parse("m m1 R=1 T=0")
>>> zpk_plant = {}
>>> # F_z to z (longitudinal force to displacement)
>>> zpk_plant['z', 'F_z'] = ([], [10], 1)
>>> model.add(SuspensionZPK('sus', model.m1.mech, zpk_plant))
>>> out = model.run("frequency_response(geomspace(1m, 100, 100), m1.mech.F_z, m1.mech.z)")
>>> plt.loglog(out.f, abs(out['m1.mech.F_z', 'm1.mech.z']))
fill(self, ws)[source]
class finesse.components.mechanical.SuspensionZPKWorkspace[source]

Bases: ConnectorWorkspace

finesse.components.mechanical.eval_tf_vec(const double complex[: :1] s, const double[: :1] num, const double[: :1] den, double complex[: :1] out)[source]