Time-delay root-locus GUI

Overview

Welcome to the tdrlocus() manual.
This guide provides an overview of the MATLAB function, along with instructions and examples to help you effectively use the tool.

The idea to create a MATLAB tool for plotting the root locus of time-delayed systems originated at CTU Prague, where the QPmR algorithm for efficient root-finding of quasipolynomials was developed. The thought that this algorithm could be used and further extended to generate root locus plots for time delay systems led to the development of this tool.

Description

The tdrlocus() tool is an open-source MATLAB graphical user interface designed for plotting the root locus of open-loop time-delayed systems. The GUI operates within the basic MATLAB environment and utilizes both the Symbolic Math Toolbox and the Control System Toolbox.

The tool is designed to be user-friendly, offering a straightforward interface for visualizing the root locus of continuous time-delay systems. In addition to basic root-locus plotting, it provides a variety of features for interactive system analysis. These include interactive closed-loop pole placement based on gain adjustment, the ability to add poles and zeros directly within the tool, importing and exporting systems from/to MATLAB workspace, creating and saving designed controllers, performing system analyses such as step response and Bode plots and much more.

The tdrlocus tool is a graphical interface for MATLAB, designed to be invoked as a function. It is provided as a folder containing the complete source code. To use the tool, simply download the folder, and place it to the working directory or add the folder with tdrlocus to the MATLAB search path.

tdrlocus.zip

Functions

To see further description, click on the function.

Toolbar

You can modify the system's transfer function directly in the GUI, either by entering the numerator and denominator in string notation into the corresponding fields, or by loading the numerator and denominator matrices from the workspace.

Numerical values can be replaced with parametric notation in the form of "K...", where "..." represents any integer (e.g., "K1", "K24", etc.). Each parameter is initialized with a value of 1. By clicking the second leftmost button on the toolbar, you can modify these parameter values directly in the GUI without rewriting the entire transfer function. This feature is useful, for example, for easy adjustment of time delays.

When this function is enabled, you can adjust the gain by clicking and dragging the poles on the complex plane.

This function opens a pop-up window that allows you to manually adjust the displayed region of the root locus.

This button adjusts the displayed region to fit the current section of the complex plane.

Adds a real pole to the system by clicking on the complex plane.

Adds a pair of complex-conjugate poles by clicking on the complex plane.

Adds a real zero to the system by clicking on the complex plane.

Adds a pair of complex-conjugate zeros by clicking on the complex plane.

This function enables or disables the pan mode. When enabled, you can navigate the complex plane by dragging.

This function enables or disables the zoom-in mode. You can zoom in by clicking or by selecting a region on the complex plane.

This function enables or disables the zoom-out mode. You can zoom out by clicking on the complex plane.

Reverts to the previous system state on the complex plane.

Sidebar

This button exports the current system to the MATLAB workspace as a transfer function or state-space object under the name "tdsys".

This button plots the step response of the current closed-loop system using the step() function from the Control System Toolbox.

This button plots the Bode plot of the current open-loop system using the bode() function from the Control System Toolbox.

This button opens a pop-up window that allows you to add or modify a controller in the form of a transfer function. It also supports controllers with time-delay terms.

This button sets the current system in the GUI as the default system. Any subsequent changes are treated as additions to the controller.

This button exports the current portion of the system considered to be the controller as a transfer function or state-space object to the MATLAB workspace under the name "tdcntrl".

Underbar

The "Toggle Pole Direction" option displays the direction of pole movement in response to increasing gain.

The gain edit field is a numerical input that allows the user to manually set the controller gain in the closed loop.

The gain slider allows you to adjust the gain value in the closed loop using a logarithmic scale. The positions of the closed-loop poles update dynamically based on the selected gain.

Examples