Introduction
The RX-CACSD (Computer-Aided Control System Design) library is a software tool for the design, analysis, and implementation of automatic control systems in the Open Object Rexx (ooRexx) programming environment. Its primary goal is to make control theory methods accessible to ooRexx users and to extend the languages traditional focus on scripting and automation toward technical and engineering applications.
Open Object Rexx (ooRexx) is an object-oriented implementation of the REXX language originally developed by IBM as Object REXX for the OS/2 operating system. It was later released as an open-source project and is currently maintained by the Rexx Language Association. ooRexx is primarily used for scripting, automation, and system integration across multiple platforms.
Overview
The RC-CACSD library provides comprehensive support for dynamic system modeling, controller design, control loop simulation, and stability analysis. It allows users to work with transfer functions, block diagrams, and standard stability criteria directly within the ooRexx environment.
The library includes implementations of commonly used linear controllers, most notably PID controllers, with flexible parameter tuning options. It also offers tools for time-domain simulation, stability evaluation, and basic controller optimization.
At the time of its introduction, no comparable library existed for ooRexx that provided integrated support for automatic control system design. While environments such as MATLAB (Control System Toolbox) and Python (python-control) offer similar capabilities, RX-CACSD brings these functionalities directly into ooRexx.
The library is portable across all platforms supported by ooRexx, including ArcaOS, OS/2 Warp 4, and FreeBSD, and integrates seamlessly with other ooRexx-based applications.
The library has proven useful both in real-time classical systems and in modern desktop and scripting environments.
The RX-CACSD library provides a set of object classes that enable intuitive snd clear expression of control structures and mathematical operations.
Key classes include:
- Transfer Function class (TFN)
- PID Controler class (PID)
- Matrix class (MAT)
- Polynomial class (POL)
- Transport delay class (LAG)
- Relay class (REL)
- Dead zone class (DZN)
- Stauration class (SAT)
- Optimization class (OPT)
- etc.
Example code of Control Process:
cls -- clear screen (system dependent command)
ts = 0.01 -- sample period
t_sim = 100 -- time of the simulation
rc = set_ts(ts) -- sets global step
G = .tfn~new(.array~of(0.5),.array~of(1,2,1)) -- define transfer function of the system
say G -- show transfer function on the screen
R = .pid~new(2.5,1.5,0,.array~of(-10,10),'PID') -- defines PI controller
say R -- show PI controller on the screen
ysp = .array~of(.array~of(0, 2,-1.5,3,0),.array~of(0,20,40,60,80))
a_t = .array~new -- for plot
a_y = .array~new
a_ysp = .array~new
u = 0 -- initial value of manipulated variable
t = 0
itx = 1 -- time index
say ysp[1][3]
loop t_sim/ts -- control loop
if t > ysp[2][itx+1] then -- ysp change
itx += 1
y = G~sim(u) -- system response to manipulated variable
u = R~sim(ysp[1][itx],y) -- manipulated variable from controller
a_t~append(t)
a_y~append(y)
a_ysp~append(ysp[1][itx])
say format(y,3,6) format(u,3,6) format(ysp[1][itx]-y,3,6) -- format output to the screen
t += ts
end
grp = .grp~new('Control process','t','y,ysp')
grp~plot(.array~of(a_t,a_y),'-b',.array~of(a_t,a_ysp),'-k')
::requires 'rxcacsd.cls' -- necessary RXCACSD library
Download
The RX-CACSD library is freely available for download. It is not open source, but it can be used free o charge for non-commercial and educational purposis.
For commercial use or integration into proprietary systems, contact the author to obtain a license.
Compatible with Open Object Rexx 5.0, 5.1 and 5.2 Beta.
version: 1.0.1-260121 (ooRexx 5.0.0 or higher)
| ArcaOS,eCS,OS/2 | FreeBSD15(AMD64) | Windows | |
|---|---|---|---|
| RX-CACSD | REXX Server | REXX Server | REXX Server |
| Open Object Rexx | Hobbes REXX Server |
REXX Server | SourceForge REXX Server |
| GnuPlot | Hobbes REXX Server |
STD PKG in FBSD | SourceForge REXX Server |
Contact
Email: michal.moucka@tul.cz