Functions | |
| def | plot_plat_sim (sim_time, sim_result, title, fig_size) |
| Th function creates an appropriately formatted system test plot. More... | |
Variables | |
| A = np.asmatrix(np.loadtxt('A.txt',delimiter=',')) | |
| State space system state matrix A. More... | |
| B = np.asmatrix(np.loadtxt('B.txt',delimiter=',')).transpose() | |
| State space system input matrix B. More... | |
| C = np.matrix() | |
| State space system state output matrix C. More... | |
| int | D = 0 |
| State space system input output matrix D. More... | |
| sys = control.StateSpace(A,B,C,D) | |
| State space system object. More... | |
| TA = np.arange(0,1,.001) | |
| Simulation A time vector. More... | |
| list | X0A = [0, 0, 0, 0] |
| Simulation A initial conditions. More... | |
| RA = control.initial_response(sys,TA,X0A) | |
| Simulation A results. More... | |
| TB = np.arange(0,0.4,.001) | |
| Simulation B time vector. More... | |
| list | X0B = [.05, 0, 0, 0] |
| Simulation b initial conditions. More... | |
| RB = control.initial_response(sys,TB,X0B) | |
| Simulation B results. More... | |
| TC = np.arange(0,0.4,.001) | |
| Simulation C time vector. More... | |
| list | X0C = [0.001619, 5*3.14159/180, 0, 0] |
| Simulation C initial conditions. More... | |
| RC = control.initial_response(sys,TC,X0C) | |
| Simulation C results. More... | |
| TD = np.arange(0,0.4,.001) | |
| Simulation D time vector. More... | |
| u0D = np.zeros((1,len(TD))) | |
| Simulation D input signal. More... | |
| list | X0D = [0, 0, 0, 0] |
| Simulation D input signal. More... | |
| RD = control.forced_response(sys,TD,u0D,X0D) | |
| Simulation D results. More... | |
| K = np.matrix() | |
| Closed loop systems gain matrix. More... | |
| A_cl = np.subtract(A,np.matmul(B,K)) | |
| Closed loop state space system state matrix. More... | |
| B_cl = np.matrix() | |
| Closed loop state space system input matrix set to zeros since the system is used as a regulator. More... | |
| sys_cl = control.StateSpace(A_cl,B_cl,C,D) | |
| Closed loop state space system object. More... | |
| TA_cl = np.arange(0,1,.001) | |
| Closed loop simulation A time vector. More... | |
| list | X0A_cl = [0, 0, 0, 0] |
| Closed loop simulation A initial conditions. More... | |
| RA_cl = control.initial_response(sys_cl,TA_cl,X0A_cl) | |
| Closed loop simulation A results. More... | |
| TB_cl = np.arange(0,20,.001) | |
| Closed loop simulation B time. More... | |
| list | X0B_cl = [.05, 0, 0, 0] |
| Closed loop simulation B initial conditions. More... | |
| RB_cl = control.initial_response(sys_cl,TB_cl,X0B_cl) | |
| Closed loop simulation B results. More... | |
| TC_cl = np.arange(0,20,.001) | |
| Closed loop simulation C time. More... | |
| list | X0C_cl = [0.001619, 5*3.14159/180, 0, 0] |
| Closed loop simulation C initial conditions. More... | |
| RC_cl = control.initial_response(sys_cl,TC_cl,X0C_cl) | |
| Closed loop simulation C results. More... | |
| def system_modeling.plot_plat_sim | ( | sim_time, | |
| sim_result, | |||
| title, | |||
| fig_size | |||
| ) |
Th function creates an appropriately formatted system test plot.
| sim_time | a vector containing the simulation time steps. |
| sim_results | a matrix with the system simulation output. |
| title | A str describing the plot. |
| fig_size | A tuple giving the width and height of the figure. |
| system_modeling.A = np.asmatrix(np.loadtxt('A.txt',delimiter=',')) |
State space system state matrix A.
| system_modeling.B = np.asmatrix(np.loadtxt('B.txt',delimiter=',')).transpose() |
State space system input matrix B.
| system_modeling.B_cl = np.matrix() |
Closed loop state space system input matrix set to zeros since the system is used as a regulator.
| system_modeling.C = np.matrix() |
State space system state output matrix C.
| int system_modeling.D = 0 |
State space system input output matrix D.
| system_modeling.K = np.matrix() |
Closed loop systems gain matrix.
Closed loop simulation A results.
Closed loop simulation B results.
Closed loop simulation C results.
| system_modeling.TA = np.arange(0,1,.001) |
Simulation A time vector.
| system_modeling.TA_cl = np.arange(0,1,.001) |
Closed loop simulation A time vector.
| system_modeling.TB = np.arange(0,0.4,.001) |
Simulation B time vector.
| system_modeling.TB_cl = np.arange(0,20,.001) |
Closed loop simulation B time.
| system_modeling.TC = np.arange(0,0.4,.001) |
Simulation C time vector.
| system_modeling.TC_cl = np.arange(0,20,.001) |
Closed loop simulation C time.
| system_modeling.TD = np.arange(0,0.4,.001) |
Simulation D time vector.
| system_modeling.u0D = np.zeros((1,len(TD))) |
Simulation D input signal.
| list system_modeling.X0A = [0, 0, 0, 0] |
Simulation A initial conditions.
| list system_modeling.X0A_cl = [0, 0, 0, 0] |
Closed loop simulation A initial conditions.
| list system_modeling.X0B = [.05, 0, 0, 0] |
Simulation b initial conditions.
| list system_modeling.X0B_cl = [.05, 0, 0, 0] |
Closed loop simulation B initial conditions.
| list system_modeling.X0C = [0.001619, 5*3.14159/180, 0, 0] |
Simulation C initial conditions.
| list system_modeling.X0C_cl = [0.001619, 5*3.14159/180, 0, 0] |
Closed loop simulation C initial conditions.
| list system_modeling.X0D = [0, 0, 0, 0] |
Simulation D input signal.