Application notes

Digital Filter Prototyping with Multi-instrument Mode

Moku:Go Multi-instrument Mode for Control Systems

Liquid Instrument’s powerful Multi-instrument Mode is available on Moku:Go, Moku:Lab, and Moku:Pro. On Moku:Go, it features two configurable instrument slots for creating your own mixed-signal test bench. Using two instruments simultaneously unlocks new applications for this portable device and makes it easier to set up and explore more advanced systems and concepts.


Moku:Go combines 14+ lab instruments in one high performance device, with 2 analog inputs, 2 analog outputs, 16 digital I/O pins and optional integrated power supplies.


Anyone who is familiar with control systems has had to work with this basic set of equipment: A plant, controller, a software or hardware interface, and a power supply. Each of these is typically a separate box that must be setup and controlled for the project of focus that day.


What if you could combine all this equipment together into one device? That is the purpose of Moku:Go; Simplifying the lab workspace and workflow so students can focus more on applying the theories they have learned in lecture and not waste precious lab time setting up multiple pieces of equipment.



What is Multi-instrument Mode?

With the addition of Multi-instrument Mode, users can do more with less equipment. Easy access to digital PID controllers, full end to end frequency response characterization of your control system, and effortlessly repeatable dynamic input response tests are just a few of the workflow improvements that Multi-instrument Mode offers. Democratizing hard to obtain equipment like a PID controller and spectrum analyzer means more students can get exposure to these instruments and can get the most out of their lab times. This article will detail a few use-cases that utilize Moku:Go’s Multi-instrument Mode to simplify the teaching process of PID controllers and make control systems more accessible for students.


Figure 1. Multi-instrument Mode user interface


Improve noisy sensors with the Digital Filter Box

When designing a control systems lab, it is necessary to determine what type of sensors are needed. Whether it is an IR sensor, accelerometer, or microphone, these sensors come with many different functions and prices. Typically, control labs will use mid-level quality sensors in the hopes that they will last a couple of years in the lab and give students enough hands-on experience that they can work with sensors of any quality. Cheaper sensors tend to have worse high-frequency noise which is amplified by the derivative term of a PID controller, limiting the damping that can be applied by a simple PID.


With Multi-instrument Mode and the Digital Filter Box, it is now possible to pre-filter the sensor signal before sending it to the controller. This means that cheaper sensors can be used, which reduces lab costs for the university and students. By filtering out the noise in these low-quality sensors, greater system stability can be attained, while also allowing for a larger derivative gain to be used in the PID controller.

Figure 2. Digital Filter Box and PID Controller MiM configuration


If you are unfamiliar with Liquid Instruments Digital Filter Box, it is an instrument that allows you to select preset or custom filters to eliminate noise, amplify signals, or even prototype analog filters for hardware design. The block diagram interface makes understanding and visualizing the signal chain simple for students and promotes an experimental environment for students to play around with various filter types, shapes, corner frequencies, and more. More advanced students can use the DFB to change the system’s gain margin and investigate control under marginal stability.




Figure 3. Notching Out 60 Hz Mains Frequency


Improving sensor signals and allowing for cheaper sensors to be used is a great feature, but what if you want to record the desired setpoint signal for your plant so that you can quickly tune the controller for the system?


Record dynamic inputs for easily repeatable plant testing and controller tuning

Control systems play a large role in electronics and designing a PID controller for a plant can be a massive undertaking. With Multi-instrument Mode, it is now possible for Moku:Go to be a digital PID controller test system.


Moku:Go’s Arbitrary Waveform Generator (AWG) allows users to load in custom waveforms, which can be obtained a few different ways for an easily repeatable dynamic input to the PID controller. One way is to simply upload a .csv or .txt file that contains the defined points for the waveform. This can be generated from a simulation, for example, or tediously typed in by the user. Another way is to use Moku:Go’s Data Logger to record the input signal, export it to a text file, then upload that file to the AWG.


Figure 4. Data Logger Recording a Custom Input Signal


Figure 5. Custom Input Signal Loaded Into AWG

Figure 6. Arbitrary Waveform Generator and PID Controller


In the setup depicted in Figure 6, the AWG is used to generate a custom set-point trajectory that the plant should track. This allows the student to quantify tuning performance in particular, repeatable applications rather than just in response to single steps. While not visible in the MIM configuration screen, the embedded Oscilloscope and Data Logger built into the PID controller are available for use as seen in Figure 7 below. The Oscilloscope measurement functionality can quantify overshoot while the Data Logger can provide result sets suitable for inclusion in a lab book or for submission for marking.


Figure 7. PID Controller Interface


Replace expensive plants with Moku Cloud Compile

Moku Cloud Compile, now available for Moku:Go, is a browser-based FPGA programming platform that allows users to deploy custom DSP directly onto Moku hardware. This can be used to simulate large or expensive plants imitating a mass-spring damper system, cruise control, or even an industrial power system. Combining MCC and MiM,  students can perform black box testing and PID tuning with real-world examples and discrete signals instead of being forced into simulation-only labs.



Figure 8. PID Controller and Cloud Compile


To simplify labs with real-world plants, MCC drivers can convert the PID Controller output in to a PWM signal, servo pulse train or digital communications packet to interface with motor controllers or other hardware. MCC can help on the input side as well, decoding digital sensor data, quadrature encoders and other signals as required to maximize the interconnectivity of the PID Controller and the real world.


A big advantage of MCC compared with traditional programmable FPGA solutions is that there is no massive 3rd party software download required. As a browser-based solution, your VHDL code is written and compiled in the cloud and a deployable bitstream is generated in minutes enabling fast development and debugging during lab time.



Moku:Go is a test and measurement device that can be configured into 14+ different instruments and with optional power supplies. With Multi-instrument Mode, it can deploy up to two instruments simultaneously, including the power supplies, for a streamlined approach to complicated bench-top setups.


This article has shown how Multi-instrument Mode can replace lab bench setups for control system courses that use various instruments, often from different manufacturers, reducing experiment complexity. Liquid Instruments has been in collaboration with many universities to expand our education content to help educators get started with Moku:Go faster. Be sure to check out some of our other lab tutorials and app notes related to control systems like this Closed Loop PID Tuning lab and Zieglar-Nichols Tuning Method lab. For all other education resources, check out our Coursework here.



Benefits of Moku:Go



For the educator & lab assistants

Efficient use of lab space and time

Ease of consistent instrument configuration

Focus on the electronics not the instrument setup

Maximize lab teaching assistant time

Individual labs, individual learning

Simplified evaluation and grading via screenshots

For the student

Individual labs at their own pace enhance the understanding and retention

Portable, choose pace, place and time for lab work be it home, on campus lab or even collaborate remotely

Familiar Windows or macOS laptop environment, yet with professional grade instruments