Control and filtering¶
A simple lock which computes and applies the feedback to a given parameter using an error signal.
lock name error_signal feedback gain accuracy disabled=false offset=0
name: Name of newly created lock.
error_signal: An error signal parameter or an object capable of producing a real-type error signal. This is typically a demodulated
PowerDetectorinstance (or the name of the instance).
feedback: A parameter of the model to apply the locks’ feedback signal to.
gain: Control loop gain.
accuracy: Threshold to decide whether the loop is locked.
disabled: If true this lock will not run when the RunLocks() action is used. Explicitly specifying the name of the lock will override this setting, e.g. RunLocks(name).
offset: An offset that is applied to the error signal before it is used.
dof name *node_amplitude_pairs DC=0
amplifier name gain=1
A zero-pole-gain filter element that is used for shaping signals in simulations. It is a two port element. p1 is the input port and p2 is the output port. Each one has a single node: p1.i and p2.o.
zpk name z p k=none fQ=false gain=1
name: Name of element in the model
z: A 1D-array of zeros. Use  if none are required. By default these are provided in units of radians, not Hz.
p: A 1D-array of poles. Use  if none are required. By default these are provided in units of radians, not Hz.
gain: Overall gain for the filter. Differs from k as this is a Parameter so can be easily switched on/off or varied during a simulation.
k: Gain factor for the zeros and poles. If None then its value is automatically set to generate a unity gain at DC.
fQ: When True the zeros and poles can be specified in a tuple of (frequency, quality factor) for each pole and zero. This automatically adds the complex conjugate pair.
butter name order btype frequency gain=1 analog=true
cheby1 name order rp btype frequency gain=1 analog=true