Control Systems (control-systems-ai999x)
Control Systems covers transfer functions, poles and zeros, step and frequency response, stability (Routh-Hurwitz, gain and phase margins, Nyquist), root locus, state space, controllability and observability, pole placement, LQR, Kalman filters, discretization and PID tuning: 97 calculations in 16 topics, each with its formula, its steps and its units, and a plain reason instead of a number when an input is missing or out of range. One compiled engine, four ways to use it: the desktop app, the command line, the browser and Python. Everything runs on your own computer, offline.
Four ways to use it
| Desktop app (Windows, Linux) | Windows 路 Linux |
Command line control-systems (Windows, Linux) |
Windows 路 Linux |
| Browser (any device) | Try it on the model page |
| Python 3.10+ | pip install control-systems-ai999x: on Windows and Linux (x86-64) pip installs the same compiled engine; on other systems (macOS, ARM) it installs a pure-Python build that gives the same answers |
See it
From the Control Systems desktop app: every scene and chart is drawn from the computed answer.
Charts:
![]() Gain and phase margins |
![]() Percent overshoot from the damping ratio |
![]() Continuous-time LQR gain (Riccati equation) |
![]() Tustin (bilinear) discretization |
Ask in words: 15 examples
Each question below was asked on this release; the comment under it is the line it printed.
import control_systems_ai999x as control_systems
a = control_systems.ask("bandwidth: num = [1], den = [1, 1]")
print(a.outcome, a.values)
# SOLVED {'wb': 1.0, 'dc_gain': 1.0}
a = control_systems.ask(
"logarithmic decrement: x1 = 1, xn = 0.5, n = 1"
)
print(a.outcome, a.values)
# SOLVED {'delta': 0.69314718056, 'zeta': 0.109652580999}
a = control_systems.ask(
"steady-state error: num = [10], den = [1, 3, 2], input = step"
)
print(a.outcome, a.values)
# SOLVED {'system_type': 0, 'K_static': 5.0, 'ess': 0.166666666667}
a = control_systems.ask("damping ratio from overshoot: OS = 0.2")
print(a.outcome, a.values)
# SOLVED {'zeta': 0.455949810769, 'pole_angle_deg': 62.8739366084}
a = control_systems.ask(
"Smith FOPDT fit: t28 = 4, t63 = 10, dy = 6, du = 2"
)
print(a.outcome, a.values)
# SOLVED {'K': 3.0, 'tau': 9.0, 'theta': 1.0}
a = control_systems.ask("exact settling time: zeta = 0.5, wn = 1")
print(a.outcome, a.values)
# SOLVED {'Ts': 8.07634897393, 'last_extremum': 2}
a = control_systems.ask("DC gain: num = [10], den = [1, 3, 2]")
print(a.outcome, a.values)
# SOLVED {'dc_gain': 5.0, 'final_value': 5.0}
a = control_systems.ask(
"discrete DC gain: num = [0.5], den = [1, -0.5]"
)
print(a.outcome, a.values)
# SOLVED {'dc_gain': 1.0, 'final_value': 1.0}
a = control_systems.ask("scalar LQR: a = 1, b = 1, q = 3, r = 1")
print(a.outcome, a.values)
# SOLVED {'P': 3.0, 'K': 3.0, 'pole': -2.0}
a = control_systems.ask(
"PI pole placement: K = 2, tau = 5, zeta = 0.7, wn = 1"
)
print(a.outcome, a.values)
# SOLVED {'Kp': 3.0, 'Ki': 2.5}
a = control_systems.ask(
"final value theorem: num = [10], den = [1, 3, 2, 0]"
)
print(a.outcome, a.values)
# SOLVED {'final_value': 5.0}
a = control_systems.ask(
"discrete PID: Kp = 2, Ki = 1, Kd = 0.5, T = 0.1"
)
print(a.outcome, a.values)
# SOLVED {'q0': 7.1, 'q1': -12.0, 'q2': 5.0}
a = control_systems.ask(
"PID parallel to standard: Kp = 6, Ki = 3, Kd = 3"
)
print(a.outcome, a.values)
# SOLVED {'Ti': 2.0, 'Td': 0.5}
a = control_systems.ask("Jury test: coefficients = [1, -1.2, 0.35]")
print(a.outcome, a.values)
# SOLVED {'stable': True, 'P1': 0.15, 'Pm1': 2.55}
a = control_systems.ask(
"initial value theorem: num = [2, 3], den = [1, 5, 6]"
)
print(a.outcome, a.values)
# SOLVED {'y0': 2.0, 'dy0': -7.0}
Command line: 15 examples
Each command below was run with control-systems of this release; the lines under it are the answer it printed (the full answer goes on with the method, every input in SI units and the conditions it assumes).
$ control-systems solve ctrl_lag_design beta=10 w_c=1
zero = 0.1
pole = 0.01
dc_gain = 10
phase_deg = -5.13765444
magnitude_db = 0.04277946506
$ control-systems solve ctrl_specs_to_poles OS=0.1630335348 Ts=2
zeta = 0.5
wn = 4 rad/s
sigma = 2
wd = 3.464101615 rad/s
char_poly = [1.0,4.0,15.9999999982]
$ control-systems solve ctrl_backward_euler "num=[1]" "den=[1, 1]" T=0.1
numz = [0.0909090909091,0.0]
denz = [1.0,-0.909090909091]
$ control-systems solve ctrl_kalman_scalar_step x=0 P=1 a=1 q=1 r=2 z=4
x_pred = 0
P_pred = 2
gain = 0.5
x_post = 2
P_post = 1
$ control-systems solve ctrl_bandwidth "num=[1]" "den=[1, 1]"
wb = 1 rad/s
dc_gain = 1
$ control-systems solve ctrl_log_decrement x1=1 xn=0.5 n=1
delta = 0.6931471806
zeta = 0.109652581
$ control-systems solve ctrl_dc_motor J=0.01 b=0.1 Kt=0.01 R=1 L=0.5
num = [0.01]
den = [0.005,0.06,0.1001]
dc_gain = 0.0999000999
poles = [-9.99749921826,-2.00250078174]
$ control-systems solve ctrl_lqr "A=[[0, 1], [0, 0]]" "B=[0, 1]" "Q=[[1, 0], [0, 1]]" R=1
K = [1.0,1.73205080757]
P = [[1.73205080757,1.0],[1.0,1.73205080757]]
poles = [{"re":-0.866025403784,"im":-0.5},{"re":-0.866025403784,"im":0.5}]
$ control-systems solve ctrl_pid_closed_loop "num=[1]" "den=[1, 1]" Kp=3 Ki=2
char_poly = [1.0,4.0,2.0]
poles = [-3.41421356237,-0.585786437627]
max_real_part = -0.5857864376
stable = true
$ control-systems solve ctrl_arrival_angle "num=[1, 2, 2]" "den=[1, 0]"
zero = {"re":-1.0,"im":1.0}
arrival_deg = -135
$ control-systems solve ctrl_lyapunov "A=[[-1, 0], [0, -2]]" "Q=[[2, 0], [0, 4]]"
P = [[1.0,0.0],[0.0,1.0]]
positive_definite = true
$ control-systems solve ctrl_state_feedback_poles "A=[[0, 1], [0, 0]]" "B=[0, 1]" "K=[4, 4]"
char_poly = [1.0,4.0,4.0]
poles = [-2.0,-2.0]
stable = true
$ control-systems solve ctrl_error_constants "num=[10]" "den=[1, 3, 2]" input=step
system_type = 0
K_static = 5
ess = 0.1666666667
$ control-systems solve ctrl_pade theta=2 n=1
num = [-1.0,1.0]
den = [1.0,1.0]
$ control-systems solve ctrl_damping_from_overshoot OS=0.2
zeta = 0.4559498108
pole_angle_deg = 62.87393661
Rust library: 15 examples
The crate control-systems-ai999x (in rust/ of the GitHub repository) answers a JSON request with control_systems_ai999x::solve_json. Each call below was compiled and run on this release; the comment under it is what it printed. The whole program is rust/control-systems/examples/readme.rs: cd rust && cargo run --release --example readme -p control-systems-ai999x.
use serde_json::{json, Value};
fn show(request: Value) {
let answer: Value = serde_json::from_str(&control_systems_ai999x::solve_json(&request.to_string())).unwrap();
println!("{}", answer["outcome"].as_str().unwrap_or(""));
for v in answer["values"].as_array().into_iter().flatten() {
let unit = v[2].as_str().unwrap_or("");
let unit = if unit.is_empty() || unit == "1" { String::new() } else { format!(" {unit}") };
println!("{} = {}{}", v[0].as_str().unwrap_or(""), v[1], unit);
}
}
show(json!({"key": "ctrl_lag_design", "inputs": {"beta": "10", "w_c": "1"}}));
// SOLVED
// zero = 0.1
// pole = 0.01
// dc_gain = 10.0
// phase_deg = -5.13765443982
// magnitude_db = 0.0427794650578
show(json!({"key": "ctrl_specs_to_poles", "inputs": {"OS": "0.1630335348", "Ts": "2"}}));
// SOLVED
// zeta = 0.500000000027
// wn = 3.99999999978 rad/s
// sigma = 2.0
// wd = 3.46410161488 rad/s
// char_poly = [1.0,4.0,15.9999999982]
show(json!({"key": "ctrl_backward_euler", "inputs": {"num": [1], "den": [1, 1], "T": "0.1"}}));
// SOLVED
// numz = [0.0909090909091,0.0]
// denz = [1.0,-0.909090909091]
show(json!({"key": "ctrl_kalman_scalar_step", "inputs": {"x": "0", "P": "1", "a": "1", "q": "1", "r": "2", "z": "4"}}));
// SOLVED
// x_pred = 0.0
// P_pred = 2.0
// gain = 0.5
// x_post = 2.0
// P_post = 1.0
show(json!({"key": "ctrl_bandwidth", "inputs": {"num": [1], "den": [1, 1]}}));
// SOLVED
// wb = 1.0 rad/s
// dc_gain = 1.0
show(json!({"key": "ctrl_log_decrement", "inputs": {"x1": "1", "xn": "0.5", "n": "1"}}));
// SOLVED
// delta = 0.69314718056
// zeta = 0.109652580999
show(json!({"key": "ctrl_dc_motor", "inputs": {"J": "0.01", "b": "0.1", "Kt": "0.01", "R": "1", "L": "0.5"}}));
// SOLVED
// num = [0.01]
// den = [0.005,0.06,0.1001]
// dc_gain = 0.0999000999001
// poles = [-9.99749921826,-2.00250078174]
show(json!({"key": "ctrl_lqr", "inputs": {"A": [[0, 1], [0, 0]], "B": [0, 1], "Q": [[1, 0], [0, 1]], "R": "1"}}));
// SOLVED
// K = [1.0,1.73205080757]
// P = [[1.73205080757,1.0],[1.0,1.73205080757]]
// poles = [{"re":-0.866025403784,"im":-0.5},{"re":-0.866025403784,"im":0.5}]
show(json!({"key": "ctrl_pid_closed_loop", "inputs": {"num": [1], "den": [1, 1], "Kp": "3", "Ki": "2"}}));
// SOLVED
// char_poly = [1.0,4.0,2.0]
// poles = [-3.41421356237,-0.585786437627]
// max_real_part = -0.585786437627
// stable = true
show(json!({"key": "ctrl_arrival_angle", "inputs": {"num": [1, 2, 2], "den": [1, 0]}}));
// SOLVED
// zero = {"re":-1.0,"im":1.0}
// arrival_deg = -135.0
show(json!({"key": "ctrl_lyapunov", "inputs": {"A": [[-1, 0], [0, -2]], "Q": [[2, 0], [0, 4]]}}));
// SOLVED
// P = [[1.0,0.0],[0.0,1.0]]
// positive_definite = true
show(json!({"key": "ctrl_state_feedback_poles", "inputs": {"A": [[0, 1], [0, 0]], "B": [0, 1], "K": [4, 4]}}));
// SOLVED
// char_poly = [1.0,4.0,4.0]
// poles = [-2.0,-2.0]
// stable = true
show(json!({"key": "ctrl_error_constants", "inputs": {"num": [10], "den": [1, 3, 2], "input": "step"}}));
// SOLVED
// system_type = 0
// K_static = 5.0
// ess = 0.166666666667
show(json!({"key": "ctrl_pade", "inputs": {"theta": "2", "n": "1"}}));
// SOLVED
// num = [-1.0,1.0]
// den = [1.0,1.0]
show(json!({"key": "ctrl_damping_from_overshoot", "inputs": {"OS": "0.2"}}));
// SOLVED
// zeta = 0.455949810769
// pole_angle_deg = 62.8739366084
Guides
- Desktop app guide: the window, every calculation, scenes and charts: PDF 路 HTML 路 Markdown
- Python guide: every calculation with a Python example: PDF 路 HTML 路 Markdown
- Command-line guide: every calculation with the command and what it printed: PDF 路 HTML 路 Markdown
Every calculation, with its formula, a worked example and its figures: Control Systems on ai999x.com. Install guides for the app and the command line: https://www.ai999x.com/desktop-cli/.
Version 1.6.4 路 License: Apache-2.0 路 Author: Ibnul Jaif Farabi 路 Organization: AI999X 路 Contact: support@ai999x.com 路 Support the project
The Future Is Self-Improving.
- Downloads last month
- 224
Evaluation results
- identical on every platform on Golden answers (686 documented questions, Windows + Linux Python 3.10-3.14)self-reported1.000













