One of the more advanced features of the QUARC real-time control software lies in its Dynamic Reconfiguration blockset. Dynamic Reconfiguration refers to the capability of being able to dynamically switch QUARC models on the target system (e.g., a Windows PC, a NI myRIO, a Raspberry Pi 3 board). In other words, a QUARC model, while it is running, can be dynamically replaced with another running model – and that within a single sampling interval! So why would this be useful?

Switch to an Emergency Controller

The QUARC dynamic reconfiguration capability provides, for example, a mission reconfiguration mechanism for unmanned aerial and ground vehicles. On top of enabling the switching between several automatic controllers (for normal operation modes of a ground robot or a quadrotor), the QUARC dynamic reconfiguration capability can also be used for emergency situations (e.g., when the unmanned vehicle is going unstable) to switch to an emergency controller (e.g., implementing a manual override) and attempt a recovery.

QUARC Dynamic Reconfiguration blockset

Switch from a Remote Host or Target

Dynamic reconfiguration of QUARC models can be performed using either a MATLAB command or a QUARC supervisory model running in the background. Also, while only models running on the same target can be switched, it is possible to perform the switch from a remote host machine. For example, a QUARC supervisory model running either on the QUARC Host or a QUARC Target machine can monitor some key state variables and determine whether and when to trigger the switch.

Data Transition during the Dynamic Switch

Additionally, the QUARC Dynamic Reconfiguration toolbox also provides for transferring data (e.g., state variables, elapsed relative time) from the QUARC model being switched-out to the incoming QUARC model being switched-in. The data is transferred at the exact time of the switch, i.e., at the exact sampling instant when the switch occurs. As the actual plant can only be accessed by one controller at a time, this data transition mechanism is essential when dynamically switching QUARC controllers in order to ensure, for example, the stability of the controlled plant. Typically, the dynamic reconfiguration data transition is used to achieve continuity of the states between the switched-out and the switched-in controllers, as well as proper initial conditions for the switched-in QUARC model.

As an illustration, the QUARC Dynamic Reconfiguration blocks were successfully demonstrated using the Quanser Rotary Servo-based self-erecting single inverted pendulum experiment. In this setup, a first QUARC model was in charge of swinging up the single pendulum, while a second model implemented a state-feedback controller to balance the pendulum once inverted. A third and supervisory QUARC model was also running and monitoring the pendulum angle in order to automatically decide which one of the two models should run (depending on whether the pendulum needed to be swung up or balanced), and trigger the corresponding switch dynamically. In this example, the transferred data included the pendulum angle, which had to be passed from the swing-up model to the balancing controller and vice-versa to ensure correct initial conditions and pendulum stability.

QUARC Block PartyGive QUARC a Try

To introduce the dynamic reconfiguration feature and help users get started quickly, QUARC comes with an interactive and fully documented Dynamic Reconfiguration Demonstration. Try it – request a 30-day free demo license and let us know what you think. And if you are an existing QUARC user, let us know which block is your favourite and why! Email us and join the QUARC Block Party!