Thursday, May 14, 2009

QUARC: Dynamic Reconfiguration Toolbox

One of the advanced features of QUARC lies in its Dynamic Reconfiguration Toolbox. Dynamic Reconfiguration (DR) refers to dynamically switching QUARC models on the target machine (e.g., a Windows or QNX PC, or a Gumstix Verdex board). In other words, a QUARC model, while running, may be dynamically replaced with another running model - within a single sampling interval!

The QUARC dynamic reconfiguration capability provides, for example, a mission reconfiguration mechanism for Unmanned Arial Vehicles (UAVs) or Unmanned Ground Vehicles (UGVs). On top of enabling the switching between several automatic controllers (for normal operation modes of a robot or an UAV), the QUARC DR can also be used for emergency situations (e.g. when a robot or an UAV going unstable) to switch to an emergency controller (e.g. implementing a manual override) and attempt a recovery.

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, either running on the QUARC Host or the QuaRC Target machine, can monitor some key state variables and determine whether and when to trigger the 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, 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 plant being controlled. Typically, the DR 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 to run 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 needs 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.

To Introduce QUARC's dynamic reconfiguration feature and help users to quickly get strated, the latest QUARC version 1.2 comes with an interactive and fully documented Dynamic Reconfiguration demonstration. Try it - request a 30 day QUARC demo and let me know what you think.

No comments: