Skip to content

pathsim/pathsim-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Control systems toolbox for PathSim

PyPI License

HomepageDocumentationGitHub


PathSim-Control extends the PathSim simulation framework with specialized blocks. All blocks follow the standard PathSim block interface and can be connected into simulation diagrams.

Blocks

Block Description Key Parameters
FirstOrderLag First-order lag / low-pass filter tau, y0

Install

pip install pathsim-control

Quick Example

from pathsim import Simulation, Connection
from pathsim.blocks import Source, Scope
from pathsim_control import FirstOrderLag

src = Source(lambda t: float(t > 1))   # unit step at t = 1
lag = FirstOrderLag(tau=2.0)           # first-order lag
sco = Scope(labels=["input", "output"])

sim = Simulation(
    blocks=[src, lag, sco],
    connections=[
        Connection(src, lag[0], sco[0]),
        Connection(lag, sco[1]),
    ],
    dt=0.01,
)
sim.run(20)
sco.plot()

Development

pip install -e ".[test]" mypy
mypy src/pathsim_control    # type check
pytest tests/ -v            # run tests

License

MIT

About

PathSim control systems toolbox

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages