Control Systems TorBox
Control Systems Torbox is a rust library for designing, analysing, simulating and implementating linear control systems.
Usage
To use this crate add control-systems-torbox
to your Cargo.toml
:
[]
= "*"
Examples
The crate contains a representation for transfer functions:
use *;
let tf_lp = new; // 10/(s + 10)
let sys = 1.0 / s;
let pi_c = 1.0 + 1.0 / s;
let openloop = sys * pi_c * tf_lp;
let tracking = openloop.clone / ;
State-Space representations is also implemented and you can convert between transfer function and state-space
use *;
use DMatrix;
let a = from_row_slice;
let b = from_row_slice;
let c = from_row_slice;
let d = from_row_slice;
let sys_ss = new.unwrap;
let sys_tf = ss2tf.unwrap;
Both Bodeplot and Nyquistplot is implemented and can be displayed natively:
use *;
let sys = * ;
let sys_clp = sys.clone / ;
let mut bode_plot = new;
bode_plot.add_system;
bode_plot.show.unwrap;
let mut nyq_plot = new;
nyq_plot.add_system;
nyq_plot.show.unwrap;