A key strength of Quanser products lies in the open architecture and software-agnostic nature, both in real-time applications. This flexibility ensures seamless integration with various solutions, making our products ideal for diverse research and educational environments. As Benjamin Franklin wisely put it, “Well done is better than well said.” That’s why we focus on showcasing our products in action, demonstrating their value in real-life situations.

These characteristics make the Qube-Servo 3 an ideal fit for integration within Collimator—a platform for designing, simulating, and optimizing complex dynamical systems using Python and Machine Learning. In this blog post, Jared, an engineer from Collimator, demonstrates these capabilities by guiding us through advanced techniques for controlling the inverted pendulum using the Quanser Qube-Servo 3 on the Collimator platform. I personally enjoyed how he leveraged both the Qube-Servo 3 and the QLabs Virtual Qube-Servo to teach a range of topics, from fundamental concepts to modern AI-based models.

Let’s dive in and hear firsthand about the incredible work Jared has done.

The below blog was from Collimator.ai: Machine Learning Control and HIL Testing with Collimator and JAX .

Machine Learning Control and HIL Testing with Collimator and JAX

In this blog post we present a four-part video series hosted by Jared, an engineer on the Collimator team, who guides viewers through advanced techniques for controlling the Quanser Qube rotary pendulum using the Collimator platform. Each part of the series focuses on different aspects of controller design, from basic linear control strategies to sophisticated machine learning-based approaches, showcasing the versatility and power of the Collimator software for modeling, simulation, and control design. The neural network controller in particular illustrates how easy it is to develop and test modern AI-based systems in Collimator, a process that is typically complicated and time consuming, even for experts.

Part 1: Introduction to the System and Basic Control

Jared introduces the Quanser Qube rotary pendulum, discussing its mechanical setup and the theoretical underpinnings necessary for control, such as the equations of motion. He demonstrates how to use the Collimator app to interact with both the hardware and an idealized model of the system, highlighting the platform’s ease of integrating hardware and software to streamline the simulation process.

Part 2: Linear Control Strategies

The second video dives into linear control strategies, specifically the design and implementation of a Linear Quadratic Regulator (LQR) for disturbance rejection. Jared uses Collimator’s Python API and integration with external libraries, like Python Control Systems Library, to enhance the control design process. This part emphasizes the practical application of theory to hardware and the benefits of graphical block diagram construction within Collimator.

Part 3: Nonlinear Control and Energy Shaping

In this installment, Jared tackles the nonlinear control challenge of swinging the pendulum to its upright position using energy shaping control. He develops a heuristic control law inspired by the simple pendulum’s dynamics. Then we learn how to implement a hybrid approach that switches between non-linear and linear control, demonstrating Collimator’s capabilities in quickly iterating and testing control strategies on virtual, and then physical, hardware. This video illustrates the platform’s flexibility in accommodating both simple and complex control logic through user-friendly block diagram and Python interfaces.

Part 4: Advanced Control Techniques (ML)

The final video explores cutting-edge control techniques, including trajectory optimization and neural network-based feedback control. Jared outlines the process of setting up trajectory optimization problems within Collimator and the challenges of applying such optimized trajectories in real-world applications. He then shifts to a more innovative approach by developing a neural network controller trained via reinforcement learning. The process is enhanced by Collimator’s differentiable simulation capabilities derived from JAX. This part notably highlights how Collimator facilitates the integration of machine learning with traditional control methods to create robust, hybrid control architectures.

Benefits of Using the Collimator Platform

There are many benefits to using Collimator for controls engineering, including:

  • Versatile Modeling Tools: The platform supports a wide range of control design approaches, from simple PID controllers to complex machine learning algorithms, accommodating various user needs and system complexities.
  • Integration of Hardware and Software: Collimator seamlessly integrates physical hardware interaction with simulation, allowing for real-time testing and adjustment of control strategies.
  • Graphical and Script-Based Interaction: Users can construct models and control systems using intuitive block diagrams or direct script coding, offering flexibility in design approach.
  • Advanced Optimization and Machine Learning Capabilities: Collimator supports advanced techniques like trajectory optimization and neural network training, leveraging its differentiable simulation environment to efficiently compute gradients and optimize control parameters.
  • Educational and Practical Application: The platform serves as both an educational tool for learning control system design and a practical tool for developing sophisticated control strategies in research and industry.

In addition to these, within the context of optimization of controls and control algorithms, one of the primary benefits to using Collimator is efficiency. Not only can you implement and test a variety of control strategies quickly, but you can also efficiently optimize your controller thanks to the integration of common libraries, support for highly parallel computation, and the auto differentiation capability that JAX provides.

ABOUT COLLIMATOR

We’re building data driven modeling and simulation tools for today’s systems.

Modern day systems are more complex than ever before. Traditional hardware functions are transitioning to software, big data and AI are used in the design of every system, and customers expect functionality of their systems to improve with every software update.

We’re leading the evolution of embedded system design, helping engineering teams overcome the challenges of designing the most complex systems so they can reduce their development risk and bring products to market faster.

To learn more, visit Collimator – Data driven design and simulation.