Coder Social home page Coder Social logo

controlsystems.jl's Introduction

ControlSystems.jl

Build Status PkgEval codecov

A control systems design toolbox for Julia.

Installation

To install, in the Julia REPL:

using Pkg; Pkg.add("ControlSystems")

News

2020-10

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

2020-09-24

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

2019-11-03

  • 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.

2019-05-28

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
nyquistplot(sys)

New examples

2019-05-22

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

2019-01-31

System identification using ControlSystemIdentification.jl is now available. The readme together with a series of notebooks serve as documentation.

Documentation

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

A documentation website is available at http://juliacontrol.github.io/ControlSystems.jl/latest/.

Some of the available commands are:

Constructing systems

ss, tf, zpk

Analysis

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

Synthesis

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

Plotting

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

Other

minreal, sminreal, c2d

Usage

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.

Example

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"])

StepResponse

Additional examples

See the examples folder

controlsystems.jl's People

Contributors

adityam avatar albheim avatar andrersimoes avatar baggepinnen avatar femtocleaner[bot] avatar freemin7 avatar github-actions[bot] avatar hppyctrlengnrng avatar hurak avatar jcrist avatar jleny avatar kronosthelate avatar mfalt avatar michaelhatherly avatar neveritt avatar non-jedi avatar olof3 avatar pilwonhur avatar tkelman avatar ufechner7 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.