istefanis / controllio

Web app for experimenting with control systems

Home Page:https://istefanis.github.io/controllio/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Controllio

app

Controllio is a web app which lets Control Systems engineers design & experiment with LTI (linear time-invariant) dynamical systems online.

So far, functionality has been implemented for:

  • the analytical computation of the overall transfer function (tf) of a system modeled by interconnected elements in the s-domain
  • the generation of its Bode and Nyquist plots
  • the numerical computation of its time response plot
  • the numerical computation of its zeros/poles & some characteristic numbers, ex. bandwidth
  • the numerical computation of its stability

This is a web GUI tool. For a command-line one, check the lti-freq-domain-toolbox

Motivation

The motivation behind Controllio is to create an open-source tool for studying Control Systems, which:

  • runs on the browser without any installation, is fast and mobile-friendly
  • is written in a widely-used programming language (vanilla Javascript), and can be easily extended

Technical details

Circuit simplification

  • A set of 6 simplication algorithms to compute analytically its overall transfer function

circuit simplification

Numerical algorithms

  • Polynomial complex roots: Weierstrass / Durand-Kerner algorithm
  • Laplace inversion: Talbot algorithm

Topology optimization

  • A stochastic algorithm to simplify the circuit's topology

topology optimization

Ready-made components

  • Utilities: integrator / step, exponential decay, sine, phase delay
  • Controllers: PI, PD, PID

Try it out

Online

  • The app is deployed here

Locally

  • Download the repo, and just load the app using a development server

User Guide

A User Guide is included in the web app, and can be launched from the main menu

Code Structure

The project uses a simplified variation of the MVC pattern, organizing code into model and view parts:

  • \model\ contains all code modeling the circuit elements, state & functionality:
    • the definitions of the main circuit elements (tf, adder, block), as JS classes
    • the circuit/block simplification algorithms' logic
    • the services related to the circuit state & core functionality (ex. elementConnectionService)
  • \view\ contains all code related to the visual part of the app & its UI:
    • the views of the main circuit elements (ex. tfView) & all other UI components (ex. navbarView)
    • the core rendering & UI services (ex. elementRenderingService, elementSelectingAndDraggingService)
    • the app features' services (ex. optimizeTopologyService)
    • the animations' rendering code
    • the plot computations & rendering code
    • the CSS styles

In addition:

  • \assets\ contains any other resources used (ex. libraries, images)
  • \math\ contains the math services (ex. complexAnalysisService)
  • \test\ contains the services' tests (ex. plotsTests), which can be executed from the main JS file script.js
  • \util\ contains any general-purpose utility code & services (ex. loggingService)

License

Controllio is distributed under the MIT License, included in the 'LICENCE.TXT' file. Copyright (C) 2023 Ioannis Stefanis