set_pid_by_frequency

Configure the selected PID controller using crossover frequencies. Channel 1 configures the fast controller, channel 2 configures the slow controller.

When proportional gain is enabled (prop_gain is set), int_crossover and diff_crossover are the integrator and differentiator crossover frequencies. When proportional gain is disabled there is no crossover point, so int_crossover and diff_crossover are instead interpreted as the integrator and differentiator unity gain frequencies. This mirrors the Moku app, which relabels these fields depending on whether proportional gain is active.

Parameters

integer required
Target channel
allowed values:1, 2
number
Proportional gain factor
default: undefined
allowed values:-60 to 60
units: dB
Integrator crossover frequency, or unity gain frequency when proportional gain is disabled
default: undefined
allowed values:31.25e-3 to 312.5e3
units: Hz
Differentiator crossover frequency, or unity gain frequency when proportional gain is disabled
default: undefined
allowed values:312.5e-3 to 3.125e6
units: Hz
Second integrator crossover frequency
default: undefined
allowed values:31.25e-3 to 312.5e3
units: Hz
Integrator gain saturation
default: undefined
allowed values:-60 to 60
units: dB
Differentiator gain saturation
default: undefined
allowed values:-60 to 60
units: dB
number
Invert PID
default: false
boolean
Disable all implicit conversions and coercions.
default: true

# Examples

# Sample response

{
    "int_crossover": 3100.0,
    "int_saturation": 40.0,
    "invert": false,
    "prop_gain": -10.0
}
1
2
3
4
5
6