Moku PID Controller

تحديد
- حلقة مغلقة bandwidth: >100 kHz
- سمات: Real-time configurable feedback controllers
- التطبيقات: Suitable for temperature and laser frequency stabilization
- إضافي Features: Embedded Oscilloscope and Data Logger
مقدمة
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 example in the quick start guide and a small number of in-depth examples 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.
Access AI help from the main menu
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.
دليل البدء السريع
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.
- الخطوة 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. - الخطوة 2: Configure the Control matrix
في هذا المثال السابقample, 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. - الخطوة 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. - الخطوة 4: تكوين المجلدtagحدود ه
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. - الخطوة 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.
ملحوظة: This step can be repeated multiple times to change the PID Controller behavior as required. - الخطوة 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. - الخطوة 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.
Figure 3. Using the embedded Oscilloscope to monitor signals before and after the controller.
- الخطوة 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.
ملحوظة: other Moku instruments, such as the Phasemeter and Time & Frequency Analyzer, can offer additional metrics to help quantify performance.
Figure 4. Tuning the PID Controller gains by observing the signals on the Oscilloscope.
مبدأ التشغيل
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.
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.
- جزء 1: Frequency-domain control: defining a transfer function
- جزء 2: Feedback control: constructing feedback control loops
- جزء 3: Stability and delays: assessing stability in feedback control loops
- جزء 4: Loop shaping: frequency domain tuning
- جزء 5: Understanding actuator saturation in control systems
- جزء 6: PID Controllers: Frequency-Domain Models & Applications
Using the instrument
مدخلات الإشارة
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.

Figure 6. Configuration of analog inputs on the PID Controller.
- Select between AC and DC input coupling.
- Select between 50 Ω and 1 MΩ input impedance (hardware dependent).
- Select an input attention.
مصفوفة التحكم
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.
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..
وحدة تحكم 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.

Figure 8. Accessing multiple PIDs on Moku: Pro.
الوضع الأساسي
The Basic mode of the PID Controller provides a simplistic way to change the PID gains.
Figure 9. Interface to access the Basic mode of the PID block.
- Enable/Disable button for the corresponding gain parameter.
- Field to observe or type in the numbers for each gain parameter.
- Corresponding interactive PID response plot.
- Markers on the plot indicate the enabled gain parameters.
- Toggle between magnitude and phase graphs.
- Increase/Decrease the Overall gain of the PID Controller.
- Toggle between Basic and Advanced mode.
- Close the PID block.
The gain fields of the different parameters are described below
Table 1. Parameters of the PID block

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.

Figure 10. Accessing quick control on the PID block.
- Enable/Disable button for Proportional (P), Integrator(I) and Derivative (D).
- Field to observe and/or type in the numbers for each gain parameter-
الوضع المتقدم
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.
Figure 11. Accessing the interface for Advanced mode on the PID Block.
- 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.
- Enable/Disable the corresponding gain parameter in each Section.
- Field to observe or type in the numbers for each gain parameter in dB or Hz.
- Corresponding PID response plot.
- Toggle between magnitude and phase graphs.
- Close the PID block.
The gains of the different parameters are shown below
Table 2. Different Parameters of the PID section
ملحوظة: 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.

Figure 12. PID Controller path settings.
- Type in the Input offset before the Controller.
- Open/close the input switch from the input signal to the Controller.
- Open/close the output switch from the Controller to the output.
- Type in the Output offset before it is generated as output.
- Enable/Disable the Voltagالمحدد البريد.
- Type in the high and low voltagحدود ه.
- Enable/Disable the output and set the output gain (if applicable).
تعويضات
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.
المفاتيح
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.
المجلدtagحدود ه
المجلدtage 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.
Observing the data
راسم الذبذبات المدمج
Figure 13. Probe point signals viewed in the embedded Oscilloscope.
تسجيل البيانات

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.
تصدير البيانات
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.
البيانات المباشرة

Figure 15. Data exporting user interface and settings.
To save live data
- 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.
- Select the export format.
- حدد Filename prefix for your export. This is defaulted to “MokuPIDControllerData” and can be changed to any filename of alphanumeric characters and underscores. A timestamp and the data format will be appended to the prefix to ensure the filename is unique. For example: “MokuPIDControllerData_YYYYMMDD_HHMMSS_Traces.csv”
- Enter additional Comments to be saved in any text-based file رأس الصفحة.
- 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 and Share, but only one export type can be exported to the clipboard at a time.
- Export the data, or
- Close the export data window, without exporting.
البيانات المسجلة
الشكل 16. File exporting user interface and settings.
لحفظ البيانات المسجلة:
- حدد الكل files logged to the device’s memory to download or convert.
- حذف المحدد file/ث.
- Browse and select file/s للتحميل أو التحويل.
- Select an optional file تنسيق التحويل.
- Select a location to export your selected fileس الى.
- تصدير البيانات.
- Close the export data window, without exporting.
Exampليه
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.
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.
- الخطوة 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. - الخطوة 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]. - الخطوة 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.
Figure 18. PID Controller interface for implementing feedback in the tank system.
- الخطوة 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. - الخطوة 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. - الخطوة 6: Observe the controller inputs and outputs
Put probes on the input channels and at the outputs of the PID Controller.
أدوات إضافية
القائمة الرئيسية
The main menu can be accessed by clicking the icon in the top-left corner.

AI Help… Opens a window to chat to an AI trained to provide Moku-specific help (Ctrl/Cmd+F1)
أجهزتي returns to the device selection screen
يُحوّل to another instrument
Save/recall settings
- 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.
أداة إعادة الضبط to its default state (Ctrl/Cmd+R)
Sync Instrument slots in Multi-Instrument Mode*
خارجي 10 MHz clock selection determines whether the internal 10 MHz clock is used.
Clock blending configuration opens the clock blending configuration pop-up *
مزود الطاقة access panel*
File مدير access tool
File تحويلr access tool
التفضيلات access tool
If available, use the current settings or device.
HelpThe
- الأدوات السائلة 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 محول
ال 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 يتم حفظه في نفس المجلد مثل الملف الأصلي file.
الشكل 20. File Converter user interface.
لتحويل file
- حدد file يكتب.
- افتح file (Ctrl/Cmd+O) أو المجلد (Ctrl/Cmd+Shift+O) أو اسحب وأفلِت في File converter to convert the file.
Preferences and settings
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.

Figure 21. Preferences and settings for the Desktop (a) and for the iPad (b) App.
- Change the App theme between dark and light mode.
- Choose if a warning opens before closing any instrument windows.
- Tap to change the color associated with the input channels.
- Tap to change the color associated with the output channels.
- Tap to change the color associated with the math channel.
- Select if instruments open with the last used setting r default values each time.
- Clear all auto-saved settings and reset them to their defaults.
- حفظ وتطبيق الإعدادات.
- Reset all application preferences to their default state.
- Notify when a new version of the app is available. Your device must be connected to the internet to check for updates.
- قم بالإشارة إلى نقاط اللمس على الشاشة بالدوائر. يمكن أن يكون هذا مفيدًا للمظاهرات.
- Open information about the installed Moku application and license.
الساعة المرجعية الخارجية
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 the available external reference options for your Moku.
مدخلات المرجع: Accepts a clock signal from an external source, such as another Moku, a laboratory frequency standard, or an atomic reference (for example, a rubidium clock or a GPS-disciplined oscillator).
الإخراج المرجعي: 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.
10 MHz external reference
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.
Figure 22. Moku main menu with “Always use internal” reference disabled and using an external reference.
Clock blending configuration
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.

Figure 23. Moku clock blending configuration dialog with an external 10 MHz frequency reference and GNSS enabled.
- VCXO jitter reference is always used for clock generation, handling high-frequency jitter with the lowest noise.
- OCXO jitter reference is always used for clock generation, ensuring moderate-term stability.
- External 10/100 MHz frequency reference uses a “10 MHz” or “100 MHz” external reference to correct drift in the local oscillator, noting your Moku will have to be restarted after each change between a 10 MHz and 100 MHz source.
- 1 pps synchronization reference uses an “External” or “GNSS” reference to sync with UTC and correct drift in the local oscillator. The estimated clock stability is a measure of how much the reference performance deviates relative to the local OCXO/VCXO timebase (as currently blended and, if enabled, steered by the external 10 / 100 MHz External reference).
الأسئلة الشائعة
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.
المستندات / الموارد
![]() |
Moku PID Controller [بي دي اف] دليل المستخدم PID, PID Controller, Controller |

