QUARC (Quanser Real-Time Control) is a powerful extension for
designed to bridge the gap between simulation and real-world hardware. It essentially transforms a standard PC into a real-time controller, allowing you to run Simulink models on physical plants with high precision. Key Features & Capabilities 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:
Benefits of Using Quarc Library
The Quarc library offers several benefits, including:
Applications of Quarc Library
The Quarc library has a wide range of applications, including:
Getting Started with Quarc Library
To get started with the Quarc library, users can:
By following these steps, users can effectively utilize the Quarc library to design, simulate, and deploy advanced control systems, mechatronics, and robotics applications.
The QUARC Library for Simulink, developed by Quanser, is a comprehensive suite of real-time control software that bridges the gap between theoretical Simulink models and physical hardware implementation. It serves as a rapid control prototyping (RCP) and hardware-in-the-loop (HIL) environment, allowing users to generate real-time code directly from Simulink diagrams without writing a single line of manual code. Core Functionality and Architecture
QUARC operates on a host-target relationship, where the user designs controllers in the Simulink Development Environment (SDE) on a host PC and deploys them to a local or remote real-time target.
Real-Time Code Generation: Converts graphical Simulink models into optimized C-code that runs deterministically on platforms like Windows and Linux.
External Mode Support: Enables online parameter tuning and real-time data monitoring directly within the Simulink interface while the model is executing on the target hardware.
Dynamic Reconfiguration: Allows users to replace a running model with a new one without interrupting the hardware's execution. Key Blocksets in the QUARC Library
The QUARC Targets Library expands standard Simulink capabilities with specialized blocks:
Hardware-In-the-Loop (HIL) API: Provides a unified interface to access data acquisition (DAQ) cards from Quanser, National Instruments, and other third-party manufacturers.
Stream API: A protocol-independent communication framework supporting TCP/IP, UDP, serial, shared memory, and SPI.
Multimedia and Vision: Specialized blocks for interfacing with FLIR and PGR cameras, performing image processing, and handling video compression.
Advanced Robotics: Includes kinematic solvers and blocks for controlling specific robots like the Quanser QArm, Denso, and Kinova arms. Applications in Education and Research
QUARC is widely utilized across academic and industrial sectors due to its "academically appropriate abstraction," which allows students to focus on control theory rather than low-level coding.
Teaching Labs: Integrated into Quanser lab workstations to teach linear systems, rotary motion, and mechatronics.
Autonomous Systems: Powering research in multi-agent robotics using the QBot 2, QCars, and QDrones.
High-Performance Prototyping: Used in large-scale projects, such as the Challenging Environment Assessment Lab (CEAL), for complex motion platform control. Getting Started and Troubleshooting
To use the library, ensure that QUARC Real-Time Control software is installed after MATLAB. If blocks are missing with a quarc_library error, you can run quarc_setup in the MATLAB Command Window to refresh the paths. For existing models, use the Upgrade blocks utility under the QUARC menu to resolve broken links from older versions. Quanser Lab Workstation Support from Simulink - MathWorks
Understanding the QUARC Targets Library for Simulink QUARC Real-Time Control Software is a powerful tool by that transforms quarc library simulink
models into real-time applications without requiring manual code writing. While Simulink is typically used for simulation, the QUARC Targets Library
adds specialized blocksets that allow these models to interact directly with hardware in real-time. Core Components of the QUARC Library
The QUARC library introduces several unique blocksets designed for high-performance control and communication: Hardware-in-the-Loop (HIL) Blocks
: These allow you to interface with data acquisition (DAQ) cards. A key feature is the ability to swap out the physical hardware for a model by changing a single parameter in the block. Communications Blockset
: This set enables models to talk to each other or external devices using protocols like TCP/IP, UDP, Serial, or Shared Memory. It uses Universal Resource Identifiers (URIs)
to define protocols, making it easy to switch communication methods by simply updating a string. Asynchronous Thread Blocks
: Unlike standard Simulink models that are strictly periodic, QUARC allows you to create non-periodic threads
that run asynchronously for tasks like event-driven code or background communications. Advanced Plotting : Includes the XY Figure block
, which outperforms standard Simulink graphs and can be used to drive axes within a custom MATLAB GUI. Key Features and Workflow QUARC Real-Time Control Software - Quanser
QUARCTM is the most efficient way to design, develop, deploy and validate real-time applications on hardware using Simulink®. QUARC Targets Library - Unleashing the Power of QUARC
QUARC is a rapid control prototyping (RCP) software developed by Quanser that integrates directly into Simulink. It allows engineers and researchers to run Simulink models on real-time targets—such as Windows, Linux, or embedded hardware—without manual C/C++ coding. Core Functions & Capabilities
QUARC essentially transforms Simulink into a real-time development environment through several key features:
Real-Time Execution: It enables Simulink models to run at deterministic rates (up to several kHz) on hardware, ensuring precise control timing for robotics and mechatronics.
Target Management: You can develop a model on your host PC and deploy it to a remote target (like a Quanser Qube or a Raspberry Pi) via a single click using the "Monitor and Tune" feature.
Hardware Interfacing: The library includes specialized blocks for I/O, including Data Acquisition (DAQ) boards, cameras, and communication protocols (SPI, I2C, PWM).
Code Generation: It leverages Simulink Coder to automatically generate, compile, and download real-time code to the target processor. Key Library Blocks
The QUARC library is organized into categories to streamline the development of control systems: Description Common Blocks Data Acquisition Interfaces with physical hardware sensors and actuators. HIL Read/Write, Analog Input, Encoder Input. Communications Handles data exchange between different models or devices. Stream Call, Stream Send/Receive, TCP/IP, UDP. Multimedia For vision-based control and image processing. Video Capture, Display Image, RGB to Gray. Devices Specific support for high-level hardware. Game Controller, Wiimote, Specialized Robot drivers. Advantages for Developers
"One-Click" Deployment: Eliminates the need to write custom drivers or handle complex compilation toolchains manually.
Live Parameter Tuning: Change gains, setpoints, or logic in the Simulink model while it is running on the hardware, and see the results instantly without stopping the process.
Cross-Platform Support: Develop once and deploy to various operating systems (Windows, Linux, QNX) by simply changing the target configuration.
Extensive Documentation: Quanser provides a comprehensive Online Help system integrated directly into the MATLAB help browser. Typical Workflow
Design: Create your controller using standard Simulink blocks.
Interface: Replace "Simulated Plant" blocks with QUARC HIL (Hardware-In-the-loop) blocks to connect to real sensors.
Configure: Select the QUARC target (e.g., quarc_win64) in the Model Configuration Parameters.
Build & Run: Click the "Build" button to generate code and "Connect" to start real-time execution.
The QUARC library is a suite of tools developed by Quanser that integrates with MATLAB and Simulink to enable rapid control prototyping and real-time hardware-in-the-loop (HIL) simulations. It allows users to generate real-time C code directly from Simulink models and run it on various hardware targets without manual programming. Key Papers and Documentation
Hardware-in-the-Loop Architecture with MATLAB/Simulink and QuaRC: This research paper explores the use of QUARC for rapid prototyping of CMAC neural network controllers, specifically for a ball-and-beam system.
MATLAB Simulink QUARC Primer: An authoritative guide from Quanser that introduces the basic functions of MATLAB, Simulink, and QUARC for first-time users. QUARC (Quanser Real-Time Control) is a powerful extension
QBOT: An educational mobile robot controlled in MATLAB/Simulink environment: This paper discusses the Quanser Mobile Robot Control Framework (QMRCF), which utilizes QUARC to accelerate mobile robot development and HIL testing. Core Capabilities of the QUARC Library QUARC Real-Time Control Software - Quanser
QUARC Targets Library is a specialized extension for Simulink that enables high-performance, real-time code generation and hardware-in-the-loop (HIL) testing. Unlike standard Simulink libraries, it provides unique blocks for hardware access, asynchronous communications, and advanced visualization. Core Capabilities Hardware Interfacing HIL (Hardware-in-the-Loop)
blocks allow for direct access to data acquisition cards. Users can switch hardware targets for an entire model by modifying a single parameter. Real-Time Performance : It supports hard real-time execution
on various targets, including Windows and Linux, and allows for online parameter tuning directly from the Simulink diagram. Asynchronous Execution : Blocks like the Asynchronous Thread
enable non-periodic tasks (e.g., event-driven code or idle worker threads) to run independently of the model's main sample rate. Advanced Sinks : QUARC includes specialized plotting blocks like Time Figure
that offer superior performance and can be integrated into custom MATLAB GUIs. Installation & Configuration
To use QUARC within Simulink, it must be properly initialized in the MATLAB environment: Automatic Setup
: If MATLAB is installed before QUARC, it is typically configured automatically. Manual Setup
: If needed, run the following command in the MATLAB Command Window to add QUARC to the path: quarc_setup Use code with caution. Copied to clipboard Opening the Library : You can access the blockset via the Simulink Library Browser or by entering qc_open_library('quarc_library') in the command window.
Creating Your First Visualization Part I - Loading Meshes and Textures
For safety, QUARC includes QUARC Shutdown blocks that can safely stop motors if an emergency condition is detected (e.g., encoder out of range or temperature sensor too high). You can programmatically halt the real-time code.
This is the most utilized section of the library. Quarc provides pre-written drivers for a vast array of hardware data acquisition (DAQ) cards and sensors. This includes:
Introduction to Quarc Library in Simulink
Simulink, a graphical modeling and simulation environment, is widely used in the development of control systems, signal processing, and communication systems. One of the key features of Simulink is its ability to integrate with various libraries and tools, allowing users to leverage the strengths of different platforms. The Quarc library, developed by Quanser, is one such library that seamlessly integrates with Simulink to provide a comprehensive platform for designing, testing, and deploying advanced control systems.
What is Quarc Library?
The Quarc library is a software framework that enables users to design, simulate, and deploy control systems using Simulink. Quarc provides a set of tools and blocks that can be used to create complex control systems, including state-space models, transfer functions, and PID controllers. The library is designed to work seamlessly with Simulink, allowing users to take advantage of Simulink's graphical modeling and simulation capabilities.
Key Features of Quarc Library
The Quarc library offers a range of features that make it an ideal choice for control systems development. Some of the key features of the Quarc library include:
Benefits of Using Quarc Library
The Quarc library offers a range of benefits to users, including:
Applications of Quarc Library
The Quarc library has a wide range of applications in the development of control systems, including:
Getting Started with Quarc Library
Getting started with the Quarc library is easy. Here are the steps to follow:
Conclusion
The Quarc library is a powerful tool for designing, simulating, and deploying advanced control systems using Simulink. With its range of blocks and tools, Quarc enables users to create complex control systems quickly and easily. The library's integration with Simulink and Quanser hardware makes it an ideal choice for control systems development. Whether you're working on control systems, robotics, aerospace, or industrial automation applications, the Quarc library is definitely worth considering.
FAQs
Additional Resources
By following this article, you should now have a good understanding of the Quarc library and its applications in control systems development using Simulink. Whether you're a seasoned developer or just starting out, the Quarc library is definitely worth considering for your next project.
(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
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
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
QuArc is a model-based design library for Simulink focused on control systems and embedded software development. It provides reusable blocks, templates, and verification/scalability features aimed at improving development speed, code quality, and traceability for embedded control applications.
Seamless Simulink Integration
QUARC blocks drag-and-drop into Simulink like native blocks. No separate coding environment—just add I/O blocks, set sample time, and hit "Run" to execute in real time.
True Hard Real-Time (Windows/Linux)
Achieves sub-millisecond deterministic performance (e.g., 1 kHz control loops) on standard PCs using Quanser’s kernel-level real-time engine. Far superior to plain Simulink Desktop Real-Time.
Excellent Hardware Support
Native drivers for Quanser plants, sensors (encoders, IMUs), actuators, and data acquisition cards (e.g., QPIDe, Q8-USB). Also supports third-party boards via generic I/O blocks.
Powerful Debugging & Monitoring
Live tuning of parameters, real-time scope/display blocks, data streaming to MATLAB Workspace without stopping the model. Makes iterative controller tuning very fast.
Advanced Features
Support for distributed systems (SHM, UDP, serial), hardware-in-the-loop (HIL) simulation, automatic C-code generation, and even Simulink external mode. Control Systems : Quarc provides a variety of