Logotipo de Moku

Moku PID Controller

Moku-PID-Controller-product

Especificacións

  • Circuíto pechado bandwidth: >100 kHz
  • Características: Real-time configurable feedback controllers
  • Aplicacións: Suitable for temperature and laser frequency stabilization
  • Adicional Features: Embedded Oscilloscope and Data Logger

Introdución

The Moku PID (Proportional-Integral-Derivative) Controller features real-time configurable feedback controllers with a closed-loop bandwidth of >100 kHz. This enables each controller to be used in applications requiring both low and high feedback bandwidths, such as temperature and laser frequency stabilization. The PID Controller also comes withan embedded Oscilloscope and Data Logger to observe short- and long-term behavior of the controller. Below, we provide a guide to the underlying architecture of the instrument. We also include a general exampna guía de inicio rápido e unha pequena cantidade de exemplos en profundidadeamples to showcase different ways to use the Moku’s PID Controller. These user manuals are tailored to the graphical interfaces available on macOS, Windows, iPadOS, and visionOS. If you’d prefer to automate your application, you can use Moku API; available for Python, MATLAB, LabVIEW, and more. Refer to the API Reference to get started. AI-powered help is available to aid both workflows. AI help is built into the Moku application, and provides fast, intelligent answers to your questions, whether you’re configuring instruments or troubleshooting setups. It draws from Moku manuals, the Liquid Instruments Knowledge Base, and more, so you can skip the datasheets and get straight to the solution.

Accede á axuda da IA ​​desde o menú principalMoku-PID-Controller-fig (1)

Figure 1. PID Controller user interface showing the instrument block diagram (top), embedded Oscilloscope panel (bottom), and the Oscilloscope settings panels (bottom right)

For more information on the specifications for each Moku device, please refer to our Product Documentation, where you can find the Specifications and the PID Controller Datasheets.

Guía de inicio rápido

Here we outline how to set up the Moku PID Controller and highlight a typical use case for the instrument. In this example, we incorporate the PID Controller into a feedback system. The measured signal is provided as Input 1, with a reference signal provided as Input 2. The output is sent to the actuator in the feedback system from Output1. In this case, the PID Controller is used as a simple proportional-integral (PI) controller, with no derivative term.

  • Paso 1: Configure the analog front-end settings for the signal inputs
    Set the analog front-end settings for the input. In this case, both Input1 and Input2 have a 50 Ω input impedance, 0 dB attenuation, and use DC coupling.
  • Paso 2: Configure the Control matrix
    Neste example, the matrix is chosen to be [1,-1;0,0]. This indicates the matrix takes the difference between the two inputs, the sensed and reference signal, and then gives it to the controller.
  • Paso 3: Configure the input/output offset
    Depending on the control loop settings, it is sometimes desirable to introduce a DC offset in the error signal calculation. For example, if the error signal at Input 1 has a DC offset of 10 mV, setting the input offset to –10 mV would compensate for it. Similar adjustments can be made by adding output offsets after the controller block.
  • Paso 4: Configurar o voltage límites
    In addition to the offsets, the user can also put voltage limits on each of the output ports. These limits ensure that excessive voltages are not applied to any component in the control system. For this example, the offsets are set to 0 with no limits on the output port.
  • Paso 5: Configure the PID Controller
    Now configure the response by selecting the PID block. Doing so opens an interactive window that displays the PID response as a function of frequency. The behavior of the PID Controller can then be changed by enabling/disabling the different terms and putting in the gain value for each term. This can be done by dragging the markers on the interactive graph and changing them as desired. For this example, the Derivative and Double Integrator are disabled with only the Integrator and Proportional gain active. The Proportional gain is at 0 dB, with the Integrator crossover frequency at 1 kHz.
    Nota: This step can be repeated multiple times to change the PID Controller behavior as required.
  • Paso 6: Observe signals on the Oscilloscope
    After the PID Controller is set, probe points can be used to observe the signals. Enable the probe points before the controller and at the controller output. Clicking on these probe points opens up the embedded Oscilloscope menu and displays the signal at that point in the chain. Please see the Oscilloscope manual for more details on its operation.
  • Paso 7: Enable the outputs.
    Once the Oscilloscope is set up to observe the signals, the output can be enabled. Click on the output icon to select between Off, 0 dB gain, and 14 dB gain. For this example, 0 dB is selected as the smallest range.Moku-PID-Controller-fig (2)

Figure 3. Using the embedded Oscilloscope to monitor signals before and after the controller.

  • Paso 8: Updating the PID Controller
    With the output enabled, the feedback system becomes closed. The embedded Oscilloscope is useful to observe the error and control signal. Using these probe points to monitor changes, the PID Controller can be tuned to optimize loop performance or maximize noise suppression.
    Nota: other Moku instruments, such as the Phasemeter and Time & Frequency Analyzer, can offer additional metrics to help quantify performance.Moku-PID-Controller-fig (3)

Figure 4. Tuning the PID Controller gains by observing the signals on the Oscilloscope.

Principio de funcionamento

Moku’s PID Controller instrument provides an easy-to-use interface for tuning proportional, integral, and derivative gains in a feedback loop. The PID is implemented by cascading two PID controllers to yield the final output. This architecture enables features such as a double integrator or multiple-section frequency response in Advanced mode. The basic control structure is shown in the block diagram below.Moku-PID-Controller-fig (4)

Figure 5. Block diagram of the Moku PID Controller.

Both PIDA and PIDB have an identical structure. The behavior of the PID controller can be encapsulated by the time domain expression as

c t = Kpe t + KI∫ e t dt + KD dx t

Using a Laplace transform, this can be converted to the frequency domain as

C s = KPE s + KIE s s + KDE s s

PID controllers are commonly used in feedback systems as they are easy to use and implement. Conceptually, each path contributes a correction to the measured error between the input and the reference signal. The proportional term applies a correction based on the current error but cannot eliminate steady-state error. The integral term addresses this by accumulating the error signal over time, which helps stability by driving the steady-state error toward zero. To further improve performance, the derivative term responds to the rate of change of the error, which dampens rapid fluctuations that the proportional and integral terms might otherwise amplify. In practice, the PI configuration is widely used, as it offers low steady-state error while being simple to implement. The Moku PID Controller also provides the ability to set saturation on the integrator and derivative terms. These saturation levels allow the systems to have a finite gain at very low and very high frequencies. Limiting the integrator gain at low frequencies prevents long-term noise accumulation that could otherwise drive the system to its voltage limits. Similarly, setting saturation limits can avoid infinite gain for high-frequency noise in differentiators and thereby improve performance. While saturation limits improve stability and help during tuning, setting them too low can restrict the controller’s ability to correct errors, leading to poor steady-state performance. Please refer to the six-part app series for a deeper understanding of feedback systems and PID controllers.

  • Parte 1: Frequency-domain control: defining a transfer function
  • Parte 2: Feedback control: constructing feedback control loops
  • Parte 3: Stability and delays: assessing stability in feedback control loops
  • Parte 4: Loop shaping: frequency domain tuning
  • Parte 5: Understanding actuator saturation in control systems
  • Parte 6: PID Controllers: Frequency-Domain Models & Applications

Usando o instrumento

Entradas de sinal
The analog frontend settings for each input channel of the PID Controller can be individually configured. Click the icon to configure the input settings for the signal input.

Moku-PID-Controller-fig (5)

Figure 6. Configuration of analog inputs on the PID Controller.

  • Escolla entre o acoplamento de entrada CA e CC.
  • Select between 50 Ω and 1 MΩ input impedance (hardware dependent).
  • Select an input attention.

Matriz de control

The control matrix combines, rescales, and redistributes the input signal to the two independent PID Controllers. The output vector is the product of the control matrix multiplied by the input vector.Moku-PID-Controller-fig (6)

Figure 7. Control matrix in the block diagram and path schematic.

where Path1 = a × In1 + b × In2 and Path2 = c × In1 + d × In2.

The value of each element in the control matrix can be set between -20 to +20. The gain can be incremented by 0.1 when the absolute value is less than 10 and by 1 when the absolute value is between 10 and 20. Thus t,, he matrix can be used to add or subtract two input signals to instead utilize a differential or common mode input for the PID Controller..

Controlador PID
Each channel is equipped with an independent PID Controller, positioned after the Control matrix that combines inputs from a pair of channels. This configuration allows precise control over each channel’s feedback path following signal blending. If more than two channels are available, you can access the other channels by clicking the arrow at the top. Each Control matrix feeds two PID blocks, each of which, in tu, is connected to an output. The signal path is shown as a block diagram in the PID instrument. To configure the PID gains, the PID block can be selected and then operated either in Basic or Advanced Mode.

Moku-PID-Controller-fig (8)

Figure 8. Accessing multiple PIDs on Moku: Pro.

Modo básico

The Basic mode of the PID Controller provides a simplistic way to change the PID gains.Moku-PID-Controller-fig (7)

Figure 9. Interface to access the Basic mode of the PID block.

  1. Enable/Disable button for the corresponding gain parameter.
  2. Field to observe or type in the numbers for each gain parameter.
  3. Corresponding interactive PID response plot.
  4. Markers on the plot indicate the enabled gain parameters.
  5. Toggle between magnitude and phase graphs.
  6. Increase/Decrease the Overall gain of the PID Controller.
  7. Toggle between Basic and Advanced mode.
  8. Close the PID block.

The gain fields of the different parameters are described below

Table 1. Parameters of the PID block

Moku-PID-Controller-fig (10)

Quick PID configuration
In the Basic mode of the PID controller, users can change the Proportional, Integrator, and Differentiator without the need to open the block, as shown in the screenshot.

Moku-PID-Controller-fig (11)

Figure 10. Accessing quick control on the PID block.

  1. Enable/Disable button for Proportional (P), Integrator(I) and Derivative (D).
  2. Field to observe and/or type in the numbers for each gain parameter-

Modo avanzado
The Advanced mode in the PID Controller provides us with the flexibility to manually adjust the gain settings of the PID Controller. The user can access each gain parameter from two PID cascaded blocks – Section A and Section B. The combined response of the two sections is shown in the PID response plot.Moku-PID-Controller-fig (12)

Figure 11. Accessing the interface for Advanced mode on the PID Block.

  1. Enable/Disable button to select the corresponding Section. Disabling any Section would ensure only the other Section is active. Disabling both Sections would result in a pass-through/ signal relay logic.
  2. Enable/Disable the corresponding gain parameter in each Section.
  3. Field to observe or type in the numbers for each gain parameter in dB or Hz.
  4. Corresponding PID response plot.
  5. Toggle between magnitude and phase graphs.
  6. Close the PID block.

The gains of the different parameters are shown below

Table 2. Different Parameters of the PID sectionMoku-PID-Controller-fig (13)

Nota: Double integrators can be implemented in the Advanced mode by cascading the cascade of integrators in Section A and Section B.

Controller path settings
Other block diagram elements in the PID Controller include switches to enable/disable the signal in the processing path, offsets that can be applied to the input signal or the control signal, and applying voltage limits on the output channels.

Moku-PID-Controller-fig (14)

Figure 12. PID Controller path settings.

  1. Type in the Input offset before the Controller.
  2. Open/close the input switch from the input signal to the Controller.
  3. Open/close the output switch from the Controller to the output.
  4. Type in the Output offset before it is generated as output.
  5. Enable/Disable the Voltage limitador.
  6. Type in the high and low voltage límites.
  7. Enable/Disable the output and set the output gain (if applicable).

Compensacións
A DC offset can be applied to the signal both before and after the controller. Input offsets can be added or subtracted from the measured process variable before it is fed to the PID block. These are used to correct for any sensor calibration errors or to handle known deviations from the error point. Output offsets are added to the output of the PID block before it’s sent to the actuator or system. These offsets are used to maintain operation in the system around a known nominal value, or when the actuator needs a default bias to operate.

Interruptores
The switches can be used to engage or disengage the control loop. When the switches are open, the input switch feeds zeros to the controller while the output switch gives zeros to the output. Upon clicking the input switch and closing it, the input signal is again fed to the controller. Similarly, upon clicking the output switch, the controller signal is passed to the output signal path. Every time the switches are opened and closed, the Integrator and Differentiator registers in the PID Controller are cleared.

Voltage límites
Voltage limits can be applied before the signals are generated from the output ports. These limits ensure the output is maintained at these voltage levels whenever the signal crosses the specified threshold. For example, consider a system that only works with positive voltages. An input offset would be useful to generate a zero-crossing error signal with an output offset to return it to a positive level. The voltage limits would be useful to ensure that the minimum voltage is always greater than zero.

Observación dos datos

Osciloscopio incorporado

Moku-PID-Controller-fig (15)

Figure 13. Probe point signals viewed in the embedded Oscilloscope.Moku-PID-Controller-fig (16)

Rexistro de datos 

Moku-PID-Controller-fig (17) Moku-PID-Controller-fig (18)

Figure 14. Embedded Data Logger in PID Controller.

The embedded Data Logger can stream over a network or save data to the onboard storage of our Moku. For details, refer to the Data Logger user manual. More streaming information is in our API Reference.

Exportando datos
Export data by clicking the share icon . Any active probe points will be captured in the live data export or logging. Open the embedded Oscilloscope or Data Logger to export live and logged data, respectively.

Datos en directo 

Moku-PID-Controller-fig (19)

Figure 15. Data exporting user interface and settings.

To save live data

  1. Select the type of data to export
    • Traces Saves the trace data for all visible signal traces, in either a CSV or MATLAB format.
    • Screenshots: ve the app window as an image, in either a PNG or JPG format.
    • Settings saves the current instrument settings to a TXT file.
    • Measurements saves the active measurement values in either a CSV or MATLAB format.
    • High-res data ,the full memory depth of statistic values for all visible channels, in LI, CSV, HDF5, MAT, or NPY format.
  2. Selecciona o formato de exportación.
  3. Seleccione o Filename prefix for your export. This is defaulted to “MokuPIDControllerData” and can be changed to any filenome de caracteres alfanuméricos e guións baixos. Un tempo máximoamp e o formato de datos engadirase ao prefixo para garantir o filename is unique. For example: “MokuPIDControllerData_YYYYMMDD_HHMMSS_Traces.csv”
  4. Enter additional Comments to be saved in any text-based file cabeceira.
  5. Select the export Destination on your local computer. If “My files” or “Share” is selected, the exact location is selected when the Export button is clicked. Multiple export types can be exported simultaneously using My Files e Compartir, pero só se pode exportar un tipo de exportación ao portapapeis á vez.
  6. Exportar os datos ou
  7. Pecha a xanela de exportación de datos sen exportar.

Datos rexistradosMoku-PID-Controller-fig (20)

Figura 16. File exporting user interface and settings.

Para gardar os datos rexistrados:

  1. Selecciona todo files logged to the device’s memory to download or convert.
  2. Eliminar o seleccionado file/s.
  3. Browse and select file/s para descargar ou converter.
  4. Select an optional file formato de conversión.
  5. Select a location to export your selected files a.
  6. Exportar os datos.
  7. Pecha a xanela de exportación de datos sen exportar.

Examples

Using PID in a feedback system
The Moku PID Controller can be directly incorporated into different feedback systems. A simple example involves using a PID controller to control the flow of fluid in a tank.Moku-PID-Controller-fig (21)

Figure 17. Block diagram of the water tank system.

Consider a simple block diagram of a tank system. The tank uses two valves to control the inflow and outflow of a fluid into the tank. A sensor is used to measure the fluid level in the tank and is given to the Moku as a voltage signal. The Moku PID Controller would then produce a signal to control the valves.

  • Paso 1: Configure the analog front-end settings for the signal inputs
    Set the analog front-end settings for the input. In this case, both inputs have a 50 Ω input impedance to match the source, -20 dB attenuation, and use DC coupling.
  • Paso 2: Configure the Control matrix
    Configure the Control matrix to take Input1 in control path 1, and Input1 in control path 2. As the same water level information is required for both systems, both control paths would use the same information. The matrix will take the values [1, 0; 1, 0].
  • Paso 3: Configure the input and output offsets
    The input offsets provide the reference set point. Depending on the valve, the height can be translated to a voltage using a scaling factor. This can then be used to generate the reference DC offset and thus create an error signal. Since the valves operate in unipolar mode, the output offsets need to ensure the signal is positive at all times. This can be reinforced by enabling the voltage limits to have a minimum of 0 V.Moku-PID-Controller-fig (22)

Figure 18. PID Controller interface for implementing feedback in the tank system.

  • Paso 4: Configure the PID block
    The PID Controller can be set to the desired configuration for operation. The optimal values can be analytically calculated by doing an open-loop analysis on the tank system. Alternatively, the control loop can be enabled at very low gains and slowly increase them until it becomes unstable.
  • Paso 5: Enable the outputs
    Once the PID blocks are configured, the outputs can be enabled. These outputs would be used to control the valve operation.
  • Paso 6: Observe the controller inputs and outputs
    Put probes on the input channels and at the outputs of the PID Controller.

Ferramentas adicionais

Menú principal
The main menu can be accessed by clicking the icon in the top-left corner.

Moku-PID-Controller-fig (23)

AI Help… Opens a window to chat to an AI trained to provide Moku-specific help (Ctrl/Cmd+F1)
Os meus dispositivos returns to the device selection screen
Cambiar to another instrument
Gardar/recuperar a configuración

  • Save current instrument state (Ctrl/Cmd+S)
  • Load last saved instrument state (Ctrl/Cmd+O)
  • Show the current instrument settings, with the option to export the settings.

Restablecer instrumento to its default state (Ctrl/Cmd+R)
Sync Instrument slots in Multi-Instrument Mode*
Externo 10 MHz clock selection determines whether the internal 10 MHz clock is used.
Configuración de mestura de reloxos opens the clock blending configuration pop-up *
Fonte de alimentación access panel*
File Xerente access tool
File Converterr access tool
Preferencias access tool
If available, use the current settings or device.

HelpThe 

  • Instrumentos líquidos website opens in the default browser
  • Shortcuts list (Ctrl/Cmd+H)
  • Manual Open the user manual in your default browser (F1)
  • Report an issue to the Liquid Instruments team
  • Privacy Policy opens in the default browser
  • Export diagnostics exports a diagnostics file you can send to the Liquid Instruments team for support.
  • About the Show app version, check for updates or licence information

File conversor 

O File converter can be accessed from the main menu. The File converter converts a Moku binary (.li) format on the local computer to either .csv, .mat, .hdf5, or .npy format. The converted file gárdase no mesmo cartafol que o orixinal file.Moku-PID-Controller-fig (24)

Figura 20. File Converter user interface.

Para converter a file

  1. Seleccione a file tipo.
  2. Abrir a file (Ctrl/Cmd+O) ou cartafol (Ctrl/Cmd+Maiús+O) ou arrastre e solte no File conversor para converter o file.

Preferencias e configuracións

The preferences panel can be accessed via the Main Menu. In here, you can reassign the color representations for each channel, switch between light and dark mode, etc. Throughout the manual, the default colors are used to present instrument features.

Moku-PID-Controller-fig (25)

Figura 21. Preferencias e configuracións para a aplicación de escritorio (a) e para o iPad (b).

  1. Change the App theme between dark and light mode.
  2. Choose if a warning opens before closing any instrument windows.
  3. Tap to change the color associated with the input channels.
  4. Tap to change the color associated with the output channels.
  5. Tap to change the color associated with the math channel.
  6. Select if instruments open with the last used setting  r default values each time.
  7. Clear all auto-saved settings and reset them to their defaults.
  8. Garda e aplica a configuración.
  9. Reset all application preferences to their default state.
  10. Notify when a new version of the app is available. Your device must be connected to the internet to check for updates.
  11. Indica os puntos táctiles na pantalla con círculos. Isto pode ser útil para demostracións.
  12. Open information about the installed Moku application and license.

Reloxo de referencia externo

Your Moku may support the use of an external reference clock, which allows Moku to synchronize with multiple Moku devices, other lab equipment, lock to a more stable timing reference, or integrate with laboratory standards. The reference clock input and output are on the rear panel of the device. Each external reference option is hardware-dependent. Review as opcións de referencia externa dispoñibles para o teu Moku.

Entrada de referencia: Accepts a clock signal from an external source, such as another Moku, a laboratory frequency standard, or an atomic reference (for exampé dicir, un reloxo de rubidio ou un oscilador disciplinado por GPS).

Saída de referencia: Supplies the Moku internal reference clock to other equipment that requires synchronization.

If your signal is lost or is out of frequency, your Moku will revert to using its own internal clock until the reference signal returns. If this occurs, check that the source is enabled and that the correct impedance, amplitude, tolerance, frequency, and modulation are attached to the reference. Check the required specifications in the device specsheets. When the reference returns within range, sthe status changes to “validating” and then “valid” once the lock is re-established.

Referencia externa de 10 MHz

To use the 10 MHz external reference function, ensure “always use internal” is disabled in the Moku application, found in the main menu under “External 10 MHz clock”. Then, when an external signal is applied to your Moku reference input and your Moku has locked to it, a pop-up will show in the app. On some devices, the external reference information will be shown in the LED status as well. More information can be found in your Moku Quick Start Guide.Moku-PID-Controller-fig (26)

Figura 22. Menú principal de Moku coa opción "Usar sempre a referencia interna" desactivada e usando unha referencia externa.

Configuración de mestura de reloxos

If available, Moku blends up to four clock sources simultaneously for more accurate phase, frequency, and interval measurements across all time scales. A low-phase-noise Voltage-Controlled Crystal Oscillator (VCXO) is blended with a 1 ppb Oven-Controlled Crystal Oscillator (OCXO) for optimal wide-band phase noise and stability, which can be blended further with an external frequency reference and GPS disciplining to synchronize Moku with your lab and UTC. The VCXO and OCXO will always be used for the clock generation signal. The external and 1 pps references are optional and can be enabled or disabled in the “Clock blending configuration…” settings from the main menu. The loop bands are adjusted based on the different possible k source configurations, shown in Figure 23, where the frequencies of the bands represent where each oscillator’s phase noise dominates. Read how the clock blending works on Mok:  DD e lta for more details.

Moku-PID-Controller-fig (27)

Figura 23. Diálogo de configuración da mestura de reloxos Moku cunha referencia de frecuencia externa de 10 MHz e GNSS activado.

  1. VCXO jitter reference is always used for clock generation, handling high-frequency jitter with the lowest noise.
  2. OCXO jitter reference is always used for clock generation, ensuring moderate-term stability.
  3. A referencia de frecuencia externa de 10/100 MHz usa unha referencia externa de "10 MHz" ou "100 MHz" para corrixir a deriva no oscilador local, tendo en conta que o seu Moku terá que reiniciarse despois de cada cambio entre unha fonte de 10 MHz e 100 MHz.
  4.  A referencia de sincronización de 1 pps usa unha referencia "Externa" ou "GNSS" para sincronizarse co UTC e corrixir a deriva no oscilador local. A estabilidade do reloxo estimada é unha medida de canto se desvía o rendemento da referencia en relación coa base de tempo OCXO/VCXO local (tal como está mesturada actualmente e, se está activada, dirixida pola referencia externa de 10/100 MHz).

Preguntas frecuentes

Can the Moku PID Controller be used for applications other than temperature and laser frequency stabilization?

While the controller is optimized for these applications, it can also be adapted for other feedback control systems with appropriate tuning.

Is the Moku API compatible with all operating systems?

The Moku API is available for Python, MATLAB, LabVIEW, and more, making it compatible with a wide range of operating systems.

Documentos/Recursos

Moku PID Controller [pdfManual do usuario
PID, PID Controller, Controller

Referencias

Deixa un comentario

O teu enderezo de correo electrónico non será publicado. Os campos obrigatorios están marcados *