control-theory

Guide control theory concepts with code examples using the ctrlsys Python library.

1|Updated Feb 1, 2026
One-click install
npx skills add https://github.com/jamestjsp/control-skills --skill control-theory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: control-theory
Source: https://github.com/jamestjsp/control-skills/tree/main/plugins/control-theory/skills
Command: npx skills add https://github.com/jamestjsp/control-skills --skill control-theory

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ctrlsys, numpy, matplotlib, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps engineers and students understand, design, and implement control systems by providing practical guidance and code examples using the ctrlsys library.

Core Features & Use Cases

  • System Analysis: Analyze LTI systems (poles, zeros, stability, frequency response).
  • Controller Design: Design controllers (LQR, pole placement) and discretization methods.
  • Simulation & Validation: Simulate system responses and validate designs.
  • Use Case: Design a discrete-time LQR controller for a robotic arm, discretize it for implementation, and simulate its step response to verify performance.

Quick Start

Use the control-theory skill to discretize a continuous-time system with a sampling period of 0.01 seconds.

Frequently Asked Questions about control-theory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design an LQR controller for a state-space model in Python?

To design an LQR controller for a state-space model, this Skill uses the `ctrlsys` library to solve the Riccati equation and calculate optimal feedback gains for your LTI systems.

How does Tustin discretization with prewarping work for continuous-time systems?

Tustin discretization with prewarping converts continuous-time state-space models to discrete-time using the `ctrlsys` library, applying frequency prewarping to maintain accuracy at critical frequencies during the transformation.

Can I analyze LTI system stability and frequency response using ctrlsys and numpy?

Yes, you can analyze LTI system stability and frequency response using `ctrlsys` and `numpy`, which provide the necessary functions to compute poles, zeros, and system frequency characteristics.

What is the best way to simulate a step response for a discrete-time robotic arm controller?

Simulating a discrete-time step response for a robotic arm controller involves using `ctrlsys` and `matplotlib` to model the state-space dynamics, apply the controller, and plot the system's time response.

Do I need numpy and matplotlib to perform control theory analysis with this Skill?

Yes, `numpy` and `matplotlib` are required dependencies alongside `ctrlsys` to support numerical computations for state-space modeling and to visualize frequency and step responses.

Why does my pole placement controller simulation show unexpected results?

Unexpected results in pole placement controller simulation often occur when LTI system matrices are incorrectly defined or when sampling periods during discretization are improperly configured for the state-space model.