cpsim.controllers package
Submodules
cpsim.controllers.LP_cvxpy module
- class cpsim.controllers.LP_cvxpy.LP(param_dict: dict)[source]
Bases:
Controller- formulate()[source]
x = | x0, x1, …, xN, u0, u1, …, u{N-1} | Aeq leq (1-D)
-I | | -x0 |Ad -I Bd | | |Ad -I Bd | | |… … | | |Ad -I Bd | | |
cpsim.controllers.LQR module
- class cpsim.controllers.LQR.LQR(A: ndarray, B: ndarray, Q: ndarray, R: ndarray)[source]
Bases:
Controller
cpsim.controllers.LQRSSE module
- class cpsim.controllers.LQRSSE.LQRSSE(A: ndarray, B: ndarray, Q: ndarray, R: ndarray)[source]
Bases:
Controller
cpsim.controllers.MPC_OSQP module
- class cpsim.controllers.MPC_OSQP.MPC(param_dict: dict)[source]
Bases:
Controller- formulate()[source]
x = | x0, x1, …, xN, u0, u1, …, u{N-1} | Aeq leq (1-D)
-I | | -x0 |Ad -I Bd | | |Ad -I Bd | | |… … | | |Ad -I Bd | | |
cpsim.controllers.MPC_cvxpy module
- class cpsim.controllers.MPC_cvxpy.MPC(param_dict: dict)[source]
Bases:
Controller- formulate()[source]
x = | x0, x1, …, xN, u0, u1, …, u{N-1} | Aeq leq (1-D)
-I | | -x0 |Ad -I Bd | | -c |Ad -I Bd | | -c |… … | | -c |Ad -I Bd | | -c |
cpsim.controllers.PID module
Ivmech PID Controller is simple implementation of a Proportional-Integral-Derivative (PID) Controller in the Python Programming Language. More information about PID Controller: http://en.wikipedia.org/wiki/PID_controller
- class cpsim.controllers.PID.PID(P=0.2, I=0.0, D=0.0, current_time=None)[source]
Bases:
ControllerPID Controller
- setKd(derivative_gain)[source]
Determines how aggressively the PID reacts to the current error with setting Derivative Gain
- setKi(integral_gain)[source]
Determines how aggressively the PID reacts to the current error with setting Integral Gain
- setKp(proportional_gain)[source]
Determines how aggressively the PID reacts to the current error with setting Proportional Gain
- setSampleTime(sample_time)[source]
PID that should be updated at a regular interval. Based on a pre-determined sampe time, the PID decides if it should compute or return immediately.
- setWindup(windup)[source]
Integral windup, also known as integrator windup or reset windup, refers to the situation in a PID feedback controller where a large change in setpoint occurs (say a positive change) and the integral terms accumulates a significant error during the rise (windup), thus overshooting and continuing to increase as this accumulated error is unwound (offset by errors in the other direction). The specific problem is the excess overshooting.
cpsim.controllers.PID_incremental module
Ivmech PID Controller is simple implementation of a Proportional-Integral-Derivative (PID) Controller in the Python Programming Language. More information about PID Controller: http://en.wikipedia.org/wiki/PID_controller
- class cpsim.controllers.PID_incremental.PID(u_0, P=0.2, I=0.0, D=0.0, current_time=None)[source]
Bases:
ControllerPID Controller
- setKd(derivative_gain)[source]
Determines how aggressively the PID reacts to the current error with setting Derivative Gain
- setKi(integral_gain)[source]
Determines how aggressively the PID reacts to the current error with setting Integral Gain
- setKp(proportional_gain)[source]
Determines how aggressively the PID reacts to the current error with setting Proportional Gain
- setSampleTime(sample_time)[source]
PID that should be updated at a regular interval. Based on a pre-determined sampe time, the PID decides if it should compute or return immediately.
- setWindup(windup)[source]
Integral windup, also known as integrator windup or reset windup, refers to the situation in a PID feedback controller where a large change in setpoint occurs (say a positive change) and the integral terms accumulates a significant error during the rise (windup), thus overshooting and continuing to increase as this accumulated error is unwound (offset by errors in the other direction). The specific problem is the excess overshooting.