Learn R Programming

Control Systems Toolbox for R Language

The Control Systems Toolbox is an R library that implements basic operations for the design and analysis of control systems.

This library started as a Google Summer of Code project (2017) and was mentored by Dr. M. Kostrun and Hans W Borchers

Installation

The package may be installed from this GitHub repository using devtools in the following manner:

install.packages("devtools") # if not already installed on your PC

devtools::install_github("benubah/control")

Features

  • Model Creation: Transfer function(tf), State-space(ss) and Zero-pole-gain (zpk) models; Transfer function Expressions
  • Model Conversion: tf2ss, tf2zp, ss2tf, ss2zp, zp2tf, zp2ss, tfdata, ssdata, zpkdata
  • System Interconnection: append, serial, parallel, feedback, connect
  • Analysis: ctrb, obsv, pole, damp, dcgain
  • Design: acker, care, pid, place, lqr
  • Time Response: gensig, ltitr, lsim, initial, impulse, ramp, step
  • Frequency Response: ltifr, freqresp, bode and nyquist
  • Plotting: lsimplot, initialplot, impulseplot, rampplot, stepplot, bodeplot, nyquistplot
  • Others: c2d, ode2ss

Most fundamental features of this toolbox were developed during the Google Summer of Code 2017 and a list of functions and activities produced during this summer could be found here.

Google Summer of Code project (2017) related articles demonstrating the usage of this toolbox are underlisted:

Documentation

All callable functions (including utilities) are documented and could be accessed within the R environment after installing the toolbox.

A web-browser readable format of the documentation could be found here: https://rdrr.io/github/benubah/control/api/

Copy Link

Version

Install

install.packages('control')

Monthly Downloads

203

Version

0.2.5

License

GPL-2

Maintainer

Ben Ubah

Last Published

December 12th, 2017

Functions in control (0.2.5)

acker

Pole placement gain selection using Ackermann's formula
append

Append the dynamics of a set of systems
connect

Block diagram interconnections of dynamic systems
care

Continuous-time Algebraic Riccati Equation solution
ctrb

Form Controllability Matrix
cloop

Closed Feedback Loops
TF

Evaluate Transfer function Expressions
initial

Initial Condition Response for Linear Systems
abcdchk

State-space matrices check.
freqresp

Low level frequency response function
bode

Bode Frequency Response for continuous-time Linear Systems.
gensig

Generate periodic signal
c2d

Continuous Time model conversion to Discrete Time model.
ltifr

LTI frequency response kernel
esort

Sort Complex Continuous Eigenvalues in Descending Order
lsim

Time response of a Linear system
feedback

Feedback Connection of LTI systems
pid

Proportional-Integral-Derivative (PID) Controller
issiso

SISO / MIMO Check
damp

Damping and Natural Frequencies for Continuous Systems
nyquist

Nyquist Frequency Response for continuous-time Linear Systems.
dcgain

DC Gain
obsv

Observability Matrix
impulse

Impulse Response for Linear Systems
selectsys

Select/Remove Subsystem in State-space Model
series

Series Connection of two systems
ordschur

Ordered schur decomposition
ltitr

Time response of a Linear Time-Invariant system
parallel

Parallel Connection of two systems
pole

Obtain Poles for a System
ss

Create State-space Model.
poly2str

Print Polynomial
zp2ss

Convert Zero-Pole-Gain Model to State-Space Model
ss2tf

State-space model conversion to Transfer function model.
zp2tf

Zero-pole-gain model conversion to Transfer function model
step

Step Response for Linear Systems
tf

Create Transfer function Model.
givens_rot

Complex Givens Rotation
place

Pole placement gain selection
ss2zp

State-space representation to zero-pole-gain representation
lsimplot

Plot time response of an LTI system
ssdata

Retrieve State-space data
tf2ss

Transfer function model conversion to State-space model.
tfchk

Transfer function check.
tfdata

Retrieve Transfer function data
tf2zp

Transfer function model conversion to Zero-Pole-Gain model.
polysub

Subtracting Polynomials
ramp

Ramp Response for Linear Time-Invariant Systems
zpk

Create Zero-Pole-Gain Model.
zpkdata

Retrieve zero-pole data from LTI system object