Library Simulink [better]: Quarc

The QUARC library for Simulink is a set of blocks provided by Quanser that integrates real-time control with Simulink. It allows you to:

Conclusion: Why QUARC Remains a Leader

The QUARC library for Simulink is not just a collection of I/O blocks—it is a complete real-time ecosystem. By enabling engineers to stay within the familiar Simulink environment while interacting with physical hardware, QUARC reduces development time from days to minutes. Its robust handling of real-time synchronization, versatile hardware support, and deep integration with Quanser’s world-class plants make it the go-to choice for control system education and research.

Whether you are a professor designing an undergraduate mechatronics lab, a graduate student validating a nonlinear controller, or an industry professional prototyping a novel actuator, mastering the QUARC blockset will empower you to turn theoretical models into real-world results.

Next Steps for the Reader:

The gap between simulation and reality is narrow, but QUARC provides the bridge. Happy real-time modeling.


Mark Thompson is a control systems engineer with over a decade of experience in real-time simulation and hardware-in-the-loop testing. This article was reviewed by Quanser Inc. for technical accuracy as of 2025.

The Scenario

Imagine you're a suspension engineer at an automotive company, tasked with designing a new suspension system for a luxury sedan. You need to ensure that the suspension provides a smooth ride while also maintaining stability and handling.

The Task

Your goal is to model and simulate the quarter car suspension system using Simulink and the Quarc library. You want to analyze the system's behavior under various road conditions and vehicle speeds.

The Steps

  1. Open Simulink: You start by opening Simulink and creating a new model.
  2. Add Quarc Library: You add the Quarc library to your Simulink model by searching for "Quarc" in the Simulink Library Browser.
  3. Select Quarter Car Model: You select the Quarter Car model from the Quarc library and add it to your model.
  4. Configure the Model: You configure the Quarter Car model by setting parameters such as the vehicle's mass, suspension stiffness, and damping coefficients.
  5. Add Road Profile: You add a road profile to simulate the vehicle's response to different road conditions. This can be done using a built-in road profile block or by creating a custom profile.
  6. Run the Simulation: You run the simulation to analyze the vehicle's response to the road profile.

The Results

After running the simulation, you can analyze the results to see how the suspension system performs. You can plot variables such as: quarc library simulink

By analyzing these plots, you can evaluate the performance of the suspension system and make adjustments to the design as needed.

The Benefits

Using the Quarc library in Simulink provides several benefits, including:

By following these steps, you can effectively use the Quarc library in Simulink to design and analyze a quarter car suspension system, ultimately leading to a better ride and handling experience for your vehicle's passengers.

QUARC is a powerful real-time control software developed by that integrates directly with

. It allows engineers and researchers to transform Simulink models into real-time applications that can interface with physical hardware without writing a single line of C/C++ code. 🛠️ The QUARC Targets Library The heart of QUARC within Simulink is the QUARC Targets Library

. This library provides specialized blocks that extend standard Simulink functionality for real-time environments. HIL (Hardware-In-the-Loop):

Blocks for reading and writing to data acquisition (DAQ) cards, such as the Quanser Q8-USB Communications:

Support for protocols like TCP/IP, UDP, Shared Memory, Serial, SPI, and I2C. Multithreading: Asynchronous Thread

block allows for non-periodic tasks (like communications or event-driven code) to run separately from the main control loop. Multimedia:

Blocks for interacting with cameras (e.g., FLIR), video files, and audio. ⚡ Core Features

QUARC bridges the gap between digital simulation and physical implementation through several key mechanisms: 1. External Mode Support Using Simulink's External Mode , QUARC allows you to Monitor & Tune The QUARC library for Simulink is a set

your model while it runs on the hardware. You can change controller gains or parameters in the Simulink diagram and see the results instantly on physical hardware. 2. Rapid Control Prototyping (RCP)

QUARC automates the generation, compilation, and deployment of code. With one click, your model is converted into real-time code and downloaded to the QUARC Target Manager 3. Cross-Platform Deployment

While development often happens on Windows, QUARC can target various environments, including: Windows (Hard Real-Time) Linux (on Raspberry Pi or other boards) Embedded platforms like NI myRIO or ELVIS III 🚀 Getting Started

To use the QUARC library in your Simulink projects, follow these standard steps: QUARC Real-Time Control Software - Quanser

Introduction to Quarc Library in Simulink

The Quarc library is a set of Simulink blocks developed by Quanser, a leading provider of engineering solutions for research and education. Quarc (Quanser Advanced Research and Control) is a software framework that enables users to design, simulate, and deploy control systems, mechatronics, and robotics applications. The Quarc library provides a comprehensive set of tools and blocks to facilitate the development of advanced control systems, estimation, and signal processing algorithms.

Key Features of Quarc Library

The Quarc library offers a wide range of features and tools, including:

  1. Control Systems: Quarc provides a variety of control system blocks, such as PID controllers, state-space controllers, and model predictive control (MPC) blocks.
  2. Estimation and Filtering: The library includes blocks for state estimation, parameter estimation, and signal filtering, such as Kalman filter and Luenberger observer blocks.
  3. Signal Processing: Quarc offers a range of signal processing blocks, including filtering, convolution, and Fourier transform blocks.
  4. Nonlinear Systems: The library provides blocks for modeling and simulating nonlinear systems, such as backlash, hysteresis, and saturation blocks.
  5. Real-time Systems: Quarc supports real-time implementation of control systems on Quanser's hardware platforms, allowing for rapid prototyping and testing.

Benefits of Using Quarc Library

The Quarc library offers several benefits, including:

  1. Rapid Prototyping: Quarc enables users to quickly design, simulate, and test control systems, reducing development time and effort.
  2. Ease of Use: The library provides a user-friendly interface and a comprehensive set of documentation and tutorials, making it easier for users to learn and use.
  3. Flexibility: Quarc supports a wide range of applications, from simple control systems to complex mechatronics and robotics systems.
  4. Real-time Implementation: The library enables seamless transition from simulation to real-time implementation on Quanser's hardware platforms.

Applications of Quarc Library

The Quarc library has a wide range of applications, including: Run Simulink models in real time on Windows

  1. Control Systems: Quarc is used in various control systems applications, such as robotics, autonomous vehicles, and process control.
  2. Mechatronics: The library is used in mechatronics applications, such as motion control, vibration control, and robotics.
  3. Signal Processing: Quarc is used in signal processing applications, such as audio processing, image processing, and biomedical signal processing.
  4. Research and Education: The library is widely used in research and education institutions for teaching and research purposes.

Getting Started with Quarc Library

To get started with the Quarc library, users can:

  1. Download and Install: Download and install the Quarc library from the Quanser website.
  2. Familiarize with Simulink: Familiarize themselves with Simulink and its interface.
  3. Explore Quarc Blocks: Explore the Quarc library and its blocks, and review the documentation and tutorials.
  4. Start with Examples: Start with example projects and models provided with the library to gain hands-on experience.

By following these steps, users can effectively utilize the Quarc library to design, simulate, and deploy advanced control systems, mechatronics, and robotics applications.

(Quanser Real-Time Control) is a rapid control prototyping platform that integrates with

to enable the design, development, and deployment of real-time applications directly onto hardware. It serves as a bridge between high-level graphical modeling and real-world execution, allowing users to run controllers on various targets—such as Windows or Linux—without writing manual code. The QUARC Targets Library The core of QUARC’s functionality within Simulink is the QUARC Targets Library

. This library provides specialized blocks that extend standard Simulink capabilities for hardware-in-the-loop (HIL) testing and real-time communication. Data Acquisition (DAQ):

Blocks that allow direct interaction with hardware sensors and actuators. The Immediate I/O

blocks, for instance, read or write to channels every time the block executes, which is critical for time-sensitive control loops. Communications:

A protocol-independent framework that uses Universal Resource Identifiers (URIs) to define connections. It supports various protocols like TCP/IP, UDP, serial, SPI, and I2C. Asynchronous Threads:

These blocks enable the creation of non-periodic threads for tasks like event-driven code or background communications, which run independently of the main model sample rate. Continuous Blocks:

Includes advanced tools for nonlinear state-space systems and extended Kalman filters. Key Features and Capabilities

QUARC transforms a standard Simulink environment into a powerful real-time workstation with several distinct advantages: QUARC Real-Time Control Software - Quanser


Step 5: Configure Code Generation

Best Practices

Sample Workflow (Typical User)

  1. Build controller in Simulink (e.g., PID for QUBE-Servo).
  2. Replace input sources with QUARC encoder blocks.
  3. Replace output sinks with QUARC PWM/voltage blocks.
  4. Set fixed-step solver (e.g., ode1, 0.001 s).
  5. Click Run → model executes in real time on actual hardware.
  6. Use QUARC Monitor to tune gains live.

Part 4: A Practical Step-by-Step Workflow

Let’s walk through a typical workflow of using QUARC Library for Simulink.

Key features:

Part 8: Real-World Applications

The QUARC library for Simulink is used extensively in academia and industry: