A Control Systems Toolbox for Julia
279 Stars
Updated Last
1 Year Ago
Started In
January 2015


Build Status Documentation Status

PkgEval codecov

A control systems design toolbox for Julia.


To install, in the Julia REPL:

using Pkg; Pkg.add("ControlSystems")



  • Breaking: Support for julia versions older than 1.3 is dropped
  • Breaking: c2d(::StateSpace) now returns only the system, not the x0map. See c2d_x0map for the old functionality.
  • System order can be specified in baltrunc.
  • New discretization methods in c2d. We now support :zoh,:foh,:fwdeuler,:tustin
  • Symbolic computation utilities in SymbolicControlSystems.jl

More details under releases.


  • lsimplot, stepplot, impulseplot now have the same signatures as the corresponding non-plotting function.
  • New function d2c for conversion from discrete to continuous.


Release v0.7 introduces a new TimeEvolution type to handle Discrete/Continuous systems. See the release notes.


  • Poles and zeros are "not sorted" as in Julia versions < 1.2, even on newer versions of Julia. This should imply that complex conjugates are kept together.


Delay systems

  • We now support systems with time delays. Example:
sys = tf(1, [1,1])*delay(1)
stepplot(sys, 5) # Compilation time might be long for first simulation

New examples


New state-space type HeteroStateSpace that accepts matrices of heterogeneous types: example using StaticArrays.


All functions have docstrings, which can be viewed from the REPL, using for example ?tf .

A documentation website is available at

Some of the available commands are:

Constructing systems

ss, tf, zpk


pole, tzero, norm, hinfnorm, linfnorm, ctrb, obsv, gangoffour, margin, markovparam, damp, dampreport, zpkdata, dcgain, covar, gram, sigma, sisomargin


care, dare, dlyap, lqr, dlqr, place, leadlink, laglink, leadlinkat, rstd, rstc, dab, balreal, baltrunc

PID design

pid, stabregionPID, loopshapingPI, pidplots

Time and Frequency response

step, impulse, lsim, freqresp, evalfr, bode, nyquist


lsimplot, stepplot, impulseplot, bodeplot, nyquistplot, sigmaplot, marginplot, gangoffourplot, pidplots, pzmap, nicholsplot, pidplots, rlocus, leadlinkcurve


minreal, sminreal, c2d


This toolbox works similar to that of other major computer-aided control systems design (CACSD) toolboxes. Systems can be created in either a transfer function or a state space representation. These systems can then be combined into larger architectures, simulated in both time and frequency domain, and analyzed for stability/performance properties.


Here we create a simple position controller for an electric motor with an inertial load.

using ControlSystems

# Motor parameters
J = 2.0
b = 0.04
K = 1.0
R = 0.08
L = 1e-4

# Create the model transfer function
s = tf("s")
P = K/(s*((J*s + b)*(L*s + R) + K^2))
# This generates the system
# TransferFunction:
#                1.0
# ---------------------------------
# 0.0002s^3 + 0.160004s^2 + 1.0032s
#Continuous-time transfer function model

# Create an array of closed loop systems for different values of Kp
CLs = TransferFunction[kp*P/(1 + kp*P) for kp = [1, 5, 15]];

# Plot the step response of the controllers
# Any keyword arguments supported in Plots.jl can be supplied
stepplot(CLs, label=["Kp = 1" "Kp = 5" "Kp = 15"])


Additional examples

See the examples folder and ControlExamples.jl